Repository navigation
test(platform): lock each provider's model list to its own catalog - #5492
Merged
yannickmonney merged 2 commits intoNov 23, 2026
Merged
Conversation
Contributor
Author
|
Rebased onto main after #5497 merged. #5497 added its own PROV-R5 ("A listing with a key that is not saved goes to its asker alone") under a new "Listing a provider's models" section, so this PR's rule is now PROV-R6 in the same section; the two test tags and both commit messages follow. No other change: the rest of the patch is identical (range-diff). |
yannickmonney
force-pushed
the
test/openrouter-models-not-narrowed-by-custom-provider
branch
from
November 23, 2026 15:36
52a7e90 to
6977141
Compare
An operator on preview v0.5.107 read OpenRouter's model dropdown as narrowed to a custom OpenAI-compatible provider they had just added. No code path scopes a catalog by anything but its provider: the live catalog cache keys on provider name and listing URLs, the catalog listing fetches per provider, and every dropdown reads its own provider's entry. The likelier cause is the fenced backend DNS of that deployment, where every live listing failed: OpenRouter served its 24 shipped flagships with no error, and the custom provider reported its DNS failure. Hold the rule as PROV-R6: the catalog listing over the real fetch with OpenRouter beside a custom provider, reachable and unresolvable, and the settings dropdowns over both. Record the silent fallback as an open question in the providers spec.
OpenRouter, like any live source with shipped defaults, falls back to those defaults without an error on its entry, so only an organization's own provider shows the failure. Drop a duplicate assertion in the catalog scope test.
yannickmonney
force-pushed
the
test/openrouter-models-not-narrowed-by-custom-provider
branch
from
November 23, 2026 16:40
6977141 to
48de448
Compare
yannickmonney
enabled auto-merge (squash)
November 23, 2026 16:40
yannickmonney
deleted the
test/openrouter-models-not-narrowed-by-custom-provider
branch
November 23, 2026 17:14
This was referenced Nov 23, 2026
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.
Problem (as seen on preview, v0.5.107)
After an OpenAI-compatible custom provider was added, the OpenRouter model dropdown looked narrowed to a short list, as if the custom provider had restricted it.
Root cause
No code path scopes a provider's model list by another provider:
GET /providers/catalogsfetches each provider with its own credential and its own try/catch.The likely cause is the preview backend's DNS fence. It makes every external name fail to resolve,
openrouter.aiincluded. With nothing cached, OpenRouter silently serves its 24 shipped default models and shows no error on its entry. The custom provider is the only one that showsPROVIDER_CATALOG_UNREACHABLE. Together these looked like narrowing. The DNS fence is fixed in a separate change. This was not observed on preview directly.Change
No production code changes.
services/platform/backend/domains/providers/spec.md: each provider lists only its own models, and an organization's own provider shows its listing failure on its own entry.catalogs-scope.test.ts: runs the catalog listing over the real fetch and cache, with OpenRouter next to a custom provider, both when it is reachable and when its host does not resolve.providers-settings.test.tsx: the add and edit dialogs each show only their own provider's models.Tests
vitest --project serveronbackend/domains/providers/plustests/guards/domain-specs.guard.test.ts: 4 files, 40 tests pass, including the newcatalogs-scope.test.tswith 2 tests.vitest --config vitest.ui.config.ts providers-settings.test.tsx: 57/57 pass.oxlint --type-awareexits 0 andoxfmt --checkis clean on the changed files.Follow-up
Once the DNS fence fix is deployed on preview, OpenRouter should list its full live catalog. Before that fix, the backend log shows
[catalog] openrouter: fetch failed with nothing cached; serving the shipped defaults (24 models).