Files
magpie/internal
yetone ffc1d64e5e usage: a call recorded under magpie's alias id is the gateway's, not a direct one (CrazyJal on X)
Claude Desktop's Code tab, and Claude Code under it, write the id the gateway
listed the model by (magpie-<number>.anthropic.<Claude model>,
mythos-magpie-<n>, anthropic/magpie-<n>, claude-magpie-<n>) as each turn's
model. The gateway's log counts the turn under the model that served it, and
the agent's file counted it again under the alias: a row for a model that is
none, its cost on top of the real one.

Only the gateway knows those ids, so a call that names one went through it.
Such calls are now left out of what Direct, the ledger and the Requests
page's chunks take from session files, for every agent that records one.
Calls under a model of the agent's own are unchanged. usage.MagpieAlias
mirrors the gateway's alias forms; a gateway test fails when the two differ.

Run (mote, at the pushed head): TestAliasCallsAreTheGatewaysNotDirect, TestMagpieAliasForms and
the gateway's TestUsageKnowsEveryAliasForm pass; with ownCalls returning its
input the first fails (7 rows, four under aliases). go test internal/usage,
internal/gui, internal/sessions ok; vet darwin, linux nogui and windows of
usage and gateway clean; gofmt clean. Go-only change, so no GUI file was run.
Not tried: a real Claude Desktop 3p session (none on this machine; the model
forms come from the gateway's own alias code and its tests, not JSONL bytes).
Existing persisted request chunks rebuild with the new binary.
2026-11-12 13:14:43 +08:00
..
…
…
…
…
…
2026-11-11 08:14:28 +08:00
…
…
…
…