Commit Graph
439 Commits
Author SHA1 Message Date
yetone 86c7fee4d5 providers: drop the + and the agents that only could use a provider
The Agents field is now a summary of who is on the provider: point a new
agent at it from the Agent tab's picker instead. Removes the row's +, the
editor's list of capable agents, canUse, and the strings they used.
2026-09-24 02:40:29 +08:00
yetone 4115d443c1 providers: a plain edit lists only the agents actually on it
The Agents field listed every agent that could use the provider, most of
them sitting there doing nothing until clicked. A normal edit now shows
just the agents pointed at it, and hides the row when there are none; the
ones that could be added stay behind the row's +, which opens the same
editor in an add mode.
2026-09-24 02:36:06 +08:00
yetone 912b3a79ce site: the ChatGPT plan is a provider too 2026-09-24 02:33:19 +08:00
yetone 8a746c025b "every agent's model" in the app too, not only coding agents 2026-09-24 02:31:21 +08:00
yetone cd4f97e326 "Every agent's model": magpie is not only for coding agents 2026-09-24 02:30:23 +08:00
yetone b3aa852326 site: back to "Every coding agent's model. One place." 2026-09-24 02:29:18 +08:00
yetone 45b25253d2 site: no purple; the gateway card and OG image stay black and white 2026-09-24 02:28:03 +08:00
yetone 0ecc7b6218 providers: 鱼鱼连线 with a region switch, and a ui polish pass
A relay with several endpoints is one preset now: a Region selector
(Auto / Global / China Mainland) swaps the provider's base URLs, and the
endpoints list follows the choice. AiHubMix's key page moves to
console.aihubmix.com/token.

The rest is a pass over the gateway, usage and provider views: a copy
button that answers on itself, a cache hit rate in the usage tiles, the
chart's peak and last date no longer overlap, the tabs sit level with
the logo, the provider key column holds a line, pickers opened from the
editor show above its modal, and buttons drop the native webkit look so
their labels centre.
2026-09-24 02:27:11 +08:00
yetone 9f678458b9 catalog: ask a relay for its chat models without the anthropic header
OpenRouter serves a second, namespaced catalogue from /v1/models as
soon as it sees anthropic-version, so sending that header on the chat
fetch cached ids like anthropic/xiaomi/mimo-v2.6-pro-ultraspeed[1m]
that the chat endpoint then rejected. Send it only when the fetch is
for the Anthropic protocol, where the official API requires it.
2026-09-24 02:27:06 +08:00
yetone 4b251650b8 site: the gateway card is light in light mode 2026-09-24 02:18:17 +08:00
yetone 6c99ab01ef Open source under MIT; the site shows third-party models in every agent
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.
2026-09-24 02:16:29 +08:00
yetone 28688e2463 site: the feed survives GitHub's API limits, from SHA256SUMS alone 2026-09-24 02:03:07 +08:00
yetone 73ef0e5276 usemagpie.ai, and a magpie that updates itself
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.
2026-09-24 01:57:50 +08:00
yetone 0bcb2cc26c release: a v* tag dispatches the build to yetone/magpie-releases 2026-09-24 01:09:59 +08:00
yetone 3b0cf9a965 logo: a round magpie in black and white, drawn from one SVG 2026-09-24 01:09:59 +08:00
yetone 702477525a Claude subscription as a provider; model lists fetched, never compiled in
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.
2026-09-24 00:20:59 +08:00
yetone 1f44812457 agent: rewrite the wiring an older dial left behind
On start-up magpie now renames what dial wrote into the agents' files: a
model spelled dial/… becomes magpie/… (which also writes the magpie
provider entry), and the dial provider entry, Codex's [model_providers.dial]
table and dial-models.json, and Claude Code's bearer token go. Once nothing
says dial it changes nothing.
2026-09-24 00:17:32 +08:00
yetone 402a96c39d Rename dial to magpie, with a magpie for a logo
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.
2026-09-23 23:55:11 +08:00
yetone 9e3e338e63 logo: a kingfisher
The gateway glyph is gone. The mark is now a kingfisher in profile, facing
the wordmark: big head, dagger beak, short tail, one line for the wing, the
eye a hole. The header draws it in ink rather than the accent, which fought
the text in light mode. The icon generator rasterizes the same SVG path
(flattened cubics, even-odd fill), and the app tile is kingfisher blue.
2026-09-23 23:25:07 +08:00
yetone 4ae45965ef gui: list age reads "3h ago", not "3h0m0s ago" 2026-09-23 19:14:56 +08:00
yetone 9d85f6bfb8 make dev: Ctrl-C ends the loop; dialog never wider than the window
fswatch swallows SIGINT, so the shell went round again instead of
exiting; a trap now stops the child and leaves. The loop also kills
only its own dial-dev rather than every one on the machine.

