Commit Graph
3 Commits
Author SHA1 Message Date
yetone 4660fd69f5 provider: Copilot's Auto pick is served to a Student plan, its session read as VS Code's is (infinitr0us, #256) — /auto picked gpt-5.6-luna and Copilot refused magpie the request (The requested model is not supported.) while VS Code 1.140's Copilot Chat 0.68 was served it on the same account. magpie sent Auto's Copilot-Session-Token with no X-GitHub-Api-Version, which Copilot Chat sends on every request (2026-01-09), and Copilot reads the session only with one: without it the request is a model picked by hand, which the plan is refused for the pick. The editors' sign-in now sends Copilot's API that version and Copilot Chat 0.68 / VS Code 1.140.0 as its client (copilotAPIHeaders; GitHub's own API keeps no version); /models/session's 2025-10-01 is set after them. Copilot then holds the session to its pick (Requested model not available for session for another model, or a session let go): such a session is let go and the request sent with one asked anew, not noted as a refusal. With the owner's real Copilot account (Individual): without the version, the session token was ignored (any model served with it); with it, /auto's gpt-6-luna was served on /responses with its session through ResolveAuto and Sign, and another model with that session answered 400 not available for session; claude-haiku-4.5 on chat and messages, gpt-4.1 streamed, gemini-3.8-flash and gpt-5.4-mini on responses answered 200 with the new headers, and /models lists the same models. TestCopilotAutoPickServed fails on the old code (served gpt-4.1, the fallback). go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-05 07:55:27 +08:00
yetone 026158b0ad copilot: each Auto try in the route names the model Auto picked, where the pick came from and Copilot's refusal, and /auto's refused pick goes to the account's own model, not /models/session (infinitr0us, #256 again: on v0.1.916 a Student account's first copilot/auto requests each took two 400 "The requested model is not supported." tries before gpt-4.1 answered, and both refused tries were logged as model "auto", so neither the route nor X-Magpie-Model said whether /auto answered the account, what it picked, or whether magpie fell back to /models/session) — a try now carries auto: [{model, via, skipped, refused}], via being /auto, /models/session or fallback (the model the account may pick by hand), skipped why /auto's pick wasn't taken (its error, or the refused model it picked), refused Copilot's words; the Routing page names the try "GitHub Copilot (auto → gpt-5.3-codex)" and puts a line per pick under it (zh, ja, de strings), and the log says each pick not from /auto and each refusal. POST /auto is asked at Copilot Chat's tier, "balance", which its AutoV2Fetcher always sends. Once /auto has answered with a model the account was refused, the model it may pick by hand stands in, as Copilot Chat asks nothing else: /models/session names the same few models for every plan, which this account was refused (gpt-5.4-mini, gpt-5.3-codex). With the owner's real (Individual) Copilot account through an in-process gateway under a sandbox HOME: /auto picked gpt-6-luna at tier balance, 200, the try's auto [{gpt-6-luna /auto}]. TestCopilotAutoPicksInRoute (a fake Student plan whose /auto picks gpt-5.3-codex, refused) and routing-copilot-auto.test.cjs (WebKit, en and zh) fail on the old code; routing-wb-refused, routing-effort, routing-kind and routing-zcode-blocked pass on WebKit; go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-05 05:48:27 +08:00
yetone 7d0f33d702 copilot: a model the plan refuses is remembered and Auto falls back (#371, #256) — Copilot answers a model the account's plan doesn't carry (Student, Free) with 400 model_not_supported; magpie kept offering and picking it. Such a model is now marked refused for that token for 6h, left out of the models listed and of Auto's picks, and the request is retried on the next model (fallback, then default, then non-premium such as gpt-4.1). TestCopilotRefused* fail without the change. 2026-10-01 11:28:41 +08:00