Repository navigation
fix(coderd/x/chatd): coerce Bedrock reasoning summaries to auto - #29229
Conversation
|
@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: a4878f88c2
ℹ️ 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".
Only the derived provider options see the Bedrock reasoning_summary coercion, so computer-use rerouting to direct OpenAI starts from the configured value. Replace the architecture prose with a TODO per the chatd guardrail.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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
Bedrock Mantle's OpenAI Responses endpoint rejects
reasoning.summaryvalues other thanautowith HTTP 400 (Unsupported parameter: 'reasoning.summary' is not supported with the 'openai.gpt-5.6-sol' model). chatd forwardsprovider_options.openai.reasoning_summaryfrom the model config unchanged, so every chat turn and quickgen title call through a Bedrock model config carryingconcise/detailedfails. On dogfood this produced 43 user-visible "chat generation failed" errors and 118 title-generation failures in one day; five Bedrock configs still carrydetailed.What
resolveModelCallnow coercesprovider_options.openai.reasoning_summarytoautofor Bedrock providers whose model uses the OpenAI wire format (non-anthropic.model IDs), before per-call provider options are built. Mantle acceptsauto(it returns no summaries today, but encrypted reasoning continuity keeps working). Coercing instead of dropping keeps one config portable between Bedrock and direct OpenAI, and summaries start flowing if AWS adds support. Anthropic models on Bedrock and every non-Bedrock provider are untouched. Only the derived provider options see the coerced value; the resolved call config keeps the configured one, so computer-use rerouting to direct OpenAI is unaffected. A TODO item incoderd/x/chatd/ARCHITECTURE.mdmarks the section for the human author, per the chatd guardrail.Validation
TestAIGatewayModelBedrockReasoningSummarydrives the realresolveModelCallpath (newModel + ProviderOptionsForCall) with a request-capturing transport: Bedrock +openai.gpt-5.6-lunawithdetailedsends"summary":"auto"; Bedrock + Anthropic and direct OpenAI are unchanged.TestBedrockReasoningSummarycovers the helper table. Red-green: removing the resolver call or the helper body fails the body assertion (expected "auto", actual "detailed").go test ./coderd/x/chatd/ -run 'TestAIGateway|Bedrock',go test ./coderd/x/chatd/chatprovider/...,golangci-lint run ./coderd/x/chatd/...(0 issues),make pre-commit.openai.gpt-5.6-lunaconfigs withdetailed/concise/odd-cased values send"summary":"auto"and complete chats and titles; direct OpenAI keepsdetailedwith visible summaries; Bedrock Anthropic requests gain no OpenAI fields. UAT ran on the first head (a4878f8); the follow-up commit only stops the coerced config from leaking into provider substitution and swaps the doc paragraph for a TODO.pre-pushhook failed only on unrelated pre-existing failures in this checkout (provisioner/terraform TestGetModulesArchivehash mismatch from the host umask, two untouched site tests), so the push bypassed it; CI is the gate.Related follow-ups: coder/fantasy#57 (gpt-6+ reasoning classification and an override hook) and a coder PR exposing an
openai_config.reasoning_modelflag in the model config UI.