-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Initial Checks
- I confirm that I'm using the latest version of Pydantic AI
- I confirm that I searched for my issue in https://github.com/pydantic/pydantic-ai/issues before opening this issue
Description
supports_json_schema_output: bool = False
"""Whether the model supports JSON schema output."""
supports_json_object_output: bool = False
"""Whether the model supports JSON object output."""
default_structured_output_mode: StructuredOutputMode = 'tool'
"""The default structured output mode to use for the model."""
prompted_output_template: str = dedent(
"""
Always respond with a JSON object that's compatible with this schema:
{schema}
Don't include any text or Markdown fencing before or after.
"""
)
"""The instructions template to use for prompted structured output. The '{schema}' placeholder will be replaced with the JSON schema for the output."""
json_schema_transformer: type[JsonSchemaTransformer] | None = None
"""The transformer to use to make JSON schemas for tools and structured output compatible with the model."""ModelProfile Describes how requests to and responses from specific models or families of models need to be constructed and processed to get the best results, independent of the model and provider classes used.
The above fields of ModelProfile are not model-specific, but provider-specific. They should be categorized as provider settings. For example, there are a bunch of providers for deepseek v3.2, which have different support for json schema and json object.
Example Code
Python, Pydantic AI & LLM client version
Python 3.13
pydantic_ai 1.12.0