-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Initial Checks
- I confirm that I'm using Pydantic V2
- confrim that I'm using pydantic_ai 1.0.0b1
Description
I am using OpenAI models and got this error. I am very confused that gpt-5-mini is out there.
status_code: 404, model_name: gpt-5-mini, body: {'detail': 'Not Found'}
Here is the stacktrace:
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/agent/abstract.py", line 316, in run_sync
return get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/agent/abstract.py", line 217, in run
async for node in agent_run:
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/run.py", line 150, in __anext__
next_node = await self._graph_run.__anext__()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_graph/graph.py", line 761, in __anext__
return await self.next(self._next_node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_graph/graph.py", line 734, in next
self._next_node = await node.run(ctx)
^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/_agent_graph.py", line 378, in run
return await self._make_request(ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/_agent_graph.py", line 420, in _make_request
model_response = await ctx.deps.model.request(message_history, model_settings, model_request_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/models/openai.py", line 337, in request
response = await self._completions_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/pydantic_ai/models/openai.py", line 445, in _completions_create
raise ModelHTTPError(status_code=status_code, model_name=self.model_name, body=e.body) from e
pydantic_ai.exceptions.ModelHTTPError: status_code: 404, model_name: gpt-5-mini, body: {'detail': 'Not Found'}
Example Code
Python, Pydantic & OS Version
pydantic version: 2.11.5
pydantic-core version: 2.33.2
pydantic-core build: profile=release pgo=false
python version: 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0]
platform: Linux-6.8.0-48-generic-x86_64-with-glibc2.35
related packages: pydantic-settings-2.9.1 typing_extensions-4.13.2 pyright-1.1.368 typing_extensions-4.11.0 mypy-0.942
commit: unknown
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested