You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cea3e57
Browse filesBrowse the repository at this point in the historyBrowse files
fix: send max_completion_tokens to Azure OpenAI reasoning models
Bump the fantasy fork to its sync with upstream v0.48.3 (coder/fantasy#86),
whose Chat Completions reasoning check knows gpt-6 through gpt-9. Azure
OpenAI models now also obey the Reasoning Model setting, and the model
form shows it for them, as a deployment name does not have to say what
model it serves.
This replaces the earlier approach of routing Azure OpenAI through the
OpenAI client.
Copy file name to clipboardExpand all lines: coderd/x/chatd/ARCHITECTURE.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1262,9 +1262,7 @@ Request preparation reads the transport from the model instead of recomputing it
1262
1262
1263
1263
The first two happen together in `chatprovider.ProviderOptionsForCall`, the only entry point in `chatprovider` that builds provider options for a call; it delegates transport-aware OpenAI conversion to `chatopenai.ProviderOptionsFromChatConfig`. Config conversion and effort injection cannot pick different option types because one function owns both.
1264
1264
1265
-
`TransportFor` has no Azure case, because chatd never builds an azure-typed provider as a fantasy azure client: `fantasyConfigForAIBridge` maps openai and azure to the OpenAI client, because Azure OpenAI serves the OpenAI API, and folds every other provider type except anthropic and bedrock into openai-compat, which always speaks Chat Completions. A bedrock model's client depends on the model ID: `anthropic.*` bedrock models fold to the Anthropic Messages client, and other bedrock models fold to the OpenAI client.
1266
-
1267
-
For bedrock and azure, the provider type, not the model name, decides an unset `use_responses_api`: `newModel` fills it in before it builds the client. Bedrock serves OpenAI-format models only through the Responses API, so it defaults to true. An Azure model name is a deployment name that does not identify the model, so azure defaults to false, because every Azure chat deployment supports Chat Completions.
1265
+
`TransportFor` has no Azure case, because chatd never builds an azure-typed provider as a fantasy azure client: `fantasyConfigForAIBridge` folds every provider type other than anthropic, bedrock, and openai into openai-compat, which always speaks Chat Completions. Bedrock is the exception within that set: its fantasy client depends on the model ID, so `anthropic.*` bedrock models fold to the Anthropic Messages client while non-anthropic bedrock models fold to the OpenAI Responses client.
1268
1266
1269
1267
Both transports read the same `provider_options.openai` config, but not every field applies to both wire formats. The table below records, per field, which transport honors it; `TestProviderOptionsTransportParity` fails when a field is honored on one transport and silently ignored on the other without being recorded there as intentional.
0 commit comments