Repository navigation
feat: add OpenAI Pro reasoning mode to chat model configs - #29584
Conversation
Admins can set provider_options.openai.reasoning_mode (standard or pro) on GPT-5.6 family and GPT-6 Astra model configs. The mode is validated against the provider, model, and Responses transport when a config is written, and applied as a client-scoped SDK option because the pinned fantasy provider options do not expose reasoning.mode.
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7dbaefeaf
ℹ️ 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".
Move the reasoning mode behavior assertions from Storybook play functions into a Vitest ModelForm test and keep one assertion-free story for the screenshot. Accept gpt-daybreak-blue-latest, OpenAI's alias for gpt-5.6-sol, when the Responses transport is explicitly forced.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fccf11111
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23449e9231
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Remote UAT showed gpt-daybreak-blue-latest with reasoning_mode=pro sent
{"reasoning": {"mode": "pro"}} without the configured effort and summary
and kept sending temperature, because the SDK does not know the alias as
a reasoning model. Force the classification when a mode is configured
and no explicit reasoning_model override exists, and reject a mode on a
config that forces plain sampling.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Address the coder-frontend-review findings on the reasoning mode form support so the frontend no longer hand-mirrors backend model knowledge. The supported-model regex now lives once in codersdk as ChatModelReasoningModeModels; chatopenai.ValidateReasoningMode compiles nothing of its own and scripts/modeloptionsgen attaches the pattern to the openai reasoning_mode field as supported_models. The field also carries providers:"openai" so its provider scope is schema data, and the generator now validates providers tags on provider-group fields too. isFieldApplicableToModel replaces isReasoningModeSupported: it reads visible_for_providers and supported_models from the field schema and keeps only the Responses API, reasoning model, and daybreak alias rules as a single reasoning_mode dispatch, so ModelConfigFields and buildModelConfigFromForm share one gate without a field-name literal in either. buildModelConfigFromForm takes the model as a required argument. Also: the ModelForm test imports the UserEvent type and asserts the select disappears for an unsupported model, the story comment and JSDoc are trimmed, and the field description uses the Responses API term.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 554c90d5fd
ℹ️ 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".
…resence assertions from ModelForm test FE1 reserves rendered presence for Storybook screenshots; the unsupported model state is already captured by the ProviderConfigOpenAI story, and the onUpdateModel payload assertion covers the dropped mode.
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Model-ID gating meant a newly released model that supports Pro needed a code change before admins could use it. Drop the supported-model regex from codersdk, the generated field schema, validation, and the form logic. The field now offers only "pro" (standard is the default and would fail the same way on an unsupported model); its description says Pro is supported from the GPT-5.6 Sol generation and that requests fail on models without it. A configured mode implies the Responses API and reasoning-model treatment when the overrides are unset, so an alias the SDK does not know still works. Validation rejects only non-pro values, non-OpenAI providers, and explicit overrides that contradict the mode. The frontend now honors visible_for_providers for provider fields as it already did for general fields, so the OpenAI-scoped select does not render or serialize for Azure.
… test Edit the GPT-5 fixture that matches the selected provider state so the form is dirtied by the Pro selection alone, type the update mock like the sibling story, drop the unused route, inline the saved-Pro model on the shared fixture instead of a dedicated one, and add an Azure story so the field group without reasoning_mode is captured.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e06bfbe429
ℹ️ 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".
… when saving a model fails The save toast showed only "Invalid model config." so an admin who combined Pro with Use Responses API or Reasoning Model at Off had no way to tell which field to change. Pass the API detail as the toast description, as other pages already do.
Documentation CheckUpdates Needed
Automated review via Coder Agents |
Adds
provider_options.openai.reasoning_mode(pro) to chat model configs so admins can turn on OpenAI's Pro reasoning mode for a model, alongside the other OpenAI request options on the model form such asservice_tier. The field is offered for any model on an OpenAI provider; the field description says Pro is supported from the GPT-5.6 Sol generation and that requests fail when Pro is set on a model that does not support it. There is deliberately no supported-model list anywhere: a newly released model that supports Pro works with no code change, and OpenAI rejects the request when the model does not. Validation rejects only values other thanpro, non-OpenAI providers, and configs that explicitly force plain sampling (reasoning_model=false) or Chat Completions (use_responses_api=false), including partial updates that move a configured model onto such a provider or transport.A configured mode implies the Responses API and reasoning-model treatment when
openai_configleaves those unset (chatprovider.effectiveOpenAIConfig), so an alias the pinned SDK has never seen, such asgpt-daybreak-blue-latest, still getseffortandsummaryand dropstemperature. The same effective config feeds the client options and the recorded transport, so the two cannot disagree.The pinned fantasy OpenAI provider options do not carry
reasoning.mode, so the mode is applied as a client-scopedopenai-gorequest option when the model client is built rather than per call. The SDK merges pre-serializationWithJSONSetoverlays by top-level key, so the key is escaped (reasoning\.mode) to addmodeto the existingreasoningobject instead of replacingeffortandsummary.TestResolveModelCallReasoningModeWirepins the resulting request body for streaming and non-streaming calls and checks that the fixed computer-use model does not inherit the mode; AI Gateway forwarding of thereasoningobject is covered inaibridge. Because the option is bound to the model client, every call made through a Pro model config carries it, including title generation and quick generation when those fall back to the chat's model; deployments that want cheaper auxiliary calls should point the title generation override at another model.Frontend: the field renders through the existing schema-driven provider options with no hand-written field logic. Two generic changes:
visible_for_providersis now honored for provider fields the way it already was for general fields (render and payload), so the OpenAI-scoped select does not appear or serialize for Azure, which shares the OpenAI field group; and the add/update model save toasts now carry the server's error detail, so a rejected combination such as Pro with Use Responses API at Off tells the admin which field to change.Docs:
docs/ai-coder/agents/models.mdgains a Reasoning Mode row in the OpenAI provider-specific options table (from the documentation check comment #29584 (comment)), and its Azure note now says Azure OpenAI lacks that one option.Not changed:
coderd/x/chatd/ARCHITECTURE.md. Its OpenAI transport selection table needs areasoning_moderow (client-applied, neither transport) to matchTestProviderOptionsTransportParity; left for the human author.Delivery record
Local validation on every pushed head: targeted Go tests (chatopenai, chatprovider, chatd wire test, aibridge integration test, coderd DB tests for persistence, invalid input, and partial updates), red/green on the wire test (injection removed, and unescaped key), Vitest (
modelConfigFormLogic,ModelForm), Storybook tests forModelFormProviderConfig, biome, tsc, oxlint, golangci-lint on touched packages, pre-commit hook.Codex round 1 on
e7dbaefeafc: 3 findings (Storybook assertions, ARCHITECTURE.md TODO,gpt-daybreak-blue-latestalias). Disposition: assertions moved to Vitest and alias accepted in8fccf111111; ARCHITECTURE.md left untouched by author instruction. Threads replied to and resolved.Codex round 2 on
8fccf111111: 1 finding (fixture naming, FE9), renamed in23449e92317. Round 3 on23449e92317: 1 finding (fixture location, FE9), moved totestHelpers/chatModels.tsinc3bd5aa370f. Round 4 onc3bd5aa370f: "Didn't find any major issues" (feat: add OpenAI Pro reasoning mode to chat model configs #29584 (comment)). All threads resolved.Remote UAT round 1 (chat https://dogfood.cdr.dev/agents/f5ed1d16-be1d-4d39-952b-126a6a829ef1) exercised
e7dbaefeafc: endorsed PASS. Realgpt-5.6-solturns showed"mode": "pro"/"standard"/ no key in the Debug tab with effort and summary intact; 14 POST and 6 PATCH rejections captured; UI select visibility, persistence, reload, and clearing verified. Low, non-blocking notes: thegpt-5.6alias revert in the model identifier field is pre-existing; Pro is dropped silently when a model or transport change makes it unsupported; Pro applies to auxiliary calls (see above).Remote UAT round 2 on
c3bd5aa370f(same chat, alias and core re-verify): core PASS, alias FAIL. Withgpt-daybreak-blue-latestthe request carried{"mode": "pro"}without the configured effort and summary and kept sendingtemperature(provider 400 then retry on quick generation and title calls), because the SDK does not classify the alias as a reasoning model. Fixed ind4c338de767: a configured mode now implies a reasoning model unlessopenai_config.reasoning_modelis set, and a mode on a config that forces plain sampling is rejected. Alias UI/API behavior, rejections, and known-model Pro/Default turns all passed onc3bd5aa370f.Codex round 5 on
d4c338de767: "Didn't find any major issues" (feat: add OpenAI Pro reasoning mode to chat model configs #29584 (comment)). Zero unresolved threads. CI green ond4c338de767.Remote UAT round 3 on
d4c338de767(same chat): endorsed PASS. Alias runs are single-attempt 200s with{"effort", "summary", "mode": "pro"}and notemperature(quick generation and title calls no longer retry);reasoning_model=falseplus a mode is rejected by POST and PATCH with the stored config unchanged; the Reasoning Model override at Off hides the select and drops the mode on save;gpt-5.6-solPro turn unchanged. Remaining low notes, none introduced here: rejection detail for a non-OpenAI provider names the model rather than the provider; Pro is dropped silently when an override makes it unsupported;PATCH model_configreplaces the whole object (pre-existing on main).coder-frontend-review on
d4c338de767(8 role reviewers, 3 passes): 13 failing checkpoints, chiefly a TS mirror of the Go model regex, thejson_name === "reasoning_mode"gate duplicated in the render filter and payload builder, a defaultedmodelparameter, and comment and type nits. Fixed in554c90d5fd9: the pattern and provider scope are generated onto the field schema, one predicate is shared by both call sites,buildModelConfigFromForm(provider, model, form)requires the model, and the ModelForm test also asserts the select disappears for an unsupported model. Red/green: strippingsupported_modelsorvisible_for_providersfrom the generated schema fails 21 and 1 Vitest cases respectively. Declined with rationale: RO4 (move the fixture toModelsPage/testFixtures.ts; FE9 inFRONTEND_PATTERNS.mdnamestestHelpers/chatModels.ts, and Codex round 3 required it) and a DF5 nit to gate on the committed identifier and warn when a saved mode is dropped (behavior change, separate follow-up). Final pass: all checkpoints PASS or N/A.Remote UAT round 4 on
554c90d5fd9(same chat, focused regression after the frontend-review refactor): endorsed PASS. All six claims held (Pro round trip with effort and tier intact; unsupported identifiers hide the select and a save drops the stale mode while keeping the other options; Azure never shows or saves it; the alias shows it only with the Responses override On; Reasoning Model Off hides it and drops it; three realgpt-5.6-solPro turns were single-attempt 200s with{"effort","summary","mode":"pro"}and notemperature). Probes aimed at the refactor also passed:gpt-5X6-solis rejected (dot escaping survived the JSON round trip), whitespace-padded identifiers still match, the other 11 OpenAI fields and the Anthropic section still render. Remaining low notes are carried over from round 3 plus one naming note ("Reasoning Mode" versus "Reasoning Model"). The final headabb58df77d8differs from554c90d5fd9only inModelForm.test.tsx, so it ships the same production code.Codex round 6 on
554c90d5fd9: 1 finding (feat: add OpenAI Pro reasoning mode to chat model configs #29584 (review)): the twotoBeInTheDocumentassertions added in the frontend-review round violate FE1. Confirmed againstsite/AGENTS.md; removed inabb58df77d8(test-only, 7 deletions; the payload assertion keeps the behavior coverage and theProviderConfigOpenAIstory captures the hidden state). Thread replied to and resolved.Codex round 7 on
abb58df77d8: "Didn't find any major issues" (feat: add OpenAI Pro reasoning mode to chat model configs #29584 (comment)). Zero unresolved threads. CI green onabb58df77d8(23 success, 8 skipped,requiredpass).Design change on
e99152e5c57(owner direction: no model gating; "none or pro" for any model; tooltip states the GPT-5.6 Sol constraint and that requests fail on unsupported models). Removedcodersdk.ChatModelReasoningModeModels, the generatedsupported_models,isFieldApplicableToModel, thegpt-daybreak-blue-latestspecial case, and thestandardenum value;ValidateReasoningMode(provider, config)no longer takes the model;effectiveOpenAIConfigmakes a mode imply Responses and reasoning-model treatment. PR footprint went from +1130/-22 to +769/-18. Local validation:go testfor chatopenai, chatprovider, chatd wire test, and the coderd API tests (persistence now coversgpt-5.6-sol,gpt-4o,gpt-daybreak-blue-latest,gpt-7-nova; invalid input now rejectsstandard), golangci-lint on touched packages, Vitest (187 tests acrossmodules/aiModelsandModelsPage), biome, tsc, pre-commit hook.coder-frontend-review on
e99152e5c57(8 roles, 1 pass plus a TS and CD confirmation pass): 9 failing checkpoints (SD4, CD1, CD3, CD4, TS3, TS7 x2, RO3, RO5, TN4, DF5). Fixed ine06bfbe4299: the ModelForm test editsmockGPT5so its provider matches the selected provider state, types the update mock like the sibling story, and drops an unused route; the story spreadsmockGPT5with a saved mode instead of a dedicated shared fixture (MockGPT56Proremoved,testHelpers/chatModels.tsback to base); aProviderConfigAzurestory captures the panel withoutreasoning_mode; comment nits. Left as a nit with justification: RO3 (the one-line!hidden && isFieldVisibleForProviderpredicate now appears in bothgetVisibleProviderFieldsandgetVisibleGeneralFields; hoisting a helper for two call sites is not worth it). Confirmation pass: TS all PASS; CD flagged one wording nit, fixed before commit.CI green on
e06bfbe4299(23 success, 8 skipped,requiredpass).Codex round 8 on
e06bfbe4299: 1 P2 finding (feat: add OpenAI Pro reasoning mode to chat model configs #29584 (comment)): the form still offers Pro with Use Responses API or Reasoning Model at Off, a combination the server rejects, and the failure was not actionable. Disposition: the select stays visible by owner direction (no client-side gating of this field beyond the provider scope; an explicit rejection is preferred over the earlier silent drop), ande2b43c3aee7makes the add/update save toasts show the server detail so the admin sees which field to change. Thread replied to and resolved; zero unresolved threads.Remote UAT round 5 on
e06bfbe4299(same chat): endorsed PASS with two UI issues to land before release. All seven probes passed: the select offers only Default and Pro forgpt-5.6-solandgpt-4owith the tooltip text verbatim; Pro saves ongpt-4oand the real turn fails visibly with the provider's "reasoning.mode is not supported with this model" after a single 400 attempt, and works again once Pro is cleared;gpt-daybreak-blue-latestwith Pro and no overrides is a single 200 to/v1/responseswith{effort, summary, mode: "pro"}and notemperature; thegpt-5.6-solPro turn is unchanged; POST and PATCH rejectstandard,PRO, empty, Responses Off, Reasoning Model Off, and Azure, openai-compat, and Anthropic providers with the stored config unchanged, while a model-only PATCH togpt-4onow succeeds; the Azure form shows no Reasoning Mode; the alias with an explicit Responses override still works. Reservations: (1) medium, the UI conflict path only showed "Invalid model config." without the detail (fixed ine2b43c3aee7, not yet UAT-exercised); (2) low-medium, a dev-DB row still holdingstandardfrom round 2 renders an empty red select whose message is the whole field description plus "has an invalid value." and blocks saving unrelated fields (pre-existing generic behavior ofyupTestForFieldusing the description as the label; no released data can holdstandard, so no migration); (3) low, no hint next to older identifiers (documented design); (4) low, a chat on such a stored row fails with a generic headline (pre-existing).Final head
e2b43c3aee7differs frome06bfbe4299only in the two save-toast handlers (AddModelPage.tsx,UpdateModelPage.tsx, 8 insertions). CI is green one2b43c3aee7(skipped=8, success=23,requiredsuccess). Codex has not run one2b43c3aee7.Remote UAT round 6 on
e2b43c3aee7(same chat, https://dogfood.cdr.dev/agents/f5ed1d16-be1d-4d39-952b-126a6a829ef1, settled 2026-09-20T19:02Z): endorsed PASS on the exact final head. Build proven by/api/v2/buildinfo(v2.37.2-devel+e2b43c3aee,external_urlat the full SHA) and the UI badge. The round 5 toast issue is resolved: Add and Update saves with Pro plus Use Responses API Off or Reasoning Model Off show "Invalid model config." with the server detail as the description, one 400 each, nothing stored. Compact regression of every round 5 probe held (dropdown and tooltip; Pro ongpt-4ofails visibly with the provider'sreasoning.mode is not supported with this modeland works after clearing; alias with and without the Responses override andgpt-5.6-solall send{effort, summary, mode: "pro"}with notemperaturein a single 200; POST and PATCH rejection matrices with stored config unchanged; Azure form without the field). Legacystandardrow: fails closed on chat, and re-picking Pro or Default saves. Remaining notes, none blocking: the malformed validation copy for an invalid stored enum (pre-existingyupTestForFieldlabel choice, dev-DB rows only), Pro offered for models that cannot accept it (documented design), and a pre-existingquickgenstatus quirk ongpt-4ounrelated to this field. Secret scan clean.Final head
4f3c6106dfeadds one docs-only commit on top ofe2b43c3aee7(docs/ai-coder/agents/models.md, 9 insertions, 8 deletions, no code). Remote UAT round 6 exercisede2b43c3aee7; the docs commit is not UAT-relevant. Validated withmarkdown-table-formatter,markdownlint-cli2, and the pre-commit hook (fmt/markdown,lint/markdown,lint/emdash,lint/typos). CI is green on4f3c6106dfe(success=24, skipped=7,requiredsuccess) and the documentation check re-run marked its item addressed (feat: add OpenAI Pro reasoning mode to chat model configs #29584 (comment)).Review tally for this PR: Codex 8 completed rounds; coder-frontend-review 34 role passes (24 on
d4c338de767, 10 one99152e5c57); remote UAT 5 rounds; no human review yet. This is far past the six-review guardrail, so no further Codex or agent review has been requested. Whether to spend another Codex pass one2b43c3aee7is an owner decision; human review is still required before merge.