KoiLx0 on X: with Azure or another provider that takes service_tier
"ultrafast", the group's speed toggle stopped at Fast, and they asked
whether the group's Fast overwrites {"service_tier": "ultrafast"} put
in the provider's extra request body. Before this commit it did. A member
sent fast got service_tier "priority" in its body before the extra body
was merged. A non-forced extra-body field only fills in a missing value,
so "priority" went upstream. Only "!service_tier" survived.
Precedence now:
- Member not sent fast: as before. The agent's own tier is kept, and the
extra body's service_tier fills in when the agent sends none.
- Member sent Fast: priority. If the provider's extra body asks for
"ultrafast", it is sent ultrafast, so Fast is never sent slower than
the user asked of the provider. A slower extra-body tier (flex) gives
way to the toggle, which the user set on this member.
- Member sent Ultrafast: ultrafast.
- A forced "!service_tier" in the extra body still goes over all of
these as written.
The same holds for an agent's fast pick (same member loop).
Ultrafast on a provider the user added by its address (OwnFast): the
toggle goes on to Ultrafast for a GPT model when OpenAI offers the tier
on that model. That is known when one of Codex's accounts lists it, or
when Codex's own entry in models_cache.json for the slug does
(codexcat.OwnOffers). Codex itself is already offered the tier on such a
provider from that same entry (ownTiers). Like its Fast, Ultrafast is
only asked for. A provider that turns the field away is asked again
without it. Other vendors and OpenAI's own API are unchanged. The
Ultrafast button's tooltip on such a provider says the tier is asked of
the provider (new string in zh, zh-TW, ja, de).
Tests, red on the old code:
- TestFastMemberOwnProviderExtraTier: the outgoing body for each
combination of group speed and extra body, from Chat, Responses and
Anthropic agents. Old code sent "priority" for "fast + extra ultrafast"
and for "Ultrafast".
- TestCanUltraOwnProvider: old code returned false for a relay's
gpt-6.1-sol that Codex's entry offers Ultrafast on.
- group-member-fast.test.cjs: an own provider's member steps usual,
Fast, Ultrafast and saves ultra; one with no Ultrafast steps back to
usual. en/zh, Chromium and WebKit.
Docs: gateway-routing.md (a group member's speed) and
providers-accounts.md (Extra body) say the precedence and the
Ultrafast rule.
Run on mote at df2652f63 (base b0d634b85), log kept whole:
- gofmt -l internal: nothing.
- go vet (darwin) provider, gateway, codexcat, gui, agent; GOOS=linux
and GOOS=windows go vet provider, gateway, codexcat: clean.
- go test -timeout 45m -count=1 provider (176s), gateway (1017s),
codexcat, agent (275s), settingsapi: ok. go test -tags nogui gui: ok.
- GUI on mica, Chromium and WebKit: group-member-fast, model-speed,
routing-service-tier, i18n-keys, i18n-en-no-cjk pass. fast-ultra is
red the same way on b0d634b85 (extra POST /api/update/using, #6201).
- Broken by hand: the new Go tests red on the old sources (above).
Rebased onto 338eae3c2 (provider/models.go, remote groups) after
4f40a1061 (sessions, agent/codex.go, app.js, i18n.js; none
of this change's files). At that head, on mica: TestLoopGuardLeavesOrdinaryRepliesAlone (reads
the two edited docs), TestFastMemberOwnProviderExtraTier,
TestGroupMemberUltrafast and TestCanUltraOwnProvider ok; at 338eae3c2
plus this, go vet and go test of provider (143s) and codexcat, and
gateway's fast, ultra, model-tier and loop-guard tests: ok.
Not tried: a real request to Azure or a relay that serves "ultrafast";
the whole GUI suite; a Linux or Windows run beyond cross-vet.