LLMErrorResponse (schemas/errors.py)

openclaw-mission-control · backend/app/schemas/errors.py · python · MIT
ai, AI / Agents

Pydantic schemas defining structured error responses for LLM APIs, including retry logic and request tracing.

# Source: https://github.com/abhi1693/openclaw-mission-control | License: MIT | Copyright 2026 OpenClaw Mission Control
# Provided via justclaw.it.com; keep this notice with the code.
"""Structured error payload schemas used by API responses."""

from __future__ import annotations

from pydantic import Field
from sqlmodel import SQLModel
from sqlmodel._compat import SQLModelConfig


class LLMErrorResponse(SQLModel):
    """Standardized LLM-facing error payload used by API contracts."""

    model_config = SQLModelConfig(
        json_schema_extra={
            "title": "LLMErrorResponse",
            "x-llm-intent": "llm_error_handling",
            "x-when-to-use": [
                "Structured, tool-facing API errors for agent workflows",
                "Gateway handoff and delegated-ta

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key