Skip to content

feat: add GPT-6.2 Astra and GPT-6.2 Sol to Agents and AI Gateway - #32370

Merged
ethanndickson merged 3 commits into
mainfrom
ethan/openai-reasoning-effort-floor
Nov 18, 2026
Merged

ethanndickson merged 3 commits into
mainfrom
ethan/openai-reasoning-effort-floor

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes CODAGT-1608

This adds gpt-6.2-astra and gpt-6.2-sol to the Agents known models catalog, so they're suggested when an admin adds a chat model, and regenerates the AI Gateway price book from models.dev so the gateway can price them.

Model Input Output Cache read Cache write
GPT-6.2 Astra $8 $40 $0.40 $10
GPT-6.2 Sol $2 $10 $0.10 $2.50

Prices are per 1M tokens, and both models have a 1,050,000 token context window and 128,000 max output tokens. They're in the catalog for OpenAI (with a suggested effort of medium, same as gpt-6-astra and gpt-6.1-sol), OpenRouter and Vercel. models.dev doesn't list them on Azure or Bedrock yet, so I've left those out for now.

Both models also reject the none and minimal reasoning efforts. A model config only sets a default and a maximum effort, so the picker always offers both, and picking either one fails the turn:

Unsupported value: 'none' is not supported with the 'gpt-6.2-astra' model. Supported values are: 'low', 'medium', 'high', 'xhigh', and 'max'.

We already send low instead for gpt-6-astra and gpt-6.1-sol, so to fix, we'll just do the same for the two new models. All four now live in one list of model ID prefixes, rather than a helper each. I checked this against the real models: all four return a 400 like the one above for none and minimal, and accept low. gpt-6-sol and gpt-6.1-terra still accept none, so they're left alone.

Regenerating the price book also brings in everything else models.dev changed since the last weekly refresh, mostly on OpenRouter and Vercel: 22 other new entries (4 of them -pro and -fast variants of these two), 29 it dropped and 51 price changes. 6 existing catalog entries get new prices or limits the same way.

…or GPT-6.2 models

GPT-6.2 Astra and GPT-6.2 Sol reject the none and minimal reasoning
efforts with HTTP 400, as GPT-6 Astra and GPT-6.1 Sol do. One prefix
list in chatprovider now names all four models and replaces the two
exported chatopenai helpers.
@linear-code

linear-code Bot commented Nov 18, 2026

Copy link
Copy Markdown

CODAGT-1608

Comment on lines +138 to +143
var openAILowFloorPrefixes = []string{
"gpt-6-astra",
"gpt-6.1-sol",
"gpt-6.2-astra",
"gpt-6.2-sol",
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should handle this in the follow-up, CODAGT-1609, rather than add to this list every time a new model rejects these efforts.


During generation preparation, the effective effort is resolved as the chat's `last_reasoning_effort` if set, else the config's `default`; clamped to the config's `max` on the global scale `none < minimal < low < medium < high < xhigh < max`; and passed through to the provider. The provider verifies whether the configured value is valid for that model at runtime. If the model config has no `reasoning_effort`, any user-selected value is ignored. The resolved value is injected into the provider-native options by `chatprovider.ProviderOptionsForCall`, which converts the model config and applies the effort in one step. For Anthropic, the fantasy provider converts effort into enabled budget thinking on models older than Claude 4.6, which reject adaptive thinking.

`applyReasoningEffort` clamps `none` and `minimal` to `low` for GPT-6 Astra and its dated snapshots (`chatopenai.IsGPT6Astra`, a case-insensitive prefix match on `gpt-6-astra`), because that model rejects `none` with HTTP 400 and lists no `minimal` effort.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this belongs in ARCHITECTURE.md at all, so I've deleted it rather than extend it to the new models. It's a per-model detail, and the comment on the list in reasoningeffort.go already covers it.

Add both models to the Agents known models catalog for openai,
openrouter, and vercel, and regenerate the AI Gateway price book from
models.dev.
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T07:08:23.432499Z 1a823d2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 6a844eaf7c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ethanndickson ethanndickson changed the title fix(coderd/x/chatd): clamp none and minimal reasoning effort to low for GPT-6.2 models feat: add GPT-6.2 Astra and GPT-6.2 Sol to Agents and AI Gateway Nov 18, 2026
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a823d22a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

The earlier finding "Route the new GPT-6.2 models through Responses" did not reproduce, so the head is unchanged. In the pinned SDK, fantasyopenai.IsResponsesModel matches every gpt-4 and later generation by pattern (responsesGenerationPattern) as well as its static list, so chatopenai.TransportFor("openai", id, nil) already returns TransportResponses for gpt-6.2-astra and gpt-6.2-sol. A throwaway test with both IDs passes on this head, and the existing gpt-6-astra rows in TestTransportFor cover the same rule.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 1a823d22a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ssncferreira ssncferreira left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from AI Gateway and price book side 👍

@ethanndickson
ethanndickson merged commit feea5ab into main Nov 18, 2026
35 checks passed
@ethanndickson
ethanndickson deleted the ethan/openai-reasoning-effort-floor branch November 18, 2026 13:33
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 18, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
main — 1a823d22 Deployed Nov 18, 2026 by ethanndickson via cla #259468
docs-preview — 1a823d22 Deployed Nov 18, 2026 by ethanndickson via cleanup #206
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants