o
    h2                     @   s   U d dl Z d dlZd dlmZ d dlmZ d dlmZ dZeeddddZ	ee
d	< d
edefddZdefddZdefddZddee defddZdS )    N)Optional)	Reasoning)ModelSettingsOPENAI_DEFAULT_MODELlow)effort)	reasoning	verbosity_GPT_5_DEFAULT_MODEL_SETTINGS
model_namereturnc                 C   s   |  drdS |  dS )z^
    Returns True if the model name is a GPT-5 model and reasoning settings are required.
    z
gpt-5-chatFzgpt-5)
startswith)r    r   ]/var/www/html/openai_agents/venv/lib/python3.10/site-packages/agents/models/default_models.py!gpt_5_reasoning_settings_required   s   

r   c                   C   s
   t t S )z
    Returns True if the default model is a GPT-5 model.
    This is used to determine if the default model settings are compatible with GPT-5 models.
    If the default model is not a GPT-5 model, the model settings are compatible with other models.
    )r   get_default_modelr   r   r   r   is_gpt_5_default!   s   
r   c                   C   s   t td S )z)
    Returns the default model name.
    zgpt-4.1)osgetenv&OPENAI_DEFAULT_MODEL_ENV_VARIABLE_NAMElowerr   r   r   r   r   *   s   r   modelc                 C   s*   | dur| nt  }t|rttS t S )z
    Returns the default model settings.
    If the default model is a GPT-5 model, returns the GPT-5 default model settings.
    Otherwise, returns the legacy default model settings.
    N)r   r   copydeepcopyr
   r   )r   _modelr   r   r   get_default_model_settings1   s   
r   )N)r   r   typingr   openai.types.shared.reasoningr   agents.model_settingsr   r   r
   __annotations__strboolr   r   r   r   r   r   r   r   <module>   s   
 		