* agent: MiMo Code — a terminal coding assistant that is Xiaomi's fork of OpenCode, whose config keeps OpenCode's shape: its own mimocode.json(c) under ~/.config/mimocode, its auth beside it, and a magpie provider block with npm/@ai-sdk/openai-compatible, model and small_model fields. opencode() becomes openCodeLike() for the two to share it, and magpieProviderJSON splits shape from the catalog id (magpieProviderJSONFor), so a visibility narrowed on mimocode (magpie visible mimocode …) narrows its list and leaves OpenCode's alone. The library gives it the same instructions, MCP servers (its mcp key) and skills as OpenCode, except the shared skills go into its own skills/ folder: it reads Claude Code's skills only behind a flag, though it reads its CLAUDE.md like OpenCode, and the page says so. Its requests are told by the mimocode/ User-Agent. Checked against XiaomiMiMo/MiMo-Code
* icon: MiMo Code's own favicon, from packages/ui/src/assets/favicon — its frame with the bottom bar, in the monochrome the app masks to the text colour
The OpenAI-compatible model serializer omitted catalog efforts, so endpoint consumers saw reasoning models as incapable. Include reasoning support and effective effort levels for both individual models and routing groups.
* fix(provider): preserve Codex import headers
Copy fixed Codex provider headers into imported providers, including entries that match a preset. Compare headers when detecting duplicates or merging keys so reimports and distinct relay accounts retain their request configuration.
Signed-off-by: jimyag <git@jimyag.com>
* fix(provider): keep Codex preset identity on import
Import fixed headers only for custom providers, matching the existing Alma importer and preset request-shape rule. Cover a preset-host Codex entry so its preset and header behavior remain explicit.
Signed-off-by: jimyag <git@jimyag.com>
* fix(provider): normalize headers before import comparison
Compare headers as they are stored so importing a Codex provider again does not report a duplicate when source values contain surrounding whitespace.
Signed-off-by: jimyag <git@jimyag.com>
* fix(gateway): retain Devin reply channel while awaiting
The response reader can delete a pending call before its caller looks up the channel, causing intermittent no such call errors. Return the reply channel from send so await can receive even after the reader removes the pending entry.
Signed-off-by: jimyag <git@jimyag.com>
* Revert "fix(gateway): retain Devin reply channel while awaiting"
This reverts commit 6278c793b9b4f45dc09106168269915007abffe5.
Signed-off-by: jimyag <git@jimyag.com>
---------
Signed-off-by: jimyag <git@jimyag.com>
Each [model_providers.<id>] table in ~/.codex/config.toml (or $CODEX_HOME) becomes a provider — its base_url, wire_api and bearer token, with the models the top level and the profiles pick for it and their model catalogs; magpie's own table and catalog are left out, as are sub-tables such as http_headers. Claude Code's settings are read from $CLAUDE_CONFIG_DIR when it is set.
Co-authored-by: jimyag <jimyag@users.noreply.github.com>
* agent: add Devin — model via agent.model in config.json, subscription via devin acp over ACP
* gateway: surface devin acp read errors to waiters
* providers: fix devin sign-in exchange; account editor and picker fixes
* gateway: scope the devin deny rules and copy credentials when a link can't be made
* gateway: note devin never rewrites credentials.toml during a session
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.
Through magpie, each tier follows the main model until it is given one of
its own (ANTHROPIC_DEFAULT_*_MODEL; haiku also sets ANTHROPIC_SMALL_FAST_MODEL).
The GUI shows them under one tiers menu; the CLI takes magpie claude haiku <model>.
A vendor or relay can hand out a ready-made provider as a link. The app
registers the magpie scheme (Info.plist on macOS, HKCU on Windows, a
.desktop handler on Linux), a second launch hands the link to the running
one, and the window shows what the link would add, with the hosts the
prompts and key would go to, before anything is saved. `magpie import`
does the same in a terminal.
The Windows app cross-compiles (WebView2, no cgo) as a GUI program with an
icon, version info and a DPI-aware manifest; run from a terminal with a
command it borrows the console. The Linux app links GTK 3 and WebKitGTK
4.1. Off the Mac the app updates its own binary from its own build:
downloaded in the background, swapped in on restart or quit, and the
relaunched process waits for the old one before taking the gateway. The
window leaves room for traffic lights only on a Mac.
The site leads with what magpie is for: Codex on DeepSeek, Claude Code on
Kimi. New screenshots (Codex's picker, the panel, Providers), a diagram of
the gateway, shared subscriptions, a light/dark/system theme switch, a new
OG image, and links to the source.
site/ is the website: a static page plus a worker that turns the newest
release of yetone/magpie-releases into an update feed (/api/latest, with
every file's SHA-256), stable download links and an install script.
The app asks the feed at start-up and every six hours, downloads a newer
version in the background, and installs it on Restart to Update or on
quit. A download must match its checksum and be signed by the same team
as the app it replaces. `magpie update` does the same from a terminal and
replaces a bare binary in place.
A signed-in Claude Code is now offered as a provider (claude/…) like Codex
and Copilot. Anthropic classifies another agent's system prompt as
third-party traffic even over Claude Code's OAuth, so magpie drives the
real local claude binary for every generation: the caller's tools are
bridged in over MCP (magpie claude-mcp-helper), and tool results resume
the same Claude Code turn. Token counting is estimated locally so the
OAuth token takes no side path.
No model list is compiled in any more. The built-in catalog, preset
defaults and Claude Code's alias list are gone; the picker shows the
models.dev catalog (refreshed in the background when stale) layered with
each vendor's own /models answer, and signed-in accounts fetch theirs at
start-up. Whether a model rejects temperature/top_p now comes from
models.dev rather than a name prefix.
The gateway retries a Chat request on the Responses endpoint when the
model is Responses-only, and remembers that. Recent calls keep the first
256 KB of request and response bodies, viewable in the call list. The
Usage tab shows subscription allowances (Claude, Codex, Copilot) as the
vendors report them.
The product, module path (github.com/yetone/magpie), binaries, env vars
(MAGPIE_ADDR, MAGPIE_DEV_UI, MAGPIE_THEME, MAGPIE_DEBUG), config and cache
folders (~/.config/magpie, ~/.cache/magpie), bundle id (com.yetone.magpie),
gateway provider id and token, and every UI string now say magpie.
On first run magpie copies ~/.config/dial and ~/.cache/dial to the new
folders when they don't exist yet (copy, not move, so a still-running dial
keeps working; the old folders can be deleted by hand later).
The logo is a small round magpie in profile: one path for the header and
the tray, and the app tile adds the white belly and the blue-green tail.
The header mark is drawn in ink rather than the accent colour, which
fought the text in light mode.
The gateway gets its own tab: status and URL, a connect card with the base
URL, key and a model id as copy buttons, and a highlighted snippet in
shell, curl, Python or Node for each of the four APIs; then every model id
and the recent calls. Providers rows show signed-in accounts (ChatGPT Pro,
GitHub) with an editor for their model picks, and a note explains why a
signed-in Claude Code is not listed.
Gemini CLI only speaks Google's API, so its picker stopped at Google's
models. The gateway now serves /v1beta/models/{model}:generateContent,
:streamGenerateContent (alt=sse), :countTokens and GET /v1beta/models,
translating to whatever the provider speaks: contents/parts, function
calls and responses (ids kept, names matched otherwise), inline images,
thinking config, tool config, structured-output asks, Gemini's uppercase
schema types, and usageMetadata on the way back.
Picking a catalog model for Gemini CLI points GOOGLE_GEMINI_BASE_URL at
the gateway with the gateway token as GEMINI_API_KEY, switches auth to
API key and names the model; a native model or Default puts the earlier
auth, key and model back. The auth pill reads "dial" while routed.
`dial gemini auth …` now resolves a field by its label too.
dial now serves OpenAI chat completions, OpenAI Responses and the
Anthropic Messages API on 127.0.0.1:3425 and forwards each request to the
vendor that serves the model, translating between the APIs when the vendor
speaks a different one (streaming, tool calls and reasoning included).
Every agent points at that one URL; models are spelled provider/model.
Providers are added from presets (vendors, relays, local servers) with
just an API key, or as custom OpenAI/Anthropic-compatible endpoints.
Keys live in ~/.config/dial/providers.json; nothing is read from the
shell environment. Each provider chooses which of its models to expose.
Agents get gateway wiring instead of vendor-specific tables: Claude Code
via the env block, Codex via a dial model provider plus a model catalog
file, OpenCode/Pi/Crush via a dial provider entry; native settings are
stashed and restored when a native model is picked again.
The Providers page shows the gateway, each provider with the agents on it,
an inline editor with model chips, and an add sheet of preset tiles.
CLI: dial presets | providers | provider add|key|models|test|rm | models | serve.
Wails v3 tray panel and window, TUI and CLI. Switches model, effort and
provider for Claude Code, Codex, Gemini CLI, OpenCode, Pi, Goose, Cursor,
Copilot CLI and Crush with format-preserving config edits. Providers page
and registry, stored keys, live vendor model lists, profiles.
Co-Authored-By: Claude <noreply@anthropic.com>