fix(cliproxy): preserve adaptive thinking on opus 4.7 paths

This commit is contained in:
Tam Nhu Tran committed 2026-04-22 21:43:11 -04:00
1 parent 45fe7ab086
commit 71deda553a
11 files changed
+159 -9

No files matched your search

@@ -396,7 +396,7 @@ function mapThinkingToReasoning(
};
}
const VALID_EFFORT_LEVELS = new Set(['low', 'medium', 'high', 'max']);
const VALID_EFFORT_LEVELS = new Set(['low', 'medium', 'high', 'xhigh', 'max']);
function resolveOutputConfigEffort(
outputConfig: AnthropicOutputConfig | undefined
@@ -416,7 +416,7 @@ function resolveOutputConfigEffort(
* for Codex; for generic OpenAI-compat providers we clamp to high.
*/
function toOpenAIEffort(effort: string): string {
return effort === 'max' ? 'high' : effort;
return effort === 'max' || effort === 'xhigh' ? 'high' : effort;
}
function transformMessages(messagesValue: unknown): OpenAIMessage[] {