fix(ai): enable xhigh for anthropic opus 4.6
This commit is contained in:
@@ -47,10 +47,21 @@ export function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage
|
||||
|
||||
/**
|
||||
* Check if a model supports xhigh thinking level.
|
||||
* Currently only certain OpenAI Codex models support this.
|
||||
*
|
||||
* Supported today:
|
||||
* - GPT-5.2 / GPT-5.3 model families
|
||||
* - Anthropic Messages API Opus 4.6 models (xhigh maps to adaptive effort "max")
|
||||
*/
|
||||
export function supportsXhigh<TApi extends Api>(model: Model<TApi>): boolean {
|
||||
return model.id.includes("gpt-5.2") || model.id.includes("gpt-5.3");
|
||||
if (model.id.includes("gpt-5.2") || model.id.includes("gpt-5.3")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (model.api === "anthropic-messages") {
|
||||
return model.id.includes("opus-4-6") || model.id.includes("opus-4.6");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user