MCPcopy Create free account
hub / github.com/microsoft/Webwright / BaseModelConfig

Class BaseModelConfig

src/webwright/models/base.py:204–222  ·  view source on GitHub ↗

Fields common to every model backend (OpenAI, Anthropic, ...).

Source from the content-addressed store, hash-verified

202
203
204class 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
225class BaseModel:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected