
    sj`
                         d Z ddlmZ ddlmZ ddlmZ ddlm	Z	 dddd	e d
Z
 G d de	          Z edddddd ee
          d          Z ee           dS )u  OpenCode Free provider profile.

OpenCode's free model tier on the Zen relay (https://opencode.ai/zen/v1).
KEYLESS: the relay serves free-tier models anonymously and rejects any
Authorization bearer it doesn't recognize with 401 — so this provider
never sends a credential at all (the runtime resolver pins the keyless
placeholder and an empty Authorization header; see
hermes_cli.models.opencode_zen_free_runtime). No OpenCode account needed.
Select via ``hermes model`` or ``/model free``.
    )Any)__version__)register_provider)ProviderProfile z%https://hermes-agent.nousresearch.comzHermes AgentzHermesAgent/)AuthorizationzHTTP-RefererzX-Titlez
User-Agentc                   j    e Zd ZdZddddedz  dedz  deeeef         eeef         f         fdZdS )OpenCodeFreeProfileu  OpenCode Free — keyless, with Ox Alpha reasoning controls.

    Ox Alpha (x-preview-f-free) is reachable through this provider as well
    as opencode-zen; both share the same wire contract (reasoning_effort
    accepts exactly low/high/max — anything else 400s). The translation
    lives in the zen plugin; resolve it through the registered zen profile's
    module so the two providers can never drift.
    N)reasoning_configmodelr   r   returnc                    	 dd l }ddlm}  |d          }|j        t	          |          j                 }|                    ||          S # t          $ r i i fcY S w xY w)Nr   )get_provider_profilezopencode-zen)sys	providersr   modulestype
__module__ _build_ox_alpha_reasoning_extras	Exception)selfr   r   contextr   r   zen_profile
zen_modules           R/home/agent/.hermes/hermes-agent/plugins/model-providers/opencode-free/__init__.pybuild_api_kwargs_extrasz+OpenCodeFreeProfile.build_api_kwargs_extras'   s    		JJJ666666..~>>KT+%6%6%ABJ>>?OQVWWW 	 	 	r6MMM	s   A	A AA)	__name__r   __qualname____doc__dictstrtupler   r        r   r
   r
      s}          264  #'$;>ADj	tCH~tCH~-	.     r$   r
   zopencode-free)freeopencode_freer#   zhttps://opencode.ai/zen/v1zOpenCode Freeu3   OpenCode free models — keyless, no account neededzlaguna-s-2.1-free)namealiasesenv_varsbase_urldisplay_namedescriptiondefault_headersdefault_aux_modelN)r   typingr   
hermes_clir   _HERMES_VERSIONr   r   providers.baser   _KEYLESS_HEADERSr
   r    r&   r#   r$   r   <module>r4      s   	 	       5 5 5 5 5 5 ' ' ' ' ' ' * * * * * * ;222	      /   2 $#	%) ED)** *    -          r$   