The editor grid's 1fr column had an auto minimum, so a long endpoint
error pushed the dialog past the window edge.
2026-09-23 19:14:26 +08:00
yetone 50db5ccbed gui: provider editor as a dialog; one easing for every motion
The editor no longer unfolds under a row: it lifts over the page as a
dialog with a blurred backdrop, closed by Escape, the backdrop or Cancel.
Its head names the provider and links to its site, so it stands alone.

Motion, kept restrained: a single ease (quick start, soft landing), pills
with one thumb that glides to the chosen option (nav, appearance,
language, usage period, the editor's API switch), views that settle in,
buttons that give under the press, and a theme change that crossfades
instead of snapping. Reduced-motion users get none of it.
2026-09-23 16:19:47 +08:00
yetone c05e83fc07 gui: settings page — theme, language, about; deeper panel palette
A gear in the header opens Preferences: appearance (system/light/dark)
and language (system/English/中文), applied at once and kept in
~/.config/dial/settings.json. The About card shows the version, config
folder (copy/open) and gateway URL. Every visible string goes through
t() with a Chinese table in i18n.js.

The panel gets a tonal ladder of its own (bg, card, pill) with hairline
edges and a legible --faint, instead of the pale flat wash.
2026-09-23 16:12:22 +08:00
yetone a404ebe8dd gui: quieter, column-aligned agent rows on a tinted panel 2026-09-23 15:47:55 +08:00
yetone 045f7f3077 gui: breathing room between section labels and cards 2026-09-23 15:27:22 +08:00
yetone 7cdbce8a3c gui: Gateway tab with connect docs; accounts in the providers page
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.
2026-09-23 15:25:06 +08:00
yetone 9174a6510b provider: signed-in agents (Codex, Copilot) become providers
A Codex (ChatGPT) or Copilot login is a subscription with models behind
it, so dial offers it as a provider: every other agent can use its models
through the gateway. The agent's own credential file is read each time,
tokens are refreshed the way the agent does it, and only the model picks
are stored. Claude Code is found but deliberately not offered (Anthropic's
terms), and the CLI and API say so.

The gateway signs upstream requests through the provider (Sign/Prepare),
translates non-streaming requests for backends that only stream, and now
recognises an event stream by its body when the vendor sends no
Content-Type, which is what the ChatGPT backend does.
2026-09-23 15:25:05 +08:00
yetone 0f96a5fb74 gateway: serve the Gemini API; Gemini CLI can use every catalog model
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.
2026-09-23 14:51:43 +08:00
yetone cf403221f3 gui: Show reveals the saved API key; 302.AI keys link
Show only toggled the input type, but the box holds nothing until a new
key is pasted, so there was nothing to reveal. Now it fetches the saved
key (loopback-only endpoint) and Hide puts the placeholder back.

302.AI moved its keys page to https://302.ai/api-keys/list.
2026-09-23 14:43:40 +08:00
yetone 0b1626be6d agents: a Default entry that puts an agent back the way it shipped
Setting a field to nothing now means the agent's own default: dial's
wiring (gateway provider, model catalog, env) comes out and the key is
removed, so Codex is back on OpenAI's catalog and Claude Code on
Anthropic's. The picker lists it first; the CLI takes `dial <agent>
default`. Also the vendor icon inside a field pill was 22px, not 14px:
the row icon rule outranked it.
2026-09-23 14:37:42 +08:00
yetone ec2eb09853 logo: the gateway mark
Three inputs from the left, two of them curving in, meet at a hollow node
and one line leaves to the right: many models, one endpoint. Replaces the
detent ring, which read as a power button.
2026-09-23 14:01:54 +08:00
yetone 740fc5738f gui: a calmer providers page
The gateway is a row like the providers below it, with its URL as a
copyable pill and the recent calls folded underneath. A provider row shows
only the agents pointed at it, as real logos, plus a + for the rest; the
grey smear of every agent is gone. The editor gains an Agents line (click
one to pick it a model here), lists the endpoints with a Test that reports
against each, and drops agents that speak only their own vendor's API
(Gemini CLI, Cursor). The add sheet's tiles are one line each, with a
filter, so every preset fits on one screen.

Also gives the usage tiles their own class; they had borrowed .tile from
the add sheet and made every preset name uppercase.
2026-09-23 03:27:43 +08:00
yetone 8211a723b3 pi: a thinking-level field
Pi keeps its startup thinking level in defaultThinkingLevel; offer the
same list its /thinking does. dial's provider entry in Pi's models.json
now marks reasoning models, without which Pi never thinks.
2026-09-23 03:16:34 +08:00
yetone 30c489a000 usage: a token statistics page
The gateway now records every call's token counts (read from the provider's
own usage block, in both the translated and the pass-through paths) with the
calling agent taken from the client's User-Agent, into
~/.config/dial/usage.jsonl. A Usage tab sums them by period, agent and
model, with a per-hour/day/week timeline and cost at models.dev list
prices; dial usage does the same in the terminal.

Also nudges the window header 1pt up so the brand sits level with the
traffic lights, and lets ?view= open the window on a tab.
2026-09-23 03:16:33 +08:00
yetone 7fefa62851 logo: the detent mark
A control ring open to the upper right with a detached index reaching
through the opening: the instant a knob clicks into position. One glyph
on a 44-unit grid drives the window header SVG, the menu bar template
icon and the app icon; the generator draws it with round-capped strokes
so the three stay identical.
2026-09-23 01:11:20 +08:00
yetone c374e55926 gui: real vendor logos on every picker row, no monograms
Every model option now names its vendor's bundled logo: a models.dev
provider id maps through the presets, and model families (claude, gpt,
gemini, deepseek, grok, kimi, glm, qwen, mistral, minimax) are recognised
by id for lists that have no provider, such as Copilot's. Claude Code's
aliases and own models carry the Claude mark, Codex's the OpenAI mark,
Copilot's and Cursor's auto their own. The two-letter monogram fallback
is gone: an option without a known vendor keeps an empty slot, and a
custom provider shows a plain outline glyph. A foreign ANTHROPIC_BASE_URL
now names the Claude Code group instead of being appended to the first
row's note.

Window header content moves 1.5pt down to sit level with the traffic
lights. Dev builds also serve the UI over plain HTTP when DIAL_DEV_UI is
set (make dev uses 127.0.0.1:3427) so it can be checked in a browser.
2026-09-23 01:09:01 +08:00
yetone 3a5f00ac71 Add make dev with live reload; align the window header with the traffic lights; make the profiles hint readable 2026-09-23 00:31:26 +08:00
yetone 8fb93f8fc2 Make dial a local LLM gateway with preset providers and one catalog
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.
2026-09-22 22:43:51 +08:00
yetoneandClaude 0a234ce41d dial: one dial for every coding agent's model
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>
2026-09-22 21:47:29 +08:00