Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pydantic_ai_slim/pydantic_ai/models/openrouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class _OpenRouterCompletionMessage(chat.ChatCompletionMessage):
class _OpenRouterChoice(chat_completion.Choice):
"""Wraps OpenAI chat completion choice with OpenRouter specific attributes."""

native_finish_reason: str
native_finish_reason: str | None
"""The provided finish reason by the downstream provider from OpenRouter."""

finish_reason: Literal['stop', 'length', 'tool_calls', 'content_filter', 'error'] # type: ignore[reportIncompatibleVariableOverride]
Expand Down