mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 08:00:59 +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
|
|
@ -1,4 +1,5 @@
|
|||
import { ThinkingLevel } from "@google/genai";
|
||||
import { supportsXhigh } from "./models.js";
|
||||
import { type AnthropicOptions, streamAnthropic } from "./providers/anthropic.js";
|
||||
import { type GoogleOptions, streamGoogle } from "./providers/google.js";
|
||||
import { type OpenAICompletionsOptions, streamOpenAICompletions } from "./providers/openai-completions.js";
|
||||
|
|
@ -155,13 +156,13 @@ function mapOptionsForApi<TApi extends Api>(
|
|||
case "openai-completions":
|
||||
return {
|
||||
...base,
|
||||
reasoningEffort: options?.reasoning,
|
||||
reasoningEffort: supportsXhigh(model) ? options?.reasoning : clampReasoning(options?.reasoning),
|
||||
} satisfies OpenAICompletionsOptions;
|
||||
|
||||
case "openai-responses":
|
||||
return {
|
||||
...base,
|
||||
reasoningEffort: options?.reasoning,
|
||||
reasoningEffort: supportsXhigh(model) ? options?.reasoning : clampReasoning(options?.reasoning),
|
||||
} satisfies OpenAIResponsesOptions;
|
||||
|
||||
case "google-generative-ai": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue