Skip to content

Commit 1748efd

Browse files
BBYNAIDouweM
andauthored
Use model_name property in OpenAIChatModel chat completion create request (#3543)
Co-authored-by: Douwe Maan <douwe@pydantic.dev>
1 parent f56a8e8 commit 1748efd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydantic_ai_slim/pydantic_ai/models/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ async def _completions_create(
518518
extra_headers = model_settings.get('extra_headers', {})
519519
extra_headers.setdefault('User-Agent', get_user_agent())
520520
return await self.client.chat.completions.create(
521-
model=self._model_name,
521+
model=self.model_name,
522522
messages=openai_messages,
523523
parallel_tool_calls=model_settings.get('parallel_tool_calls', OMIT),
524524
tools=tools or OMIT,

0 commit comments

Comments
 (0)