
    i
              	           d Z ddlmZ ddlmZ ddlmZ  G d de          Z eddd	d
ddd          Z eddd	ddd          Z	 ee            ee	           dS )u  Google Gemini provider profiles.

gemini:            Google AI Studio (API key) — uses GeminiNativeClient
google-gemini-cli: Google Cloud Code Assist (OAuth) — uses GeminiCloudCodeClient

Both report api_mode="chat_completions" but use custom native clients
that bypass the standard OpenAI transport. The profile captures auth
and endpoint metadata for auth.py / runtime_provider.py migration, and
carries the thinking_config translation hook so the transport's profile
path produces the same extra_body shape the legacy flag path did.
    )Any)register_provider)ProviderProfilec            	       B    e Zd ZdZdddedz  dedeeef         fdZdS )GeminiProfileuG   Gemini — translate reasoning_config to thinking_config in extra_body.N)
session_idr   contextreturnc                2   ddl m}m}m} |                    d          pd}|                    d          }|                    d          p| j        } |||          }	|	si S i }
| j        dk    r" ||          r ||	          }|r	dd	|ii|
d
<   n|	|
d	<   |
S )zEmit extra_body.thinking_config (native) or extra_body.extra_body.google.thinking_config
        (OpenAI-compat /openai subpath), mirroring the legacy path's behavior.
        r   )_build_gemini_thinking_config!_is_gemini_openai_compat_base_url"_snake_case_gemini_thinking_configmodel reasoning_configbase_urlgeminigooglethinking_config
extra_body)!agent.transports.chat_completionsr   r   r   getr   name)selfr   r	   r   r   r   r   r   r   raw_thinking_configbodyr   s               L/home/piyush/.hermes/hermes-agent/plugins/model-providers/gemini/__init__.pybuild_extra_bodyzGeminiProfile.build_extra_body   s    	
 	
 	
 	
 	
 	
 	
 	
 	
 	
 G$$*";;'9::;;z**;dm;;ECSTT" 	I!9  %F%Fx%P%P @@ATUUO V&.1BO0T%U\"&9D"#    )__name__
__module____qualname____doc__strr   dictr    r   r   r   r      sa        QQ +/   4Z;>	c3h     r   r   r   )r   zgoogle-geminizgoogle-ai-studiochat_completions)GOOGLE_API_KEYGEMINI_API_KEYz0https://generativelanguage.googleapis.com/v1betaapi_keyzgemini-3-flash-preview)r   aliasesapi_modeenv_varsr   	auth_typedefault_aux_modelzgoogle-gemini-cli)z
gemini-clizgemini-oauthr&   zcloudcode-pa://googleoauth_external)r   r+   r,   r-   r   r.   N)
r#   typingr   	providersr   providers.baser   r   r   google_gemini_clir&   r   r   <module>r5      s   
 
       ' ' ' ' ' ' * * * * * *    O   B 
	;1?.
 
 
 "M	*$     &     # $ $ $ $ $r   