o
    PL
j                     @   sV   d Z ddlmZ ddlmZ ddlmZ G dd deZeddd	d
ddZee dS )u  Copilot / GitHub Models provider profile.

Copilot uses per-model api_mode routing:
  - GPT-5+ / Codex models → codex_responses
  - Claude models → anthropic_messages
  - Everything else → chat_completions (this profile covers that subset)

Key quirks for the chat_completions subset:
  - Editor attribution headers (via copilot_default_headers())
  - GitHub Models reasoning extra_body (model-catalog gated)
    )Any)register_provider)ProviderProfilec                   @   sT   e Zd ZdZdddddedB dedB dedeeeef eeef f fd	d
Z	dS )CopilotProfileu>   GitHub Copilot / GitHub Models — editor headers + reasoning.NF)modelreasoning_configsupports_reasoningr   r   r   returnc          	      K   s   i }|rO|rOz<ddl m} ||}|r,|r,|dd}|dkr!d}||v r+d|i|d< n|r9ddi|d< W |i fS W |i fS W |i fS  tyN   Y |i fS w |i fS )Nr   )github_model_reasoning_effortseffortmediumxhighhigh	reasoning)hermes_cli.modelsr
   get	Exception)	selfr   r   r   ctx
extra_bodyr
   supported_effortsr    r   L/home/kuhnn/.hermes/hermes-agent/plugins/model-providers/copilot/__init__.pybuild_api_kwargs_extras   s0    z&CopilotProfile.build_api_kwargs_extras)
__name__
__module____qualname____doc__strdictbooltupler   r   r   r   r   r   r      s    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   r   <module>   s    