GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Web search: rotate providers on quota and plan-limit failures, not only HTTP 429 · Issue #60176 · anomalyco/opencode

Web search: rotate providers on quota and plan-limit failures, not only HTTP 429 #60176

New issue
Copy link
New issue
Copy link
In review
#66881
In review
Web search: rotate providers on quota and plan-limit failures, not only HTTP 429#60176
#66881
Copy link

Description

@Caffa
Caffa
opened on Oct 29, 2026
Issue body actions

What

With "websearch": { "provider": "random" }, the built-in websearch tool picks a provider for the session and reuses it. The retry loop in packages/core/src/websearch.ts (query) rotates to another provider only on HTTP 429. On any other non-2xx status the search fails outright, even when other providers are healthy.

This hits quota-limited providers: once a free plan is exhausted, Tavily returns HTTP 432 ({"detail":{"error":"This request exceeds your plan's set usage limit..."}}), and other providers return 402 under the equivalent condition. A session whose random pick lands on that provider gets no working search, and the configured alternatives are ignored.

Related: #54311 tracks the same family (sticky random provider), and #58327 tracks the plugin-side counterpart. The docs in services/www/src/docs/content/websearch.mdx describe failover for "HTTP 429" only.

Repro

  1. Deplete a built-in provider's free plan (Tavily 432, or 402 on others).
  2. Configure "websearch": {"provider": "random"} in a fresh session.
  3. Run websearch.
  4. Result: Web search request failed (HTTP 432) with no fallback provider tried.

Proposal

Treat quota/plan-limit responses as rotation triggers alongside 429 — status 402 (Payment Required) and 432 (reported by Tavily) — only under random. Fixed providers keep current behaviour (no failover). Narrow scope on purpose; distinct from #58327's proposed typed-error change.

Happy to change scope (e.g. include 5xx) if a maintainer prefers a broader policy.

Activity

  1. opencodejr commented on Oct 29, 2026

    @opencodejr
    opencodejrBot
    on Oct 29, 2026
    Contributor
    More actions

    Thanks for the clear write-up and for opening #60177 alongside it.

    To restate the request: with "websearch": { "provider": "random" }, quota and plan-limit responses (HTTP 402, and Tavily's 432) should rotate to another available provider the same way HTTP 429 does, and fixed providers would keep their current behaviour. Right now the code and the docs both limit failover to 429, so this would be a change to the failover policy rather than a bug fix. Maintainers will consider it, including the scope questions you raised, such as how long a provider that has run out of quota should cool down and whether 5xx should count too.

    Related issues:

    • websearch: V2 keyless search is undocumented and "random" can stick to a failing provider #54311: the broader problem of random sticking to a provider that fails or returns no results
    • websearch: custom providers cannot signal rate limits — excluded from provider failover #58327: custom (plugin) providers can't signal rate limits, so they're left out of failover
    • core: websearch key-less provider answers 200 with empty results and is never rotated away #56283 (closed): a keyless provider returning empty 200 responses was never rotated away from
  2. rahul05ranjan commented on Nov 23, 2026

    @rahul05ranjan
    rahul05ranjan
    on Nov 23, 2026
    More actions

    Working the same problem from the provider side (disclosure: founder of Gyaansetu, a search API for agents). We return clean quota errors, 1,000 free credits/mo per user, passages+scores in one call. If opencode's rotation wants another provider — Happy to share our quota/error semantics + a test key if you're adding providers to the rotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.