Context
We're Sippar (production consumer, same account behind #394 and pay-kit#212/#213). We pay generativelanguage.google.gateway-402.com server-side with @solana/pay-kit's client.fetch, settling real USDC on mainnet — this has worked since 2026-07-04 (our generateContent vision-critic call, proven live).
As of today (2026-07-07) the same call fails before any payment step.
Problem
generateContent and streamGenerateContent on this host return a bare 500 with no 402 at all:
$ curl -s -i -X POST "https://generativelanguage.google.gateway-402.com/v1beta/models/gemini-2.5-flash:generateContent" \
-H "Content-Type: application/json" \
-d '{"contents":[{"role":"user","parts":[{"text":"hi"}]}]}'
HTTP/2 500
content-type: application/json
{"error":"challenge_generation_failed"}
Reproduced consistently (30+ calls) across:
- two networks (our own machine and our production VPS)
- curl and Node's native
fetch
- every model we tried (
gemini-2.5-flash, gemini-2.5-pro, gemini-2.0-flash, gemini-1.5-flash)
- both
generateContent and streamGenerateContent
- with and without a
tools/toolConfig body, with and without a body-level model field, with vision (inlineData) and text-only content
Meanwhile the same host's embedContent and countTokens endpoints work correctly right now — embedContent returns a clean 402 with a full MPP challenge, countTokens returns 200 with no payment required. So the gateway and its payment stack are up; this looks specific to the two content-generation methods.
Why we think this is new, not a known limit
So this is a regression inside the last few days, not a documented constraint.
Possible cause (unconfirmed, just a lead)
The proxy was rewritten onto Pingora in #385 (merged 2026-06-29). That PR's own "Deferred" section lists "response-side session byte-metering" as not yet done. generateContent/streamGenerateContent are the two methods whose price depends on the output size, which is unknown until generation completes — unlike embedContent's flat, input-only pricing. That split lines up with what we're seeing, but we haven't looked at the proxy internals to confirm it.
Ask
Is this a known issue on your end, or something scoped to our traffic? We're blocked on wiring tool-calling through this host until generateContent issues a challenge again — checked your docs and GitHub issues first, didn't find an existing report.
Context
We're Sippar (production consumer, same account behind #394 and pay-kit#212/#213). We pay
generativelanguage.google.gateway-402.comserver-side with@solana/pay-kit'sclient.fetch, settling real USDC on mainnet — this has worked since 2026-07-04 (ourgenerateContentvision-critic call, proven live).As of today (2026-07-07) the same call fails before any payment step.
Problem
generateContentandstreamGenerateContenton this host return a bare500with no 402 at all:Reproduced consistently (30+ calls) across:
fetchgemini-2.5-flash,gemini-2.5-pro,gemini-2.0-flash,gemini-1.5-flash)generateContentandstreamGenerateContenttools/toolConfigbody, with and without a body-levelmodelfield, with vision (inlineData) and text-only contentMeanwhile the same host's
embedContentandcountTokensendpoints work correctly right now —embedContentreturns a clean 402 with a full MPP challenge,countTokensreturns 200 with no payment required. So the gateway and its payment stack are up; this looks specific to the two content-generation methods.Why we think this is new, not a known limit
generateContent'sx402-uptochallenge decoding fine that day.generateContentvision-critic call has been live in production since 2026-07-04.So this is a regression inside the last few days, not a documented constraint.
Possible cause (unconfirmed, just a lead)
The proxy was rewritten onto Pingora in #385 (merged 2026-06-29). That PR's own "Deferred" section lists "response-side session byte-metering" as not yet done.
generateContent/streamGenerateContentare the two methods whose price depends on the output size, which is unknown until generation completes — unlikeembedContent's flat, input-only pricing. That split lines up with what we're seeing, but we haven't looked at the proxy internals to confirm it.Ask
Is this a known issue on your end, or something scoped to our traffic? We're blocked on wiring tool-calling through this host until
generateContentissues a challenge again — checked your docs and GitHub issues first, didn't find an existing report.