PI-Desktop (vastsa/PI-Desktop) runs Pi's own library, so by default it
sends pi's User-Agent ("pi (darwin …)") and is counted as Pi. Its provider
settings take a custom User-Agent ("pi-desktop/0.0.0" in its own tests),
but that name started with Pi's "pi-" prefix, so it was still Pi.
agents.go's others gains PI-Desktop (id pi-desktop, UA "pi-desktop", Pi's
icon). AgentOf matches it by its exact name first and by the longer
prefix, so pi-desktop/<ver> and the key magpie-pi-desktop are PI-Desktop,
while "pi (…)" and other "pi-" clients stay Pi.
Run: TestPIDesktopIsNotPi (red without the agents.go entry: pi-desktop/0.1.0
went to pi), go test -tags nogui ./internal/agent ./internal/usage, gofmt,
vet darwin/linux(nogui)/windows. A sandbox gateway (temp HOME, port 3561)
given a /v1/chat/completions request with User-Agent pi-desktop/0.1.0
recorded agent "pi-desktop" in usage.jsonl.
Not tried: the real PI-Desktop app; with its default User-Agent it still
reads as Pi, which nothing in the request can tell apart.
Pi shows xhigh and max only for models whose thinkingLevelMap names them,
and magpie wrote just "reasoning", so a model whose top level is max (GLM-5.3,
DeepSeek) stopped at high and a max setting was sent as high (#5). Checked on
the wire: --thinking max sent reasoning_effort high before, max after. Picking
the model or thinking level in magpie again rewrites Pi's models.json.