Repository navigation
Description
Summary
When two or more providers offer the same model id, the Allowed models (or Blocked models) list of a Model access rule shows one row per provider. Each row shows the bare id and no provider. In the pilot's organization, three providers list openai/gpt-5.6-luna. OpenRouter's shipped catalog names that model this way (configs/platform/system/models/openrouter/models.yml:105), and OpenAI-compatible gateways commonly use the same vendor/model form. All the rows of one id share one value: checking one checks them all, and React reports duplicate keys. While a search is typed, rows from the earlier lists stay on screen beside No results found, and they stop showing the real selection. Behind the dialog, a rule stores bare ids and is enforced per id, so it cannot allow a model through one provider and not through another. This was reproduced locally; a pilot's screenshot shows the same state.
The report
The pilot's screenshot shows Regel bearbeiten (Edit rule) with scope Role › Member and Erlaubte Modelle (Allowed models). The chips read openai/gpt-5.6-sol, anthropic/claude-haiku-5.5 and openai/gpt-5.6-luna. The list, searched for luna 5.6, shows five checked rows — …-luna, …-sol, …-luna, …-sol, …-luna — above Keine Ergebnisse gefunden (No results found). The owner's note:
Some parts of the UI do not show the actual AI provider when selecting a model.
Reproduction (local; main at 49ce42fdd)
The setup: two OpenAI-compatible providers, "Gateway A" and "Gateway B", whose catalogs list the same four ids. In Settings › Governance › Models › Model access: the policy on, mode Allowlist, then Add rule.
- The list shows eight rows: each id twice, with no provider. Opening it logs four errors, one per id, of this form: "Encountered two children with the same key,
openai/gpt-5.6-luna. … Non-unique keys may cause children to be duplicated and/or omitted". - Checking the first
openai/gpt-5.6-lunarow checks the second one too. The field shows one chip. - With
luna,solandhaikuchecked,luna 5.6is typed one key at a time. The search is one substring of the label, soluna 5.6does not matchopenai/gpt-5.6-luna, and No results found appears. Four rows stay on screen anyway:mock/skill-runner, plusopenai/gpt-5.6-luna,openai/gpt-5.6-solandanthropic/claude-haiku-5.5, all three checked. Which rows remain depends on the lists the search passed through. That is the state in the pilot's screenshot. - Clicking the leftover
openai/gpt-5.6-solrow removed that model from the selection (its chip went), while the row still read as checked. - A rule saved with
openai/gpt-5.6-lunapicked from Gateway A's row is stored as the bare id (allowedModels: [openai/gpt-5.6-luna]). The chat's model picker then offers GPT 5.6 Luna from Gateway A and from Gateway B.
What the repository says (main at 49ce42fdd)
Paths that start with components/ or hooks/ are under services/platform/app/features/settings/governance/.
The options.
allModelOptionsadds one option per provider and model, withvalue: model.idandlabel: model.displayName || model.id(components/model-access-editor.tsx:422-440).- The catalog hook sets
displayNameto the id (hooks/model-catalog.ts:65-69). It lists only providers with an active credential (:53-61). - The dialog hands
{value, label}toMultiSelect(components/model-access-editor.tsx:206-208,:318-349).
The list. MultiSelect (packages/ui/src/components/forms/multi-select.tsx):
- keys each row by
value(:530-542); - finds each chip's option by value (
:225-231); - shows the empty text when the filtered list is empty (
:544-553); - by default, keeps an option when the query is a case-insensitive substring of its label or description (
:147-153).
The details popover. The ⓘ on each row gets tags and capabilities keyed by the bare id (components/model-access-editor.tsx:337-343). useModelCapabilities reads every catalog, not only providers with a credential, and takes the first that lists the id (hooks/model-catalog.ts:86-101). So two rows of one id show the same details, which may be another provider's prices. The popover can show a provider (services/platform/app/features/shared/models/model-info-popover.tsx:54-64, :160-162), but this caller passes none.
The rules table. It names each model by the first option with that id (resolveModelNames, components/model-access-editor.tsx:704-715).
What a rule stores and enforces.
allowedModelsandblockedModelsare lists of strings (packages/shared/src/schemas/governance.ts:749-750).isModelPermittedcompares the bare id after stripping aprovider:qualifier (services/platform/backend/core/governance/model_access_enforcement.ts:83-102), so a rule applies to that id from every provider.
The other governance pickers carry the provider.
- Default models picks a provider first, then one of its models, and stores both (
components/default-model-editor.tsx:225-247). - Standard agent, Image generation, Transcription and Vision offer
provider::modelpairs (components/model-id.ts:11-26) and store the provider and the model, for example Vision atcomponents/vision-model-editor.tsx:134-146.
In passing: the client's conflict checks cut ids at the first colon.
- Before saving, both editors compare the default-model rules against the access rules with
stripQualifier, which drops everything up to the first:(components/model-id.ts:1-9;components/model-access-editor.tsx:101-103;components/default-model-editor.tsx:86-92). An OpenRouter id such asvendor/model:freebecomesfree, so two different:freemodels compare as equal. - The server's
stripModelRefQualifiertreats a prefix as a provider only when it is a slug (packages/shared/src/utils/model-ref.ts:27,:49-61), so it keeps these ids whole. Only the warnings are affected.
Questions
- Should a rule allow or block a model per id (as today: from every provider), or per provider and model? Per provider is what an admin needs to allow a model through an EU gateway but not through another provider (feat(platform): let admins restrict model calls to endpoints that process in the EU/EEA #5041).
- If per id: should the list show each id once, naming on the row the providers that offer it, as the automation
llmstep does (services/platform/app/features/automations/hooks/use-llm-model-options.ts:37-55)? - Should
MultiSelectguard against duplicate values itself (warn, dedupe, or key rows another way), since any caller can pass them?
Options (no preference stated)
- Keep rules per id. List each id once, with its providers as the description, and dedupe before the
MultiSelect. - Make rules per provider. Store the provider with the model, as the other governance pickers do, show the provider on rows and chips, and decide what a stored bare id means (for example, "every provider").
- Either way, make
MultiSelecthold up against duplicate values.
Related
#5179 (where else the provider is missing), #5140 (provider in the chat model picker), #5041 (EU/EEA endpoints), #3655 (the usage ledger merged one id across providers; fixed), #3639 (model access rules without a target; fixed), #5044 (pilot findings).
Activity
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
yannickmonney commentedon Nov 3, 2026
Second report, 2026-11-03: an admin editing rules again could not tell which provider a model in the Model access list comes from. The dialog was re-read on
mainat 039e421 and nothing has changed since this issue was filed:components/model-access-editor.tsx:422-440still addsvalue: model.id/label: model.displayName || model.idper provider and model, with no provider;resolveModelNames(:704-715) still names a rule's models by the first option with that id;isModelPermitted(services/platform/backend/core/governance/model_access_enforcement.ts:83-102) still compares the bare id after stripping a qualifier. The Default models editor next to it does show a provider column, so the two governance editors disagree.One consequence worth adding to the case: because a rule is per id and not per (provider, model), an admin cannot use Model access to take one provider's models out of play for a user. That is the lever someone would reach for when one of two providers is unusable, for example out of credit, which came up in #5339 (Auto picked a model whose key had no credit left and the turn failed).
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone
yannickmonney commentedon Nov 14, 2026
Decision
Model access rules can name a provider and model, or a model from every provider. The stored format stays.
<provider>:<model-id>(for examplegateway-a:openai/gpt-5.6-luna) allows or blocks that model only through that provider.<model-id>means that model from every provider. Every entry stored today is bare and keeps its meaning. Nothing is rewritten.packages/sharedserves the server and the client checks. An entry equal to the whole model id always matches, sollama3:8bandvendor/model:freework. A qualified entry matches its exact pair, and a bare entry matches the id from any provider.@quantvariants match their base model.{providerSlug, modelId}as a type and checks the pair that will actually be called: the chat turn, Auto, the composer's model list, title generation, the default-model pin and the model API.MultiSelectprotects itself. It drops duplicate values with a warning, and its search matches every word typed ("luna 5.6" findsopenai/gpt-5.6-luna). Leftover rows never sit next to "No results found".Answers
MultiSelectguard against duplicate values itself? Yes. It dedupes and warns, and its search becomes word-based.Rationale
Today picking Gateway A's row silently also covers Gateway B, so the stored policy does not match the admin's choice. Per-provider entries fix that and agree with every other governance picker. The editor still offers Every provider because blocking a model everywhere is the main use of a block list. With per-provider blocks only, a newly added provider serving the same model would quietly unblock it. The existing
provider:modelgrammar needs no migration, and older backends fall back to per-id. That means the same allow behaviour as today and a stricter block. Fixing the sharedMultiSelectprotects every screen that uses it.Implementation units (all on
main)luna 5.6sequence from the report.@quantvariants match correctly.stripQualifierremoved, en/de/fr strings, docs, a manual-test box.feat(platform): name a model by its provider wherever it stands alone
feat(platform): name a model by its provider wherever it stands alone