from __future__ import annotations from typing import Any from pydantic import BaseModel, ConfigDict, Field class ErrorBody(BaseModel): code: str message: str details: Any | None = None class ErrorResponse(BaseModel): success: bool = False request_id: str error: ErrorBody class SuccessResponse(BaseModel): model_config = ConfigDict(extra="forbid") success: bool = True request_id: str processing_time: float = Field(ge=0) download_url: str | None = None metadata: dict[str, Any] = Field(default_factory=dict)