Agentic.LLM.Provider.ClaudeCode
(agentic v0.3.0)
Copy Markdown
Catalog-only Provider wrapper for the Claude Code CLI.
The CLI protocol (Agentic.Protocol.ClaudeCode) handles the actual
subprocess; this Provider wrapper exists so Claude Code shows up in
Agentic.LLM.Catalog as an alternative pathway for the Claude family.
The router groups it under the same canonical_id as Anthropic-direct
and OpenRouter, then scores all three pathways via ProviderAccount.
availability/1
Three-state result (the proposal's graded availability):
:unavailable—claudebinary not on PATH:degraded— binary present but~/.claude/auth.jsonismissing or expired (CLI re-auths lazily on first call; we still want the router to deprioritize):ready— binary present and auth file is non-expired
Note: the Agentic.LLM.Provider behaviour does not yet declare an
availability/1 callback. That's a follow-up; for now the function
is plain Elixir and the router consumes it via Worth's
ProviderAccount resolver.
Summary
Functions
Three-state availability for the Claude Code pathway. Used by the
router-side ProviderAccount resolver in Worth to set the
availability field on this provider's account.
Functions
@spec availability(Agentic.LLM.ProviderAccount.t() | nil) :: :ready | :degraded | :unavailable
Three-state availability for the Claude Code pathway. Used by the
router-side ProviderAccount resolver in Worth to set the
availability field on this provider's account.