ac4af582301a4e8a29245dbba767eba31334ddf9
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1a1ca0351b |
Revert "catalog: a listed model its id names a video model is one (agnes-video-2.5)"
This reverts commit |
||
|
|
b5b6cc5739 |
catalog: a listed model its id names a video model is one (agnes-video-2.5)
glorious_rabbit_30894 on Discord (#help): models of a custom provider pointed at Agnes AI (apihub.agnes-ai.com/v1) "can't be added to an agent". Agnes runs new-api; its /v1/models rows carry only id, owned_by "custom" and supported_endpoint_types ["openai"], no kind, domain or modalities. Nothing but the id tells agnes-video-2.5 and agnes-video-2.5-flash from its chat models, and magpie had a name check for image models (DrawsID) but none for video, so both were offered to every agent as chat models, and never as video models. FilmsID is DrawsID for videos (video, sora, veo, kling, seedance, hailuo, vidu, runway, *-t2v/i2v/r2v; veo and kling only as a word of their own, so inkling still chats). fetchPage marks a row a video model by it when the list says no kind, no domain, no text output and the id isn't an image model's. mendKinds applies the same to a list saved before, so a fetched Agnes list is fixed on the first read, not the next fetch. A model whose list says it answers in text is never moved. Checked FilmsID against every id in models.dev's cache (~/.cache/magpie models.json, 2026-11-04): every id it matches outputs video and no text, except nvidia/synthetic-video-detector (a classifier, text out); video models it misses are named for nothing it could know (ray2, minimax-h3, gemini-omni), and their lists' modalities or a user's kind still mark them. Not the cause of the report, as far as can be told: with Agnes's real list (testdata, fetched 2026-11-04) and models.dev's real cache, a custom provider at .../v1, at the bare host, Anthropic or Responses protocol, reaches Available, Exposed and Catalog with all four chat models, and every agent's picker (claude, codex, opencode, pi, omp, ... 75 fields) lists them beside a relay's. The reporter says (#help 09:52) dsh, VS Code and Codex can't pick them, with no error; that is not reproduced here and is asked for. Run (mote): - at this tree on origin/main |
||
|
|
92d2ed74f9 |
providers: an Ark key's Seedance models are under Video models in its editor, each to tick
axelburks on Discord: "供应商里方舟的配置页,有图像模型选项能勾选模型,但是没 有视频模型选项不能勾选视频模型". A Volcengine Ark key's editor listed its Seedream models under Image models, to tick, and had its Seedance models among the chat models or nowhere. Cause, two parts: - The editor had no video section at all: video models had no list and no hidden set (gateway-routing.md said "Video models aren't listed in the editor, so there is nothing to hide there"). - catalog's live parse read only "kind" and modalities.input/output. Ark's /api/v3/models marks no kind: it says domain "VideoGeneration" / "ImageGeneration" and modalities.input_modalities/output_modalities. So Seedance came back as a chat model, and 3D models (output 3d, no text) as chat models too. Change: - catalog: a live row with no kind is a video model when its domain is VideoGeneration or it outputs video without text, an image model for ImageGeneration or image without text; Ark's input_modalities / output_modalities are read when input/output aren't there, so a model that gives no text (Ark's 3D) is left out of the chat list. TestFetchArkMarksVideoModels runs on a captured Ark list (testdata/volcengine-ark-models-2026-11-03.json, fetched read-only with GET /api/v3/models, no key in it). - provider: HiddenVideomakers beside HiddenDrawers, VideomakerHidden. - gateway: VideomakersOf (Videomakers on a given list, for the editor), OfferedVideomakers = Videomakers less the unticked ones, read by AutoVideomaker, videomakerObjects (another magpie's list) and mediaModels(true) (generate_video). A hidden one still makes its video when named: bareVideomaker, videosCreate and arkFilms read Videomakers. - gui: the editor's Video models section (renderVideomakers), filmIds and hiddenVideomakers on /api/providers, kept on save as hiddenDrawers is; i18n for every language. app.js comments cut to stay under TestCoreScriptBudget, which this change reached; no raise. - docs: gateway-routing.md's Hidden image models section. Old data: an Ark list fetched before keeps Seedance among its chat models until its list is fetched again; customVideomakers already counts any Seedance id an Ark key lists or picks as a video model, so it makes videos and shows under Video models now. Run on mote, this change and the next (/v1/models ?kind=, gateway and docs only) rebased on f4c664a09; this commit's own tree, on |
||
|
|
8413267097 |
catalog: a list's image/jpeg is an image, so OpenCode Go's models that see take images again (zeo9901)
zeo9901 (CC01CC) on Discord #feedback: "magpie 中 opencode go 所有的模型似乎 都无法实现图片输入了". Their screenshot is a routing group of DeepSeek V4.1 Flash at Open Design and at OpenCode Go. Cause: OpenCode Go's own /models (https://opencode.ai/inference/go/v1/models, the same at /zen/go/v1/models) lists what a model takes as media types: deepseek-v4.1-flash's modalities.input is ["text","image/jpeg","image/png", "image/gif","image/webp"], Gemini's adds application/pdf and audio/*, and so on. catalog's live-list reader took the list word for word and asked for "image", found none, and recorded ImageInput = false, an explicit answer. entryFor puts a list's explicit answer over models.dev's (which says image), so with a working Go key every Go model was text-only: a direct pick had its image described or turned away with "model does not support image input", a group member was sent it described or not at all, and agents were told the models take text only. It used to work while Go's list spelt modalities as models.dev does, or said nothing. Fix: catalog.Kinds reads a modalities list as models.dev words it (image/* image, video/* video, audio/* audio, text/* text, application/pdf pdf, each once, an unknown word kept, nil stays nil). imageInput and the live reader's InputModalities/OutputModalities go through it, as do Codex's input_modalities, the labs rows and a decision provider's listed facts (decide.go). A list saved before this, still holding Go's media types and false, is mended when read (mendKinds), so a user sees images from the first read after the update, not the next fetch. A user's own Accepts images answer still wins. Which OpenCode Go models take images, per Go's list on 2026-10-31: deepseek-v4.1-flash, kimi-k3, kimi-k3.1-pro, kimi-k2.7-code, glm-5.3-flash, qwen3.8-max, qwen3.8-flash, qwen3.7-plus, minimax-m3, minimax-m3.1-flash, mimo-v2.6-flash, mimo-v2.6-pro, step-5-preview, gemini-4-argon, grok-4.7, gpt-6-luna, gpt-5.6-luna, claude-haiku-5-5, muse-spark-1.2/1.3-contributor. Text only: deepseek-v4-pro, glm-5.2, glm-5.3, hy3, hy4-preview, longcat-2.0, beam-free, iceman-contributor-free. Tests (fixture: four rows of Go's real list, read without a key, no test reaches the network): - TestOpenCodeGoMediaTypesSee (catalog), TestKinds, TestSavedMediaTypesListSees, TestListedFactsMediaTypesSee (provider). - Broken by hand: Kinds returning its input unchanged turns all four red (deepseek-v4.1-flash, kimi-k3, gemini-4-argon "Images false"); the mendKinds call taken out turns TestSavedMediaTypesListSees red. Run on mote at the working tree on |
||
|
|
2ac423f4f2 |
kimi: a Kimi Code plan model is told always_thinking, dynamically_loaded_tools and its default effort, as Kimi's list says (jiabubu)
jiabubu on Discord (Kimi Code 2.2.0, Windows): Kimi Code's own provider
gives K2.8 Preview and K3.1 Pro the capabilities thinking,
always_thinking, image_in, video_in, tool_use and
dynamically_loaded_tools; through magpie they had thinking, image_in and
tool_use, so Kimi Code offered a thinking switch the models refuse to
turn off, and started K2.8 on high where Kimi's own starts it on max.
Kimi Code 2.4.1's managed provider (packages/oauth managed-kimi-code.ts,
capabilitiesForModel) derives them from /coding/v1/models:
supports_thinking_type "only" -> thinking + always_thinking,
supports_dynamic_tools -> dynamically_loaded_tools, supports_video_in ->
video_in, think_efforts.default_effort -> the default. magpie now reads
the same fields (flat, or nested reasoning.type, tools.dynamic_load,
reasoning.effort.default) into catalog.Model (AlwaysThinks,
DynamicTools, DefaultEffort; kimiFacts), carries them through
provider.Entry and the agent's model list, and the new Kimi Code's table
gets always_thinking, dynamically_loaded_tools and default_effort at the
vendor's default (else high, as before). Only Kimi's list sends these
fields, so another vendor's model is written as before; kimi-cli, which
refuses unknown words, gets none. A routing group has none of them.
default_effort is now recorded in the stash as magpie's (kimiOwn), so a
level the user picked stays while the model has it. A table with high
and no record is read as the high magpie wrote before it kept one, and
becomes the vendor's default (max on K2.8, high on K3/K3.1).
Left out:
- video_in: with type="kimi" Kimi Code uploads a video to
{base_url}/files (purpose=video) and sends the ms:// id. The gateway
has no /files route, and the id belongs to the account that stored it.
Filed as #4485.
- dynamically_loaded_tools works (Kimi Code's tool select is behind
KIMI_CODE_EXPERIMENTAL_TOOL_SELECT): the loaded tools' system message
is lifted into the request's tools (liftMessageTools, #2322), so they
stay callable (TestKimiCodeLoadedToolsReachKimi), but each load
restarts Kimi's prompt cache. Filed as #4486.
- max_output_size: Kimi's own provider writes none; magpie keeps writing
the model's known reply cap (32768 on K2.8 per models.dev), unchanged.
This also covers #3399 (K3.1 offered thinking off): Kimi's list says
"only" for both K3.1 models.
Real list: tests read Kimi's /coding/v1/models reply of 2026-10-31
(internal/catalog/testdata/kimi-code-cn-models-2026-10-31.json, read
with the owner's kimi-code-cn key, no key in the file).
Run (mote, at this commit on origin/main b62fa332f; the agent-wiring.md
line was added after the run, docs only):
- go test -tags nogui -count=1 -timeout 45m ./... : 79 packages ok;
internal/proc (TestNoCommandBypassesProc) and internal/sqlitedb
(TestOnlyThisPackageReachesSQLite) red on a Go module cache my e2e
sandbox had left inside the run folder (vendor files under
e2e-kimi/sb/home/go/pkg/mod); with it removed both ok.
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./... ok; gofmt -l clean.
- Real Kimi Code 2.4.1 (npm) in a sandbox HOME/KIMI_CODE_HOME on mote,
with a sandbox magpie serve (MAGPIE_ADDR 127.0.0.1:34652), the
kimi-code-cn preset pointed at a fake upstream that serves the real
list: magpie wrote the six tables (K2.8: thinking, always_thinking,
image_in, tool_use, dynamically_loaded_tools, support_efforts low/high/
max, default_effort max; K2.7 Highspeed without
dynamically_loaded_tools), Kimi Code took the config, and `kimi -p`
reached the upstream with thinking enabled and reasoning_effort max
(K2.8) and high (K3.1 Pro).
- Rebased onto 43966a53f..f2eb56c6b (claude, GUI budget, usage; none of
them touch these files) as f5a82f215, then again at this head:
internal/agent, internal/catalog, internal/provider ok, internal/gateway
-run 'Kimi|MessageTools|Lift' ok. The full suite was not rerun there.
Broken by hand, each red then green:
- kimiFacts not called: TestFetchKimiCodeFacts and
TestKimiCodePlanCapabilities red.
- fields not carried in route.go / entryFor: TestKimiCodePlanCapabilities
red.
- the unrecorded-high rule off: TestKimiCodeOldHighBecomesTheVendorsDefault
red.
- always_thinking without the !legacy guard: the kimi-cli case red.
Not tried: the TUI picker by eye (that the thinking switch is gone);
tool select with a real MCP server and the experimental flag; Windows
(the reporter's system; nothing here is OS-specific); a real Kimi
upstream through magpie (the list was real, the chat was a fake).
|
||
|
|
f51ab771f6 |
catalog, provider: a model only models.dev's lab lists is known, and a Claude account lists the gated models Anthropic told its Claude Code of (iebb on Discord)
iebb on Discord (10-27): his account has Claude Mythos 5.1, magpie doesn't list it. models.dev took the gated Mythos 5.1 out of anthropic's provider list (models.dev #11327) and kept only its lab file, models/anthropic/claude-mythos-5-1.toml (#11328). Cause. magpie read only models.dev's api.json (providers -> models). The Claude subscription's list was exactly catalog.Provider("anthropic"), so Mythos 5.1 left it with that PR. And a vendor list that still returns it (an Anthropic key's /v1/models) got no window, reply limit, name or thinking for it, since nothing read the lab catalog. Fix. - catalog: Sync also keeps models.dev's lab catalog (models.json) as labs.json beside the cache, through temp+rename; a failed fetch keeps the last one, and a cache without it is Stale once a process. A model only a lab lists votes into the same tables as a listed one (ContextOf, OutputOf, NameOf, Thinks, SeesImages); a model a provider lists keeps what providers say. A thinking lab-only model with no levels takes those of the newest of its family a provider gives (labKinEfforts: Mythos 5.1 takes Mythos 5's). catalog.Describe builds a Model from an id for lists that name ids alone. - provider: the Claude account's list is models.dev's anthropic list plus what Anthropic told the account's Claude Code beyond it, read from .claude.json's additionalModelOptionsCache / modelAccessCache / additionalModelCostsCache (Claude Code's own sign-in and each saved account's directory). Account.Lists honours modelAccessCache's entitled per account, ListPrice falls back to Anthropic's price from additionalModelCostsCache, and the agent's own Claude Code picker (claudeOwn) offers the signed-in account's extras. WSL keeps the catalog list. magpie still asks Anthropic nothing with a Claude sign-in; nothing is sent differently, no Claude Code mimicry change. - docs/subsystems/providers-accounts.md: two rows, the lab catalog and a Claude account's models. Testdata: models.dev's api.json and models.json as served on 10-27, cut to the anthropic and azure providers' Claude models and the anthropic lab. Tests never reach the network. Run: - TestLabOnlyModelIsKnown, TestLabsLeaveListedModels, TestSyncKeepsLabs, TestClaudeAccountListsGatedModels, TestAnthropicKeyGatedModelDescribed: pass. - go test -count=1 -timeout 45m ./internal/catalog/ ./internal/provider/ ./internal/agent/ ./internal/gateway/ at |
||
|
|
c8b4ac7755 |
fix(catalog): honor models.dev reasoning toggles (#1294)
* catalog: honor reasoning toggles as off effort Include none when models.dev reports both a reasoning toggle and effort levels. Keep toggle-only entries level-less, and leave effort-only entries unchanged. Validation: go test ./... with GOFLAGS=-tags=nogui; all packages pass. The new catalog regression failed before the fix and passes after it. No vendor API request was made locally. * catalog: limit reasoning off to DeepSeek * catalog: include verified Kimi reasoning toggles * fix(catalog): keep off effort provider scoped |