Fields common to every model backend (OpenAI, Anthropic, ...).
| 202 | |
| 203 | |
| 204 | class BaseModelConfig(PydanticBaseModel): |
| 205 | """Fields common to every model backend (OpenAI, Anthropic, ...).""" |
| 206 | |
| 207 | model_name: OptStr = "" |
| 208 | max_output_tokens: int = 4000 |
| 209 | request_timeout_seconds: int = 120 |
| 210 | error_log_path: Path | None = None |
| 211 | observation_template: OptStr = DEFAULT_OBSERVATION_TEMPLATE |
| 212 | format_error_template: OptStr = DEFAULT_FORMAT_ERROR_TEMPLATE |
| 213 | attach_observation_screenshot: bool = True |
| 214 | action_field: str = "bash_command" |
| 215 | |
| 216 | @field_validator("action_field") |
| 217 | @classmethod |
| 218 | def validate_action_field(cls, value: str) -> str: |
| 219 | normalized = value.strip() |
| 220 | if normalized not in ACTION_FIELDS: |
| 221 | raise ValueError(f"action_field must be one of: {', '.join(sorted(ACTION_FIELDS))}") |
| 222 | return normalized |
| 223 | |
| 224 | |
| 225 | class BaseModel: |
nothing calls this directly
no outgoing calls
no test coverage detected