Repository navigation
Route unmatched namespaced ids to OpenRouter instead of NRP - #155
Merged
Merged
Conversation
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.
Closes #154. Part of #142 and #120 (shape 2 from #154).
Change
get_provider_for_model()gains one tier between declared prefixes anddefault_provider:models(unchanged; nimbusqwenstill wins)model_prefixes(unchanged;~floating aliases,claude-)/goes tonamespaced_default_provider. That defaults toopenrouterwhen configured. With no usable value it is a 400 naming the setting, never a fallback todefault_provider.default_provider(nrp, unchanged)NRP serves no slash-namespaced ids. In the last 60 days of logs the only namespaced id routed to NRP was the #142 repro (
google/gemini-3.7-flash), and it failed there. So no working route changes.reflection/…,meta/…andgoogle/…now reach OpenRouter without a prefix edit.GET /v1/modelsis filtered through the router, so it now lists OpenRouter's whole catalog, not only the declared vendors.Not changed
openrouter.model_prefixesstays inconfig.json. It is now redundant for routing but harmless.Tests
66 pass. Two are new: unlisted vendors route to OpenRouter while bare, exact and
claude-ids are unchanged; and with no namespaced fallback the id raisesUnknownModelErrorand does not reach NRP. The discovery-listing test was updated for the intended change.