ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
625938a2f8 |
search: a picked searcher that can't serve gives way to the next that can (plugins#635)
pedestrianz (magpie-community/plugins#635) set Codex's gpt-6.1-sol to
search for Cursor's models. When the Codex plan was used up (429, usage
limit), every web search of a Cursor turn failed with it: a searcher named
in Settings gave way only to the ones named after it (SearcherThen), never
to the searchers magpie would pick itself. That rule is Gearclickist's:
Grok, picked, answered without searching, and the search moved to a
pricier Codex model the user hadn't picked.
Now a named searcher that can't serve at all hands the search on, after
those named after it, to the searchers magpie would pick in turn
(searchInTurn: the ones not spent first, up to two more providers). Can't
serve means every account or key is out of its allowance (searcherSpent),
or the search was refused for quota, credit or rate (failure() in
searchWith). Both are marked errCantServe, through a cantServe wrapper,
without changing the error's text. A named searcher that is spent is no
longer asked first; it is asked last only if no one else could search.
One that answered without searching or found nothing still gives way to
no other, so Gearclickist's case is unchanged. The Routing row and
Settings' SearcherFailed name who searched in its place
(searchingInstead, namedFailed). If none can, the errors go back to the
model as a failed tool result ("... no other provider could search in its
place") and the turn goes on to the model's answer. The AI Studio keys
|
||
|
|
50adf78e66 |
gateway, gui: the web searcher picked in Settings is never handed on to another provider, and one that answered without searching is said so (Gearclickist on Discord)
Cause: Gearclickist picked the Grok subscription's grok-4.7 in Settings ›
Web search. Their grok rows were about 1.3k tokens. That is the size of a
Grok request that ran no search. With the tool and searching, our real
Grok account gives 6k-66k input every time, and /models says
supports_backend_search for all four models. So on their account Grok
answered from what it knew. searchWith read that as "found nothing", and
modelSearch handed the search to the next of Searchers() by rank: Codex's
gpt-6-astra, a pricier subscription model they never picked.
Change:
- modelSearch: a searcher named in Settings gives way to no other
provider. Its error goes back to the model ("no other provider searches
in its place"), and webSearch then asks the search APIs, if any are set
up. Automatic keeps its fallback (#669) with the Routing row that says
why.
- searchWith tells a reply with no server_tool_use or
web_search_tool_result (errNotSearched) apart from one that searched and
named no page (errFoundNothing). CallFor gets notSearched.
- namedFailed/SearcherFailed keep the named searcher's last failed search,
cleared by its next success or by picking another searcher.
/api/settings returns it as searchFailed.
- Settings › Web search puts a warning at the start of the row's help
(before the ellipsis) naming the searcher, when, and why ("answered
without searching the web, so its account or plan may not offer web
search"). The help text now says a picked provider is never replaced by
another provider. The Routing row (kindWhy) says not-searched too.
zh, zh-TW, ja and de strings added.
- docs/subsystems/gateway-routing.md rewritten for the rule.
Run (worktree on origin/main
|
||
|
|
7639c1d8db |
gateway, gui: a web search made in place of the picked searcher says in its Routing row which searcher failed or found nothing, and why (Gearclickist on Discord)
Gearclickist picked Grok as the web-search model (代搜). In Codex, a web_search did go to Grok, but Codex's default search model then searched, and nothing said why. modelSearch asks the searcher picked in Settings first. When it errors, or its reply names no page it found, the next of Searchers() searches in its place (#669, up to three). The first error was dropped, so the Routing row only showed the model that answered. Falling back stays. searchingInstead now puts on the search's CallFor the searcher asked first (instead), whether the user picked it (picked), and its error (why) or that it found nothing (nothingFound, from a new errFoundNothing that searchWith and kimiSearch wrap). Routing's kindWhy says "<grok>, the searcher picked in Settings › Models › Web search, didn't search for Codex's <model>: <why>. So magpie had <next>, the next searcher it can use, search in its place." There are 7 new strings, in zh, zh-TW, ja and de. Grok itself: magpie's exact search body was sent to real Grok (4 models, 6 queries) through the built-in, and replayed through the plugin. Every time it answered with pages, so no Grok or plugin cause was found, and there is no plugin publish or mover min raise. The next time Grok fails for Gearclickist, the row now names the error. Run: - go test ./internal/gateway ./internal/agent -count=1 under a sandbox HOME: ok (933s, 720s). - TestSearchInPlaceOfPickedSaysWhy (found nothing, failed) passes. With the searchingInstead call taken out by hand, both subtests go red. - search-instead.test.cjs: chromium and webkit, en/zh/zh-TW/ja/de, at 1100 and 520px: 10/10 pass. With kindWhy's new branch turned off by hand: red. - search-mcp, routing-side-calls, provider-search and routing-kind GUI tests pass. - go vet on darwin, GOOS=linux -tags nogui, and GOOS=windows; gofmt -l is clean. Not verified: a real Grok search failing for Gearclickist's account, since it couldn't be reproduced. |