zhenghaowen0967 asked for an agent's fast pick of a ChatGPT model to go as
Codex's Ultrafast without the client asking for it. settings.UltraPicks
holds the agent's fast picks that are set to Ultrafast; each one is in
FastPicks too.
- The gateway marks those candidates `ultra` in fastPick.
- On Chat and Responses, a try sends service_tier "ultrafast".
- From Messages, a try carries withUltra to forwardTranslated, which
sets Request.Ultrafast for the ChatGPT backend.
- In every case, the #1784 check decides the account. One whose list
doesn't offer Ultrafast goes after a mate that does (tierMate). With
no mate left, it is sent priority.
- That check now covers Chat as well as Responses.
- Sibling fix: chat.go dropped a Chat client's own service_tier
"ultrafast" (Fast was false, Ultrafast unset). It now parses as
Responses does.
- provider: SetFastTier (""/priority/ultrafast) behind SetFastPick.
CanUltra and UltraModels say whether one of Codex's accounts lists
Ultrafast on the model. UltraPicks follow a provider rename
(renameModelPrefs) and survive a GUI settings save.
- GUI: an option gets ultraOk/ultra. Where ultraOk is set, the bolt in
the picker steps usual -> Fast -> Ultrafast -> usual, as a camera's
flash button steps its modes. Ultrafast shows two overlapped bolts, in
the row and after the field's model. Tooltips and the status line are
in en, zh, zh-TW, ja and de. POST /api/agent-fast takes `ultra`.
- No `:ultrafast` suffix for routing groups yet.
Tests, each broken by hand and seen red:
- TestUltraPickSentUltrafast covers omp/Responses with no tier asked
(acct-pro:ultrafast), the Pro account out (then acct-plus:priority),
another agent unchanged, opencode/Chat and claude/Messages picks, a
Chat client's own ultrafast, and switching back to Fast or off.
- Red with ultra forced false (4 cases).
- Red without withUltra (claude went priority).
- Red without the chat.go parse (2 cases).
- TestSetFastPick: red without UltraPicks in renameModelPrefs.
- TestSettingsSaveKeepsWhatItDoesNotSend: red without the api.go carry.
- fast-ultra.test.cjs (en zh ja de, window and 440px panel): red (9/9)
without the Ultrafast step.
Run (vet, gofmt, GUI and full suite at base 8b84dc902; the reruns
below at a rebase onto 6b3ee5a03 and then onto 63be47717 origin/main):
- gofmt -l: clean.
- go vet -tags nogui ./... for darwin, linux and windows: clean.
- GUI, chromium + webkit: fast-ultra, fast-pick, group-member-fast,
i18n-keys, model-pick and 14 other agent-model/picker files. 197/197
pass.
- Full suite: set -o pipefail; go test -timeout 45m ./... (sandbox
HOME, macOS, 3 other sessions' suites running at the same time):
every package ok except two.
- internal/gateway: TestMaxRPMGroupPrefersMemberWithRoom hit its fixed
1s bar (1.126s) under load. It passes 5/5 alone (-count=5). Filed
as #2520.
- internal/gui: TestPanelJoinsFullScreenSpaces, red on macOS 26.2 on
main already, filed as #2450.
- Rerun of internal/gateway and internal/library after the rebase onto
6b3ee5a03 (both packages changed upstream), -timeout 60m, load
average ~290: library ok. gateway hit the 60m timeout (the test
running, TestPauseByFolder, was 13s in) and
TestQueueRefusalIsInTheUsageLedger saw b's 1s queue timeout as a
second 429. Filed as #2541. TestQueueRefusalIsInTheUsageLedger,
TestPauseByFolder and TestUltraPickSentUltrafast, -count=5 at this
head: ok.
- At the 63be47717 rebase: gofmt clean; vet darwin/linux/windows clean.
internal/provider ok, internal/settings ok. internal/agent hit the
45m timeout under load ~295 (in TestCursorLocalEffort, at 0s), so
this is not a green for that package. Its -run
"Fast|Option|Models|Picker|Cursor|Codex" subset, run through the
shared 3-slot queue, was ok in 794s. The whole package is left to
CI's Test run.
Not tried: a real Pro account's Ultrafast. The fake ChatGPT backend's
model lists offer it on one account only.