Skip to content

Gemini 3.8 Flash run fails with verbatim OpenRouter 402 'Insufficient credits' — user has no OpenRouter key; gateway upstream out of credits/allowance #1285

Description

@serrebidev

Summary

Selecting Gemini 3.8 Flash (Starter plan, freebuff.com web) fails immediately with a run error that is OpenRouter's HTTP 402 message passed through verbatim:

Insufficient credits. Add more using https://openrouter.ai/settings/credits

The end user has no OpenRouter account or API key involved, so the suggested fix cannot help them — this is the gateway's own upstream (Google models served via OpenRouter) refusing, and the message misleadingly blames the user's account.

Steps to reproduce

  1. Account: Starter plan, active subscription (accessTier full).
  2. On freebuff.com (web client), select google/gemini-3.8-flash in the Freebuff model menu and start a run.
  3. Run fails immediately with: "This run failed — Insufficient credits. Add more using https://openrouter.ai/settings/credits".

Expected behavior

Either the run succeeds (the account is entitled), or — if the upstream is out of credits/allowance — a Freebuff-side message such as "Gemini is temporarily unavailable; upstream capacity is exhausted, please retry later". The user should never be told to add credits to an OpenRouter account they don't have.

Evidence this is gateway-side, not account-side

  • The live session API for the affected Starter account returns rateLimitsByModel["google/gemini-3.8-flash"]: limit 7/day, pool subscription:starter ("Starter plan"), breakdown base 4 + subscription 3 — identical to every other Freebuff model. Plan sessions were 0/3 used at the time of failure, so this is not a quota rejection.
  • No OpenRouter API key or credential exists anywhere in the local Freebuff configuration, and neither the desktop nor web client bundles contain any OpenRouter / bring-your-own-key integration. There is literally nothing on the user side to top up.
  • OpenRouter returns exactly this 402 text both when a paid account runs out of credits and when a free model exhausts its daily per-key allowance — consistent with Freebuff's shared key for Google models hitting a daily cap. (See https://manifest.build/errors/openrouter/402-insufficient-credits/.)

Suggested fix

  • Map/mask upstream 402 responses from model providers into a Freebuff-branded outage message instead of relaying the provider's billing text verbatim (the provider's key belongs to Freebuff, so "add credits" is never actionable for the user).
  • For the immediate outage: refill/exempt the OpenRouter allowance used for google/gemini-3.8-flash (or route Google models via a direct Google upstream), so entitled Starter users can actually use their 7/day.

Environment

  • Freebuff Desktop 0.0.93 (Windows 11), failure reproduced through the freebuff.com web client.
  • Error first seen 2026-09-05.

Activity

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

    area:modelsModel routing, provider selection, output qualitybot:triagedClassified by the community triage botsupport:provider-outageAn upstream model provider is down or out of capacitytype:bugA defect in the code with a reproducible failure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions