Gemini-2.5-flash: serving error - has anyone else seen this?

Recently switched to Gemini 2.5 Flash (free tier). Getting this error:

Error: Stream cancelled; RPC from prefill servable to decode servable failed; Failed to close the streaming context; status = CANCELLED: Stream cancelled; RPC from prefill servable to decode servable failed [type.googleapis.com/util.ErrorSpacePayload=‘RPC::CANCELLED’]
=== Source Location Trace: ===
net/rpc/rpc-errorspace-util.cc:19
learning/serving/servables/wiz/remote_wiz_servable.cc:192
learning/serving/servables/wiz/prefill_remote_wiz_servable.cc:229
learning/serving/servables/wiz/wiz_servable.cc:2600
; Failed to run inference for model: go/debugstr
name: “prod-common-global__/aistudio/gemini-v3p1s-rev19-calmriver-sc__main__/aistudio/gemini-v3p1s-rev19-calmriver-sc__2025112500__prefill__variantvlp__6069839c-f472-46e0-90c0-6f87c941837a”
version {
value: 1
}
signature_name: “serving_stream”

The issue started happening only after switching to Gemini 2.5 flash (from 2.0 flash). Has anyone else seen this? Any known workarounds?

Hello,

Thank you for using the forum. To assist us in reproducing the issue, could you please provide a minimal reproducible code snippet, along with the prompt, model, and model configurations used when you encountered the error?

I’m getting error which sounds partially similar:

received 1011 (internal error) Thread was cancelled when writing StartStep status to channel.; Failed to close the streaming context; status = CANCELLED: