mirror of
https://github.com/Routstr/routstrd.git
synced 2026-10-05 12:28:23 +00:00
The generated models.json set the provider base URL to `<daemon>/v1`, which is
only safe for transports that append their endpoint without a version segment.
A model carrying `api: "anthropic-messages"` makes the Anthropic SDK append
`/v1/messages` itself, so the effective path became `/v1/v1/messages` — a 404
from every provider in the pool.
Use the daemon root, the one base URL that resolves for every transport:
gpt-* -> {root}/responses -> `responses`
claude* -> {root}/v1/messages -> `messages`
other -> {root}/chat/completions -> `chat/completions`
and pin `api` by family the way gpt-* already was, extending the pin to
claude* models. The pins override a curated value — a stale per-model `api`
picks an endpoint that does not match the provider's intent and is invisible
in models.json — while models outside the pinned families keep whatever the
user curated. getDaemonBaseUrl() strips a trailing slash, so the root cannot
double the separator either (routstr-core rejects empty path segments).