e4e9eb0928becfa4e48484dde85ef5032671d582
1064
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8564238065 |
remote magpie: a model is asked on the API the remote asks it on best (OoopsHh on X)
With another magpie as the provider, Pi's models.json had only codex/* on openai-responses; an OpenAI key's openai/* and a routing group's auto/* went on openai-completions, and effort max was turned away there while Responses takes it. Cause: the remote's /v1/models gives native_endpoints, every API the model goes on as it is, in its provider's speaking order (Chat first), and nothing for a routing group. Here Provider.Native took the first one the remote magpie provider speaks: Chat, for every model but a ChatGPT sign-in's (listed on /v1/responses alone). The remote's own choice (Native: ResponsesFirst or the Base URL's API; a group's GroupAPI) was lost on the wire. Now the remote's list (X-Magpie-Drawers) says magpie_prefers, the path it asks the model on best (provider.PreferredEndpoint). The local magpie keeps it as catalog.Model.Prefers and Native takes it first for a remote magpie (RemotePrefers), so every agent wired one API per model (Pi, omp, droid, dsh, grok, hermes, liveagent through catalog.Model.APIs) asks it there, and the gateway's usable translates another API's request to it once instead of to Chat. A user's own API set on the model still wins; a remote from before says nothing and stays as it was. Not changed: a Chat request a client sends itself for such a model is still relayed as Chat to the remote, which decides as it does for its own clients. Run (mote, at this tree): - TestRemoteMagpiePrefersResponses (gateway: two magpies on one gateway, a fake vendor that turns away reasoning_effort max on Chat) and TestPiAsksARemoteMagpiesModelWhereItPrefers (agent): green; both red with the RemotePrefers check in Native and usable turned off (openai/* and group/auto on chat, Pi's api nil, a Messages request relayed as Chat). - Two real magpie serve processes in sandbox HOMEs, a fake vendor, an OpenAI key there with its Base URL given as Responses, a group auto and the first magpie as the second's Remote magpie: Pi's models.json has office/openai/gpt-6.2-astra and office/group/auto on openai-responses with max, and /v1/responses effort max reaches the vendor's /v1/responses for both. The same script at the base commit wrote both with no api (the provider's openai-completions). - At base |
||
|
|
72f7c1f41a |
agents: Nowledge Mem's own AI runs on magpie (xiaomaomiloulou on X)
Nowledge Mem asks for "选择一个 AI" on its first page and in Settings >
AI, and Mem 0.10 has a provider type of magpie's own. Picking a magpie
model for the new agent nowledge-mem now sets it up from magpie:
- Mem keeps its providers in remote_llm.json with each key encrypted, so
the file is only read. Changes go through its backend (nmem-server,
127.0.0.1:14242, $NMEM_API_URL when it names this computer), as its
Settings and `nmem config provider` do: POST /remote-llm/config saves
provider "magpie" at the gateway's /v1 with agentKey("nowledge-mem")
and the model, which makes it active and turns the AI on.
- Mem puts temperature, max_tokens and timeout back to its defaults
when a save leaves them out, so every save sends the provider's own.
- What Mem had is stashed once: the active provider, whether the AI was
on, and a "magpie" provider the user made, which keeps its key and
gets its model, base and parameters back. Stepping out activates the
provider Mem had (unless one was picked in Mem since), removes
magpie's provider and turns the AI off again if it was off.
- Mem has to run to change it (errMemDown); a sync moves the base only
when the gateway's port moved. Detected by its config folder or the
installed app (co.nowledge.mem.desktop). Icon from its icon.icns.
Run (mote):
- go test -count=1 -run 'NowledgeMem|TestEveryAgent|TestListOnly|TestSync|Desktop'
./internal/agent ./internal/library ./internal/agentenv ok; -run Icon
./internal/gui ok.
- GUI: icon-one-tone, icon-tile, routing-client-icons, i18n-keys in
Chromium and WebKit, 58 of 59; the red is icon-tile's dim-color, red
on origin/main since
|
||
|
|
ddc78405cf |
gateway: a magpie's /v1/models offers Ultrafast where its accounts do
OoopsHh on X: a magpie in Docker could pick Ultrafast on a model, but another magpie that has it as its Remote magpie provider was offered Fast alone on that model. The remote's list takes its service tiers from provider.CodexTiers through codexcat.Entries, and CodexTiers only ever added "priority". Ultrafast came only from Codex's own catalog, which a magpie with no Codex beside it (Docker) does not have, and the codexcat branches for Fast and OwnTier models dropped any tier m.Tiers added. - CodexTiersWith adds "ultrafast" after Fast where provider.UltraOn says the key or account offers it (an OpenAI key's Ultrafast models, a provider added by its address on OpenAI's Ultrafast models, a Codex account whose live list has it), and on a group where a member does. UltraModels is read at most once a list, and only after a model already shows Fast. - codexcat keeps those tiers (withTiers) and names "ultrafast" "Ultrafast" when Codex's own catalog doesn't. - The asking side already sends ultrafast to a Remote magpie (RemoteTiers), and the remote already asks a member without it for priority (tierMate). Both ends need this version: the remote to list it, the local one to read it. A provider added by its address serving gpt-6.1-sol now lists Ultrafast in /v1/models, /v1/codex/models and magpie-models.json, as its editor's CanUltra already said; TestModelsListTiersForEveryClient, TestRemoteMagpieOffersItsTiers and TestCodexCatalogTiersReachDisk expect it. Tests: - TestRemoteMagpieOffersUltrafast: a relay's gpt-6.2-sol and a group of it list "priority ultrafast"; a Remote magpie provider reading that list has CanUltra on both, and an ultrafast ask through it reaches the vendor as ultrafast. Red on |
||
|
|
3869aee3b0 |
sessions: agy's calls in T3 Code are on Usage → Requests
zzzkl on X: requests from Antigravity in T3 Code weren't on Usage → Requests, while a plain agy's were. T3 Code (pingdotgg/t3code, read at 00c6adbd) runs agy for each Antigravity instance as an ACP server on the instance's own Google sign-in: `agy acp --gemini-dir <profile> --app-data-dir antigravity-acp` (antigravityAuthSupport.ts), the profile being <T3 Code's folder>/userdata/providers/antigravity/<sha256 of the instance id>, the folder $T3CODE_HOME or ~/.t3 (dev for its dev server). Those requests go to Google, never through the gateway, and magpie's agy reader looked only in ~/.gemini/antigravity-cli, so nothing counted them. agy writes the same transcript_full.jsonl there as in its own folder (agy 1.5.10 run that way in a sandbox against a fake Gemini endpoint; the fixture is its bytes). agyCallFiles now reads every T3 Code profile's antigravity-acp too, and Found lists agy for those folders, so the read consent covers them. T3 Code's folder is appdir.T3Code, shared with agent's t3Base. Siblings: `agy acp` from any other ACP client with the defaults writes to antigravity-cli, already read (agy acp --help). T3 Code's magpie instances (Claude, Codex) go through the gateway and are counted there. Run: TestAgyCallsInT3Code (default folder, T3CODE_HOME, ~/ form) red on the old calls_agy.go/access.go with 0 calls, and with Found() = [claude codex] when only access.go is old; green with the change. gofmt -l clean; go vet (darwin, GOOS=linux, GOOS=windows) of appdir, agent and sessions on mote. Full suite (go test -timeout 45m ./..., mica, at |
||
|
|
06428541ac |
agent: Dim's Magpie provider names each model with its provider, so two vendors' DeepSeek are told apart (T_t__biu on X)
T_t__biu on X: in Dim alpha, models of its built-in Magpie provider
can't be told apart by the magpie provider behind them; two vendors'
DeepSeek read the same.
Cause: Dim names a listed model by the display_name (or displayName,
name) of the endpoint's /v1/models (crates/dim-app-server
provider/remote.rs), shown in its Models page, `dima models` and the
picker's search. magpie's /v1/models gives display_name the name alone
(PlainName) to every client but Cindy and Claude Code's discovery.
- /v1/models asked with Dim's key gives display_name the name the
agents' lists give the model (provider.LabelsFor("dim"): its
provider's after it, as the Provider in model names setting says),
as Cindy's already is.
- Dim takes names only when it lists the models again
(provider.refresh). dim.json now keeps dimListed (a hash of the ids
and names) of the last listing, and Sync, while Dim's daemon runs,
lists the provider again when it changed: a provider renamed or
added, the setting changed, and a Dim connected by v0.1.4497, which
kept none, on its first Sync.
- A name the user gave a model in Dim (provider.models.edit) is a
descriptor override, which Dim's refresh keeps. No other provider of
Dim's is touched; disconnect is as before.
Run at this commit's tree (rebased on origin/main
|
||
|
|
d01e0a465a |
agent: Dim's built-in Magpie provider is filled in, so a plain dima runs on magpie (T_t__biu on X)
T_t__biu on X: Dim alpha has a provider named Magpie built in, and magpie's one-click connect left it empty, relying on DIM_* variables a shell function set for each run. Dim launched any other way (its app, a terminal opened before, an IDE) was not on magpie. Dim keeps providers in a database only its daemon writes, so magpie now talks to the daemon the way Dim's own clients do (JSON-RPC 2.0 after a hello of protocol 4, on <home>/rust/daemon.sock, or on Windows through Dim's pipe bridge `dimcode-server app-server --connect-pipe`; read from Dim's crates/dim-app-server and dim-client source). Picking a magpie model: - writes the gateway's /v1 (the port magpie is on), magpie's key and enabled onto the `magpie` provider only, each against the record's version (provider.update); - refreshes it, gives a model its token limits when the gateway doesn't know them (provider.models.edit), and makes it Dim's pick (provider.select against the pick's version); - records first, in magpie's own dim.json (temp+rename), what was there and the pick to give back. A key or address the user set on that entry themselves is kept: magpie writes nothing to the provider and only picks the model. Sync writes the port and key again when they change. Disconnect (`magpie dim default` or the switch) turns the entry off with the key cleared (Dim clears a key only on a provider turned off), puts the address back, and puts back the model Dim was on. No other provider is read or written. The per-run env and shell function stay only as the fallback when Dim's daemon can't be reached or started. Run at this commit's tree (on origin/main |
||
|
|
fcbc1a2d02 |
gateway: Claude Code's deferred tools are declared in full where a load would lose the cache
Seapawn1 on X: GPT in Claude Code loses its prompt cache with tool search on. A tool ToolSearch loads joined the top-level tools on the next request on every route but Anthropic's and a Responses upstream that loads in place (LoadedInPlace, #2660). An OpenAI-style cache is a prefix with the tools before the messages, so each load (2.1.327 defers WebFetch, WebSearch, Monitor and the other built-ins too) read the whole conversation again uncached. A sandboxed Claude Code 2.1.327 through a fake upstream showed it: on Chat and on a Responses relay the tools changed at req1 and req3; in place they held. On such a route a Claude Code request carrying DeferredToolPlaceholder is answered 400 invalid_request_error naming tools.defer_loading, locally. The real Claude Code 2.1.327 answers that (after its beta-strip retries, 3 refused requests) by declaring every tool in full for the rest of that conversation, --continue included; a new conversation, on a Claude model, tries tool search again. The message doesn't name the beta header, which Claude Code would remember everywhere. Only while the reminder names 50 deferred tools or fewer: an MCP router's hundreds keep tool search, and a request whose reminder can't be read keeps it too. Anthropic routes and in-place Responses upstreams are unchanged. The refusal is not a member's fault (retryable/shapeRefused false), so a group doesn't fall over or rest. Not handled: a user who set ENABLE_TOOL_SEARCH themselves can't be told apart on the wire; additional-tools=on keeps search on a relay that takes the item. Run: - mica: go test -run 'TestDeferred|TestLoadedTools|TestKimiIsSent|TestToolSearch|TestDeferredToolBlocks' ./internal/gateway ok. - Broken by hand (the check in translate made false): TestDeferredToolsTurnedAwayWhereTheyLoseTheCache and TestDeferredToolsKeptWhereLoadedInPlace red (status 200, upstream called). - mica: GOOS=linux and GOOS=windows go vet ./internal/gateway ./internal/agent ok; gofmt -l clean. - wsl-run (magpie-desktop): go test -timeout 45m ./internal/gateway ./internal/agent started before push; result with the full suite. - Real Claude Code 2.1.327 in a sandbox HOME against a fake 400 naming defer_loading: retried with every tool declared, kept for the conversation and --continue, new conversation searched again. Full suite: run after push. |
||
|
|
2ab2f69132 |
agent: Codex's status line shows the account's quota or the relay's balance (opt-in)
lyj1115 on X asked for the current account's quota, or the relay key's
balance, under Codex's chat box, off by default. Codex's TUI draws its
footer from a status line provider from 0.171.0-alpha.12 on: a stdio
MCP server whose tool advertises a statusline entrypoint, picked in
[tui] status_line_provider behind [features] tui_extensions_statusline.
Codex reads it about once a second with the thread's id. Nothing is put
into the prompt or the model's reply.
- `magpie statusline --codex` is that server. Each read asks the local
gateway for the thread's latest route and the kept quotas (no vendor
read). It answers `→ provider/model` and that provider's account that
answered last, with its windows or a key's balance. A gateway that is
down gives a null tree, never an error, because an error stops Codex's
reads. The tool's name and words name neither magpie nor a vendor,
since the tool is listed to the model.
- A status line square on Codex's row (`magpie codex statusline on`)
writes the flag, [mcp_servers.quota_line] (this magpie by full path,
args statusline --codex, env_vars = ["MAGPIE_ADDR"]) and the
provider. Every write is read back, and the file is restored on a
mismatch. Off and Disconnect take out only magpie's keys, and the flag
only when the stash says magpie wrote it.
- Nothing of the user's is written over. A provider of their own, a
quota_line of theirs, the flag turned off or an unreadable file keeps
the square away and refuses on.
- The switch is offered only when a Codex CLI here is 0.171.0-alpha.12
or newer (0.170.0 reads the keys and draws nothing), and only on this
computer, not in a WSL distro.
- In the GUI, the status line square's title takes the note of its
field's on option, which Claude Code's field already sent with the
same words TOGGLES kept, so Codex's says its own words in en, zh,
zh-TW, ja and de. TOGGLES' copy of Claude's note went, and app.js
stays under its budget (30 bytes of room) without a raise.
The Codex desktop app has no such footer. cockpit-tools reaches it
through a debug port, and magpie doesn't.
Run (WSL magpie-desktop, since mote's load was over 18):
- go vet -tags nogui ./...; GOOS=windows go vet of agent, cli, provider
and gui; gofmt -l clean.
- go test -tags nogui of ./internal/cli and ./internal/provider: ok.
- ./internal/agent -run "CodexStatus|Statusline|StatusLine|TestCodex|
TestWSLCodex": ok.
- ./internal/gui -run "CoreScript|Budget|I18n|Keys" and node --test of
codex-statusline, claude-statusline and i18n-keys (both engines, every
language, window and panel), with vet (and GOOS=linux and windows
vet) of agent, cli, provider and gui, on mote at the rebased head
(on
|
||
|
|
3438b7bd9c |
codex: a kept ChatGPT account that runs out is taken over on magpie's models, so the Codex app sends them (Yuzhou__Zhang on X)
Yuzhou__Zhang on X, after updating from Stable (v0.1.3960) to v0.1.4477: once the ChatGPT account ran out, the Codex app (ChatGPT app) sent nothing, on "Claude Opus 5.5 · routing group" too, whose Claude accounts had room. The screenshot shows the app's own banner, "Codex 和工作使用额度 已用完 … 11月20日 16:25 重置", and Send greyed: no request reached magpie. Cause. The Codex app greys Send for every model while its authMethod is chatgpt and the account's rate limit says not allowed. magpie gets past that by becoming Codex's provider while the account is held (codex.out, #540). |
||
|
|
589e4ba6da |
agent: OpenCode finds magpie's models itself; opencode.json no longer lists them
chawyehsu on X asked for dynamic model discovery, as
yuhp/opencode-models-discovery does. magpie wrote its whole catalog into
opencode.json's magpie provider. For an OpenCode that loads plugins of
today's shape (1.4.0 and later, 2.0.5 and later; openCodeDiscovers),
the provider now has no "models". magpie writes plugins/magpie-models.js
beside the file (opencode_models.js, marked by its first line). It fills
the provider's models as OpenCode starts, from the gateway's new
/v1/models?format=opencode (opencode2 for OpenCode 2;
gateway/opencode_models.go). That endpoint gives the same entries a sync
would have listed, in magpie's order, never cached, and only the
models of OpenCode's catalog the key asking may use (keyListed).
- OpenCode 1: through its config hook, which runs before it reads
providers. The user's entries under magpie's provider are laid over
magpie's, and an id magpie doesn't list stays.
- OpenCode 2: through ctx.model.transform. The config's own entries are
laid on afterwards by OpenCode. Every entry says variants ([] for
none), so OpenCode makes up none.
- Gateway not answering (3s timeout): the plugin lists the models magpie
had when it last wrote it.
Existing users: the first sync on such an OpenCode takes magpie's list
out of the file (modelsLeft). Of each model, only what the user said
differently stays: their own variant, or a limit.output they typed. A
limit or cost they changed stays whole, since OpenCode 1.19.6 refuses
one without its context ("Missing key ...limit.context"). An id magpie
no longer lists goes that once (stash opencode-discover:<path>), as it
did on every sync before; one added after that is the user's and stays.
The user's other keys and providers are untouched. These keep the list
in the file as before: an OpenCode older than those versions, of no
known version, and the forks (mimocode, DevEco, Air). Going back to
such an OpenCode writes the list again and removes the plugin, and so
does taking magpie out. A file at the plugin's path without magpie's
first line is the user's and is never touched.
Run:
- mote-run go vet ./internal/agent ./internal/gateway, also with
GOOS=linux and GOOS=windows: clean. gofmt -l: clean.
- mote-run go test ./internal/agent -run
'OpenCode|OpenChamber|Air|DevEco|Mimo': ok (TestOpenCodePluginRuns runs
the plugin in node against a stubbed gateway, up and down, v1 and v2).
- mote-run go test ./internal/gateway -run 'TestOpenCodeModelsList|Models': ok.
- Broken by hand, each red: no key filter (TestOpenCodeModelsList),
openCodeDiscovers always false (Finds/ListMoves/DiscoversFrom), the
delta keeping whole models (ListMoves), and the plugin letting magpie's
fields win over the user's (PluginRuns).
- Three opencode_v2 tests that check the listed words now pin 2.0.4 and
1.3.9, which still list.
- Real OpenCode on mote in a sandbox HOME, opencode-ai 1.19.6 and
@opencode/cli 2.3.2. Config and plugin written by magpie's own code, a
fake /v1/models serving one extra model:
- `opencode models` lists the served model with the gateway up, and
the cached list with it down. Both versions, Bearer key sent.
- A file moved from 1.3.9/2.0.4 with a user limit.output and a user
model: `opencode models magpie --verbose` (1.19.6) and
`opencode api --standalone GET /api/model` (2.3.2) resolve magpie's
models the same as the old full-list file did. Names, limits,
variants and the user's edits are identical; 2.3.2 orders a model
the file names first.
- Full suite: mote-run go test ./... -timeout 45m -count=1 on this change over base
|
||
|
|
bfddc9cfba |
routing: DimCode's requests read as DimCode, with its mark, by key too
Yayoi_no_yume on X, a Docker magpie (v0.1.4350): DimCode (dimcode.dev)
on another computer, calling with a gateway key named "Magpie", drew
the Routing page's client node as the cube and "Magpie", and the
request's story said "DimAgent asked for the routing group Step 5
Preview".
Two causes:
- DimCode was no client magpie knew, so usage.AgentOf named it by its
product name: npm's dimagent 0.5.29 sends "DimAgent/<version>" to a
provider set to send its identity (resolveDimOAuthIdentityHeaders)
and "DimCode/<version>" otherwise (read from the published binary).
A client "dimcode" (DimCode, UA dimagent/dimcode) now names it,
apart from the Dim alpha magpie starts ("dima"/"dimcode-alpha" stay
Dim's, by name first). Its icon is dim-color: dimcode.dev's favicon
(dimagent-favicon.svg, "Official DimAgent mark") is the same artwork.
Routes and ledger records kept before are named again through
AgentOf (Route.routedAgain), so old "DimAgent" rows read as DimCode.
- A keyed request's node read the key's name alone (
|
||
|
|
3e66d25d84 |
agent: OpenCode's limit keeps models.dev's context and input apart
Nepsama1337 on X: magpie 0.1.4414 wrote gpt-6.2-sol into OpenCode's
config as limit {context: 922000, output: 128000}. models.dev gives
{context: 1050000, input: 922000, output: 128000}. magpie's
catalog.Model.Context is the prompt window, so it prefers models.dev's
input, and the opencode shape wrote that number as context and
dropped input.
What OpenCode reads, checked in anomalyco/opencode on dev:
packages/schema/src/config/provider.ts and
packages/core/src/v1/config/provider.ts take limit {context, input,
output}. session/compaction.ts uses min(input, context) when both are
there. OpenCode 1's models.ts (8df09abb1) has input too, and its
compaction uses limit.input || context - output.
catalog keeps the whole window that models.dev pairs with each input
cap (WholeOf, voted the same way as the windows and looked up through
the same renames). The opencode shape now writes {context: whole,
input: prompt window, output} when the catalog gives a wider whole
window, and {context, output} as before otherwise. A user's own
context for a model (Contexts) has no pair, so it stays a plain
context. This shape serves OpenCode 1 and 2, MiMo Code, DevEco, Air
and OpenChamber. OpenCode 2's converter copies limit whole, so input
reaches it too.
Agents with one window field (Crush's context_window, droid, Cline and
the rest) get the prompt window, which is right for them. ZCode and
MiniMax Code also write {context, output}, but their schemas can't be
checked: #7060.
Run:
- TestOpenCodeLimitKeepsContextAndInput is red on the old agents.go
(relay/gpt-6.2-sol: limit {"context":922000,"output":128000}) and
green with the fix. It covers the paired model, a model with no
input cap, a user's own context, and openCodeNative.
- go test -run 'TestOpenCode' ./internal/agent on mote: ok.
- Real OpenCode 1.19.5 on mote, sandbox HOME: `opencode models magpie
--verbose` lists gpt-6.2-sol with limit {context 1050000, input
922000, output 128000}.
- Full suite, go test -timeout 45m ./... on Linux (magpie-desktop, at
|
||
|
|
3ec89c5224 |
codex: the takeover's end waits for the chats on magpie the Codex app has open (milianxinqi on X)
milianxinqi on X, the Codex app: "Model provider mismatch. This chat uses
magpie, but your current provider is OpenAI. Switch to magpie to
continue." ("用的好好的,codex 突然就弹这个了"), with nothing disconnected.
Cause. With the ChatGPT account Codex is signed in to held (out of its
allowance and credits), magpie is Codex's provider (the codex.out
takeover, #540) and new chats start on magpie. When the account has room
again (its window's reset, a switch to another account, or the account
the user keeps Codex on,
|
||
|
|
28430c9b90 |
gui: magpie's own paths are written with ›
A path through magpie's own screens was written with › in some places and → in others (11-17 scan, item 18). Every one the user reads is now ›: Settings › Network and sharing, Settings › Privacy, Library › MCP servers, Providers › … › Use it anyway, Settings › Usage, in the GUI and in the Go errors and notices that reach it, in every language. The GUI matches errNotAsked by its prefix, so it still finds it. Left as they are: gateway errors written for agents, AiHubMix's and Claude Desktop's own menu paths (their apps' words), the image MCP tool description (it goes to agents), and comments. Own tests: chatgpt-usage-why, websearch-places, library-mcp-hub, i18n-keys; Go: internal/library (TestPrivateRepoInstallsWithToken, red on the first try because skills.go still had →), internal/plugin (notplugin_test), internal/pii, internal/provider. Run (mote, Chromium and WebKit, en zh zh-TW ja de): - before the rebase, 23 GUI files: every one green except plugin-provider-options (my bug, fixed in this branch before the push) and settings-groups' "warm-ups and check-in in each service's provider editor", red the same way at fresh origin/main |
||
|
|
3b74aaf12c |
agent: Claude's auto-compact window is held to the 1000000 Claude Code takes
ZeroX2017 on X (0.1.4404): a compaction threshold of 1048576 typed for Ollama Cloud's 1M DeepSeek went into ~/.claude/settings.json as it was. Claude Code 2.1.316's settings schema (and Claude Desktop 2.7032's copy of it in app.asar) takes autoCompactWindow as an int of 100000 to 1000000 and reads a larger one as none, so a new Claude App session ran that model at the top-level 272K for every model. Every auto-compact window magpie writes for Claude Code is now held to 1000000 (claudeCompactCap): the per-model modelSettings entries (claudePlan), the top-level autoCompactWindow, and CLAUDE_CODE_AUTO_COMPACT_WINDOW. An entry the hold makes equal to what the model runs at anyway is left out. The threshold in magpie stays as typed; Codex and Grok Build get it unheld; tune's card still reads the top-level value back as Long conversations at the typed value (claudeLongWindow compares against the held value). agent-wiring.md says so. Tests: TestClaudeCompactHeldToClaudeMax (Desktop entry, a second sync rewrites nothing, magpie's threshold unchanged, the variable when Claude Code is alone, Codex unheld), TestClaudePlanHeldToClaudeMax, TestClaudeTopCompactHeldToClaudeMax (top-level + tune read-back). Run: - Full suite, go test ./... -timeout 45m -count=1 on mote at base |
||
|
|
e1e454398e |
agent, gateway: the web search path is Settings › Models › Web search
dsh's and DS Bot's "nothing to search with" notices, and the gateway's "searcher picked in Settings" errors, sent people to Settings › Web search. There is no such tab: Web search is a section of Settings › Models. The notices in every language, the gateway errors, the DS Bot docs page (en, ja; zh says no path) and the subsystem docs now name the real path. llms-full.txt, the search indexes and docs-index.sums are rebuilt with `node docs-index.mjs`. Run (mica, at this tree): - go test ./internal/agent -run 'Dsh|Dsbot|Notice': ok - go test ./internal/gateway -run Search: ok - go test ./internal/gui -run 'TestCoreScriptBudget|TestI18n|TestCSS|Search': ok - site: node --test search.test.mjs: 6 pass - GUI: i18n-keys.test.cjs: 4 pass Not broken by hand: a text change, with no test that names the path. Not tried: the real app window. |
||
|
|
fefe3f658c |
library: DS Bot gets MCP servers, skills and instructions in its own DSH home (#5897)
sunset on Discord: DS Bot (ds-bot) can be given a magpie model, but the Library's MCP page offered no DS Bot. It had no target in targetOf and was listed "not looked at (#5897)" in noLibrary. DS Bot's desktop app runs its own DSH (0.2.2-rc.1 in DS Bot 0.3.8) with DSH_HOME at its data folder (agent.dsbotHome; app/src/main.mjs) and boots the profile ds-bot (app/src/profile.mjs) with dsh-base's bundles. Read from github.com/Fei2411/DS-Bot and the npm packages at 0.2.2-rc.1: - dsh-agent-instructions reads $DSH_HOME/AGENTS.md (then CLAUDE.md); - dsh-skill-filesystem reads $DSH_HOME/skills and ~/.agents/skills, and a project's .agents/skills; - dsh-mcp-client is in the app's installation (a dependency of @deepseek-ai/dsh in app/package-lock.json), so a patch list's insert row naming it loads, as in dsh; DS Bot's own bundle patch disables none of these. So ds-bot gets dsh's target on its own home: AGENTS.md, skills, and MCP rows in every profile's patch list (agent.DshPatchFiles, which globs profiles/*/cordis.patch.yml, profiles/ds-bot's included). It reads ~/.agents/skills too (readsShared) and .agents/skills in a project. #5624: when DSH_HOME names DS Bot's folder, the dsh agent's home is DS Bot's. The Library's dsh target now steps back there (agent.DshAppHome), so the two agents' rows are never written into one patch list under two names. This doesn't fix #5624's model wiring. Run (all at 3b47e8745 rebased on |
||
|
|
8e1534f5f9 |
sessions: read LiveAgent's sessions (#6741)
Usage › Sessions and the Sessions page now list LiveAgent's sessions
with their title, time, model, tokens and cost, and show their
conversation.
- Where: K-brain keeps each session at
<root>/sessions/<project>/<id>/session.jsonl (older ones right under
sessions/). sessions/.runs and sessions/.deleted-history are skipped.
- Root: $LIVEAGENT_HOME, then $K_BRAIN_HOME, then
~/.liveagent/data-dir.json, then ~/.liveagent. The rule now lives in
sessions.LiveAgentDirIn, and agent.liveAgentDir calls it, so it has
one owner.
- Reading: K-brain rewrites the file whole, so it is parsed whole. The
first line is session_meta (id, title, cwd, running totals).
- Tokens:
- Each reply's own usage counts on the day it came back.
- What the totals (model_usage, else usage_in/usage_cached/usage_out)
hold beyond those replies, such as a compaction's call or a rewound
reply, counts on the last message's day, together with sub_usage.
- Cache reads and writes are taken out of prompt_tokens.
- Forks: a fork's copies of its source's messages (seq <= fork_seq) are
the source's, and count in neither the fork's messages nor its totals.
- Subagents: a subagent's own session (task-<parent>-<task>, task_id
set) is filed under its parent with its activity, but no tokens,
because its spend is the parent's sub_usage already.
- Not added:
- a Calls reader: the gateway's own record of LiveAgent's calls
carries no session id, so it would count them twice;
- resume and delete: LiveAgent has no resume command.
- Skills: SkillsManager read (skill://<name>/SKILL.md) and Read of a
skill path are counted.
Run (mote, mote-run, at
|
||
|
|
d67ccbd3c7 |
agent: a provider named magpie at another machine's address is not this magpie's Alma wiring
Alex on Discord: any provider named magpie in Alma, one pointing at a
magpie on a VPS included, was taken as this magpie's own, and the Agents
page said "Alma no longer goes through magpie, its config was changed".
almaMagpie now takes a provider by the name magpie only when its base URL
is on this machine (onAnotherMachine, as ZCode's check does). One at
another machine's address is the user's own provider and left alone; the
second match, an OpenAI-shaped provider at this gateway, is unchanged.
Run (mote), at base f1a4de736; rebased onto
|
||
|
|
4f94b8a829 |
grok: context_window is the model's window; Long conversations goes in auto_compact_threshold_percent (@xiancrong on X)
magpie wrote Long conversations' compaction threshold into each [model."magpie/..."] table's context_window. Grok Build reads context_window as the model's whole window and compacts at a percent of it: auto_compact_threshold_percent in [model.<id>], else [session]'s, else 85 (xai-org/grok-build 559751fd: xai-grok-shell/src/util/config/resolve/compaction.rs, DEFAULT_AUTO_COMPACT_THRESHOLD_PERCENT and resolve_auto_compact_threshold_percent; GROK_AUTO_COMPACT_THRESHOLD_PERCENT above all). So a 1M model held to 300K compacted at 255K and never had its real window. Now context_window is the catalog's whole window, and where magpie has it compact (grokCompactAt, the old grokWindow rule: the model's or provider's threshold, else settings.Working, none under Full window) goes in as auto_compact_threshold_percent of the window written, rounded down, at least 1 (grokPercent). None leaves Grok's own 85. - A table an older magpie wrote with the threshold as its window, on record in grok:<path>:windows, gets the whole window back. - A percent the user set in one of magpie's tables stays: what magpie gave is stashed in grok:<path>:percents, and one it has no record of giving is the user's (grokOwnPercent). A context_window set by hand still stays (grokOwnWindow). - A [session] auto_compact_threshold_percent is the user's for every model, so magpie writes no per-model one over it. Siblings: Codex (codexcat) already writes context_window and auto_compact_token_limit apart, and Claude Code has CLAUDE_CODE_MAX_CONTEXT_TOKENS beside CLAUDE_CODE_AUTO_COMPACT_WINDOW. Grok App (grokapp.go) writes the model's own window. Only Grok Build had the threshold in its window key. Run: - At cfca72eaf (this change on |
||
|
|
6abea5f8e8 |
agent: Antigravity's app on Windows is found by its installer's registration (JJasonsun on Discord)
On Windows magpie's Agents page showed agy but not Antigravity's desktop
app, which macOS finds right after install. desktopApps["antigravity"]
knew only the macOS bundle, so on Windows the app was found only by
~/.gemini/antigravity/agyhub_summaries_proto.pb, which a fresh install
hasn't written (the Windows box's real 2.30.0 install has no
~/.gemini/antigravity at all).
Google's Antigravity-x64.exe (2.32.1, antigravity.google/download) is
electron-builder's per-user NSIS installer (app-64.7z, SpiderBanner,
package name antigravity). The real 2.30.0 install on xiaomi-gpu is
%LOCALAPPDATA%\Programs\antigravity\Antigravity.exe, registered under
HKCU\Software\121a0be4-63bd-531e-acf8-fc3924c7e984 (InstallLocation) and
its Uninstall entry (DisplayIcon ...\Antigravity.exe,0, DisplayVersion
2.30.0, no InstallLocation). The guid is the UUID v5 of
com.google.antigravity in electron-builder's namespace, as dsh's is. The
entry now has win and guid, so AppVersion reads the registered version
(the 2.15 gate still holds) and HasApp finds the default folder too.
Linux ships only a tarball to unpack anywhere, with no desktop entry of
its own, so Linux keeps the backend-file rule.
Run:
- Windows (xiaomi-gpu, real HKCU and 2.30.0 install, sandbox
USERPROFILE/HOME/APPDATA/LOCALAPPDATA, PATH without agy): `magpie ls`
from origin/main's desktopapp.go lists no Antigravity; from this tree
it lists Antigravity.
- win-run go test -count=1 -timeout 45m ./internal/agent: every
TestAntigravity* and the new test pass; 36 reds, 35 of them listed
in #6068 (Windows CI only compiles tests), and
TestEveryFieldLabelHasTUIZh (Hermes profile labels from outside the
test home), filed as #6972. None touch desktop apps' detection.
- mote: go test -count=1 ./internal/agent ok; go vet ./...,
GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... ok;
gofmt -l clean.
Broken by hand: origin/main's desktopapp.go with the new test ->
TestAntigravityWindowsAppRegistered red ("guid \"\""; with that check
skipped, "AppVersion \"\"").
Not tried: the gateway wiring again on Windows in this change (
|
||
|
|
7c3e68908f |
claude-desktop: a model past 200K and under 1M runs at its own window in the Code tab (RQuantum198888 on X)
A GPT set to "Each model's most · 872K" still showed 200K in Claude. Claude Desktop 5.11492 starts its Code tab's Claude Code with CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 in its --settings file, and flag settings come before the 872000 magpie writes to ~/.claude/settings.json. |
||
|
|
c9e8422fa8 |
agent: a field label with no TUI Chinese fails internal/agent's tests
A new agent field's label with no entry in internal/tui's zh map left TestEveryWordHasZh red on main twice ( |
||
|
|
618bfc1a95 |
kimi: pick Kimi Code's subagent pool and its effort (XiaoLing_Arisa on X)
XiaoLing_Arisa asked on X for Kimi Code's subagent pool (子代理池) on the
Agents page: which models its subagents may run on, and how hard they
think. Kimi Code 2.x keeps them in config.toml's [secondary_model]:
default_model (the legacy `model` stands for it), the pool
[secondary_model.models] ("alias" = "when to use it") and default_effort.
- internal/agent/kimi_secondary.go: three fields, subagent_model,
subagent_pool and subagent_effort, written the way Kimi Code takes
them. Its validator refuses a pool that lacks the default, a name with
no [models."…"] table, and an effort a pool model can't take, so a
default goes into the pool, a pool without the default gets its first,
and only the levels every pool model takes are offered
(kimiPoolLevels). A magpie model goes in only while [providers.magpie]
is there. Keys are set in place; hints, other keys and comments stay.
Before Sync or Unwire drops a magpie model table, its name leaves the
section (kimiPruneSecondary). The default goes back to the user's own
(stashed at kimi:<path>:secondary) or to the pool's first, and an empty
section goes. The user's own pool of their own models is never touched.
kimi-cli (legacy) has no such section. A stopped WSL distro shows none
of the three, since each reads the config (#3896).
- GUI: the three fields form one Subagents line in the opened row: the
model, then the effort (disabled until a model is set), then a
multi-pick pool menu that stays open between ticks. The model's tick
can't be removed. The picker's note says an unset model runs each
subagent on the lead's model. The line is drawn by kimisub.js, which
Details imports before its first slide so the sheet measures it.
- Size budgets +457 (reason in core_budget_test.go). Translations in
zh, zh-TW, ja and de. kimisub.js is added to old-webkit's list of
scripts loaded on demand. The Kimi bullet in agent-wiring.md is
updated.
Run at this tree on mica (mica-run):
- go test -tags nogui -count=1 ./internal/agent ./internal/gui: ok,
including TestKimiSubagentPool*, TestWSLColdPlaceOpensNothing and
TestCoreScriptBudget. An earlier run of these packages found the cold
read and the budget overrun; both are fixed here.
- go vet ./... on darwin, GOOS=linux go vet -tags nogui ./... and
GOOS=windows go vet ./...: ok. go build: ok. gofmt -l .: empty.
- GUI: kimi-subagent-pool passes 20 of 20 (Chromium and WebKit, 5
languages, 1100 and 560px). kimi-thinking passes. agent-details-ready,
old-webkit and i18n-keys have 35 reds, and origin/main
|
||
|
|
255ccdd7ca |
omp: a Protocol row picks the API magpie's models are asked on (imty42 on X)
omp's models.yml had magpie's provider on openai-completions with no way
to change it: ompKept treated the provider's api as magpie's, so an api
typed there was written back on the next sync, and omp's row had no
protocol as Pi's has. An auto/* group whose members don't all take
Responses (provider.GroupAPI) could only be asked on Chat.
- omp's row gets the Protocol row Pi has (protocolField, now shared with
Pi's piProtocolField): each model's own (unpicked, as before),
openai-completions, openai-responses or anthropic-messages. omp takes
each for the provider and a model (KnownApi in pi-catalog types.ts and
the api enum of models-config-schema-bundle.ts, omp 18.9.1). The pick
is kept per place and agent folder, so each profile has its own.
`magpie omp protocol openai-responses` sets it from the CLI.
- ompOn puts the provider and every chat model on the pick: Chat and
Responses with no api of their own and thinking mode effort; Messages
at the gateway's root with budget, or anthropic-adaptive for a Claude
that thinks only adaptively. Image models stay on openai-images.
- The provider's api typed into models.yml by hand now stays and shows
as picked (ompAPIKept, the same api:<path>:wanted record as Pi's); a
pick made after it replaces it.
Unchanged: unpicked, Responses-native models and groups whose members
all take Responses already went on openai-responses per model.
Run at this head (3d0cadfce, the same tree; only this message differs),
on mote:
- gofmt -l internal/agent: nothing. go vet ./..., GOOS=linux go vet
-tags nogui ./..., GOOS=windows go vet ./...: rc 0. go build, linux
nogui and windows builds: rc 0.
- go test -tags nogui -count=1 -timeout 45m ./... in a sandbox HOME
under suite.lock: rc 0, 103 packages ok, no FAIL.
- Broken by hand: without ompAPIKept, TestOmpProtocolPicked is red
("an api typed by hand: file openai-completions, field \"\"").
- Real omp 18.9.1 in a sandbox HOME against a stand-in server: with the
provider on openai-responses a group model posted to /v1/responses;
a model on anthropic-messages at the root posted to /v1/messages.
Not tried: the GUI suite (no GUI file changed; the Protocol row is the
generic one Pi's uses, shown for any agent with a protocol field), and
omp against the real gateway with a real auto group.
Not changed: a model's api typed by hand in omp's models.yml is still
magpie's (the model list is magpie's whole); site docs for omp.
|
||
|
|
90d7ea9331 |
agent: a new agent named nowhere in the Library fails internal/agent's tests
TestEveryAgentInLibrary (internal/library) went red on main for a new agent four times: |
||
|
|
00b2c11a6b |
agent: Open Code Review (ocr) is an agent magpie sets up (@AlanWang1027713 on X)
Open Code Review (github.com/alibaba/open-code-review, npm @alibaba-group/open-code-review) is a Go CLI, `ocr`, that reviews a diff with a model. Its Claude Code, Codex, Cursor, Kimi Code and OpenCode plugins and its skills all run that command, which reads ~/.opencodereview/config.json on every run. Picking one of magpie's models on its row writes a custom provider "magpie" there (protocol openai, the gateway's /v1, a key naming Open Code Review, the model) and points provider at it. The user's own provider and model are stashed and come back on Disconnect, which also drops a custom_providers left empty. A model of the user's own can be picked too (written the way `ocr config model` writes it). Check reports a hand-edited url or key, or a removed entry. The `ocr` command counts only under a folder named for Open Code Review, since other programs share the name. WSL distros get the row too (cold distros not opened). Its User-Agent, open-code-review/<version>, already counts as this agent. CLI update via npm. Docs, READMEs, site and icon (OCR's own logo, Apache-2.0). Run (mica, at 593517bf0; origin/main has one unrelated usage commit since): - go test ./internal/agent -run 'TestOCR|WSL|Wsl|TestOwnProviderNamedAsMagpies|TestHandWiredMagpieProviderSiblings|TestAgentOf|TestEveryAgentNamedByItsKey|TestMarkedLinesEveryAgent': ok - gofmt -l: clean; GOOS=linux go vet -tags nogui ./... and GOOS=windows go vet ./...: ok - Broken by hand: url dropped from Check -> TestOCRWiring red; stash turned off -> red at the Disconnect restore. TestWSLColdPlaceOpensNothing went red before the row's options were given an asleep path. - Real e2e in a sandbox HOME: npm-installed ocr v1.13.10 (7e5ce06c) darwin/arm64, magpie built from this tree, a fake OpenAI upstream that calls tools. `magpie agents` lists the row with the user's deepseek/deepseek-chat; `magpie open-code-review magpie/fake/m1` wrote the entry and kept the user's keys and settings; `ocr llm test`: connection ok, tool-call round trip verified; `ocr review` on a repo with a nil dereference: 2 findings "[bug · high]" through magpie (8 /v1/chat/completions calls, UA open-code-review/v1.13.10, model m1, its six review tools); `magpie usage` counts them under Open Code Review; `magpie open-code-review default` put deepseek/deepseek-chat back and removed custom_providers. - Full suite: not run before this push (ship at once; mote was running another session's suite). It runs on mica right after, at this head. Not tried: a real vendor model behind magpie; WSL and Windows/Linux machines for real; the Claude Code / OpenCode plugin path itself (it runs the same `ocr`); an ocr installed by the curl script outside a folder named for it is found by ~/.opencodereview only. |
||
|
|
593517bf00 |
codex: T3 Code's threads on magpie stay on magpie (xxxxpouqqs on X)
xxxxpouqqs on X: "t3code 每次重新会话都出现类似于 The 'codex-2/gpt-6.1-sol'
model is not supported when using Codex with a ChatGPT account".
Cause: T3 Code's magpie · Codex instance runs Codex in ~/.codex on
magpie with `-c model_provider="magpie"` alone, so config.toml names no
magpie. At the next Sync, bringBack took every thread on magpie for a
leftover and moved it to the provider config.toml names (openai), in
state_5.sqlite and in the rollout. Codex resumes a thread on the
provider it was started on, so reopening a T3 thread sent magpie's
model id to ChatGPT. codexRetagOpenThreads (the Codex app's app-server
restart) moved locked or loaded ones the same way.
Fix:
- t3CodexRunsIn(home, dir): T3's magpie-codex instance runs Codex in
this home (no homePath, or one naming it; $T3CODE_HOME honoured; an
unreadable settings file counts as yes).
- bringBack then moves only threads another client started; a thread
whose originator is T3's stays on magpie (sessions.CodexThreadsBy
reads originator and model; a failed read moves nothing).
- codexRetagOpenThreads keeps T3's threads the same way
(RetagLoadedCodexThreadsBut).
Old threads: a T3-started thread an earlier magpie moved to the
current provider with a magpie model id (one with "/") is moved back to
magpie at the next Sync, for every user; a T3 thread started on OpenAI
with OpenAI's own model stays. Nothing to do but update.
Run (worktree at
|
||
|
|
ce16633367 |
tune: a Codex card locked by config.toml's own compact limit hands it to magpie on a click (sufeng1894 on X)
sufeng1894 asked why Codex's compaction threshold can no longer be set by hand. The card said config.toml's model_auto_compact_token_limit wins, and the background row said features.async_compaction's model_async_compact_threshold_percent wins: both locked, and nothing on the card did anything about it. Cause. Only the old tune card ( |
||
|
|
8a017b5837 |
agent: a connect-only plugin whose connect returns only merged objects is connected (plugins#1230)
A connect-only agent plugin is refused with "connect returned no keys to
write" when connect returns nothing. The check counted connect's result
after merged() had taken the plugin's merge keys out of it, so a plugin
whose only keys are objects it lists under `merge` was refused although
those objects' members are exactly what gets written. Lorca's plugin
(plugins#1230) hit it once it dropped its one plain key, changed_at,
which it dropped because unwire left `{"changed_at": {}}` in the user's
credentials.json. Now the merged members count as keys to write.
Run (mote):
- go test -count=1 ./internal/agent ./internal/agentplug: ok.
- go vet ./internal/agent, with GOOS=windows and GOOS=linux: ok. gofmt -l:
clean.
- A scratch test (not committed) loading plugins#1230's lorca.agent.js at
883ea48: connect and unwire with no credentials.json leave "{}"; with
{"anthropic":"k"} and with a file that has custom:gemini and a
changed_at map, unwire gives the file back as it was.
Broken by hand: origin/main's plugged.go with the new
TestPluggedConnectOnlyMergedOnly: "connect returned no keys to write".
Not tried: the real Lorca app reading the file.
|
||
|
|
ac4a4cf849 |
sessions: opening Sessions waits on no WSL listing it already has (shangyuan0818 on X)
shangyuan0818 (X, third round, after v0.1.4091 and v0.1.4255): on Windows, Usage -> Sessions opened only after a fixed ~20s when sessions were long. The long sessions were not the cause. Goroutine dumps of the reporter's case on the Windows box showed four waits on WSL on the page's first asks: - agent.Looks -> Clients -> All -> wslDistros: a blocking wslRefresh, `wsl -l -q` (10s timeout) once its list is a minute old, then `wsl -l --running -q` (10s) every time. A WSL that answers slowly but answers is never marked hung, so each open after a minute idle waited for both: about 18s, every time. ClientsIn drops WSL's agents anyway, so Clients now reads only this machine's (local()). - gui agentsHere (the web-mode own-sessions gate) called agent.All the same way. It now calls agent.AllKnown: this machine's agents and WSL's as last listed (wslDistrosWithin(0)), never waiting on wsl.exe. - sessions.wslFilesAs waited wslFirstWait (3s) afresh on each read while the first listing was pending, so list, stats and overview each waited 3s in turn. The 3s is now counted once, from when the first listing started. - provider.copilotCLILogin waited copilotWSLWait (2s) on every re-read of a distro's Copilot sign-in, every copilotWSLAge (20s), though it had an answer. A re-read now answers the last read at once; only the first read waits. Timed on Windows 11 (xiaomi-gpu), sandbox HOME with a 90 MB Claude JSONL and a 32 MB Codex rollout, a fake wsl.exe whose -l -q answers "Ubuntu" after 8s and whose --running hangs; /api/sessions list+stats+overview together, opened 20s after start, then 70s apart: |
||
|
|
5ba53b2392 |
agent: dsh and Pi ask a Gemini 3+ on Messages adaptively, so Xhigh reaches it as xhigh (#6778)
larryhaonlp: DSH's Xhigh on agy-cli/gemini-4-hydrogen through
magpie-anthropic reached agy-cli as high, and a compat
forceAdaptiveThinking: true added by hand in dsh went on restart.
Cause, from the installed sources (dsh 0.2.1-rc.2's and Pi 1.4.0's
pi-ai, anthropic-messages.js and simple-options.js): without
compat.forceAdaptiveThinking pi-ai asks a budget through
adjustMaxTokensForThinking, whose clampReasoning turns xhigh and max into
high (16384), and agy-cli's requestedEffort reads a budget of 16384 as
high. With the switch it sends thinking adaptive plus output_config.effort
from thinkingLevelMap, which agy-cli reads first. magpie wrote the switch
only for Claude that thinks only adaptively and GLM-5.2/5.3.
- gateway.AsksAdaptively is the one rule: adaptiveOnly, AdaptiveWithEffort
or a Gemini 3 or later (geminiGeneration, the rule geminiLevelBody
already turns a budget into adaptive + effort by). dsh's dshKindConfig
and Pi's piModelOn (both cases) use it. Pi now also gets the switch for
GLM-5.2/5.3, which it lacked (same clamp).
- omp is left on AdaptiveThinking, said in omp.go: its budget isn't
clamped (ANTHROPIC_THINKING xhigh and max are 32768, read as xhigh), and
its anthropic-adaptive mode turns thinking off by leaving thinking out at
the lowest effort, which a model that can stop thinking takes as on.
- The user's own values: dshKeepCompat kept a hand-set switch magpie
doesn't write, but magpie's own switch won over the user's. magpie
writes its switches only as true (omitempty), so a false in the file is
the user's, and now stays.
- The restart: dsh-settings' importLegacyDocument imports
~/.dsh/settings.yaml into the profile dsh starts on and renames it
.imported; magpie writes settings.yaml again with routes that had no
hand-set compat, so each start of dsh took it out of the profile.
dshProfilesCompat carries the profiles' hand-set compat into
settings.yaml's routes, by the same dshKeepCompat.
Existing users: KeepDshWired's sync (30s) and Pi's sync rewrite magpie's
routes, so forceAdaptiveThinking: true lands on a Gemini 3+ there with no
action; a false the user set stays. Pi's models.json provider block is
magpie's own and is written whole, as before.
Run (mote; sandbox HOME):
- go test -tags nogui ./internal/agent -run the new tests and the dsh,
Pi and omp compat tests (TestDshMaxReachesOutputEffortModels,
TestDshRefreshKeepsHandSetCompat, TestDshKeepCompatNotAcrossProtocols,
Pi.*API, Omp): ok
- gofmt -l: clean
- Shipped before the whole ./internal/agent and ./internal/gateway run and
vet (darwin, linux, windows) finished: it was still going on mote, over
its cores, and mica's disk was full. A red there gets its own fix or
issue.
Broken by hand:
- the new tests at origin/main
|
||
|
|
ccae8e8211 |
claude-desktop: a 1M model runs at 1M in the Code tab again (fwxkogaia on X)
Claude Desktop 5.11492 (released 11-13) starts its Code tab's Claude Code
with CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 in its --settings file whenever
the provider routes models itself, the gateway included (Fcn=2e5 and Lcn in
index.chunk-xV3fJhc7.js; 4.16336 had no such value). Flag settings come
before ~/.claude/settings.json, so the window magpie writes there no longer
reached the Code tab, and every model picked by its plain entry ran at 200K,
a 1M one too. No magpie change caused it: nothing in v0.1.4300..v0.1.4322
touched what Desktop is told about 1M.
Claude Code takes a "[1m]" id for 1M whatever that variable says (pT in
2.1.322). magpie's profile now gets Desktop's own "Use 1M wherever it's
available" (modelPrefer1mContext: true, 3p only, Desktop 1.28929+) once, on
a switch on and from Sync, as toolSearchEnabled is (desktopSeedPrefer1M):
Desktop then shows a model it offers a 1M entry for by that entry alone
(D5n: prefer1m on every supports1m entry) and hands Claude Code its [1m] id.
Desktop offers that entry only for a row whose max_input_tokens is 1M or
more, so nothing smaller changes. The user's own value, false too, or their
taking it away, stays theirs. Compaction is as before: the working window,
or the whole window under Full window.
Not fixable this way: a model between 200K and 1M (a 272K or 400K GPT)
still runs at Desktop's 200K; only a managed policy setting comes before
flag settings, and magpie writes none.
Run (mote, at this tree):
- go test ./internal/agent -run TestClaudeDesktop: ok
- TestClaudeDesktopPrefers1M red with desktopSeedPrefer1M returning nil
("switch on: modelPrefer1mContext <nil>"), green with it
- go vet ./internal/agent for darwin, linux, windows: ok; gofmt -l: clean
- go test -timeout 45m ./... at base
|
||
|
|
e97271f027 |
agents: a client of a Remote magpie can connect new agents the remote has connected (KoiLx0 on X)
KoiLx0 runs one magpie as a client of another, through a gateway key, and had to switch every agent on by hand on the client before it took the remote's models. A Remote magpie's editor now has "Connect new agents to this remote" (自动接入新 agent) under Advanced, off by default. It is kept per computer in the stash (remote.<id>.connectAgents), not in providers.json, so a synced or shared providers list doesn't turn it on anywhere else. No server-side key permission. With it on, the follow loop (FollowRemotePicks, every 5 minutes, and at once when the switch is turned on) connects an agent installed here that the remote has connected, on the remote's pick (connectFromRemote), and records it as <agent>.remote.auto = on. An agent the user disconnected here is never connected again: - one with the Agents page's Disconnect mark, connected or not before; - one recorded on that is no longer connected (taken out by hand in its file, or by any other route) is recorded off. An agent magpie put back on quit (quit.restored) is left to RewireOnStart and not taken for a disconnect. Connecting it by hand records on again. The follow throttle's time is now under a mutex, since the save handler resets it from another goroutine. The switch shows in /api/providers as connectAgents and is saved as connectAgents (a save that leaves it out keeps it; a provider that isn't a Remote magpie is refused it). Advanced opens on its own while it is on. docs/subsystems/providers-accounts.md says all of this. app.js stays within its budget (TestCoreScriptBudget): the Remote magpie's three ticks (MCP servers, skills and prompts, agents) and their save are one loop, which the new switch costs less than it saves. Run: - mote, go test -tags nogui -count=1 -timeout 45m ./... with the first draft of app.js: every package ok but internal/gui, where only TestCoreScriptBudget failed (1087333 > 1086971). After the loop, rebased on origin/main |
||
|
|
19794cc10c |
serve: a headless magpie follows a Remote magpie's agent picks (KoiLx0 on X)
v0.1.4298 made a client magpie follow the models a Remote magpie's agents are on (agent.FollowRemotePicks), but only the app's Library loop (library.KeepLinked) ran it. `magpie serve` and `magpie serve --web` followed the remote's model list and efforts (the long-poll in the gateway) and never a pick changed on the remote. Both now run agent.KeepFollowingRemote, which calls FollowRemotePicks every 30s; it still asks the remote at most every 5 minutes, and only while a Remote magpie is added. Run at this head, on mica: - go test -timeout 45m ./internal/agent/ ./internal/cli/: ok - go vet; GOOS=linux go vet -tags nogui; GOOS=windows go vet: ok - Real use: two sandbox magpies (R with a fake OpenAI upstream and a gateway key, C with R as remote-magpie "office"), both `magpie serve`. Claude Code connected on R to openai/gpt-5.5: C recorded claude.model.remote at start. R's Claude Code moved to openai/gpt-5.4-mini at 15:41; C's ~/.claude/settings.json followed at 15:45:49 (the 5-minute step). Efforts set on R (low,high) and a new upstream model reached C's /v1/models, Codex's magpie-models.json and Claude Code's model list within seconds to about a minute, before and after this change. Not broken by hand: the loop is a ticker around FollowRemotePicks, whose following is covered by remote_picks_test.go. Not tried: Windows and Linux real boxes. |
||
|
|
10ce59144f |
claude: a connected Claude Code starts straight into a session (KoiLx0 on X)
KoiLx0 on X: a Claude Code that magpie connected, on a computer where it
had never run, still opened on the theme picker and the sign-in choice.
Claude Code shows its first-run steps while its global config
(~/.claude.json, $CLAUDE_CONFIG_DIR/.claude.json, or a non-empty legacy
.config.json beside settings.json) lacks hasCompletedOnboarding, which
nothing wrote.
- Connecting Claude Code (and a Sync of one connected before) writes
hasCompletedOnboarding: true into that file beside the user's other
keys, and records that magpie wrote it (claude.onboarded in the stash,
per place).
- Disconnecting takes out only the mark magpie wrote, and only while the
file has no oauthAccount or lastOnboardingVersion of Claude Code's own.
- A file that already has the mark (the user's own first run) is never
touched; one that can't be read or parsed is left alone (edit.SetJSON
writes nothing), and the connect still succeeds.
- The Claude launch profile (claude#launch) is left out; it passes its
own --settings.
- The per-folder trust prompt is Claude Code's and stays.
Run at this head (rebased on
|
||
|
|
c4d64a70b2 |
agent: Codex's config holds only keys Codex knows, checked against its schema (#6828)
hatanokokoroyo (#6828) and Nietzsche_Li on X: Codex 0.169 warns on every launch that `disable_response_storage` is ignored, and `codex --strict-config` refuses to start, with magpie 0.1.4291. The key isn't magpie's. `git log --all -S disable_response_storage` finds it in no commit, and nothing in the tree writes it. Codex removed it in openai/codex#3212 (0.30.0, 2025-09); magpie's Codex paths assume 0.133 or later, so none needs it. CC Switch wrote it in its Codex presets until 4.0.28, which stops writing it and clears it on the next switch (cc-switch#7524), and relays' setup pages still tell users to add it. magpie's CC Switch import reads only the model provider. Since magpie can't show it wrote the line, the user's line is left as it is. So this adds the guard: testdata holds Codex rust-v0.169.0's own config.schema.json (descriptions, defaults and enums stripped, 86KB), and TestCodexConfigHoldsOnlyKeysCodexKnows walks it over the config magpie writes, in place and as the magpie.config.toml profile, from an empty config and from a CC Switch one, after setting a model, an effort, subagents and memories and a sync. A key Codex has removed or never had fails it. A user config holding the line keeps it, once, and it is the only unknown key. Run at this tree (mote): go test -run TestCodexConfigHoldsOnlyKeysCodexKnows -v ./internal/agent PASS; go test ./internal/agent ok; go test . ok; GOOS=linux and GOOS=windows go vet ./internal/agent ok; gofmt -l clean. Broken by hand: codex.go writing disable_response_storage beside the effort: the test went red naming the key; restored, green. Not run: the whole suite (a test file and testdata only, in one package). |
||
|
|
b9c385286b |
agent: the disconnect preview reads no sign-ins, so macOS never asks "Keychain Not Found"
jasonz3g on X (macOS, two Claude accounts): clicking Claude Code on the Agents page made macOS ask "Keychain Not Found — A keychain cannot be found to store …" (Cancel / Reset To Defaults), dozens of times. The Agents page loads a disconnect preview each time an agent's box shows: DisconnectPreview runs Disconnect on a copy, in a subprocess whose HOME is a temporary folder. Claude Code's Disconnect builds the model list (buildModels -> CatalogFor -> provider.All -> Accounts -> rememberLogins -> liveLogin), which read the Claude sign-in with `security find-generic-password`, and Cursor's too. On a Mac the keychain is found through HOME, and the temporary one has none. With a copy of real ~/.claude and ~/.config/magpie, the dry run ran security three times under the temporary HOME, started Devin's CLI there, and rewrote held/lapsed in the copy's logins.json. previewEnv now sets MAGPIE_NO_ACCOUNTS=1, which every keychain read and write, liveLogin and askClaudeStatus already honour. The dry run of the same real copy then runs no security and no CLI, and the agent's ~/.claude files come out byte for byte the same as before (diff -r), so the preview shows the same changes. Run: - TestDisconnectPreviewReadsNoSignIns (new), red on the old code (security find-generic-password -s Claude Code-credentials ... twice), green after; its second half checks the fixture does reach the keychain out of the dry run. - go test ./internal/agent -count=1 -timeout 45m: ok on mica (macOS) and on WSL Ubuntu (magpie-desktop); GOOS=linux and GOOS=windows go vet ./internal/agent ok; gofmt -l clean. - Real binary, dry run of `claude` on a copy of real ~/.claude and ~/.config/magpie with logging security/claude stubs: 3 security calls before, none after. Not tried: the GUI dialog itself (no display over ssh); the reporter's own accounts. |
||
|
|
b1dd96ab14 |
agents: a client of a Remote magpie starts its agents on the remote's models and follows them (KoiLx0 on X)
KoiLx0 runs several computers on one remote magpie and had to set every agent's models again on each of them, and again whenever the remote changed. Routing groups already reach a client (a group is a model of the remote's list, TestRemoteMagpieNewGroupServedBesidePicks); the agents' picks did not. - The remote tells, per connected agent, each model field's catalog ref at GET /v1/magpie/agent-models (gateway.SharedAgentModels, agent.SharedModels). Guarded as the Library is: this computer, or a full-access key of a magpie shared on the network; a held key is refused (readonly_test), and another machine without a key gets 401 (TestNetworkGatewayGuardsEveryRoute). - An agent connected here starts on those picks where this magpie lists them as <remote id>/<ref> (How "remote", after "again" and "joined"; the Agents page says "as on the remote magpie", in all five languages). - A field taken from the remote, or found on its pick, is recorded in the stash and follows the remote's change every 5 minutes (FollowRemotePicks from library.KeepLinked). A model picked here is the user's: the record goes, and the field is left alone until it is on the remote's pick again. A pick this magpie doesn't list is skipped. - app.js budget: no raise. The new line's 76 bytes come from same and alike sharing one string (CONN_WAS) and the native joined case returning plain instead of the same t() again. Run at this head (rebased on |
||
|
|
13e8002641 |
claude-desktop: two providers' Claude model read "Opus 5.5 · agy-cli", not the id's tail (onkashiko on X)
Claude Desktop names a row listed as magpie-<n>.anthropic.claude-opus-5-5
after its own catalog ("Opus 5.5"), whatever display_name says, so
agy-cli's and another provider's claude-opus-5-5 read alike and Desktop
5.11492 told them apart by the part of the ids that differs: "Opus 5.5
(…<n>.anthropic.claude-opu…)" (xVn/wVn in its app.asar). Only an
inferenceModels entry's labelOverride comes before the catalog's name,
and Desktop never suffixes such a label (keep in xVn).
magpie now writes the profile's inferenceModels, each row's display_name
as labelOverride, while two rows are named after one Claude model of
Desktop's catalog (desktopNamesClash), not only while a tier is picked.
The ids are unchanged. As with a tier's list, Desktop reads it at start
and its menu stays as listed until the next start; the Agents row's
Restart shows.
desktopNames' own fallback for two rows display_name still leaves alike
(one provider's models named alike) is now the model's id, "Z · D (z2)",
not the whole catalog id; two providers of one name keep the catalog id.
Claude Science takes the same names.
Run (mote, at origin/main
|
||
|
|
b26f16ee24 |
agent: Alma has one magpie provider, whichever side turned it on
realLemonawa on X: Alma has its own Magpie preset, and magpie's Alma
agent adds a provider of its own, so turning on both left two.
Alma's preset card claims the provider whose id is "magpie" (Alma
origin/main: forPredef / getProviderForPredefined, provPredefBody in
desktop-native settings_providers_detail.go). magpie's provider is now
made under that id (with the preset's icon), so Alma's card shows it set
up and offers no second one. When a provider has that id already (a
user's own elsewhere), magpie makes one as before and leaves it alone.
almaMagpie already took a Magpie set up in Alma first (same gateway
host) as magpie's, so the row showed connected and nothing was added.
What was wrong was switching off: almaSet("") DELETEd whichever
provider it had matched, the user's own preset included. Now a provider
magpie didn't make (name not "magpie") is kept: only the default model
and image refs that point at it are taken back, as before, and it is
turned off again only if it was off when magpie turned it on
(alma.wasoff in the stash). Sync no longer rewrites its model list after
the switch-off.
Tests: TestAlmaOneMagpie (internal/agent/alma_test.go), against the
fake Alma, whose POST now honours an id and answers a taken id with
Alma's 500 "UNIQUE constraint failed":
- set up in Alma first: connected, no second provider, switch-off sends
no DELETE, the preset stays on, sync after off writes nothing
- turned off in Alma: enabled on connect, disabled again on switch-off
- none in Alma: created under id "magpie", removed on switch-off
- preset id taken by another host: left alone, a new one made
Red on the old alma.go: "the user's own Magpie was removed:
[PUT /api/settings DELETE /api/providers/magpie]". Broken by hand:
without the id, "none in Alma" fails ("not under the preset's id");
without the Sync skip, "sync after off wrote [PUT
/api/providers/magpie/models]".
Real Alma (alma-server from /Applications/Alma.app, sandbox HOME and
ALMA_DATA_DIR, port 23917, never the live one): the preset's own POST
body creates id "magpie"; a second POST with that id is refused
500 UNIQUE constraint failed; PUT {"enabled":false} turns it off; DELETE
204; magpie's POST body with id "magpie" and type openai is kept as
sent.
Run at this tree (rebased on origin/main
|
||
|
|
99a54fa874 |
agent: agy's own /model pick no longer costs settings.json its model, and each thinking level is a model in agy (LolingVerse on X)
agy's /model writes its pick into settings.json ("model": "magpie/…")
even when started with --settings magpie-settings.json. The next Sync's
migrate took that for an older magpie's wiring and put back the old
stash: a stale model and "modelProvider": "gemini", or nothing, which
took the user's own model and provider out. That is the wrong restore
point the reporter saw. While magpie-settings.json is already on one of
magpie's models, such a pick is now moved into magpie's file (what agy
starts on next), and settings.json's model goes back to the one
connect.was kept when magpie was switched on, or out. The old stash is
no longer read for it.
agy 1.5.9 turns /effort away for every custom model, one with a
thinkingLevel too. A custom model's thinkingLevel takes low, medium or
high, and agy sends it as generationConfig.thinkingConfig.thinkingLevel,
which the gateway already asks over the row's effort (agyLevelAsked). A
model with two or more of those levels now has a custom model per
level, magpie/<ref>:<level>. The row's model field shows such a pick as
its model, so the switch stays on (agyLevelOf).
Run:
- TestAgyOwnPickKeepsSettings is red on the old agy.go. The levels part
fails with "level low:". The pick part, with the levels cut out,
fails with settings.json {"model":"stale","modelProvider":"gemini"}.
It is green on the new code.
- go test -count=1 ./internal/agent ./internal/cli on mote: ok (agent 259s, cli 67s) at base
|
||
|
|
4a4424ea84 |
codex: the takeover note names the phone connection the Codex app loses, beside Keep on ChatGPT (Mugenrikka on X)
Mugenrikka on X: once the Codex quota was used up, Codex opened through magpie stopped connecting to the phone and the account's profile could no longer be opened. Cause. This is the used-up takeover (#540, codex.out): with the active ChatGPT account held, magpie becomes Codex's provider without requires_openai_auth, so the app-server's getAuthStatus/account/read answer no account (codex-rs app-server get_account builds the account from the provider). ChatGPT.app 26.1029's main process then takes the host as an "execution-storage" identity, not a "chatgpt" one (its early-bootstrap: authMethod chatgpt/chatgptAuthTokens -> chatgpt; authMethod null and requiresOpenaiAuth false -> execution-storage), and "Connect your phone" (remote control) and the profile go with it. magpie never touches auth.json; the sign-in is still there. Nothing can keep both. With requires_openai_auth = true the app reads the account again, but its composer gate then greys Send for every model while the account's /wham/usage says not allowed (checked in |
||
|
|
2649d5d727 |
agents: Dim alpha (dima) is an agent, started on magpie's gateway (T_t__biu on X)
Dim alpha (arcships/dim, npm dimcode-alpha, command dima) gets a row on
the Agents page. Picking a magpie model there starts dima with the
variables Dim documents for any OpenAI-compatible endpoint
(docs/design/model-startup.md): DIM_BASE_URL (gateway /v1),
DIM_API_FORMAT=openai-compatible, DIM_API_KEY (magpie-dim), DIM_MODEL
and both DIM_MAX_*_TOKENS (the catalog's, else 128000/32000). They hold
for that run only; Dim's saved Providers, settings and database are not
written. The pick is in magpie's own dim.json; a dima function in the
user's shell profiles runs `magpie dim run`, and the row gives the
command for an open terminal. Picking Dim's own (or Disconnect) removes
both. Nothing signs in to, reads or proxies Dim's own account or the
DimAgent subscription (removed at its vendor's request, v0.1.471).
Run:
- mica, at this tree (rebased on
|
||
|
|
9cd5f36521 |
antigravity: retired, the built-in and its plugin both ask Google nothing; Antigravity is served by your own agy (agy-cli)
Google bans accounts it sees on Code Assist through Antigravity's own
client. magpie offered that route twice, the built-in and
@magpie-community/opencode-antigravity-auth, and anyone who picked
Antigravity in magpie took it by default (the owner, 11-15: 全部下线,改推
agy-cli).
- retiredBuiltins has antigravity. googleLogins lists no account of a
subscription its plugin serves, so no list, usage read, quota read or
request goes to Google with a built-in Antigravity account (the usage
loop in subscription_usage.go had no gate of its own). The mover reads
googleSavedLogins, so saved accounts still move.
- The mover's min is 0.2.0 (on the plugins dist index, b8bf5a57): that
version sends nothing, answers every request 410 ModelDeprecated
("model has been retired", which modelRetired reads, so a group asks its
next member) naming Antigravity (local agy CLI) and
`magpie plugin add @magpie-community/opencode-agy-cli-auth`, and turns
sign-in away. It left the plugins registry (003a38ff).
- Gemini CLI's route, on the same code, is unchanged.
- The built-in's code stays for now (shared with Gemini CLI); taking it
out is #6723. Its 123 tests serve it again for their run through
provider.AntigravityBuiltinForTest(), a counter BuiltinRetired reads.
- README (en, zh) and site docs subscriptions (en, zh, ja) point to
Antigravity through the user's own agy CLI. AGENTS.md and
provider-plugins.md say why and that neither route comes back.
What users lose: Antigravity with Google accounts signed in to magpie, and
rotating several of them. agy-cli serves the one account the user's agy is
signed in to, and needs agy installed.
Tests: TestRetiredAntigravityAsksGoogleNothing saves an Antigravity
account and checks googleLogins/googleAccountOf give nothing, the mover
still carries it, usage has no Antigravity card and the fake Google was
asked nothing, and Gemini's account still lists. Broken by hand (the
PluginServes gate removed from googleLogins): red,
"googleLogins(antigravity) = 1 accounts".
Run (mote/mica, at this change on origin/main
|
||
|
|
a5e3972a71 |
agent: the Codex account the user keeps Codex on is never taken over when held, so the app shows it, not "magpie" (davezfr on X)
davezfr on X, after v0.1.4216 ( |
||
|
|
f1c9014cd9 |
wsl, masking: a hung WSL or a slow local model no longer holds requests
vsoullai on X (0.1.4190, Windows): the gateway froze. Each request waited 15s in turn on the local masking model, routing was held 30s and got a 504, and a stopped WSL distro's probe dragged everything down until redactModel and WSL were turned off. #6167 (Codex held 30s then 504, fixed by restarting WSL) and #4856 (masking timeouts, 504s) are the same. WSL (internal/agent/wsl.go, wsl_links.go): - wsl's lock was held through wsl.exe and through the stat of \\wsl.localhost\<distro>, which can't be cancelled. The GUI's look held it, and every request's Codex/Claude stand-in, wslUp, distroAt and Copilot's WSL folders queued behind it. - A look (wslRefresh) now runs wsl.exe, the probes and the stat outside the lock. Looks take turns on wslRefreshMu, and the lock only guards reads and writes. - wslRoot's stat is bounded (wslRootWait 5s); a distro whose / can't be opened fails its probe and is tried again later. - What a request asks never waits on a look. "Which distros run" is asked single-flight in the background and waited for at most wslRunningWait (2s). A distro wsl.exe hasn't named as running counts as stopped, so nothing opens or wakes a distro on a guess. - Copilot's WSL sign-in (internal/provider/copilot_cli.go) is read the same way: single-flight, waited for at most copilotWSLWait (2s), with the last answer kept. Before, its own mutex queued every request behind the first one's read. Masking (internal/masking/masking.go): - With redactModel on, each request waited up to strictWait (15s). In a burst the backlog grew and the requests waited one after another. - Once a strict request runs out its wait with texts unread, the model is "behind". The next requests then wait only defaultWait (2s) until a request is read whole or a minute passes (behind, waitFor). The rules still mask everything the model hasn't read. Docs: docs/subsystems/agent-wiring.md (WSL twins) and gateway-routing.md (masking). Run: - New tests, on mote, -race -count=3: TestWSLHangHoldsNoRequest (wsl.exe --running, a distro's probe, the stat; each hang injected), TestWSLRootHangFailsProbe, TestCopilotWSLHangHoldsNoRequest and TestStrictModelBehindWaitsTheDefault, with the other WSL, Copilot WSL and masking tests. All ok. - Broken by hand: the same tests on the old code (origin/main's files with only the new tests added). Each WSL hang case failed ("a Codex stand-in waited on a hung WSL past 2.2s", "the GUI's look didn't wait on the hung WSL"). The Copilot test failed ("13 requests waited on a hung WSL past 2.2s"). The masking test failed ("request 2 after the model fell behind waited 2.0s"). - Full suite on mica at f08597a58 (this change on |
||
|
|
ec8125e680 |
agent: Kimi Code's thinking level is picked in Agents
@apple_test_src on X: every other agent has a reasoning-effort pick,
Kimi Code didn't. Kimi Code 2.x keeps its startup level in
config.toml's [thinking] table (read from @moonshot-ai/kimi-code 2.6.2's
source: ThinkingConfigSchema, persistModelSelection,
thinkingEffortFromConfig). The new "thinking" field writes it the way
Kimi's own /model does: off = enabled=false (effort kept), a level =
enabled=true + effort, Default removes both keys (and the table when
empty). Options come from the chosen model's support_efforts /
default_effort / capabilities, overrides first; "off" is left out for
an always_thinking model; unknown model or unreadable file gives
off/low/medium/high. A cold WSL place reads nothing (#3896). The legacy
Python kimi-cli gets on/off through its top-level default_thinking.
Run:
- Real Kimi Code 2.6.2 on mote, sandbox HOME and
KIMI_CODE_HOME, fake chat server, config written by this field's Set:
Default sent thinking {enabled, effort medium (model default)}, off
sent {type: disabled}, low and max sent those efforts.
- mica-run at bba704222 (rebased on
|
||
|
|
df4578438e |
models: a model listed bare takes what models.dev says, audio too
Parlevent_ on X: Gemini served through magpie from Vertex AI was listed
as taking text and images only, never audio. Vertex AI's models, and a
relay's, come from a list that says nothing of what a model takes, so
the entry had no input kinds and every agent's fallback said
text+image (provider.Entry.Modalities' Images branch).
catalog.InputsOf is now what most of models.dev's providers list a
model with, by bare id, as SeesImages, ContextOf and the others are
voted. provider.InputsOf uses it when the model's own source said
nothing of input (InputModalities and ImageInput both nil); a source's
own word, a plugin's included, still stands, and the image kind still
follows Images (the user's override included). The GUI's model row and
every agent's list read it through the Entry. OpenCode is now told
audio, video and pdf where the model takes them (its modalities enum
holds all five), not text+image only.
So Vertex AI's gemini-3.5-flash is text, image, audio, video, pdf;
gpt-oss-120b-maas there is text; a relay's bare gemini-3.5-flash is the
same as Vertex AI's. A model models.dev doesn't know stays unknown.
Also: a video sent to a bare-listed model models.dev lists without
video is now refused at magpie ("does not support video input") as it
is for a model whose own list says so, where it went upstream before.
Run (mica, mica-run):
- the new tests: TestGeminiTakesAudioWhereverServed (provider),
TestInputsOf (catalog), TestOpenCodeInputs (agent): green; red on
|
||
|
|
04ca2afab2 |
netproxy: Auto reads a Linux desktop's proxy, GNOME's and KDE's (#4147)
On Linux, Auto read no system proxy at all (system_other.go answered none), so with Clash Verge's system proxy on, magpie opened from the desktop's menu, with no *_PROXY, went direct and Settings said "No system proxy found". The user had to type the proxy into magpie and take it out again when they turned the proxy off. system_linux.go reads the desktop's own setting, where its apps and Clash Verge (sysproxy-rs) put it: - GNOME (and Cinnamon, MATE, Budgie): `gsettings list-recursively org.gnome.system.proxy`, mode 'manual' only; HTTPS over HTTP over SOCKS, ignore-hosts as the bypass list. - KDE: ~/.config/kioslaverc (XDG_CONFIG_HOME), ProxyType=1 only, its "http://127.0.0.1 7897" address form, NoProxyFor unless reversed. Read first on a KDE session, else after GNOME's. No gsettings, or no GNOME proxy schema, is none; a gsettings that fails otherwise is a failed read, which keeps the last good one as on macOS. PAC ('auto', ProxyType=2/3) is not read, as on macOS and Windows. Codex's view is unchanged on Linux: its reqwest reads no desktop setting there, so codexProxyFor takes no system proxy unless on macOS or Windows (codexSystem), with test cases that fail without it. Not a timezone or language guess (the X ask from jimlee0824v2): it is wrong for anyone travelling, on a VPN or a TUN, and the system's proxy is what says whether one is on. Run: - red on the old code: TestSystemReadsGnome, TestSystemReadsKDE and TestSystemWithoutDesktopProxy (3 of 3); the two Linux cases of TestCodexProxyFor with the old codex_proxy.go. - real gsettings on Ubuntu 24.04 (WSL magpie-desktop) under dbus-run-session with a temp XDG_CONFIG_HOME set to manual 127.0.0.1:7897: system() gave http://127.0.0.1:7897, bypass [localhost 127.0.0.0/8 ::1]. The distro's own setting not touched. - mica-run: go test ./internal/netproxy ./internal/agent ok; go vet of both for darwin, GOOS=linux and GOOS=windows ok. - wsl-run: go test -run 'Proxy|Gsettings|Kioslaverc|TestSystem|Codex' ./internal/netproxy ./internal/agent ok. - win-run: go test ./internal/netproxy ok. - gofmt -l clean. Not tried: a real KDE session (fixture from sysproxy-rs' format), the GUI on a Linux desktop. |