ZhuLinsen/daily_stock_analysis · error · GenerationError
invalid_json
invalid_json
Error message
invalid_json at smoke_validation for backend generation_backend
What it means
Error "invalid_json at smoke_validation for backend generation_backend" thrown in ZhuLinsen/daily_stock_analysis.
Source
Thrown at src/services/generation_backend_status_service.py:409
{
"max_tokens": 128,
"temperature": 0,
"timeout": request.timeout_seconds,
},
response_validator=self._json_smoke_validator if request.mode == "json" else self._text_smoke_validator,
audit_context={"call_type": "generation_backend_smoke", "backend": request.backend_id},
)
if request.mode == "json":
self._json_smoke_validator(result.text)
else:
self._text_smoke_validator(result.text)
@classmethod
def _json_smoke_validator(cls, text: str) -> None:
try:
payload = json.loads((text or "").strip())
except Exception as exc:
raise GenerationError(
error_code=GenerationErrorCode.INVALID_JSON,
stage="smoke_validation",
retryable=False,
fallbackable=False,
backend="generation_backend",
details={"reason": "invalid_json"},
) from exc
if payload != {"ok": True, "backend_smoke": "passed"}:
raise GenerationError(
error_code=GenerationErrorCode.SCHEMA_VALIDATION_FAILED,
stage="smoke_validation",
retryable=False,
fallbackable=False,
backend="generation_backend",
details={"reason": "unexpected_smoke_payload"},
)
@classmethodView on GitHub (pinned to 5159bd72e8)
Solutions
- Check the generation backend's smoke-test response: it did not return valid JSON.
- Verify the backend endpoint, model name, and API key so the smoke request succeeds.
- Inspect backend logs for errors returned as plain text or HTML instead of JSON.
When it happens
Trigger: Thrown at src/services/generation_backend_status_service.py:409 when the library encounters an invalid state.
Common situations: Reported when the generation backend smoke validation returns a body that is not valid JSON; occurs when the configured endpoint is not an OpenAI-compatible server or is intercepted by a proxy.
AI-assisted analysis of ZhuLinsen/daily_stock_analysis@5159bd72e8 (2026-08-15).
Data as JSON: /api/errors/b29a3ae4487647d8.
Report an issue: GitHub.