feat: add openai_config.reasoning_model override and bump fantasy - #29230
feat: add openai_config.reasoning_model override and bump fantasy#29230ibetitsmike wants to merge 3 commits into
Conversation
Bump coder/fantasy to f5b3f253c112 (reasoning-model override hook, gpt-6+ recognized as reasoning models) and expose the hook as a tri-state openai_config.reasoning_model model-config field, visible for openai and bedrock providers, so new OpenAI model generations no longer need a fork release to send reasoning parameters correctly.
|
@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. |
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. |
Documentation CheckUpdates Needed
Automated review via Coder Agents |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6436db9941
ℹ️ 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".
The chatd guardrail reserves architecture prose for the human PR author.
|
@codex review |
Documentation CheckUpdates Needed
Automated review via Coder Agents |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
The Advanced grid is two columns below sm and the on/off/default switch cannot shrink below its labels, so the new Reasoning Model switch collided with Use Responses API at 375px (found in remote UAT).
|
@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". |
Why
The coder/fantasy fork classifies OpenAI reasoning models by name. The pinned version did not know
gpt-6-astra, so the Responses client omitted thereasoningparameter (the reasoning effort picker did nothing) and forwardedtemperature(quickgen title calls got HTTP 400Unsupported parameter: 'temperature'and retried). Every new model generation would need a fork release to fix this. Admins need a switch in the model config instead.What
charm.land/fantasyto coder/fantasyf5b3f253c112(feat(providers/openai): allow reasoning-model overrides and recognize gpt-6+ fantasy#57): gpt-6 and later generations are recognized as reasoning models, and the provider gainsWithReasoningModelFuncto override the classification.openai_config.reasoning_modelonChatModelCallConfig: unset keeps fantasy's name heuristics,trueforces reasoning-model handling (effort and summary sent, temperature/top_p dropped),falseforces plain sampling. It is applied once at client construction next touse_responses_api. The generated model editor shows it foropenaiandbedrockproviders, since Bedrock Mantle also serves OpenAI-format models; it is ignored for Anthropic models on Bedrock.IsGPT6Astratransport fallback inchatopenai.UsesResponsesAPI; the bumped SDK recognizes gpt-6 itself (IsGPT6Astrastays for the effort clamp).Validation
TestChatModelCallConfig_ReasoningModelRoundTrip,TestModelFromConfig_OpenAIReasoningModelOverride(request body hasreasoningand notemperaturewhen forced on an unknown model; forced off on gpt-5 dropsreasoningand keepstemperature; unset unchanged),TestAIGatewayModelBedrockReasoningModelOverride(Bedrock provider path),TestIsZeroChatModelCallConfigReasoningModel, and form-logic cases serializing the field for openai and bedrock. Red-green: removing the constructor wiring fails the request-body assertions.go test ./coderd/x/chatd/... -count=1(full),go test ./codersdk/... -run ChatModel,go test ./coderd/ -run 'ChatModel|Chats',golangci-lint run ./coderd/x/chatd/... ./codersdk/... ./coderd/(0 issues),make gen(stable on rerun), Vitest forsrc/modules/aiModelsandsrc/api/chatModelOptions(174 tests), Biome,tsc --noEmit,make pre-commit.gpt-daybreak-blue-latest(an alias the SDK does not recognize) sendsreasoningwithouttemperaturewhen forced on and gets OpenAI's temperature 400 when off or unset. UAT also found the new switch colliding withUse Responses APIat 375px; tri-state switches now take the full row belowsm. One open observation for follow-up: in Coder chats ongpt-6-astrathe upstream stream carried no reasoning-summary events even thoughreasoning.summary=detailedwas sent, while the same model returns summaries to a standalone fantasy client; not attributed to this change.pre-pushhook fails in this checkout only on unrelated tests (umask-dependentTestGetModulesArchive, two untouched site tests), so the push bypassed it; CI is the gate.Depends on coder/fantasy#57 merging; the pin then moves to the merged
coder_2_33commit. Related: #29229 (Bedrockreasoning_summarycoercion).