You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a discrepancy between the documentation comment and the actual implementation regarding the default model used by the Agent class when no model is specified.
"""The model implementation to use when invoking the LLM.
By default, if not set, the agent will use the default model configured in
`model_settings.DEFAULT_MODEL`.
"""
However, src/agents/model_settings.py does not contain a DEFAULT_MODEL constant.
The actual implementation logic uses DEFAULT_MODEL = "gpt-4o" defined in src/agents/models/openai_provider.py, which is used in the get_model method when model_name is None.
model: str|Model|None=None"""The model implementation to use when invoking the LLM.By default, if not set, the agent will use the default model configured in`openai_provider.DEFAULT_MODEL` (currently "gpt-4o")."""
The text was updated successfully, but these errors were encountered:
I was confused to understand the default model.
Description
There is a discrepancy between the documentation comment and the actual implementation regarding the default model used by the Agent class when no model is specified.
In
src/agents/agent.py
, the comment states:openai-agents-python/src/agents/agent.py
Lines 107 to 112 in 0396052
However,
src/agents/model_settings.py
does not contain aDEFAULT_MODEL
constant.The actual implementation logic uses
DEFAULT_MODEL = "gpt-4o"
defined insrc/agents/models/openai_provider.py
, which is used in theget_model
method whenmodel_name
isNone
.openai-agents-python/src/agents/run.py
Lines 933 to 942 in 0396052
openai-agents-python/src/agents/models/openai_provider.py
Lines 81 to 83 in 0396052
openai-agents-python/src/agents/models/openai_provider.py
Line 11 in 0396052
Suggested Fix
Update the comment in
agent.py
.The text was updated successfully, but these errors were encountered: