Ë
    uPêj¡  ã                   ó  — U d Z ddlmZ ddlmZ ddlZddlmZ dZee	d<   de› �Z
ee	d	<   d
e› �Zee	d<   dZee	d<   dZee	d<    G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zdedefd„Zy)z#
Constants for Copilot integration
é    )ÚFinal)Úuuid4N)ÚBaseLLMExceptionz0.26.7ÚCOPILOT_VERSIONzcopilot-chat/ÚEDITOR_PLUGIN_VERSIONzGitHubCopilotChat/Ú
USER_AGENTz
2025-04-01ÚAPI_VERSIONzhttps://api.githubcopilot.comÚDEFAULT_GITHUB_COPILOT_API_BASEc            
       ó”   ‡ — e Zd Z	 	 	 	 ddej                  dz  dej
                  dz  dej                  ez  dz  dedz  fˆ fd„Zˆ xZ	S )ÚGithubCopilotErrorNÚrequestÚresponseÚheadersÚbodyc                 ó0   •— t         ‰| �  ||||||¬«       y )N)Ústatus_codeÚmessager   r   r   r   )ÚsuperÚ__init__)Úselfr   r   r   r   r   r   Ú	__class__s          €úm/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/github_copilot/common_utils.pyr   zGithubCopilotError.__init__   s)   ø€ ô 	‰ÑØ#ØØØØØð 	õ 	
ó    )NNNN)
Ú__name__Ú
__module__Ú__qualname__ÚhttpxÚRequestÚResponseÚHeadersÚdictr   Ú__classcell__)r   s   @r   r   r      sg   ø„ ð
 )-Ø*.Ø/3Ø ñ
ð —‘ Ñ%ð	
ð
 —.‘. 4Ñ'ð
ð —‘ Ñ%¨Ñ,ð
ð �T‰k÷
ñ 
r   r   c                   ó   — e Zd Zy)ÚGetDeviceCodeErrorN©r   r   r   © r   r   r$   r$   (   ó   „ Ør   r$   c                   ó   — e Zd Zy)ÚGetAccessTokenErrorNr%   r&   r   r   r)   r)   ,   r'   r   r)   c                   ó   — e Zd Zy)ÚAPIKeyExpiredErrorNr%   r&   r   r   r+   r+   0   r'   r   r+   c                   ó   — e Zd Zy)ÚRefreshAPIKeyErrorNr%   r&   r   r   r-   r-   4   r'   r   r-   c                   ó   — e Zd Zy)ÚGetAPIKeyErrorNr%   r&   r   r   r/   r/   8   r'   r   r/   Úapi_keyÚreturnc                 ó\   — d| › �dddt         t        dt        t        t	        «       «      ddœ
S )zq
    Get default headers for GitHub Copilot Responses API.

    Based on copilot-api's header configuration.
    zBearer zapplication/jsonzvscode-chatzvscode/1.95.0zconversation-panelzelectron-fetch)
ÚAuthorizationzcontent-typezcopilot-integration-idzeditor-versionzeditor-plugin-versionz
user-agentzopenai-intentzx-github-api-versionzx-request-idz#x-vscode-user-agent-library-version)r   r   r	   Ústrr   )r0   s    r   Úget_copilot_default_headersr5   <   s9   € ð # 7 )Ð,Ø*Ø"/Ø)Ü!6Ü Ø-Ü +ÜœE›G›Ø/?ñð r   )Ú__doc__Útypingr   Úuuidr   r   Ú)litellm.llms.base_llm.chat.transformationr   r   Ú__annotations__r   r   r	   r
   r   r$   r)   r+   r-   r/   r4   r!   r5   r&   r   r   ú<module>r;      s¿   ðòõ Ý ã å Fð "€�Ó !Ø!.¨Ð.?Ð@Ð �uÓ @Ø(¨Ð(9Ð:€
ˆEÓ :Ø!€ˆUÓ !Ø)HÐ  Ó Hô
Ð)ô 
ô(	Ð+ô 	ô	Ð,ô 	ô	Ð+ô 	ô	Ð+ô 	ô	Ð'ô 	ð¨ð °ô r   