mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 11:04:35 +00:00
feat: add xhigh thinking level support for gpt-5.2 models
- Add supportsXhigh() function to ai package for checking xhigh support - Clamp xhigh to high for OpenAI models that don't support it - Update coding-agent to use centralized supportsXhigh() - gpt-5.2, gpt-5.2-codex now show xhigh in thinking selector Closes #236
This commit is contained in:
parent
4f981d8ebc
commit
7e38897673
5 changed files with 24 additions and 8 deletions
|
|
@ -43,3 +43,14 @@ export function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage
|
|||
usage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;
|
||||
return usage.cost;
|
||||
}
|
||||
|
||||
/** Models that support xhigh thinking level */
|
||||
const XHIGH_MODELS = new Set(["gpt-5.1-codex-max", "gpt-5.2", "gpt-5.2-codex"]);
|
||||
|
||||
/**
|
||||
* Check if a model supports xhigh thinking level.
|
||||
* Currently only certain OpenAI models support this.
|
||||
*/
|
||||
export function supportsXhigh<TApi extends Api>(model: Model<TApi>): boolean {
|
||||
return XHIGH_MODELS.has(model.id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue