Problem
obol model setup --provider anthropic only supports pasting an API key. Users should also be able to:
- Reuse existing Claude Code OAuth token (
CLAUDE_CODE_OAUTH_TOKEN) — many developers already have this
- Choose from a provider menu with clear descriptions (like hermes-agent's setup wizard)
- Have the setup run as part of
obolup.sh so inference works on first boot
Currently obolup.sh prompts for an API key if the agent's primary model requires one (PR #271), but this is bare-minimum — just a read prompt that exports the key for the bootstrap.
Reference: hermes-agent setup flow
hermes-agent (hermes_cli/setup.py + hermes_cli/auth.py) has a production-grade provider setup:
Select your inference provider:
1. Login with Nous Portal (OAuth)
2. Login with OpenAI Codex
3. OpenRouter API key (100+ models)
4. Custom OpenAI-compatible endpoint
5. Anthropic (Claude models — API key or Claude Code subscription)
...
Key patterns to adopt:
- Provider registry with auth types (
oauth_device_code, oauth_external, api_key)
- Credential detection — checks for existing tokens from other CLI tools (Claude Code, OpenAI Codex)
- Multiple env var fallbacks per provider:
ANTHROPIC_API_KEY, ANTHROPIC_TOKEN, CLAUDE_CODE_OAUTH_TOKEN
- Live model probing — queries
/models endpoint to discover available models
- "Keep current" option when a provider is already configured
Proposed UX
obol model setup
==> Inference Provider Setup
Your agent uses: anthropic/claude-sonnet-4-6
1. Paste Anthropic API key
2. Use Claude Code subscription (detected: CLAUDE_CODE_OAUTH_TOKEN)
3. Use OpenAI API key
4. Use local Ollama only
5. Custom OpenAI-compatible endpoint
Select [1]:
Scope
Reference files
hermes_cli/auth.py — Provider registry, OAuth flows, credential detection
hermes_cli/setup.py:649 — setup_model_provider() interactive wizard
internal/model/model.go — Current ConfigureLiteLLM() implementation
cmd/obol/model.go — Current CLI commands
Problem
obol model setup --provider anthropiconly supports pasting an API key. Users should also be able to:CLAUDE_CODE_OAUTH_TOKEN) — many developers already have thisobolup.shso inference works on first bootCurrently
obolup.shprompts for an API key if the agent's primary model requires one (PR #271), but this is bare-minimum — just areadprompt that exports the key for the bootstrap.Reference: hermes-agent setup flow
hermes-agent (
hermes_cli/setup.py+hermes_cli/auth.py) has a production-grade provider setup:Key patterns to adopt:
oauth_device_code,oauth_external,api_key)ANTHROPIC_API_KEY,ANTHROPIC_TOKEN,CLAUDE_CODE_OAUTH_TOKEN/modelsendpoint to discover available modelsProposed UX
Scope
CLAUDE_CODE_OAUTH_TOKENas an Anthropic credential sourceobol model setup(when no flags)/modelsprobing for model discoveryobolup.shbootstrap flowReference files
hermes_cli/auth.py— Provider registry, OAuth flows, credential detectionhermes_cli/setup.py:649—setup_model_provider()interactive wizardinternal/model/model.go— CurrentConfigureLiteLLM()implementationcmd/obol/model.go— Current CLI commands