fix(routing): refuse un-prefixed passthrough model ids - #125
Closed
robmsmt wants to merge 1 commit into
Closed
Conversation
Bare upstream ids (e.g. swiss-ai/Apertus-8B-Instruct-2509) used to silently route to the first registered provider that advertised them, making the winner an accident of registration order. The deprecation window is over: resolve_model now returns None for bare ids, so they fall through to OpenTela and 404 under the id the client sent. A warning log still names the prefixed id (CSCS-Inference/..., ...) so operators can spot unmigrated clients. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #127, which enforces the canonical 3-segment id shape at the request boundary for all model-forwarding endpoints (and removes the same back-compat loop this PR touched). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bare upstream ids like
swiss-ai/Apertus-8B-Instruct-2509were still silently routing to the first registered passthrough provider that advertised them (CSCS L1 today) — which provider won was an accident of registration order, and clients had no signal they were on a deprecated path beyond a server-side log.This closes the deprecation window:
resolve_modelnow returnsNonefor un-prefixed ids, so they fall through to OpenTela and 404 under exactly the id the client sent — no silent rerouting, no cross-provider ambiguity.Refusing un-prefixed passthrough model id ...; use CSCS-Inference/...so operators can chase unmigrated clients.CSCS-Inference/...,RCP-AIaaS/...) and the platform namespace (SwissAI-Research/...) are unchanged.Client impact
Anyone still calling with a bare id (e.g. the historical
swiss-ai/Apertus-*curl) will now get a 404 and must switch to the prefixed id, e.g.CSCS-Inference/swiss-ai/Apertus-8B-Instruct-2509. These ids have been advertised via/v1/modelssince the prefix registry landed.Tests
test_bare_upstream_id_does_not_route— bare id resolves toNoneand logs the migration target.test_same_upstream_id_on_two_providers_lists_two_rows— same model on CSCS + RCP stays individually routable; the bare id routes to neither.🤖 Generated with Claude Code