-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
bugReport that something isn't working, or PR implementing a fixReport that something isn't working, or PR implementing a fix
Description
Initial Checks
- I'm using the latest version of Pydantic AI
- I've searched for my issue in the issue tracker before opening this issue
Description
OpenRouterReasoning.effort is missing three valid values: xhigh, minimal, and none. The current type is Literal['high', 'medium', 'low'], but the OpenRouter API docs show six valid values: xhigh, high, medium, low, minimal, and none.
This isn't a critical bug as the code runs fine at runtime, only throwing errors for typecheckers.
Minimal, Reproducible Example
from pydantic_ai.models.openrouter import OpenRouterModelSettings
# All three produce pyright errors:
# Type "Literal['xhigh']" is not assignable to type "Literal['high', 'medium', 'low']"
settings: OpenRouterModelSettings = {'openrouter_reasoning': {'effort': 'xhigh'}}
settings2: OpenRouterModelSettings = {'openrouter_reasoning': {'effort': 'minimal'}}
settings3: OpenRouterModelSettings = {'openrouter_reasoning': {'effort': 'none'}}Logfire Trace
No response
Python, Pydantic AI & LLM client version
- Python: 3.13
- Pydantic AI: 1.69.0
- LLM provider SDK: n/a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugReport that something isn't working, or PR implementing a fixReport that something isn't working, or PR implementing a fix