Skip to content

feat(providers): support per-model protocol routing without models.dev #4948

Description

@Astro-Han

Problem

Command Code exposes one model catalog, but Claude requires /messages while other models use /chat/completions. In #4943, one fixed adapter cannot serve both: sending Claude to Chat Completions returns HTTP 400 (verified).

Maka has per-model routing for some providers, but providers absent from models.dev lack a general way to declare it. See Command Code's API documentation.

Desired outcome

One connection and credential can serve models using different supported protocols. Model discovery and execution agree on the protocol, endpoint, and reasoning replay behavior through the existing runtime resolver, with regression coverage for both Chat Completions and Anthropic Messages.

Alternatives or workarounds

Use separate connections for each protocol, or expose only models supported by one protocol. Both limit a provider's unified catalog.

Related: #4943, #1339.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions