+
    …WÝjD  ã                   ó  € R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	 ^ RI
HtHt ]P                  ! ]4      tRt] R2t ! R R]4      t ! R	 R
]4      t]! RRRRRRR]]RRR7      t]! RRRRRRR]]RRR7      t]	! ]4       ]	! ]4       R# )uÉ   CommandCode provider profiles: ``commandcode`` (chat_completions) and
``commandcode-anthropic`` (anthropic_messages, Bearer auth â€” see
``agent/anthropic_adapter.py``). Same key and base URL for both.N)Úopen_credentialed_url)Úget_provider_profileÚregister_provider)ÚProviderProfileÚ_profile_user_agentz&https://api.commandcode.ai/provider/v1ú/modelsc                   ód   a € ] tR t^t o RtRRRRRR/V 3R lR lltR	RR
R/V 3R lR lltRtV tR# )ÚCommandCodeProfileu<   CommandCode â€” OpenAI-compatible chat completions endpoint.Úapi_keyNÚbase_urlÚtimeoutç       @c          	      ól   <€ V ^8„  d   QhRS[ R,          RS[ R,          RS[RS[S[ ,          R,          /# ©é   r
   Nr   r   Úreturn©ÚstrÚfloatÚlist)ÚformatÚ__classdict__s   "€Ú`C:\Users\johnn\AppData\Local\hermes\hermes-agent\plugins\model-providers\commandcode\__init__.pyÚ__annotate__ÚCommandCodeProfile.__annotate__   s>   ø€ ÷ ñ Ù �*ðÙ7:¸TµzðÙSXðá	‰c��TÕ	ñó    c               ó   € T;'       g    RP                  4       P                  R4      pT;'       d
    V\        8g  pV'       d
   VR,           M\        p \        P
                  P                  V4      pVP                  RR4       VP                  R\        4       4       \        WsR7      ;_uu_ 4       p\        P                  ! VP                  4       P                  4       4      p	RRR4       X	P                  R	. 4       U
u. uF-  p
\        V
\         4      '       g   K  R
V
9   g   K$  V
R
,          NK/  	  up
#   + '       g   i     LZ; iu up
i   \"         d"   p\$        P'                  RT4        Rp?R# Rp?ii ; i)z—Public (unauthenticated) /models endpoint. The picker passes base_url
unconditionally, so only a value differing from the default is a custom endpoint.Ú Ú/r   ÚAcceptzapplication/jsonz
User-Agent)r   NÚdataÚidzfetch_models(commandcode): %s)ÚstripÚrstripÚ_COMMANDCODE_BASEÚ_COMMANDCODE_MODELS_URLÚurllibÚrequestÚRequestÚ
add_headerr   r   ÚjsonÚloadsÚreadÚdecodeÚgetÚ
isinstanceÚdictÚ	ExceptionÚloggerÚdebug)Úselfr
   r   r   Úcaller_baseÚcustomÚ
models_urlÚreqÚrespr    ÚmÚexcs   &$$$        r   Úfetch_modelsÚCommandCodeProfile.fetch_models   s  € ð
  —~�~ 2×,Ñ,Ó.×5Ñ5°cÓ:ˆØ×AÐA Ô0AÑ!Aˆß06�[ 9Ö,Ô<Sˆ
ð		Ü—.‘.×(Ñ(¨Ó4ˆCØ�N‰N˜8Ð%7Ô8Ø�N‰N˜<Ô)<Ó)>Ô?Ü& s×<Õ<ÀÜ—z’z $§)¡)£+×"4Ñ"4Ó"6Ó7�÷ =à%)§X¡X¨f°bÔ%9Ó_Ñ%9 ¼ZÈÌ4×=P”GÐUYÐ]^ÑU^”G�A�d—G�GÑ%9Ñ_Ð_÷ =×<üâ_øÜô 	Ü�L‰LÐ8¸#Ô>Ýûð	úsI   ÁAE Â43D9Ã'E ÄEÄ EÄ)EÄ6E Ä9E		ÅE ÅE=ÅE8Å8E=Úreasoning_configÚmodelc                ó^   <€ V ^8„  d   QhRS[ R,          RS[R,          RS[S[ S[ 3,          /# )r   r>   Nr?   r   )r0   r   Útuple)r   r   s   "€r   r   r   *   s6   ø€ ÷ 
ñ 
Ù#'¨$¥;ð
Ù>AÀD½jð
á	‰t‘TˆzÕ	ñ
r   c          
     ó  € T;'       g    RP                  4       pVP                  4       P                  R4      '       g   / / 3# \        R4      pVf   / / 3# VP                  ! RRVRVP                  R^4      ^,          /VB # )u4  DeepSeek ids (``deepseek/deepseek-v4-flash``) get the native DeepSeek wire
