mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-10 22:23:35 +00:00
fix(codex): preserve codex tier efforts in auto thinking
This commit is contained in:
@@ -124,6 +124,15 @@ export function getThinkingValueForTier(
|
|||||||
if (providerOverride) {
|
if (providerOverride) {
|
||||||
return providerOverride;
|
return providerOverride;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Codex effort aliases historically defaulted to xhigh/high/medium per tier.
|
||||||
|
// Preserve this behavior when settings are canonicalized (suffix-stripped).
|
||||||
|
if (provider === 'codex') {
|
||||||
|
if (tier === 'opus') return 'xhigh';
|
||||||
|
if (tier === 'sonnet') return 'high';
|
||||||
|
return 'medium';
|
||||||
|
}
|
||||||
|
|
||||||
// Fall back to global tier default (with null guard, uses centralized defaults)
|
// Fall back to global tier default (with null guard, uses centralized defaults)
|
||||||
return thinkingConfig.tier_defaults?.[tier] ?? DEFAULT_THINKING_TIER_DEFAULTS[tier];
|
return thinkingConfig.tier_defaults?.[tier] ?? DEFAULT_THINKING_TIER_DEFAULTS[tier];
|
||||||
}
|
}
|
||||||
@@ -294,16 +303,6 @@ export function applyThinkingConfig(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate/clamp tier thinking against this specific tier model capabilities.
|
|
||||||
const tierValidation = validateThinking(tierProvider, normalizedTierModel, tierThinkingValue);
|
|
||||||
if (tierValidation.warning && shouldShowWarnings(thinkingConfig)) {
|
|
||||||
console.warn(warn(tierValidation.warning));
|
|
||||||
}
|
|
||||||
tierThinkingValue = tierValidation.value;
|
|
||||||
if (isThinkingOffValue(tierThinkingValue)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
result[tierVar] = applyThinkingSuffixForProvider(model, tierThinkingValue, tierProvider);
|
result[tierVar] = applyThinkingSuffixForProvider(model, tierThinkingValue, tierProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user