ac4af582301a4e8a29245dbba767eba31334ddf9
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bca122bf90 |
catalog: a router's id (auto, free, default) is no one model
models.dev lists several vendors' routers under one bare id: openrouter/auto,
model-oracle-ai's auto, trustedrouter/auto, kilo-auto/free, openrouter/free…
bareID merged them into one "auto" and voted their levels, images and
window onto it, so every provider's own "auto" borrowed them. The 豆包工作
plugin's auto (Doubao picks the model) got reasoning_levels
none/low/medium/high, and pi's models.json a thinkingLevelMap for it.
vote now skips auto, default and free. A provider's own list (ListedBy)
still says what its router does. fast and balanced are routers too
(trustedrouter, Kilo) but stay voted: a vendor may name a real model so,
and TestNamedAvoidsCollisions / TestPickedNamesAvoidCollisions hold such
a "fast".
Run (mote, at
|
||
|
|
f51863b3da |
catalog: a relay channel's word before a known model is that model, so Codex lets it see images (#2157)
The reporter's relay lists nyro-gpt-5.5, nyro-gemini-3.8-flash and nyro-deepseek-v4.1-flash. None of those ids is in models.dev, so magpie knew nothing about them: magpie-models.json gave each one input_modalities ["text"], no context window and no reasoning levels, and Codex refused every image. The bare ids are known (gpt-5.5: images, a context window and reasoning levels). renamed now also takes a leading channel word off an unknown id: 2 to 24 lowercase letters and a dash, when what is left has a digit and is a known model. models.dev's own data backs it: 147 of its listed ids have the form word-<another listed id> (openai-, databricks-, anthropic-, doubao-, zai-, ...), and each is the same model. A listed id is never renamed, so a vendor's own chan-gpt-5.5 keeps its entry; nyro-auto, ny2-gpt-5.5 and nyro-gpt-5.5x stay unknown. NameOf keeps the word, so the shown name is still the relay's own. TestRenameNeverTakesAModelForAnother (#1383) had anthropic-deepseek-v4.1-flash as a near miss. By the evidence above, that id is DeepSeek's model under a vendor word, so the guard row is now anthropic2-deepseek-v4.1-flash, which the rule still leaves alone. A model magpie still can't place stays text-only: telling Codex a text-only model sees images makes it offer view_image and fails the turn upstream. For those the per-model "sees images" switch already writes image into the catalog, which TestChannelModelsReachCodexWithImages covers along with the renamed ids. Run: go test -tags nogui for internal/catalog, codexcat, provider, gateway (40m timeout; load ~380 from other sessions) and agent; gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows. With the channel rule turned off by hand both new tests go red (nyro-gpt-5.5 images false, window 0; input_modalities [text]). Not tried: a real Codex image turn through the reporter's relay. |
||
|
|
d1ddb7defe |
catalog: a model no catalog lists by its id has what its maker's entry says of it — window, thinking, images, name — not just a price (#1565, ggbdpq)
What changed: #1520 prices the id an entry names as its canonical_model_id, but the capability tables only counted entries listed by an id, so the model behind the id was unknown all the same: gpt-5.6-cyber (OpenAI's gpt-daybreak-red-latest, canonical openai/gpt-5.6-cyber) had no window, reply limit, thinking, images or name — asked as given (WorkBuddy's shape) or behind a relay's prefix. An entry now votes for the canonical id it names too, when no catalog lists that id: one listed by its id keeps the answers it has. The per-entry vote moved into a closure (vote) whose branches are the ones it replaces, keyed the same for a listed id. Review (yetone's session): TestCanonicalOnlyIDCarriesItsMakerWord and the updated TestCanonicalIDIsNeverTakenForAnother fail on the previous catalog.go (window, reply limit, thinking, images and name all empty for gpt-5.6-cyber and claude-gpt-5.6-cyber; 0 and "" for claude-sonnet-4-0) and pass with it. The expectations were moved to the literal catalog: Daybreak Red's window is its input limit, 272000, not the 400000 context (as every listed model's is), and Cortecs's name is "Claude Sonnet 4 (latest)". A sweep of every listed and canonical id (plain, claude-, [1m]) through ContextOf, OutputOf, Thinks, SeesImages, NameOf, EffortsOf, Knows and PricedBy on the local models.dev cache, before and after: no answer for a listed id changed; the 23 canonical-only ids and their renames gained theirs. The full suite, gofmt and the cross-OS vets were run on the series. Author's run: the red/green above; go test -tags nogui ./internal/catalog ./internal/usage ./internal/provider green; go test -tags nogui ./... green but TestOffline (red on the baseline too) and TestSearchFollowsTheSearchersProxy (green alone); gofmt -l clean; go vet, GOOS=linux and GOOS=windows vet on internal/catalog clean. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> |
||
|
|
43b6959fcd |
catalog: a relay's rename of a model models.dev knows only as another entry's canonical_model_id is that model now (#1564, ggbdpq)
What changed: renamed, which takes a relay's prefix and a window mark off an id, knew only ids models.dev lists. A model no catalog lists by its id — OpenAI's gpt-5.6-cyber, served as gpt-daybreak-red-latest whose canonical_model_id is openai/gpt-5.6-cyber (23 such ids in today's api.json) — stayed unknown to the rename, so claude-gpt-5.6-cyber (a relay's, #1383) had no price, no window, no name and no capabilities, though #1520 prices the id when asked as given. The rename now reaches what models.dev knows as an entry's canonical_model_id, and a canonical id is never taken for another, as a listed one never is: cortecs's claude-sonnet-4 is claude-sonnet-4-0, and were a catalog to list a sonnet-4-0 of its own, Claude's model would not become it. Review (yetone's session): the two tests fail on the old catalog.go (PricedBy of the three renamed spellings false, ContextOf 0; Drift's 99, 32000 and "Drift Sonnet" for claude-sonnet-4-0) and pass with it. The 23 canonical-only ids were counted in the local models.dev cache (gpt-5.6-cyber only under openai's gpt-daybreak-red-latest, claude-sonnet-4-0 under cortecs and requesty). The cortecs fixture was made literal (name "Claude Sonnet 4 (latest)", pdf input, output 65000) and the Daybreak Red one given its input limit 272000. A sweep of every listed and canonical id, plain, with claude- and with [1m], through PricedBy, ContextOf, OutputOf, Thinks, SeesImages, NameOf, EffortsOf and Knows on the real catalog: no answer for a listed id changed; only canonical-only ids and their renames gained one. The full suite, gofmt and the cross-OS vets were run on the series. Author's run: the red/green above; go test -tags nogui ./internal/catalog ./internal/usage ./internal/provider green; gofmt -l clean. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> |
||
|
|
1069785dc7 |
catalog: a model a relay renamed (claude-deepseek-v4.1-flash[1M]) gets its levels, window, images, name and price from the model it is (#1383, uWydnA)
Relays rename models for Claude Code with a "claude-" prefix and/or a
window mark ("[1M]", "[200K]"). Every capability getter looked the bare id
up exactly, so such a model had an empty reasoning menu, no images (the
gateway's vision stand-in described pictures to a model that sees them)
and a 0 window.
Now every getter shares one lookup (lookup -> found -> renamed):
- found is the chain EffortsOf and ContextOf already had (exact, a Bedrock
geography, "(variant)", ":tag"), now also used by Thinks, SeesImages,
NameOf and OutputOf, which matched the exact id only.
- renamed applies only when models.dev lists no model by the id at all
(a new `listed` set of every bare id, whatever it says of it): a window
mark comes off first, and if what is left is listed it is the model
(Claude Code's claude-opus-5[1m] stays claude-opus-5, never "opus-5");
else a "claude-" prefix comes off when the rest is listed and names a
version, so the reporter's counter-example claude-auto[1M] is not
models.dev's router "auto".
- ContextOf gives a mark's window (what the relay serves it at, as Claude
Code takes [1m] for 1M); NameOf keeps the mark ("DeepSeek V4.1 Flash
[1M]") so two models apart by window alone read apart.
- Siblings: PricedBy (last, after the dot/dash match) and ListedBy take
the rename too; Knows follows from ContextOf/EffortsOf/Thinks.
Ran: the reporter's TestRelayRenamedIDLosesCapabilities verbatim, plus
tests for every getter on the renamed forms, Claude [1m] ids, a listed
claude-glm-5 keeping its own (empty) levels over glm-5's, near misses
(claude-auto, -flashy, [fast], [infm], anthropic- prefix) matching
nothing, gpt-5.5/auto/opus-5/glm-5 unchanged. Broken by hand seven ways
(no rename, no listed gate, no version check, mark window ignored, prefix
before the mark-stripped id, PricedBy or ListedBy without the rename):
each FAILs naming the getter. Against today's models.dev api.json:
claude-deepseek-v4.1-flash[1M] -> low,high,max, 1M, images; claude-auto[1M]
-> nothing; claude-code (listed) as before. gofmt -l clean; go vet,
GOOS=linux go vet -tags nogui, GOOS=windows go vet ./...; go build for
darwin, linux (nogui), windows; go test -tags nogui ./... in a temp HOME
all ok.
|