Commit Graph
11 Commits
Author SHA1 Message Date
yetone 83145e8d1d site: an OpenClaw docs page in en, zh and ja
/docs/openclaw says how magpie runs OpenClaw on magpie's models: the
magpie provider it adds to openclaw.json (the gateway's /v1, OpenAI chat
completions, a key of OpenClaw's own, one entry per model), the
magpie/<provider>/<model> refs, the primary model set with fallbacks
kept, magpie/* added to a non-empty allow list, 128K for an unknown
context, no restart but /model default for a chat that already has a
model, what is left alone (other providers, the user's own keys, a
per-agent model, $include, a JSON5 file), where the file is found
(OPENCLAW_CONFIG_PATH, _STATE_DIR, _PROFILE, _HOME) and
`magpie openclaw default`. Each claim is from internal/agent/openclaw.go
and the CLI's usage text. Linked from each language's OpenCode models
page; in the sitemap, llms.txt and llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
mote: node --test worker.test.mjs install.test.mjs: 71 pass, 0 fail.
Not tried: OpenClaw itself on magpie for this page; it names only what
magpie's source says.
2026-11-11 10:14:58 +08:00
yetone 4167419abf site: breadcrumbs in every docs page's structured data
Each docs page in en, zh and ja (98 pages, contributors left out) gets
a schema.org BreadcrumbList: magpie (the language's home page) > Docs
(that language's start page) > the page's h1. Search results can then
show the path instead of a bare URL. The eleven pages that had no JSON-LD
at all (docker, remote, intent, plugins, import, integrate, library,
mcp-router, masking, start, privacy) also get a TechArticle built from
their h1, meta description and canonical URL, like the other pages.
zh pages' inLanguage is zh-CN everywhere, as the older pages had it.
Existing JSON-LD is only appended to (the diff has no deletions besides
the inLanguage fix).

Run: every docs page's JSON-LD parsed with node (98 with a
BreadcrumbList); mote: node --test worker.test.mjs install.test.mjs:
71 pass, 0 fail.
Not tried: Google's Rich Results Test on the deployed pages.
2026-11-11 07:59:25 +08:00
yetone 4ca0befb8e site: docs pages for Anthropic and OpenAI API keys in every agent
New /docs/anthropic and /docs/openai in en, zh and ja: adding the key,
endpoints, model list, each agent's route (pass-through or translated),
what magpie does for the vendor (Anthropic cache marks and thinking,
OpenAI prompt_cache_key, Responses vs Chat, priority tier), reasoning,
web search, cost, several keys, troubleshooting and a JSON-LD FAQ.
Every claim was checked against internal/provider, internal/gateway and
internal/catalog. The "By provider" line on 30 pages, sitemap.xml (99
URLs), llms.txt and the rebuilt llms-full.txt link them.

Run (wsl-run, magpie-desktop; mote refused ssh at the time):
node --test worker.test.mjs install.test.mjs: 71 pass, 0 fail. Each new
page's JSON-LD parsed with node.
Not tried: the pages in a real browser beyond the deployed 200 check.
2026-11-10 18:56:19 +08:00
yetone 03a800ac69 agent: OpenCode 2's config in its own words (kaising00 on X)
For an OpenCode 2 magpie wrote OpenCode 1's opencode.json: its provider
under `provider`, the small model as `small_model`, and `reasoning: true`
on models that reason. OpenCode 2 converts the first two in memory, but
it doesn't read `reasoning` and logged a WARN for each such model on
every load ("configuration normalization diagnostic ... omitted
unsupported legacy setting", reproduced with a real OpenCode 2.2.6).

Now the OpenCode that reads the file decides its words (openCodeTwo in
opencode_v2.go: the opencode on PATH, or a WSL distro's probed version,
now asked for opencode too). For 2.x magpie writes `providers.magpie` in
OpenCode 2's shape (openCodeNative), `agents.title.model`, and no
`reasoning`. A file written for OpenCode 1 moves over on the next sync:
openCodeFromV1 ports migrateStandardProvider (v2.2.6) so the user's keys
in magpie's provider (headers, timeout, setCacheKey, their own variants,
limit.output) go along; an empty `provider` is dropped; a small_model
that isn't magpie's stays. OpenCode 1, or an unknown version, gets the
same output as before. OpenChamber writes the same file and takes the
same decision, so the two syncs don't undo each other. mimocode, DevEco
Code and Air keep OpenCode 1's words.

Run:
- gofmt; go vet ./internal/agent for darwin, linux (-tags nogui) and
  windows (mote): clean.
- go test -count=1 ./internal/agent on mote: ok, at the rebased head.
- win-run go test -run 'OpenCode|OpenChamber|WSL' ./internal/agent: ok.
- Real binaries on mote, sandbox HOMEs, `opencode debug config
  --print-logs`: the file magpie now writes for OpenCode 2 loads in
  OpenCode 2.2.6 with no WARN/ERROR, and resolves (model, agents,
  providers) exactly as 2.2.6 resolves the OpenCode 1 file it replaces;
  the OpenCode 1 file loads in 1.19.5 with no WARN, small_model and
  reasoning intact. The old file in 2.2.6 still shows the reasoning WARN.

Broken by hand:
- openCodeTwo always false: TestOpenCode2WritesItsOwnWords,
  TestOpenCode2MovesAnOpenCode1File, TestOpenChamberAndOpenCode2AgreeOnWords
  and TestOpenCodeTwo red.
- moveProvider not carrying the v1 block over: the move test red on the
  user's timeout.
- moveSmall off: the move test red on agents.title.model.

Not tried: a real OpenCode 1 desktop app reading a file written for an
OpenCode 2 CLI on PATH (it would see no magpie provider; 1.19.5 logs
`providers` as not representable); Air's bundled OpenCode version; a real
WSL distro with OpenCode 2.
2026-11-10 14:52:01 +08:00
yetone b681b036d2 site: Mistral and Ollama pages in en, zh and ja
/docs/mistral and /docs/ollama (with zh/ and ja/) answer "how do I use
Mistral / Ollama in Claude Code, Codex, Gemini CLI and OpenCode".

Facts come from the source: the mistral, ollama and ollama-cloud
presets in internal/provider/presets.go, chattidy.go (thinking parts,
#483, #494), mistral_plan.go, ollama_usage.go, local_address.go,
gateway/ollama.go, and the usage text of internal/cli/providers_cli.go
and model_cli.go for every CLI example (provider add, fallback, models
+id, model price, model efforts).

Every docs page with a "By provider" line now lists both, in one order;
sitemap.xml, llms.txt and llms-full.txt (rebuilt) carry them.

Run on mote: node --test worker.test.mjs install.test.mjs (fail 0);
JSON-LD of the six pages parsed. Deployed (e33573b9) and every new URL
answers 200.
Not tried: the CLI examples against a live magpie (read from the
source's usage text instead).
2026-11-10 04:54:13 +08:00
yetone 682a1e3925 site: Gemini and Grok pages in en, zh and ja
New docs pages /docs/gemini and /docs/grok (with zh/ and ja/), each
linked from every "By provider" line (the four agent guides, OpenRouter
and Copilot in all three languages), sitemap.xml and llms.txt;
llms-full.txt rebuilt.

Gemini facts and their sources:
- preset "google", AI Studio keys, models.dev google catalog
  (internal/provider/presets.go); Chat and native Gemini endpoints,
  only Gemini clients on the native API (provider/gemini_api.go).
- thinking_config with include_thoughts, Gemini 2 budgets, xhigh/max
  sent as high (gateway/chat.go aiStudioThinking); a refused level is
  retried at the nearest one, a refused thinking_config falls back to
  reasoning_effort (gateway.go geminiRefusedLevel, refusesThinkingConfig).
- thought signatures kept 90 days and returned only to their provider
  (gemini_sigstore.go sigKeep, gemini_signature.go); tool schema clean-up
  (gemini_schema.go); search only without function tools (search.go
  geminiKeySearches); per-minute 429s as rate limits (routing.go).
- Vertex AI preset and options (provider/vertex.go, cli/providers_cli.go).
- Code Assist and Antigravity worded as docs/subscriptions.

Grok facts and their sources:
- xai preset: Chat and Responses at api.x.ai/v1, Messages at api.x.ai
  (presets.go); Claude Code, Codex, OpenCode go as they are, Gemini CLI
  translated to Chat (provider.go Speaks, gateway.go usable).
- fixes for xAI: xai_body.go, grok_schema.go (#2317), object_root.go
  (#1271), lone tool_choice (#378), additional_tools (#350),
  grok_integral.go (#1431), custom_tool.go.
- effort fitting (decide.go fitFor), search (search.go), cache stickiness
  (affinity.go cacheWorth/cacheCold), errors (gateway.go tooLongRe,
  fallback.go shapeRefused). Grok Build's ~/.grok/config.toml (agent/grok.go).
- The Grok subscription and its community plugin are left out on purpose.

Run: mote-run `node --test worker.test.mjs install.test.mjs` in site/,
71 pass; JSON-LD of all six pages parsed with node on mote. Deployed
(version f785815d) and curl-checked: all six pages 200, sitemap lists them.

Not tried: no real Gemini or xAI request was made for this page; header
names, vendor terms, free-tier numbers and xAI's own rate limits are left
out because the source doesn't state them.
2026-11-10 04:27:16 +08:00
yetone 795cab91ff site: OpenRouter and GitHub Copilot pages in en, zh and ja
Two provider guides beside DeepSeek, Kimi, GLM, Qwen and MiniMax, at
/docs/{,zh/,ja/}{openrouter,copilot}, linked from each agent guide's
"By provider" line, from each other, the sitemap and llms.txt
(llms-full.txt rebuilt).

Facts come from source. OpenRouter: the preset's Chat and Anthropic
bases in presets.go, the relay path that sends Claude Code's requests
as they are, Messages for Claude models (MessagesFirst) so cache_control
survives, skipOpenRouterAnthropic for the model list, readOpenRouter's
credits, MaxRPM on free models and openRouterSharedPool, creditRest.
Copilot: device sign-in and the three read-only login sources
(copilot_accounts.go, copilot_cli.go), GHE.com hosts, /models and
copilot_refused.go, copilot_auto.go's pick and fallback, the plan names
(copilot_accounts.go: Free, Pro, Pro+, Max, Education, Business,
Enterprise), copilotSubscriptionUsage's windows, cacheWritesAlike.
Header names, GitHub's terms and env variables are left out.

Run: mote-run sh -c 'cd site && node --test worker.test.mjs
install.test.mjs': 71 pass, 0 fail. JSON-LD of the six pages parses.
Deployed (1a513b7d); the six pages answer with their titles.
Not tried: a real OpenRouter key or Copilot seat through the pages'
commands.
2026-11-10 04:01:09 +08:00
yetone 802f03e684 site: Qwen and MiniMax provider pages in en, zh and ja
Two more provider guides beside DeepSeek, Kimi and GLM, at
/docs/{,zh/,ja/}{qwen,minimax}, linked from each agent guide's
"By provider" line, the sitemap and llms.txt.

Facts come from source: the six Qwen presets (qwen, qwen-cn,
qwen-token-plan, bailian-token-plan, qwencloud, qwencloud-token-plan)
and their endpoints and key kinds in presets.go, alibabaPlanModels,
dashScope()'s non-streaming rule in gateway.go, alwaysThinks and
effortInOutputConfig in anthropic.go, MiniMax's inline <think> in
chat.go, readMiniMaxPlan's windows in planquota.go, and the Qwen Code
and MiniMax Code agents in internal/agent.

Run: mote-run sh -c 'cd site && node --test worker.test.mjs
install.test.mjs': 69 pass, 0 fail. JSON-LD of the six pages parses.
Not tried: a real Qwen or MiniMax key through the pages' commands.
2026-11-09 12:40:40 +08:00
yetone 25eec8f6cb site: provider pages for DeepSeek, Kimi and GLM (docs/deepseek, kimi, glm; zh, ja)
One page per provider, in English, Chinese and Japanese. Each covers adding
the provider (the presets and plan= on the CLI), the endpoints magpie uses
for each plan (from internal/provider/presets.go), how Claude Code, Codex,
Gemini CLI and OpenCode reach it (linking the agent guides), the provider's
thinking rules from internal/gateway (DeepSeek's thinking on tool turns,
low/high/max effort and one-hour key affinity; GLM-5.3 and Kimi Code
(China) K3.1 refusing thinking off; GLM's output_config.effort), the Zhipu
1113 retry on the Coding Plan endpoint, balances and plan windows
(balance.go, planquota.go), and an FAQ with FAQPage JSON-LD. The four agent
guides get a "By provider" line in each language; sitemap.xml and llms.txt
list the new pages.

Model ids are only ones in presets.go or catalog testdata. Generated by
provgen.py in the seo scratch folder, from claude-code-models' layout.

Run: mote-run node --test worker.test.mjs install.test.mjs, 69/69 pass.
Tag balance of each article checked by script. Not tried: a browser
render of the pages.
2026-11-09 11:31:53 +08:00
yetone 8a58c0e307 site: a fair comparison of magpie, CC Switch and Claude Code Router (docs/alternatives, zh, ja)
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.
2026-11-09 10:50:13 +08:00
yetone 80ccaba641 site: guide to other models and subscriptions in OpenCode (en, zh, ja)
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.
2026-11-09 10:12:57 +08:00