fix: clean up Codex thinking level handling

- Remove per-thinking-level model variants (gpt-5.2-codex-high, etc.)
- Remove thinkingLevels from Model type
- Provider clamps reasoning effort internally
- Omit reasoning field when thinking is off

fixes #472
This commit is contained in:
Mario Zechner 2026-01-05 21:58:26 +01:00
parent 02b72b49d5
commit 0b9e3ada0c
11 changed files with 45 additions and 148 deletions

View file

@ -102,18 +102,6 @@ export interface ParsedModelResult {
warning: string | undefined;
}
const THINKING_SUFFIXES = ["-none", "-minimal", "-low", "-medium", "-high", "-xhigh"];
function stripThinkingSuffix(pattern: string): string {
const normalized = pattern.toLowerCase();
for (const suffix of THINKING_SUFFIXES) {
if (normalized.endsWith(suffix)) {
return pattern.slice(0, pattern.length - suffix.length);
}
}
return pattern;
}
/**
* Parse a pattern to extract model and thinking level.
* Handles models with colons in their IDs (e.g., OpenRouter's :exacto suffix).
@ -134,14 +122,6 @@ export function parseModelPattern(pattern: string, availableModels: Model<Api>[]
return { model: exactMatch, thinkingLevel: "off", warning: undefined };
}
const normalizedPattern = stripThinkingSuffix(pattern);
if (normalizedPattern !== pattern) {
const normalizedMatch = tryMatchModel(normalizedPattern, availableModels);
if (normalizedMatch) {
return { model: normalizedMatch, thinkingLevel: "off", warning: undefined };
}
}
// No match - try splitting on last colon if present
const lastColonIndex = pattern.lastIndexOf(":");
if (lastColonIndex === -1) {