✓ PASS
any-llm 1.40.2
stream.error-midstream · gemini
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| error-reported | MUST | SATISFIED | outcome=raised; error.category="api"; finish.value=null (absent); truth.finish="error" |
Notes
- shim: Gemini reasoning_effort none is unsupported by any-llm; omitted to use the model default.
What the provider sent
- Finish
- error
- Raw finish
null
- Text
- Octop
- Tool calls
[]
- Usage
{ "alternatives": {}, "cached_input": null, "input": 22, "output": 2, "raw": { "candidatesTokenCount": 2, "promptTokenCount": 22, "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 22 } ], "serviceTier": "standard", "totalTokenCount": 24 }, "reasoning": null, "total": 24 }- Stream completed
false
- Error
- Message
- This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.
- Status
null
- Type
- UNAVAILABLE
- Code
- 503
Wire excerpt
status: 200
content-type: text/event-stream
body (sse):
data: {"candidates": [{"content": {"parts": [{"text": "Octop"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 22,"candidatesTokenCount": 2,"totalTokenCount": 24,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 22}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "pgTOaonbKMuV_uMPvK7d4AE"}
data: {"error":{"code":503,"message":"This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.","status":"UNAVAILABLE"}}
What the library reported
- Outcome
- raised
- Finish
{ "raw": null, "source": null, "surface": "absent", "value": null }- Text
- Value
- Octop
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": null, "input": 22, "output": 2, "reasoning": null, "surface": { "cached_input": "absent", "input": "primary", "output": "primary", "reasoning": "absent", "total": "primary" }, "total": 24 }- Stream
{ "chunks_seen": 1, "completed": false, "used": true }- Error
- Type
- google.genai.errors.ServerError
- Message
- 503 UNAVAILABLE. {'error': {'code': 503, 'message': 'This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.', 'status': 'UNAVAILABLE'}}
- Category
- api
- Retry after
null
- Stack top
- google/genai/errors.py:289
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 544.6984823793173,
"error": {
"category": "api",
"message": "503 UNAVAILABLE. {'error': {'code': 503, 'message': 'This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.', 'status': 'UNAVAILABLE'}}",
"retry_after": null,
"stack_top": "google/genai/errors.py:289",
"type": "google.genai.errors.ServerError"
},
"finish": {
"raw": null,
"source": null,
"surface": "absent",
"value": null
},
"format": "wiretruth.observation/v1",
"library": {
"api": "any_llm.completion",
"language": "python",
"name": "any-llm",
"version": "1.40.2"
},
"notes": [
"Gemini reasoning_effort none is unsupported by any-llm; omitted to use the model default."
],
"outcome": "raised",
"stream": {
"chunks_seen": 1,
"completed": false,
"used": true
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "primary",
"value": "Octop"
},
"tool_calls": [],
"unsupported_reason": null,
"usage": {
"cached_input": null,
"input": 22,
"output": 2,
"reasoning": null,
"surface": {
"cached_input": "absent",
"input": "primary",
"output": "primary",
"reasoning": "absent",
"total": "primary"
},
"total": 24
}
}Fixture
derived gemini/stream.error-midstream
| Provenance | Value |
|---|---|
| Transform | inject_error_event |
| Source fixture | gemini/truncation.text-stream |
| Rationale | The provider reports an error after starting a successful HTTP stream. |
| Evidence | https://github.com/googleapis/python-genai/blob/main/google/genai/_api_client.py |
Reproduce
wiretruth serve gemini/stream.error-midstreamPlain-library snippet from the shim manifest.
any_llm.completion(model=model, provider='gemini', api_base=WIRETRUTH_BASE_URL_GEMINI, api_key=WIRETRUTH_API_KEY); host-root base URLUpstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 1.40.2 | ✓ PASS |
| 1.38.0 | ✓ PASS |
| 1.33.0 | ✓ PASS |