mirror of https://github.com/openclaw/openclaw.git
refactor: reuse shared model prefix helper in thinking
This commit is contained in:
parent
7da92cc618
commit
13316a9118
|
|
@ -1,3 +1,5 @@
|
|||
import { matchesExactOrPrefix } from "../plugins/provider-model-helpers.js";
|
||||
|
||||
export type ThinkLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "adaptive";
|
||||
export type VerboseLevel = "off" | "on" | "full";
|
||||
export type NoticeLevel = "off" | "on" | "full";
|
||||
|
|
@ -29,10 +31,6 @@ const OPENAI_CODEX_XHIGH_MODEL_IDS = [
|
|||
] as const;
|
||||
const GITHUB_COPILOT_XHIGH_MODEL_IDS = ["gpt-5.2", "gpt-5.2-codex"] as const;
|
||||
|
||||
function matchesExactOrPrefix(modelId: string, ids: readonly string[]): boolean {
|
||||
return ids.some((candidate) => modelId === candidate || modelId.startsWith(`${candidate}-`));
|
||||
}
|
||||
|
||||
export function normalizeProviderId(provider?: string | null): string {
|
||||
if (!provider) {
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue