ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ce8b67de37 |
gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called page.goto with no timeout of its own, so Playwright held the first load of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a busy box (a whole-suite run at load 130-160) that load took longer and goto timed out. The same pattern is in 988 GUI test files (1174 pages): every one of them now also sets setDefaultNavigationTimeout(60000) on the same page, right after its default, so goto, reload and waitForURL wait on the load itself with room, while clicks and waits keep their short bar. group-from-model-add's own 20s navigation bar is raised to the same minute. claude-switch-only also gives its first provider row (drawn from the page's first reads) a minute before clicking it. nav-timeout.test.cjs (no browser) reads every GUI test file and names each page given a default under a minute without a navigation timeout of at least a minute, so a new file can't bring the pattern back. What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from other sessions): - node --check on every file in internal/gui/tests: all parse. - nav-timeout.test.cjs against origin/main's test files: red (names the 1174 pages); against this tree: its only reds were my own probe copies of the old files, since removed. - By hand: claude-switch-only with app.js served 7s late (a busy box's first load), --test-name-pattern "1100 en": origin/main's file 4 of 4 red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green. - claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420: 32 of 32. group-from-model-add, usage-access-key-card and i18n-keys: green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red on a 5s waitForFunction at line 115 (a wait after load, not the navigation), at load ~230. Not tried: the whole GUI suite (about 1000 files; the change is one mechanical line per page), Windows or mote (mote's browsers, #4125). |
||
|
|
eed5a6a829 |
provider, gateway, gui: a GPT model on a provider you added can be switched fast in Routing and the picker (#1615, iomect)
iomect: "目前只有官key可以开启快速模式, 希望在路由设置中 支持给供应商也开启快速模式". Fast mode (OpenAI's service_tier "priority") was offered only on a ChatGPT account, an OpenAI key, Cursor and an Anthropic key's Opus. A relay or sub2api the user added themselves had no toggle, though Codex's own Fast already reaches such a provider as asked (OwnTier, #1234). What changed - provider.OwnFast: a GPT/o-series model (by its slug, openai/GPT-x too) on a provider the user added by its address (no preset, no account, no plugin, not a cloud), served on an OpenAI API (Chat or Responses), not OpenAI's own host. CanFast now includes it, so the Routing group member toggle and the agent picker's bolt offer it. Nothing is on by default: it is sent fast only when the user switches it. - gateway: such a member or pick is asked for service_tier "priority" on the provider's Chat/Responses API whatever API the agent spoke. An Anthropic-speaking agent gets it through the translated request (forwardTranslated, via a ctx mark), and Claude's speed "fast" or its beta is never sent to the user's provider (a relay may turn it away). A provider that turns service_tier away is asked again without it and not sent it again (the existing optional-field refusal path, keyed per provider and protocol). - gui: canFast members/models carry ownFast; the toggle's and the bolt's titles say fast is asked of the provider, "where your provider serves it", in en/zh/zh-TW/ja/de. Not done: a provider's Claude model is not sent Claude's fast mode (no way to know a relay serves speed "fast"), and no relay is special-cased. What was run - go test -tags nogui ./internal/provider ./internal/agent ./internal/gui ./internal/gateway (gateway -timeout 40m): ok. - New: TestOwnFast, TestFastMemberOwnProvider (chat/responses/anthropic asks, plus a relay with an Anthropic URL too: no speed), TestFastMemberOwnProviderRefusing (refused once in 3 calls per API), TestFastPickOwnProvider; TestCanFast checks OwnFast is false for every vendor-official case. - Broken by hand: without the forwardTranslated tier line the anthropic cases go red (no tier sent, refused 0 in 2); with withFast ungated the both-APIs relay case goes red (speed:fast sent to /v1/messages); with the ownFast titles off, fast-pick and group-member-fast go red in every language. - GUI: group-member-fast, fast-pick in Chromium and WebKit; gui-ja, gui-de, i18n-keys in Chromium. - gofmt -l clean; go vet -tags nogui GOOS=linux and GOOS=windows clean. - Not tried against a real relay's priority tier. |
||
|
|
2533ccdaf9 | gui: a model with a fast mode is sent fast, or not, from its row in the agent's picker (#954, Gyarados4157) — Fast was only a routing group member's (Group.Fast), so a GPT on a ChatGPT account picked straight in Codex or OpenCode could only go fast through a group of one. A model provider.CanFast says has a fast mode (a ChatGPT account's GPT, an OpenAI key's Responses GPT/o-series, Cursor's -fast, Claude Opus on an Anthropic key) now has a bolt beside its star in the agent's picker and in the same picker opened from a provider's row; a click posts /api/agent-fast and switches it for that agent (settings FastPicks, by agent, "<provider>/<model>", moved by a provider rename and kept by the Settings page's save) without changing the pick or closing the picker; a refusal puts it back. The field shows a bolt after a model sent fast. The gateway asks for the vendor's fast mode (service_tier "priority" / speed "fast", as for a group member) on that agent's requests for that entry, every account and key of it, not its fallbacks, another agent's requests or the same model at another provider; the Routing trace marks the try Fast. A routing group is never switched: its members say it. zh/ja/de added. fast-pick (window and 440px panel, en/zh/ja/de, Chromium and WebKit; the bolt only on models with a fast mode, the post, the refusal, the provider row's picker) passes and fails without the fix; TestFastPick (gateway, Chat/Responses/Anthropic in, fails with the gateway hunk off), TestSetFastPick, TestFastPickOptions and the settings-keep test (fails without the carry) pass with -race; i18n-keys, gui-ja, gui-de, favorite-star, agent-models-picker, claude-picker-fold and click-scroll pass; go test ./internal/gui/ ./internal/provider/ ./internal/agent/ ./internal/gateway/ ./internal/settings/ pass. |