"""Independent defaults for guided exploration; no credentials live here.""" from typing import Literal from pydantic import BaseModel, ConfigDict, Field, model_validator class ExplorationConfig(BaseModel): model_config = ConfigDict(extra="forbid") model: str = Field(default="gpt-6.1-terra", min_length=1, max_length=200) reasoning_effort: Literal[ "default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] = "high" timeout_seconds: int = Field(default=1800, ge=30, le=86400) demonstration_timeout_seconds: int = Field(default=900, ge=60, le=86400) demonstration_warning_seconds: int = Field(default=60, ge=10, le=600) @model_validator(mode="after") def validate_warning(self): if self.demonstration_warning_seconds >= self.demonstration_timeout_seconds: raise ValueError("示范结束提示必须早于示范时限") return self