fix(ai): support xhigh for Codex GPT-5.5

This commit is contained in:
Mario Zechner
2026-04-23 22:49:09 +02:00
parent 8700ac1f0e
commit bf4aa3a601
7 changed files with 80 additions and 12 deletions

View File

@@ -49,11 +49,16 @@ export function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage
* Check if a model supports xhigh thinking level.
*
* Supported today:
* - GPT-5.2 / GPT-5.3 / GPT-5.4 model families
* - GPT-5.2 / GPT-5.3 / GPT-5.4 / GPT-5.5 model families
* - Opus 4.6+ models (xhigh maps to adaptive effort "max" on Anthropic-compatible providers)
*/
export function supportsXhigh<TApi extends Api>(model: Model<TApi>): boolean {
if (model.id.includes("gpt-5.2") || model.id.includes("gpt-5.3") || model.id.includes("gpt-5.4")) {
if (
model.id.includes("gpt-5.2") ||
model.id.includes("gpt-5.3") ||
model.id.includes("gpt-5.4") ||
model.id.includes("gpt-5.5")
) {
return true;
}