controls: DeepSeek V4+ defaults to thinking when ``thinking`` is omitted, so
without them ``/reasoning`` never reaches the request (#95232). Other model
families stay a no-op â€” CommandCode declares no reasoning vocabulary for them.r   z	deepseek/Údeepseekr>   r?   r   © )r"   ÚlowerÚ
startswithr   Úbuild_api_kwargs_extrasÚsplit)r4   r>   r?   Úcontextr:   Únatives   &$$,  r   rG   Ú*CommandCodeProfile.build_api_kwargs_extras*   sŒ   € ð �[ˆ[�b×ÑÓ!ˆØ�w‰w‹y×#Ñ# K×0Ò0Ø�r�6ˆMô & jÓ1ˆØŠ>Ø�r�6ˆMØ×-Ò-ñ 
Ø-ð
Ø56·W±W¸SÀ!³_ÀQÕ5Gð
ØKRñ
ð 	
r   rD   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r<   rG   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r	   r	      sI   ø‡ € ÙFðØ'+ðØDHðØ[^÷ò ð(
Ø15ð
ØKO÷
÷ 
ð 
r   r	   c                   óR   a a€ ] tR t^>t oRtRRRRRR/V3R lV 3R llltR	tVtV ;t# )
ÚCommandCodeAnthropicProfileu;   CommandCode â€” Anthropic Messages API-compatible endpoint.r
   Nr   r   r   c          	      ól   <€ V ^8„  d   QhRS[ R,          RS[ R,          RS[RS[S[ ,          R,          /# r   r   )r   r   s   "€r   r   Ú(CommandCodeAnthropicProfile.__annotate__A   sD   ø€ ÷ bñ bÙ �*ðbÙ7:¸TµzðbÙSXðbá	‰c��TÕ	ñbr   c               ó�   <€ \         SV `  WVR7      pVf   R# V Uu. uF  qUP                  R4      '       g   K  VNK  	  up# u upi )z=Public /models endpoint, filtered to Anthropic-family models.)r
   r   r   Nzclaude-)Úsuperr<   rF   )r4   r
   r   r   Ú
all_modelsr:   Ú	__class__s   &$$$  €r   r<   Ú(CommandCodeAnthropicProfile.fetch_modelsA   sH   ø€ ô ‘WÑ)°'ÐV]Ð)Ó^ˆ
Ø!Ò)ˆtÐa¹:Ó/a¹:°aÏÉÐV_×I`·°¹:Ñ/aÐaùÒ/as
   �AºArD   )	rL   rM   rN   rO   rP   r<   rQ   rR   Ú__classcell__)rZ   r   s   @@r   rT   rT   >   s5   ù‡ € ÙEðbØ'+ðbØDHðbØ[^÷b÷ bõ br   rT   ÚcommandcodeÚchat_completionsÚCommandCodeu4   CommandCode â€” 20+ models via OpenAI-compatible APIzhttps://commandcode.ai/údeepseek/deepseek-v4-flash)ÚnameÚaliasesÚapi_modeÚenv_varsÚdisplay_nameÚdescriptionÚ
signup_urlr   r7   Úfallback_modelsÚdefault_aux_modelzcommandcode-anthropicÚanthropic_messageszCommandCode (Anthropic)u8   CommandCode â€” Claude models via Anthropic Messages APIúclaude-haiku-4-5-20251001)zcommandcode-chat)ÚCOMMANDCODE_API_KEYÚCOMMANDCODE_BASE_URL)zdeepseek/deepseek-v4-pror`   zQwen/Qwen3.7-MaxzQwen/Qwen3.6-Pluszmoonshotai/Kimi-K2.6zzai-org/GLM-5.1zMiniMaxAI/MiniMax-M2.7zstepfun/Step-3.5-Flashzxiaomi/mimo-v2.5-prozgoogle/gemini-3.5-flashzgpt-5.5)zcommandcode-claude)rl   ÚCOMMANDCODE_ANTHROPIC_BASE_URL)zclaude-sonnet-4-6zclaude-opus-4-7rk   )rP   r*   ÚloggingÚurllib.requestr&   Úhermes_cli.urllib_securityr   Ú	providersr   r   Úproviders.baser   r   Ú	getLoggerrL   r2   r$   r%   r	   rT   r]   Úcommandcode_anthropicrD   r   r   Ú<module>rv      sÓ   ðñDó Û Û å <ß =ß ?à	×	Ò	˜8Ó	$€à<Ð Ø.Ð/¨wÐ7Ð ô(
˜ô (
ôVbÐ"4ô bñ !Ø	Ð 5Ð@Rð =ØÐ,bØ(Ð3DÐQhðð
 3ô€ñ 4Ø	 Ð*AÐL`ØFØ*ØJØ(Ð3DÐQhØYØ1ôÐ ñ �+Ô Ù Ð'Ö (r   