New docs page in three languages: a summary of each tool, a table
(agents, how it switches, protocol translation, subscription sign-ins,
routing and failover, GUI and CLI, platforms, license), which one fits,
and an FAQ with FAQPage JSON-LD. Linked after "Models in OpenCode" in
every docs page's nav and footer, in sitemap.xml and llms.txt.
CC Switch and CCR facts come only from their own READMEs (fetched raw,
Nov 2026); each column is dated. Cells their README doesn't cover say
"not stated": CCR subscription sign-ins, CCR macOS signing, CC Switch
CLI. magpie facts from its source and llms.txt.
Run: mote-run site tests (worker.test.mjs install.test.mjs), 69 of 69
pass. Generator: magpie-wt/seo-scratch/altgen.py.
New docs/opencode-models in English, Chinese and Japanese: DeepSeek, Kimi, GLM, Qwen and Claude/ChatGPT/Copilot sign-ins in OpenCode, what magpie writes in opencode.json (internal/agent/agents.go openCodeLike, magpieProviderJSONAt), small_model, reasoning variants, cost, magpie visible, magpie opencode default. Linked from every docs page's nav and footer, sitemap.xml and llms.txt.
Run: mote-run sh -c 'cd site && node --test worker.test.mjs install.test.mjs': 69 pass, 0 fail.
Not tried: a real OpenCode run against the page's steps.
/docs/local-models and its zh and ja pages: Ollama, LM Studio, oMLX and
MLX-Serve presets with their default addresses and the APIs magpie uses
for each, which agent goes through as is and which is translated,
another port or computer (Server address, the certificate switch),
vLLM and llama.cpp through Custom + Detect APIs, the context window and
masking. Linked from every docs page's nav and footer, the sitemap and
llms.txt.
Facts read from the provider presets, internal/cli/providers_cli.go's
help text and i18n.js labels. Left out for lack of evidence: detecting a
running Ollama, Ollama's default num_ctx, how well local models call
tools, default ports for llama.cpp and vLLM.
Run: mote-run sh -c 'cd site && node --test worker.test.mjs
install.test.mjs' at this tree: 69 pass, 0 fail.
New pages, en and zh, built on the claude-code-models template (same
head, nav, footer, TechArticle + FAQPage JSON-LD, canonical, hreflang):
- /docs/gemini-cli-models: pointing Gemini CLI at the gateway's Gemini
API, the four keys magpie writes, going back to Google, subscription
models in Gemini CLI, routing.
- /docs/subscriptions: the built-in subscriptions and their model
prefixes, sign-in, using one in another agent, several accounts,
routing modes and fallback, other tools through the gateway.
Every docs page (en, zh, ja; ja links to the English URLs) gets the two
nav and footer links after the Codex guide, the 4 URLs go in
sitemap.xml and the 2 English ones in llms.txt, as 082ca55a3 did.
Facts come from:
- internal/agent/gemini.go: .env GOOGLE_GEMINI_BASE_URL and
GEMINI_API_KEY, settings.json security.auth.selectedType
(gemini-api-key) and model.name, the stash and restore on unroute,
the auth options (google, api-key with a Google Gemini provider's
key, vertex), detection by the gemini binary on PATH and not
~/.gemini (#230, #330), the auth warning, WSL distros.
- internal/gateway routes for /v1beta/models (generateContent,
streamGenerateContent, countTokens).
- CLI forms from the command parser: magpie gemini model <id>,
magpie gemini default|google, magpie accounts add <sub>,
accounts add copilot --host, accounts project gemini, accounts
discovery off.
- The existing docs (start, integrate, privacy, claude-code-models,
codex-models) for the subscription list and plans, Claude requests
running through the installed Claude Code, the routing modes,
auto/<model> groups, the compacting rule matching Gemini CLI, the
Connect section's base URLs, and "no magpie server in that path".
Left out as unverified: whether Gemini CLI's own /model picker lists
magpie's models.
Run:
- mote-run sh -c 'cd site && node --test worker.test.mjs
install.test.mjs': tests 69, pass 69, fail 0.
- A Python check that every site/public/docs HTML file's tags balance
(html.parser) and every ld+json block parses as JSON: 0 bad.
Google sends 6,140 clicks in 28 days, every one on "magpie" or a
misspelling of it: no one finds magpie by searching for what it does.
These two guides, in English and Chinese, answer the searches it should
win: "claude code deepseek", "Claude Code 接入国产模型", "codex kimi",
"Codex 使用第三方模型".
- docs/claude-code-models and docs/zh/claude-code-models: why Claude
Code needs a gateway, the setup in the app and the CLI, how the
opus/sonnet/haiku/fable tiers map, every settings.json key magpie
writes and how it is undone, GPT models from a ChatGPT or Copilot sign-in,
several keys, and an FAQ.
- docs/codex-models and docs/zh/codex-models: the same for Codex, with
/model's catalog, the two shapes of config.toml (signed in to ChatGPT
or not), going back, Claude in Codex.
- Each page has TechArticle and FAQPage JSON-LD, canonical, hreflang
(en, zh, x-default) and og tags. Both are in every docs page's nav and
footer, in the sitemap and in llms.txt.
Every claim is checked against internal/agent/claude.go, codex.go,
internal/codexcat, internal/provider/presets.go and the gateway, or taken
from docs/start.html (Copilot models in Claude Code). No ja pages yet;
the ja nav links the English ones, as it does for integrate.
Run: node --test worker.test.mjs install.test.mjs on mote, 69 pass.
A relay's "Add to magpie" link can now name the URL that tells a key its
balance, where the amount sits in the reply, and GET or POST. magpie
takes it only on the host of one of the link's own base URLs, over
https, with no userinfo or fragment, so a link can't send the key
anywhere its requests don't already go; anything else refuses the whole
link. balance_path or balance_method without balance is an error. No
header or token is taken from a link: an account-wide token is worth
more than a key, and a URL stays in browser history.
- provider.ParseImport: linkBalance checks and sets BalanceURL,
BalancePath and BalanceMethod.
- CLI: the import preview shows the balance URL and doesn't ask it
before yes (showProviderAsking).
- GUI: the import dialog shows method, URL and field (.imp-bal).
- Docs: docs/import in en, zh and ja (table rows, a note on headers,
the builder's three fields with the same host check, a security
bullet); docs/reference.md's parameter table.
Run on mote at this tree (rebased on 8fa3c60f8):
- go test -count=1 ./internal/provider ./internal/gui: ok
(TestParseImportBalance, TestCoreScriptBudget in it).
- go test ./internal/cli: ok but TestEveryRouteHasACommandOrIsNamed,
red on main since f418edffc (GET /api/context/session); fixed in the
next commit, and ok there with -run 'TestEveryRoute…|Import'
(TestImportPreviewAsksNoBalance).
- GUI import-link-balance, import-link-gemini, i18n-keys: 43/44. The
red is i18n-keys "a plugin's words are its own", the same three
strings on an origin/main 8fa3c60f8 copy (#5327, #5426, #5482).
- GOOS=linux go vet -tags nogui and GOOS=windows go vet of provider,
cli, gui: ok. gofmt -l: clean.
Not tried: a real link with balance= imported into the app and read
against a real relay's balance endpoint.
heatonz on Discord asked for Voyage AI, its embeddings and rerank. The
gateway already had /v1/embeddings and /v1/rerank; what was missing was
a way to add Voyage and have its models found there.
- presets.go: `voyage`, a vendor with an API key at
https://api.voyageai.com/v1 (docs.voyageai.com, keys at
dashboard.voyageai.com). Voyage has no /models, so it is NoList and
the preset names its models in two new PresetDef fields, Embeddings
(voyage-4-large, -4, -4-lite, code-4, finance-2, law-2, 3-large, 3.5,
3.5-lite, code-3, code-2) and Rerankers (rerank-3, -3-lite, 2.5,
2.5-lite), as Voyage's docs list them on 11-06. Region gets
Rerankers too.
- models.go: planMedia marks each plan model with what it serves
(catalog.Model.Serves), falls back to the preset's own lists when the
provider has no region, and PlanRerankers / PlanRetrieval(kind) sit
beside PlanEmbeddings. A NoList provider's ListAll has them too,
marked, so catalog.Chat keeps them out of agents' lists, keys and
Routing's chat pickers.
- gateway: resolveRetrievalModel and servesKind look up the kind asked
for (PlanRetrieval(kind)) and not only embeddings. Before this, a plan's
embedding model named on /v1/rerank was sent there, and a plan's
reranker was never found.
- catalog.ServesOf: `voyage-*` is an embedding model (its ids have no
"embed"), so Test, detection and a relay serving voyage ids know it.
- test.go / gui providers.go: the retrieval-only Test fallback and the
editor's "retrieval" count read PlanRetrieval as well.
- docs/reference.md: a new "Embeddings and rerank" section with both
routes' bodies (OpenAI's for embeddings; the Cohere/Jina/Voyage shape
for rerank, top_n or top_k) and the Voyage preset. READMEs and the
import docs pages (en, ja, zh) list it.
Not served: Voyage's contextualized and multimodal embeddings (their own
endpoints). A Voyage 4xx comes back as its raw {"detail": ...} body with
its status (errorSaid has no "detail" reader).
Tests (no network; a fake built from Voyage's documented request and
reply shapes): TestVoyageEmbeddingsAndRerank (bare and provider ids,
input_type/output_dimension and top_k/return_documents passed on, usage
total_tokens recorded), TestVoyageModelsStayOnTheirRoutes,
TestVoyageRefusalSaysWhy, TestVoyagePreset,
TestVoyageTestAsksItsRetrievalAPIs, TestServesOf's voyage cases.
Run on mote: go test -count=1 -timeout 45m ./internal/provider
./internal/catalog ./internal/gui ./internal/gateway. provider, catalog
and gateway ok. gui has one red, TestMainWindowCorners/macOS_26_SDK,
which is #3949 (red on macOS 27); this change doesn't touch AppKit.
go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./... ok. gofmt -l clean.
Broken by hand:
- resolveRetrievalModel/servesKind back on PlanEmbeddings:
TestVoyageEmbeddingsAndRerank red (rerank-3: 404 "magpie knows no
model"), TestVoyageModelsStayOnTheirRoutes red (voyage-4 on /v1/rerank
answered 200).
- the voyage- prefix out of ServesOf: TestServesOf and TestVoyagePreset
red.
Not tried: against the real API. No Voyage key was available, so the
endpoints, auth and shapes come from Voyage's docs alone. Not tried in
the GUI's Add sheet by hand, and not on Windows or Linux beyond vet.
luckymanjc. on Discord asked for one place that says how the Library
works underneath and how to set it up. site/public/docs/library.html
(and zh/, ja/) covers each tab: where it is kept (library.json, library/,
backups/ with the last 30), instructions and their markers, MCP servers
(per-agent files, ${NAME} variables, SSE limits, single tools off, OAuth
through /mcp/<name>, link to the MCP router page), skills (folders per
agent, links vs copies and how a copy's edit is taken back, editing,
the 12h update check, ~/.agents/skills, off here), subagents (file per
agent, which agents bind skills/MCP servers, agents with none), the
subagent model (written for Codex only, laid over the spawn; the Agents
page's Codex subagent model with Lead's pick / Same as the lead / a
model, which wins over the Library's; default_subagent_model; the
ChatGPT-sealed exception; Claude Code's own order), hooks and RTK.
Every fact was read from internal/library, internal/gateway and
internal/provider codex_subagent.go, internal/agent/codex.go and the
Library page's client.js and i18n, not guessed. The nav (toc-only) and
footer of all 32 docs pages and the sitemap link the three pages.
Run (mote, through mote-run):
- a Playwright script serving site/public, in Chromium and WebKit at
1280px and 400px, on all three pages: h1, docs.css loaded, 4 tables,
no sideways scroll (scrollWidth - innerWidth = 0), every toc and
in-page anchor has its id, no 4xx on any asset, no page errors, no
left border or gradient in the article, the language menu goes to the
sibling pages; every local link on the pages resolves to a file
(except /zh/ and /ja/, which the worker serves; checked live after
deploy), and every docs page links /docs/<lang>/library twice. ok.
Screenshots looked at for desktop en and 400px zh.
- node --test site/worker.test.mjs: 30 pass, 0 fail (it includes the
sitemap-lists-every-docs-page-with-its-own-canonical test).
Broken by hand: the first script run had a wrong toc selector and
counted the toc-only nav links as missing anchors; fixed the script,
not the page.
Not tried: no Go code changed, so no go test. The Library page's
"Copies" note still says "edits made in a copy are replaced", while
skill_edits.go takes the newest edit into the library; the docs follow
the code.
LongCat makes its own models (LongCat-2.5, launched 11-02) and serves them
at api.longcat.chat. magpie had LongCat's icon but no preset for it.
The new preset is longcat ("LongCat", KindVendor, icon longcat, catalog
models.dev's longcat). It uses:
- chat completions and Responses at https://api.longcat.chat/openai/v1;
- Anthropic messages at https://api.longcat.chat/anthropic;
- docs at longcat.chat/platform/docs/zh/api-docs, keys at
longcat.chat/platform/api_keys.
The key goes as a Bearer. magpie sends both headers, and the docs ask for
Bearer on both endpoints; x-api-key alone gets "missing_api_key". The model
list is /openai/v1/models. longcat.chat's and longcat.ai's accounts use the
same API host (both sites' api-docs pages name api.longcat.chat).
An entry at those endpoints imports as the preset, for example CC Switch's
Claude Code and Codex entries from LongCat's cc-switch page. OpenCode's
auth.json "longcat" (models.dev's id) maps to the preset too. The README
(en, zh), docs/reference.md and the site's import pages (en, zh, ja, and
import.html, with the icon) list it.
Sources, read 11-02: api-docs, api/models, api/model, api/model-params,
api/chat, api/messages, image-video-understanding, cc-switch, pricing/
longcat-2.5, change-log, faq.
Probed without a key, from this machine: /openai/v1/models and
/anthropic/v1/models answer 401 authentication_error "missing_api_key".
/openai/v1/chat/completions, /openai/v1/responses and
/anthropic/v1/messages with a bad Bearer answer 401 "incorrect api key".
Run at this head (base d24be3c25, origin/main at push), on mote:
- TestLongCatPreset and TestLongCatList (the docs' literal /models
example) pass. TestLongCatPreset goes red with the OpenCode mapping taken
out ("OpenCode import: … Skip:it has no base URL").
- gofmt -l and GOOS=linux / GOOS=windows go vet ./internal/provider are
clean.
- go test -tags nogui -timeout 45m ./... is ok except three tests that
have issues already:
- TestEveryRouteHasACommandOrIsNamed (#4826) is red on a clean
d24be3c25 too.
- TestKeepOffWaitsForTheSetting (#3687) is red on a clean d24be3c25 too.
- TestCodexPoolSaysTheClientsVersion (#4807) is red in the full package
run and passes 3 of 3 alone on d24be3c25.
- GUI add-sheet and add-button pass in Chromium and WebKit (12/12). No GUI
file changed: the add sheet draws presets from /api.
Not tried:
- a real LongCat key or a real request (none available).
- LongCat-2.5's window (1M), output cap (256K) and image input. These come
from models.dev, which so far lists only LongCat-2.0 and
LongCat-2.5-Preview, and LongCat's /models gives no facts. Until
models.dev adds LongCat-2.5, magpie doesn't know them for it.
- LongCat's thinking switch ({"type":"enabled"|"disabled"}).
usemagpie.ai had no sitemap, a robots.txt with Cloudflare's comments
only, a home page titled just "magpie" in every language, and docs
pages with no canonical or x-default.
- public/sitemap.xml lists the home page in en, zh, ja and de and every
docs page by its clean URL. A test fails when a docs page on disk is
missing from it, or it lists one that isn't there.
- public/robots.txt names the sitemap and keeps crawlers off /api/,
/go/, /r/ and /download, so a crawler's fetch isn't counted as a
download or a partner click.
- The home <title>, og:title and twitter:title name the agents
("magpie: one model switcher for Claude Code, Codex and Gemini CLI"),
translated by worker.js like the rest (meta.title, meta.locale in
i18n.js). og:type, og:site_name and og:locale are added, plus JSON-LD
for a free, MIT-licensed SoftwareApplication and the WebSite.
- Each docs page has rel=canonical to its own clean URL and an
x-default alternate to the English page, plus og:site_name. A test
checks each one, and that every hreflang alternate is a listed page.
Run: on mote, node --test worker.test.mjs install.test.mjs from site/
at this tree: 54 of 54 pass. Broken by hand in a copy: a docs page
without its canonical, and the sitemap without docs/zh/docker, each
turns the sitemap test red.
Not tried: Google's Rich Results test; the live check is after deploy.
usemagpie.ai/docs/contributors, /docs/zh/contributors and
/docs/ja/contributors list each person the release notes' thanks line
would (the previous commit's rules), with the versions their reports,
ideas or code went into, newest first: three shown, the rest under
"N more", each linking its release. A name with a known GitHub login
links it; the platform a report came from (Discord, X, …) sits under it.
How it is built: wrangler.jsonc's build runs `node credits-cli.mjs wall`
at each deploy. It reads every tag's commits from git, the issue authors
from GitHub (reusing the last build's answers), and writes
public/contributors.json and the table in each language,
public/contributors/{en,zh,ja}.html (gitignored). worker.js puts that
table into the page's #wall with HTMLRewriter; without it the page keeps
a line pointing at the release notes. A build that can't read git leaves
the last list. The page says how names are found (only as already public
in the history, no emails, no maintainer, agents or bots) and how to be
left off: Discord, an issue, or a PR to site/contributors-exclude.txt.
Every docs page's footer and the home page's (foot.contrib in zh, ja, de)
link it. Styles reuse docs.css's table and tokens.
Run (mote, node 22): node --test site/*.test.mjs 77/77. The wall on a
clone of origin/main c991733d with a real token: 1338 people over 5933
released commits in 19s, ~1MB of table a language, no email address in
it.
Broken by hand: withWall matching /docs/contributors only → the
injection test red on /docs/zh/contributors; ja/docker.html's footer link
removed → the footer test red on it.
Not tried: the page in a browser before deploy (the worker's rewriter is
stood in for in the test; the deployed pages are checked after).
This reverts 25d405814. It answered a message the owner then said
was not meant for this session, so the site keeps its icons as they
were. Redeployed with wrangler and fetched both icons back.
On a phone a usemagpie.ai link showed its icon inside a white ring
(the owner: "包了一层白边"). favicon.png and the apple-touch-icon
(img/icon-256.png) were the macOS app icon, a rounded tile with ~10%
transparent margin on each side; a phone fills the transparency white
and rounds the square itself, so the tile sat inside a white border.
- favicon.png: 64px from the GUI's full-bleed apple-touch-icon,
opaque, no margin.
- apple-touch-icon.png (new, 180px, also the path iOS asks for by
itself): the GUI's apple-touch-icon, which already fills its square.
Every page's <link rel="apple-touch-icon"> points at it.
- img/icon-256.png is left as it was: install.sh takes it as the Linux
desktop icon and the READMEs show it, where the macOS shape is right.
Run: sips on both files (64x64 and 180x180, opaque); looked at both;
grep shows no page still names /img/icon-256.png as its touch icon.
Deployed with wrangler and fetched both from usemagpie.ai.
Not tried: a real iPhone's home screen or Safari tab after the deploy.
judi0713 on Discord (v0.1.2288) asked for Qwen Cloud (qwencloud.com).
Its keys are its own, made at home.qwencloud.com, and serve neither
DashScope's nor Bailian's hosts, so none of magpie's Qwen presets took
them.
Two presets, the way Alibaba's other pay-as-you-go/Token Plan pair is
modelled, because each key gets 401 at the other's host:
- qwencloud: pay as you go, sk-ws- keys, at
https://{region}.maas.qwencloudapi.com/compatible-mode/v1 (Chat) and
/apps/anthropic (Messages), in six regions named by their ids as
Alibaba's docs name them: ap-southeast-1 (the default), us-east-1,
eu-central-1, ap-northeast-1, cn-hongkong, cn-beijing. Catalog alibaba.
- qwencloud-token-plan: sk-sp- keys, token-plan.maas.qwencloudapi.com,
Singapore only, with the plan overview's text models.
Endpoints, regions, key prefixes and the plan's models are from
docs.qwencloud.com ("Regions and endpoints" and the Token Plan
overview), not guessed. Responses is left out, as in the other
Qwen presets.
The gateway's dashScope() now knows both presets and the
*.maas.qwencloudapi.com hosts, so a Qwen Cloud stream gets the same
enable_thinking handling a DashScope one does. Import (presetAt), the
CLI's region= and magpie://import?preset=qwencloud®ion=... map to it.
docs/reference.md, the CLI help and the site's import page (en, zh, ja)
name them. Region names are ids, so no string is new to i18n.js and
nothing in the GUI changed.
Run (mote, at 708213f65 on c272e5582; after it the commit was rebased on
876d477d7, which touches none of these files, and the new helpers' comment
was moved above bedrockRegions' doc comment, no code changed; at the pushed
head the provider tests below ran again, ok):
- gofmt -l: clean.
- go vet -tags nogui ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: ok.
- go test -tags nogui ./... -timeout 45m -count=1: every package ok
(gateway 804s, provider 205s) except two reds already filed, in files
this doesn't touch: internal/proc TestNoCommandBypassesProc
(claudetui/child_unix.go's exec.Command, #4491) and internal/update
TestRelaunchOpenTriedAgain (TempDir cleanup not empty, #3881).
- At the pushed head: go test ./internal/provider -run
'TestQwenCloud|TestQwenTokenPlan|Preset|TestParseImport': ok.
- No GUI change, so no GUI run.
Broken by hand:
- Preset ids renamed: TestQwenCloud red ("no preset qwencloud-token-plan").
- gateway.go's dashScope() back to main: TestDashScopeHosts red on the 5
new Qwen Cloud entries; the maas.qwencloudapi.com.example case stays
not-DashScope.
Not tried:
- No real Qwen Cloud key: no request went to qwencloudapi.com.
- The decision model (decide.go's bailianDecides hosts) doesn't know
Qwen Cloud, and image models on these presets are the next commit's.
- The site isn't deployed by this commit.
The feature is called the MCP router now (the commit before). The docs
pages move to mcp-router.html in en, zh and ja, their wording follows
(MCP router / MCP 路由 / MCP ルーター, `magpie library mcp router on|off`),
and every docs page's link and canonical/hreflang URL points at the new
path. The worker answers /docs/mcp-hub, /docs/zh/mcp-hub and
/docs/ja/mcp-hub (with or without .html or a trailing slash) with a 301
to the new page, keeping the query, so links already shared still open.
The plugins pages' link to the router page (Search1API's tools,
from the rebase) follows too.
Run at e2583df31 (this stack on 86fef947e), on mote: gofmt -l clean;
go vet for darwin, linux (-tags nogui) and windows; go build ./...;
go test -tags nogui ./... -timeout 45m, 81 packages ok, 0 FAIL;
library, gateway, imagemcp, sessions, cli and gui again alone, ok;
site's node --test, 49 of 49. GUI on xiaomi-gpu (Windows; mote's
browsers crashed under other sessions' suites): library-*, image*,
mcp-hub-direct, i18n-keys, list-sort and plugin-tools, both engines and
every language, 1055 of 1056: i18n-keys found "{name} is given to each
agent directly" dropped from the library's strings in the rebase. Put
back in the first commit; at the pushed head i18n-keys, mcp-hub-direct
and library-mcp-hub are 48 of 48. That is the only difference from
e2583df31.
Broken by hand at e2583df31: imagemcp ignoring magpie/roots fails
TestHubCallSavesInTheCallersProject; the router asking anything but
roots/list fails TestHubAsksTheAgentItsRoots and TestHubRootsUnasked;
inHub leaving magpie-image out fails TestHubGivesMagpieImage.
Checked: no 聚合, ハブ or mcp-hub left under site/ except the redirect.
The worker's redirect test fails without the redirect line (not ok 7).
Rebased once more onto 2570efb5f, which changed library-mcp-hub,
list-sort, mcp-hub-direct and gateway-routing.md. Run at the pushed
head: go build; gateway, library, cli and imagemcp tests ok; the GUI
budget tests ok; on xiaomi-gpu i18n-keys, mcp-hub-direct,
library-mcp-hub and list-sort, 51 of 54. The three reds were WebKit
420px library-mcp-hub cases with no Connect sheet after a reload.
origin/main d77da5bff goes red the same way (de 420px, 9 of 11). In a
second run of library-mcp-hub on WebKit at this head, 11 of 11 passed.
Filed as #4483.
CyberCaius (Discord) asked what the Library's MCP hub is for. The page
says what the switch does, how to turn it on (GUI and
`magpie library mcp hub on|off`), the /mcp/magpie/hub address for other
apps, which agents keep their own entries and why, and when to leave it
off. Facts from docs/subsystems/mcp-hub.md and internal/library/mcp_hub.go.
Every docs page's nav and footer link it after Privacy masking.
Run: site's node --test on mote from the repo root, 45 of 45 pass.
YH31377807 on X asked how to use magpie's local masking (咋用?能出个
教程吗?). The docs had only a short section on the Privacy page.
/docs/masking, /docs/zh/masking and /docs/ja/masking: turning it on in
Settings › Privacy, settings.json for magpie serve and Docker (no CLI
command exists), what each switch masks, an example, how to check it
(Try it, the shield badge on Gateway and Routing, Insights › Masking,
~/.config/magpie/masking), Mask/Warn/Block and Never mask, and limits.
Each docs page's nav and footer link it; the Privacy pages' masking
section points to it.
Checked against the source: the secret rules and personal kinds in
internal/redact/redact.go and more.go (Categories and their defaults),
masking.Wanted and options in internal/masking, the sealed/kept keys in
redact/json.go, Hint for the Block message, gwmw.ErrUnmasked (503) and
maskBlocked (400), the GUI labels from index.html/app.js and their zh and
ja strings in i18n.js, plugins/redact's name. The example's output is
redact.Preview's on that text, run in a throwaway test (placeholders
differ per run's key).
Run: node --test site/worker.test.mjs site/install.test.mjs (31 pass).
The three pages rendered in Chromium and WebKit at 390 and 1280 px with
no horizontal scroll and no page errors; tags balanced.
Not tried: the GUI itself; labels read from source.
An import link could set chat=, responses= and anthropic= but not
gemini=, though the editor and the TUI take a Gemini base URL; a link
with only gemini= failed with "it needs chat=, responses= or anthropic=".
ParseImport now reads gemini= under the same base-URL rules, and the
error names it (ggbdpq's patch, with docs/reference.md and the en/zh
docs rows).
Its siblings that listed the three base URLs:
- the GUI's import dialog warned "Your prompts and this key will go to ;"
with no host for a gemini-only link: it names the Gemini host now;
- the site's handoff page (site/public/import.html) left it out of
"Sends to";
- the docs' link builder (en, zh, ja) had no Gemini field and didn't
count it as a base URL; the ja docs lacked the table row, and all
three said one of chat/responses/anthropic is required.
Run:
- TestParseImportGemini fails on the old importurl.go ("the link gives
no base URL: it needs chat=, responses= or anthropic="), passes now;
go test -run Import ./internal/provider/ ./internal/gui/: ok.
- import-link-gemini.test.cjs: 20/20 (chromium+webkit, en/zh/zh-TW/ja/de,
1100 and 420 px); against the old app.js the warning reads "will go to
;" and it fails.
- docs builder (en/zh/ja) and handoff page in Chromium from file://: a
gemini-only builder gives magpie://import?name=…&gemini=…, no errors;
the handoff page lists gem.example under Sends to.
- gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows: clean.
Not tried: a real magpie://import click through the OS handler.
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
SiliconFlow asked (by mail) for its international site, api.siliconflow.com,
in magpie. It is a separate account with its own keys page and a $ balance,
so the siliconflow preset now has two regions: China (the default, so every
saved provider and link reads as before) and Global, with
cloud.siliconflow.com's key page and console. The balance read already knew
the .com host. Import links take region=intl; the import docs (en, zh, ja)
list it. "Global" reuses the GUI's existing translations.
Run: go test ./internal/provider/ (ok, 541s), incl. the new
TestSiliconFlowInternational: an intl link gets the .com endpoint, key
page, console and $ balance source; FromPreset stays on .cn; a saved .cn
provider sits at region cn and an intl one at intl. gofmt, go vet clean.
Not tried with a real international-site key (no account).
Nous Research makes the Hermes models and serves them, with other makers'
models, through Nous Portal. #392 was wrongly answered as a relay. A new
preset, nous ("Nous Portal", KindVendor with Hosts, lobe-icons
nousresearch icon), points chat completions at
https://inference-api.nousresearch.com/v1. A Portal API key goes in as a
Bearer, the way Hermes Agent's own nous-api provider uses NOUS_API_KEY.
The model list is the Portal's /v1/models, which uses vendor/model ids.
An entry another app has at that URL, such as Hermes Agent's base_url,
now imports as the preset.
The preset sets no Anthropic endpoint. The Portal's /v1/messages serves
only its anthropic/* models (Hermes Agent's
test_nous_portal_anthropic_wire.py), so Claude Code's requests are
translated to chat completions for every model. It sets no Responses
endpoint either, because none is documented.
The preset is added to the README (en, zh), docs/reference.md, and the
site's import pages and icon.
Sources:
- hermes-agent docs: integrations/nous-portal, integrations/providers,
features/subscription-proxy.
- hermes-agent source at 6e7b83a2: hermes_cli/auth_constants.py
(DEFAULT_NOUS_INFERENCE_URL), plugins/model-providers/nous,
cli-config.yaml.example ("nous-api - Nous Portal API key (requires:
NOUS_API_KEY)"), agent/anthropic_endpoints.py, and
tests/e2e/core/live/_helpers.py, whose live run calls the Portal with
NOUS_API_KEY.
Probed without a key:
- /v1/models answers 200 with 423 models.
- /v1/chat/completions with a bad Bearer answers 401 "Your API key is
invalid, blocked or out of funds".
- /v1/messages answers an Anthropic-shaped 401.
Not tried: a real Portal key or a real request, since no key was
available. Also not built: OAuth sign-in with the 1-hour token and its
refresh (Hermes Agent's ~/.hermes/auth.json).
Run:
- TestNousPortalPreset fails without the preset (no preset "nous") and
with an Anthropic endpoint added (endpoints: … "https://inference-api.nousresearch.com").
- go test -tags nogui of internal/provider, internal/gui and
internal/catalog passes.
- gofmt -l is clean.
- go vet, GOOS=linux go vet and GOOS=windows go vet -tags nogui on
./internal/provider pass.
- add-sheet and add-button GUI tests pass in Chromium and WebKit (6/6).
#1986 asked what the daily count sends, where the id lives and how to stop
it. The answer was spread over one README paragraph and the reference. A
new page, /docs/privacy (en, zh, ja), lists it from the code:
- the daily PostHog batch (internal/stats): a whole example, the label
rules for agents/providers/models, partner counts, the
$process_person_profile:false flag;
- every switch: Settings -> Privacy's two toggles, noStats/noUsageStats,
DO_NOT_TRACK / MAGPIE_NO_STATS, noAutoUpdate (About -> Automatic
updates), and that a change applies at the next hourly look;
- the files: install-id (made at the first send, not at first run, as the
issue said) and stats-sent in settings.Dir(), partner-counts.json in
the cache folder, their paths per OS and portable, and deleting them;
- what usemagpie.ai sees whatever the settings (update feed every 6h,
notes, partner list with its 1-in-10 sampled count, /go links, the icon
proxy) and the Cloudflare Web Analytics on the site's own pages;
- public lists fetched (models.dev, open.er-api.com, npm, GitHub) and
providers' quota reads with the user's own accounts;
- OTLP export, off by default, its env vars;
- why the count stays on by default in releases.
Every docs page in all three languages gets a Privacy link in its nav and
footer. README (en, zh) and start.html's "What does magpie send about
me?" (en, zh, ja) link to the page. docs/reference.md's Files list gains
install-id, stats-sent and partner-counts.json, and Counting users says
when the id is made, the hourly try, and links the page.
Checked against: internal/stats/stats.go, usage.go,
provider/partner_events.go, settings (NoStats, NoUsageStats,
NoAutoUpdate, UpdateEvery 360, otel.go), appdir, update, fx, catalog,
site/worker.js, and the GUI's Settings tabs/labels in index.html, app.js
and i18n.js (zh, ja).
Run: Playwright (Chromium and WebKit) on all three pages at 1100 and 420
wide, light and dark: no horizontal scroll, no element past the viewport,
no page errors (24/24), screenshots looked at for zh at 420 dark. Every
href/anchor in site/public/docs resolves; relative links in README and
reference resolve. node site/worker.test.mjs passes.
Not run: the page on the deployed worker (the site deploys by hand with
wrangler, so it is live at the next deploy); the language redirect for
/docs/privacy was not exercised beyond the worker's existing tests.
#1574 asks for Tencent Cloud Token Plan's usage through TokenHub's
DescribeTokenPlan API (api/1823/132270). That API covers Token Plan
企业版, the team plan, only. magpie's Tencent Cloud preset knew the
personal plan (api.lkeap.cloud.tencent.com/plan) and TokenHub's pay as
you go, not the enterprise plan, so a provider at it had nowhere to sit.
The preset gains two regions, after the old three so imports and links
are unchanged:
- enterprise: https://tokenhub.tencentmaas.com/plan/v3 (chat completions
and Responses) and /plan/anthropic, Guangzhou.
- enterprise-intl: the same paths on tokenhub-intl.tencentmaas.com,
Singapore.
Both use the plan's docs (product/1823/130659, 131173 for the 轻享套餐,
same endpoints) and the Token Plan console as the key page. Their model
lists are the doc's tables for each site, with the three GLM models it
says went away on 2026-10-09 left out, and without the deepseek/… ids.
An entry imported at those endpoints, a magpie://import link with
region=enterprise(-intl) and a provider moved there in the editor land
on the region; TokenHub's pay as you go at the same hosts stays at its
own. The site's import pages (en, zh, ja) list the two regions, and the
region names are translated in zh, zh-TW, ja and de.
Run: go test ./internal/provider (TestTencentCloud,
TestTencentCloudEnterprisePlan, red before the regions), gofmt; GUI
tencent-cloud.test.cjs in Chromium and WebKit, en and zh, 8/8.
Not tried with a real enterprise plan key: we have no Tencent Cloud
account.
A plugin's package.json icon, an import link's icon= and the library's
market icons sit on hosts their authors pick. magpie fetched each straight
from there, so an author could log the IP of everyone who opened Discover
or the library. The owner asked for icons to keep showing without that.
- site/worker.js: /api/icon?url=<https URL> fetches the picture from
Cloudflare with only Accept: image/* and its own User-Agent, follows
redirects, caps it at 1 MB (the app's MaxIcon), passes on only PNG,
JPEG, GIF, WebP, ICO or SVG (by bytes, as StoreIcon), and counts and
keeps nothing. It refuses http, userinfo, a non-443 port and
usemagpie.ai itself; 404s are cached 5 minutes, 5xx not at all.
- internal/iconproxy: URL(u) is the proxied address (MAGPIE_ICON_PROXY
for tests); a picture already on usemagpie.ai is asked for as it is.
- provider.FetchIcon (plugin, import link and partner icons) and
library.fetchImage (market icons, avatars) fetch through it. The
import link's checks (https, public host) still come first; there is
no direct fallback. provider.FaviconFor still reads the user's own
provider's site directly: they already send it their requests.
- Privacy text in README en/zh, docs/reference.md and site docs
start/import in en/zh/ja says so.
Ran:
- node --test site/*.test.mjs: 28 pass. The new test asks with Cookie,
UA, X-Forwarded-For and CF-Connecting-IP and checks only accept and
user-agent go upstream; 415/413/502/400 cases; its fetch stub throws
instead of reaching the network. With the usemagpie.ai refusal
removed by hand it goes red (27/1).
- TestFetchIconGoesThroughTheProxy and TestIconGoesThroughTheProxy
(author host is .invalid; an httptest server stands in for the proxy):
with the proxy taken out by hand both go red (provider: lookup
author.invalid; library: the proxy was never asked), green restored.
- go test ./internal/iconproxy ./internal/provider ./internal/library
./internal/gui: ok. gofmt -l clean; go vet darwin (those four),
linux (iconproxy, provider, library), windows (all four): clean.
Alibaba sells two Token Plans, both with sk-sp- keys, and a key works only
on its own host. qwen-token-plan is the Qwen AI platform's
(token-plan.maas.qianwenaiapi.com), but its website and keys links pointed
at Bailian's console. Bailian's own plan
(token-plan.cn-beijing.maas.aliyuncs.com) had no preset.
What changed:
- presets: new bailian-token-plan (chat /compatible-mode/v1, Anthropic
/apps/anthropic, decide on /compatible-mode/v1/systemone, models from the
docs' list, shared with qwen-token-plan as alibabaPlanModels).
qwen-token-plan's links now point at the Qwen AI platform. New
qwen-decision for Qwen's pay-as-you-go decision model at
maas.qianwenaiapi.com/compatible-mode/v1/systemone. bailian-decision shows
the Bailian icon instead of Qwen's.
- decide: bailianDecides also matches the bare maas.qianwenaiapi.com host.
A chat preset that also decides on a Bailian/Qwen host (bailianApart)
lists decision-model-preview as its only decision model, so it is offered
for routing groups and never given to an agent as a chat model.
- gateway: dashScope() covers bailian-token-plan and maas.qianwenaiapi.com.
- CLI help, docs/reference.md and the import docs (en, zh, ja) name the new
preset.
Usage: neither plan's docs give a usage or quota API; the remaining quota
is only on the console (百炼控制台 Token Plan > 我的订阅, Qwen 工作台
token-plan/individual), which needs a browser session. So no usage card is
added. An exhausted plan's 429 insufficient_quota is already read as out of
credit.
Not tried against the real API: no Bailian or Qwen key was available. The
stand-in is an httptest server copying the docs' systemone curl (Bearer
sk-sp-, model decision-model-preview) and its error table (401 on a wrong
key, 422 on a bad body). qwen-decision sends "Authorization: Bearer <key>";
the Qwen doc's curl shows the bare key, which is untested.
Run:
- go test -tags nogui -count=1 ./... (temp HOME)
- TestBailianTokenPlan, TestQwenDecisionPreset and TestDashScopeHosts fail
with the old decide.go and gateway.go swapped in
- gofmt -l; GOOS=linux and GOOS=windows go vet -tags nogui on .
internal/provider, internal/gateway, internal/gui
- GUI: system-one, add-sheet, gateway-decide-info, routing-kind tests in
chromium and webkit (20 pass)
Until now, both were only in docs/reference.md. The new pages are at
/docs/docker, /docs/remote and their zh/ and ja/ versions.
- docker: the image, its tags, ports, the /config volume and the nonroot
user. How to run it with the browser UI (`web --addr 0.0.0.0:3430
--no-open`, MAGPIE_WEB_KEY, the ?k= cookie). Signing in through the
Callback URL paste or `docker exec ... magpie accounts add`. What
/config keeps, the env vars, sharing with gateway keys, and a Compose
file for a NAS. Healthcheck and updates.
- remote: sharing the main magpie, then adding it as a Remote magpie
from the app, the TUI (a/w/m) or `magpie provider add remote-magpie
<key> url=... id=office`. What comes over (models, groups, APIs,
images, System One, embeddings, prices, quotas) and the errors magpie
shows, quoted from remote_quotas.go and lan.go.
The facts were checked against the code, not reference.md:
- the Dockerfile ENV, VOLUME, HEALTHCHECK and EXPOSE;
- docker.yml's tags;
- web_cli.go;
- the lanGuard in internal/gateway/lan.go;
- the remote-magpie preset.
The Docker page's warning says a Docker gateway answers anyone until
sharing is on, because MAGPIE_ADDR is 0.0.0.0 there.
The new links in the top nav bar carry a toc-only class:
- docs.js still lists them in the contents;
- the bar keeps today's width, since nine links overflowed it at
1024-1280px.
`.steps li` gets min-width: 0, so a long inline code no longer widens
the grid past a phone's width, where `overflow: hidden` clipped the
text.
Run:
- Real containers from ghcr.io/yetone/magpie:latest (v0.1.1150):
- the documented `docker run ... web` came up healthy, and its log
output is what the page shows;
- with "lan": true, `Bearer magpie` got 401 and a gateway key got 200;
- a second container ran `provider add remote-magpie <key>
url=http://<a>:3425 id=office` and listed office/test-relay/... models.
- `node --test site/*.test.mjs`: 23 pass.
- Playwright, in Chromium and WebKit, at 1280, 1024 and 390, light and
dark:
- no horizontal scroll and no nav overflow on all 20 docs pages;
- every internal link and #anchor resolves. /zh/ and /ja/ are routed
by the worker and return 200 live.
A developer of an AI app asked how to work with magpie and whether an app can
register itself after one confirmation. The page says what exists: the
gateway (find it via /api/hello and settings.json's port, the OpenAI,
Anthropic, Responses and Gemini endpoints, /v1/models' fields), how a key
magpie-<id> or the User-Agent's first word names the app in Usage, a row on
the Agents page by an adapter PR in internal/agent (config-edit, Cindy-style
own import link confirmed in the app, or a local API) with what the PR needs,
what plugins can and can't do, and what isn't there: no link or API registers
an app or installs a plugin, and magpie://import adds providers only. English
and Chinese pages, linked from every docs page's nav and footer.
TestThirdPartyAppIsCountedAsItself pins the attribution the page promises.
go vet and the gateway tests pass; site node tests pass; pages checked in
headless Chromium (no errors, TOC, no horizontal scroll at 390px).
* providers: qianfan personal, team and pay-as-you-go endpoints as its preset regions
* providers: qianfan review fixes — pay-as-you-go fetches /v2/models, enterprise naming, the plans' union models, a zh note
* providers: qianfan plans list nothing, pay as you go does — NoList scoped by region
* providers: qianfan review round two — old id maps to the new preset, the union models, IAM keys and a README section
* providers: qianfan key link follows the region — normalize takes it from the endpoints, the button from the plan picked
* providers: ParseImport takes a region key page
magpie://import now takes icon=<https picture>: the vendor's logo, PNG,
JPEG, GIF, WebP, ICO or SVG. It is fetched once, when the user opens the
confirm dialog — never at parse time — into magpie's icons folder, and
falls back to the catalog's logo or a plain mark when the fetch fails.
An explicit icon= wins over whatever catalog or preset gave.
The fetch is guarded on the way out: https only, at most 1 MB, the type
checked, and the host is resolved at connect time with loopback, private,
link-local and reserved addresses refused, so a name that points back at
the user's own machine (or a DNS-rebinding trick) never connects. The
page and the dialog never load a remote picture themselves.
IconURL is a carrier between parsing and that fetch only; Save drops it,
so it never reaches providers.json.
usemagpie.ai/docs/import explains import links, with a link builder and
buttons to copy; usemagpie.ai/import#… turns the fragment into a
magpie:// link and offers the download. install.sh registers the scheme
on Linux.