o
    pj(                     @  s   d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ee
 jd Zejdee ejdZedurEeedsEejd= dd	lmZmZ G d
d dejZdS )z?Agent provider configuration checks without external API calls.    )annotationsN)Path)patch   platform__path__)OpenAIToolSelector_strict_schemac                   @  s$   e Zd Zdd Zdd Zdd ZdS )AgentProviderChecksc                 C  sF   t jtji dd | t  W d    d S 1 sw   Y  d S )NTclear)r   dictosenvironassertIsNoner   from_environment)self r   'tests/platform/agent_provider_checks.py+test_openai_selector_is_disabled_by_default   s   "z?AgentProviderChecks.test_openai_selector_is_disabled_by_defaultc                 C  s\   t jtjddddd t }W d    n1 sw   Y  | | | d|j d S )N1z
test-model)AGENT_LLM_ENABLEDAGENT_LLM_MODELTr   )	r   r   r   r   r   r   assertIsNotNoneassertEqualmodel)r   selectorr   r   r   ,test_model_is_configuration_not_app_contract   s   

z@AgentProviderChecks.test_model_is_configuration_not_app_contractc                 C  sV   ddgddiddidd}t |}| |d  | dd	g|d
  | d| d S )Nobjectabntypestringboolean)r   include_history)r    required
propertiesadditionalPropertiesr#   r$   )r	   assertFalser   assertNotIn)r   sourcestrictr   r   r   4test_app_schema_is_converted_without_mutating_source!   s   zHAgentProviderChecks.test_app_schema_is_converted_without_mutating_sourceN)__name__
__module____qualname__r   r   r+   r   r   r   r   r
      s    r
   )__doc__
__future__r   r   sysunittestpathlibr   unittest.mockr   __file__resolveparentsPROJECT_ROOTpathinsertstrmodulesgetloaded_platformhasattr bridge_platform.agents.providersr   r	   TestCaser
   r   r   r   r   <module>   s    