Skip to content

fix(llm): treat GPT-6 as an OpenAI reasoning model - #1131

Draft
sosidudku1 wants to merge 2 commits into
mainfrom
fix/gpt6-reasoning-params
Draft

sosidudku1 wants to merge 2 commits into
mainfrom
fix/gpt6-reasoning-params

Conversation

@sosidudku1

Copy link
Copy Markdown
Collaborator

What

model-params.ts recognised OpenAI's reasoning models as o1…o9 and gpt-5 only. GPT-6 ids (gpt-6.1-sol, gpt-6.2-sol, gpt-6-terra, gpt-6-astra, with or without the openai/ prefix) fell through to the default body: temperature: 0.2 and max_tokens, the two fields this family refuses on a direct OpenAI key. The rule now covers every GPT generation from 5 on, so these ids get no temperature and max_completion_tokens. GPT-4.x is unchanged.

Why

A direct OpenAI key with a GPT-6 model would get a 400 on the first turn, the same failure the file documents for gpt-5. Linear: ATO-1339.

Out of scope: whether some GPT-6 models need the Responses API for tool calls. The agent only speaks /chat/completions; that needs a real key to confirm and would be its own change.

How it was verified

  • model-params.test.ts: GPT-6 ids added to the reasoning-model cases, gpt-4.1-mini to the free cases.
  • Not run yet, and not tried against a real OpenAI key.

Not yet checked on the second Mac.

The reasoning rule only knew o1-o9 and gpt-5, so gpt-6 ids (Sol, Terra,
Luna, Astra) went out with temperature and max_tokens, the two fields
OpenAI's reasoning models refuse. Every GPT generation from 5 on now gets
no temperature and max_completion_tokens.
The two-digit branch of the generation match also caught gpt-35-turbo,
which takes temperature and max_tokens. The generation is one digit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant