ac4af582301a4e8a29245dbba767eba31334ddf9
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
761556a0cc |
provider: Qoder's built-in is retired; its plugin serves it
qoder and qoder-cn join retiredBuiltins, as Zed did in c0605abc2. @magpie-community/opencode-qoder-auth serves both, moved or not. Removed (built-in only): - gateway: the Qoder dispatch in gateway.go and gateway/qoder.go (the translator), with its tests (qoder_test, qoder_busy_test, qoder_cn_test). - provider: qoder_usage.go; the Accounts() loop, builtinLogins case and loginQuota branch, the Logins/side-list/switch/forget cases, SetLoginOn and alsoOn, the sign-in case, the subscription_usage fetch, and qoder in asksOwnBackend; qoderLogins(); the built-in tests (qoder_test, qoder_cn_test, qoder_free_test). - internal/qoder: codec, cosy, models, oauth, usage, userinfo, ids, store and their tests. Kept, and why: - migrate_qoder.go (the mover) and the legacy qoder.json migration it reaches through qoderLoginsOf. It now reads a pair with qoderSaved. - qoder_checkin.go: the check-in walks plugin accounts (heldPlugins). - internal/qoder/endpoints.go: the provider keys, Site/SiteOf, the Credential the mover reads and NewMachineID, with the notice. - The PLUGIN-SERVED notice in provider/qoder.go and internal/qoder. - gateway's relayStatus/retryAfterOn, which commandcode.go uses, moved to relay_status.go; the tests' qoderRoundTrip is now roundTripFunc (roundtrip_test.go), no change in meaning. Tests changed in meaning: - TestOwnStoreSignInAgainDropsTheReading lost its qoder case. - New TestQoderLegacyFileMoves: a legacy qoder.json moves through the mover and is removed. Red when migrateQoder is skipped (tried by hand). Run (machine load ~300, so narrow by request): - gofmt -l internal: empty - go vet -tags nogui ./...; GOOS=linux and GOOS=windows the same: clean - go test -tags nogui -count=1 -timeout 45m -run 'Qoder|qoder|Migrat|migrat|Mover|Moved|Retired|SignIn|AsksOwnBackend|Plugin|Afresh|Checkin' ./internal/provider ./internal/gateway ./internal/cli ./internal/gui ./internal/qoder provider ok 114s, gateway ok 201s, cli ok 18s, gui ok 12s, qoder no tests Not run: the whole packages, the full suite, the GUI node suite. |
||
|
|
6ea3b78d4e |
agent: OpenCode gets <level>-fast variants of a Codex account's GPT models, sent as Codex's /fast; the user's own variants stay (#2379)
OpenCode has no /fast (jiz4oh). A ChatGPT account's own gpt-* model (not a routing group; catalog.Model.CodexFast, set in magpieModels from provider.CanFast) is written into opencode.json with each level again as low-fast … xhigh-fast, or fast alone with no levels. Each asks service_tier "priority" twice: as an option, which OpenCode 1's @ai-sdk/openai-compatible sends as it is (read in v1.18.34's transform.ts and the SDK's getArgs), and in extraBody, which OpenCode 2 sends while it drops an option it doesn't know. The gateway already sends a Chat request's priority tier to chatgpt.com on Responses and drops OpenCode 1's stray extraBody field. Other vendors' models, an OpenAI key's GPT model and groups get no fast variants. The models block was written whole, so a variant the user added to one of magpie's models was wiped on every sync. openCodeKept (OpenCode, DevEco, Air, OpenChamber) keeps a user's variant and one written over under a name of magpie's; a variant exactly as magpie writes it is magpie's, so one the model no longer has goes. agent-wiring.md says so. Run: - go test -tags nogui -p 1 -count=1 -run 'OpenCode|OpenChamber|Air|DevEco|Deveco|Variant|Theirs|Kept|CodexTier|MagpieModels|Fast' ./internal/agent/: ok - go test -tags nogui -p 1 -count=1 ./internal/catalog/: ok - go test -tags nogui -p 1 -count=1 -run 'Fast|Tier|Codex|OpenCode' ./internal/gateway/: ok - New: TestOpenCodeCodexFastVariants (written config, user variants kept, stale one dropped, second sync byte-identical, relay/gpt-5.5 and codex/codex-auto-review without fast), TestOpenCodeVariants fast cases, TestOpenCodeFastVariantReachesCodex (Chat as OpenCode 1 and 2 send it, streamed and whole, against a fake ChatGPT backend: service_tier priority, effort kept, no extraBody; none without the variant). - Broken by hand, each red: CodexFast never set; theirsKept back in place of openCodeKept; user variants not read; stale variants kept; extraBody not written; gateway's Chat parse not reading priority. - Real use: the exact opencode.json the test writes, base URL pointed at a fake server, in a sandbox HOME, with opencode v2.0.25: -m "magpie/codex/gpt-5.5#xhigh-fast" sent reasoning_effort xhigh and service_tier priority; #medium sent no tier. - gofmt -l clean; go vet -tags nogui for GOOS=darwin, linux, windows on internal/agent, internal/catalog, internal/gateway: clean. Not tried: an OpenCode 1.x binary (read from source only), a real ChatGPT account's priority tier. Full suite: SUITE_LINE |