-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Let named custom providers select a typed Responses dialect #5094
Copy link
Copy link
Closed
Labels
agent-readySelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsSelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestmodel-labModel Lab open-model discovery, evaluation, routing, and export workflowsModel Lab open-model discovery, evaluation, routing, and export workflowsresponses-apiResponses API integration, streaming, or provider protocol issuesResponses API integration, streaming, or provider protocol issuestuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interaction
Milestone
Description
Metadata
Metadata
Labels
agent-readySelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsSelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestmodel-labModel Lab open-model discovery, evaluation, routing, and export workflowsModel Lab open-model discovery, evaluation, routing, and export workflowsresponses-apiResponses API integration, streaming, or provider protocol issuesResponses API integration, streaming, or provider protocol issuestuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interaction
Projects
- StatusShow more project fieldsDone
Problem
Named
[providers.<name>]entries withkind = "openai-compatible"are currently fixed to Chat Completions byCustom::wire_policy. A Responses-compatible endpoint therefore cannot be selected explicitly. Inferring the protocol from a model slug orbase_urlwould reintroduce the ambiguity that #185 removed.For v0.9.4, custom endpoints need an explicit, typed Responses opt-in while existing configurations remain byte-for-byte and behaviorally compatible.
Current evidence
crates/config/src/provider.rs::Custom::wire_policyreturnsWireFormat::ChatCompletions.crates/config/src/lib.rs::named_custom_provider_tablevalidates the custom provider kind, butProviderConfigTomlhas no wire-format or Responses-profile field.crates/config/src/route/resolver.rsalready carries protocol information on resolved route candidates.crates/tui/src/client.rs::prepare_outbound_requestalready has a Responses preparation path and a custom route shape, but a custom provider cannot currently resolve to that path.docs/CONFIGURATION.mddocuments custom OpenAI-compatible gateways only as Chat Completions routes.Scope
wire_format = "chat_completions" | "responses"responses_profile = "standard" | "stateless_plain_reasoning", valid only whenwire_format = "responses"wire_formattochat_completions; do not infer it from model names or URLs.kind = "openai-compatible"or weakening round-trip preservation in the editable config document./responsespath. Provider-only endpoints, authentication headers, and account-scoped behavior must not become selectable custom behavior.path_suffixexplicit and cover its interaction with the Responses path in tests.Do not add arbitrary JSON body patches or user-defined event transforms. New behavior must enter through an allowlisted typed profile.
Key files
crates/config/src/provider.rscrates/config/src/provider_kind.rscrates/config/src/lib.rscrates/config/src/config_document.rscrates/config/src/route/resolver.rscrates/config/src/route/tests.rscrates/tui/src/client.rscrates/tui/src/client/prepared.rsdocs/CONFIGURATION.mdAcceptance criteria
/responsesroute.Verification
cargo fmt --all -- --checkcargo test -p codewhale-configcargo test -p codewhale-tui client::preparedcargo test -p codewhale-tui client::responsespython3 scripts/check_model_registry.pyOut of scope
Related
Triage note
Milestone: v0.9.4. This issue is ready for an implementation lane once the typed profile names and validation contract above are accepted.