"""Pydantic v2 request and response models for all API endpoints.""" from __future__ import annotations from typing import Literal, Optional from pydantic import BaseModel, Field class TranscribeResponse(BaseModel): text: str language: str duration_s: float processing_time_ms: int confidence: Optional[float] = None class IoTQueryResponse(BaseModel): transcription: str language: str intent: dict sensor_data: dict voice_response: str processing_time_ms: int class HealthResponse(BaseModel): status: str model_loaded: bool active_adapter: Optional[str] adapters_available: list[str] adapters_loaded: list[str] class ErrorResponse(BaseModel): error: str detail: str