love1sbug moved from CLIProxyAPI: their clients ask for gpt-5.6-sol, and magpie's /v1/models gave only codex/gpt-5.6-sol. "Provider in model names" (36ca5432d,6fa3109ea,250bdd5c4) changes labels in agents' lists, never ids, so no setting changed what the list returned. A bare request already routed (serve: GroupFor, then Resolve); only the list didn't offer it. What changed - settings.BareModelIDs, off by default; Settings › Network and sharing › "Model ids without the provider" (en, zh, zh-TW, ja, de), posted on its own to POST /api/settings/bare-ids (the general settings save keeps it). Drawn in gateway mode too, where such apps are. - On, /v1/models (and ?format=text) lists every row it listed before, unchanged and first, then one row per bare model id (provider.BareEntries): the row of the entry that id reaches, its label that one's. GET /v1/models/{id} answers a bare id the same way. - Which entry is decided by the gateway's own resolution (groupForIn, the GroupFor loop now shared; then resolveIn), so the list never offers what a request wouldn't reach: a model several providers serve is listed once and goes to its found group (found groups on) or the first provider in the Providers order (off), exactly as a bare request did before. An id already a catalog id isn't listed twice. - The target must be in the shown list, so a gateway key held to some models sees only bare ids that reach them. Never listed for another magpie (DrawersHeader), whose remote provider would list each twice, nor in Claude Desktop's list. - No agent file changes: magpie still writes provider/model ids, so the switch rewrites nothing and nobody who hasn't turned it on sees a change. - docs/subsystems/gateway-routing.md: a section and verification lines. What was run - go test -tags nogui ./internal/gateway -run TestBareModelIDs: the reporter's case (a Codex provider with gpt-5.6-sol listed as gpt-5.6-sol, then asked for it on chat, responses and messages against a fake ChatGPT backend that saw gpt-5.6-sol; off, the list is byte-equal to before) and several providers with found groups on and off, a held key, another magpie. Both go red with the listing disabled by hand. - go test -tags nogui ./internal/gui -run 'TestBareModelIDsSetting|TestSettingsSave'. - node --test internal/gui/tests/bare-ids.test.cjs (playwright 1.62.0): Chromium and WebKit, 420px (gateway mode) and 900px, all five languages, 20/20; i18n-keys.test.cjs passes. - gofmt -l clean; go vet ./... (darwin), go vet -tags nogui ./... on darwin, GOOS=linux, GOOS=windows clean. - go test -tags nogui ./internal/provider ./internal/gateway ./internal/gui ./internal/settings ./internal/cli ./internal/agent -timeout 40m, rebased on origin/main06ff45fed: all six ok (gateway 533s, agent 460s, the machine at load ~130; the default 10m ran out on wall time in an earlier run, the test then running 1s in, nothing failed). Before the rebase agent's TestFolderVarsAreListed was red on REASONIX_STATE_HOME, fixed upstream by24146c031. - After the rebase (a conflict with #1914's tiers for every client, kept; a bare row carries its source row's tiers): gofmt, vet on all three, and bare-ids, i18n-keys, plain-names, gateway-port .test.cjs, 31/31. - Rebased again on9b52fb504(side efforts touched settings, api.go, app.js, i18n.js; a doc table conflict, upstream's rows kept): gofmt, go vet ./... and -tags nogui on linux and windows, go test ./internal/gui ./internal/settings, gateway -run 'TestBareModelIDs|TestModels| TestCodexTiers|TestSideEffort', and bare-ids, i18n-keys, side-effort .test.cjs 31/31. Not tried: a real CLIProxyAPI client against a live gateway, or the reporter's own setup; no CLI command for the switch (Settings only).
Subsystem design references
These pages describe current responsibilities, runtime paths, state, and contracts. Start with the subsystem relevant to your task, then follow its source links to verify the implementation you change.
| Subsystem | Reference |
|---|---|
| Built-in subscriptions moving to plugins | Provider and plugin ownership |
| Built-in plugins: registry, lifecycle, plugins.yml, presets | Plugin runtime |
| Plugins that run on the gateway's requests and replies | Gateway middleware |
| Claude subscription turns across Claude Code runs | Claude subscription bridge |
| How the gateway picks a provider, key or account, and falls back | Gateway routing and fallback |
| Gateway Session Aggregation | Gateway Session Aggregation |
| Connecting an agent's config to the gateway, drift, disconnect, WSL twins | Agent wiring |
| Providers, keys, subscription accounts, refresh and allowance | Providers and accounts |
| Instructions, MCP servers, skills and RTK written into agents | Library |
Tray, panel, window, magpie web and the page's JSON API |
GUI app shell |
| Encrypted backups and setup synchronization over WebDAV, S3 or GitHub | Sync and backup |
A subsystem can span several packages or repositories. Its reference describes the behavior those parts provide together; it does not need to list every function.
Maintain a reference
Update the owning reference in the same PR when a change alters a documented responsibility, interface, state transition, runtime path, compatibility rule, or failure behavior. An internal refactor that preserves these contracts does not require a prose change.
Keep each fact in one reference and link to it from agent instructions or other pages. Link to source files and named symbols rather than copying implementation details that change frequently. Explain field meanings and constraints that signatures alone do not express.
For a new reference, include the responsibilities and boundaries, source of truth, main runtime paths, state transitions, important constraints, and existing verification commands. Include failure and compatibility behavior where relevant. Document current behavior separately from proposed changes; the proposal belongs in its issue or PR.
Describe a PR's semantic changes
For each affected subsystem, explain the observable change with its trigger and before/after behavior. Include changes to interfaces, state, compatibility, and failure behavior when relevant. Link the affected reference, implementation, and verification evidence. State when a refactor preserves the documented behavior.
For example, a change to plugin adoption should explain which migration state and account condition trigger it, which implementation handles requests before and after adoption, and which test exercises that transition.
This is an author-provided explanation that a reviewer verifies against the diff and surrounding code. It is not an automatically proven compatibility verdict.
Review a change
- Identify the affected subsystem and the actual runtime path, including plugin or built-in ownership.
- Compare the claimed before/after behavior with the base and head implementation. Trace relevant callers and state transitions beyond the changed lines.
- Check that changed contracts appear in the owning reference and that source links still resolve.
- Check that the cited tests or runtime evidence exercise the claimed behavior. Report checks that were not run.
A documentation update alone does not prove the implementation. Existing tests and runtime evidence remain necessary for behavior changes.