Skip to content

feat(internal/provider): accept OpenAI reasoning_mode in coderd_agents_model model_config - #444

Merged
ethanndickson merged 2 commits into
mainfrom
mike/agents-model-reasoning-mode
Sep 22, 2026
Merged

ethanndickson merged 2 commits into
mainfrom
mike/agents-model-reasoning-mode

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Coder now supports OpenAI's Pro reasoning mode for chat models (coder/coder#29584): provider_options.openai.reasoning_mode = "pro" in the model config, for models from the GPT-5.6 Sol generation onward, including GPT-6 Astra.

Problem

coderd_agents_model.model_config is validated against the provider's pinned codersdk.ChatModelCallConfig at plan time (#388), so with the current github.com/coder/coder/v2 v2.37.1 pin any config that sets the new field fails before it is ever sent to Coder:

Error: Unrecognized model_config settings

model_config contains a setting that is not part of the Coder chat model config schema this provider was built against, so it would be silently dropped before reaching Coder: provider_options.openai.reasoning_mode. If the setting is valid for your Coder deployment, upgrade the provider to a version built against your Coder release; otherwise remove it or fix the field name.

Fix

No field-specific tests or examples are added for reasoning_mode; the existing validator and canonicalization tests cover the mechanism, matching how earlier dependency-bump fields were handled (review feedback, 0293fa2).

Compatibility

Using reasoning_mode requires a Coder release that includes coder/coder#29584 (newer than 2.37); Coder validates the value server-side and OpenAI rejects it for models without Pro. integration/agents-model-test is intentionally left unchanged because the integration harness pulls ghcr.io/coder/coder:latest, which does not yet echo the field back.

Xum opened this PR on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T16:55:10.971009Z 0bf4052 PR opened
ℹ️ 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.

Comment thread docs/resources/agents_model.md Resolved
ibetitsmike added a commit that referenced this pull request Sep 22, 2026
Review feedback on #444: the codersdk bump alone makes reasoning_mode
accepted, and other fields gained via dependency bumps did not get
field-specific tests or examples.
…s_model model_config

The provider validates model_config against its pinned coder/coder SDK and
rejects unrecognized settings at plan time, so provider_options.openai.reasoning_mode
(coder/coder#29584, OpenAI Pro reasoning for GPT-5.6 Sol and later, including GPT-6
Astra) failed with "Unrecognized model_config settings" on the v2.37.1 pin.

Bump github.com/coder/coder/v2 to main a970c6c92e46
(v2.34.0-rc.0.0.20260921160322-a970c6c92e46). The model_config schema change is
additive (reasoning_mode, openai_config.reasoning_model); no existing key is removed.
Test helpers move to the renamed codersdk.CreateUserRequest with OrganizationIDs.

The example and generated docs gain an OpenAI provider with a GPT-6 Astra model
that sets reasoning_mode = "pro".
Review feedback on #444: the codersdk bump alone makes reasoning_mode
accepted, and other fields gained via dependency bumps did not get
field-specific tests or examples.
@ethanndickson
ethanndickson force-pushed the mike/agents-model-reasoning-mode branch from 0293fa2 to 13e68e1 Compare September 22, 2026 05:58
@ethanndickson
ethanndickson merged commit d8bddc3 into main Sep 22, 2026
13 checks passed
@ethanndickson
ethanndickson deleted the mike/agents-model-reasoning-mode branch September 22, 2026 07:16
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.

2 participants