Ë
    âß²jU  ã                   ól   — 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¬«      Z ee«       y)a  Copilot / GitHub Models provider profile.

Core routes GPT-5+/Codex -> codex_responses and Claude -> anthropic_messages;
this profile covers the chat_completions remainder: editor attribution headers
(copilot_default_headers()) and catalog-gated GitHub Models reasoning.
é    )ÚAny)Úregister_provider)ÚProviderProfilec                   ó\   — e Zd ZdZddddœdedz  dedz  dedeeeef   eeef   f   fd	„Z	y)
ÚCopilotProfileu>   GitHub Copilot / GitHub Models â€” editor headers + reasoning.NF)ÚmodelÚreasoning_configÚsupports_reasoningr   r	   r
   Úreturnc                óø   — |r|si i fS 	 ddl m}m}  ||«      }|si i fS |sdddiii fS |j                  dd«      }||vr! ||t	        |«      «      }||vrd|v rdn|d   }dd|iii fS # t
        $ r i i fcY S w xY w)Nr   )Ú#clamp_reasoning_effort_to_supportedÚgithub_model_reasoning_effortsÚ	reasoningÚeffortÚmedium)Úhermes_cli.modelsr   r   ÚgetÚlistÚ	Exception)	Úselfr   r	   r
   Úctxr   r   Ú	supportedr   s	            úM/home/ubuntu/.hermes/hermes-agent/plugins/model-providers/copilot/__init__.pyÚbuild_api_kwargs_extrasz&CopilotProfile.build_api_kwargs_extras   s»   € ñ #¡uØ�r�6ˆMð	ßmá6°uÓ=ˆIÙØ˜2�v�Ù#Ø# h°Ð%9Ð:¸BÐ>Ð>Ø%×)Ñ)¨(°HÓ=ˆFð
 ˜YÑ&Ù<¸VÄTÈ)Ã_ÓU�Ø Ñ*Ø)1°YÑ)>™XÀIÈaÁL�FØ (¨FÐ!3Ð4°bÐ8Ð8øÜò 	Ø�r�6ŠMð	ús   ŠA)  	A) ª>A) Á)A9Á8A9)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚdictÚboolÚtupler   r   © ó    r   r   r      sX   „ ÙHð &*È4Ø#(òØ˜d™
ðØ=AÀD¹[ðà ðð 
ˆt�C˜�H‰~˜t C¨ H™~Ð-Ñ	.ôr$   r   Úcopilot)zgithub-copilotzgithub-modelszgithub-modelÚgithub)ÚCOPILOT_GITHUB_TOKENÚGH_TOKENÚGITHUB_TOKENzhttps://api.githubcopilot.com)ÚnameÚaliasesÚenv_varsÚbase_urlÚ	auth_typeN)	r   Útypingr   Ú	providersr   Úproviders.baser   r   r%   r#   r$   r   ú<module>r2      sF   ðñõ å 'Ý *ô�_ô ñ> Ø	ÐYØAÐLkØô€ñ �'Õ r$   