From 81ae7d598e7ec6afe8afb5bbdbfe807042298559 Mon Sep 17 00:00:00 2001 From: Claude Sonnet 5 Date: Fri, 3 Jul 2026 09:04:06 +0000 Subject: docs: update api-keys-setup.md for Phase 2 (Anthropic now wired up) Marks Anthropic as live (agent.type: "anthropic" works once a key is configured), adds the budget-bucket-separation and [runners] disable notes that Phase 2's implementation agent independently drafted in a since-discarded duplicate doc, adds an explicit warning against using claude setup-token / CLI OAuth session for the native adapter (subscription auth is for Claude Code/Agent SDK use, not a separate product's API calls, per Anthropic's Agent SDK terms), and bumps default_model examples from claude-sonnet-4-5 to claude-sonnet-5. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01V1moSNCJRcP6kykA4tyUSs --- docs/api-keys-setup.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'docs/api-keys-setup.md') diff --git a/docs/api-keys-setup.md b/docs/api-keys-setup.md index bf58f1e..731a711 100644 --- a/docs/api-keys-setup.md +++ b/docs/api-keys-setup.md @@ -6,11 +6,11 @@ Providers, in escalation-ladder order (cheapest/free first): | Provider | Status | Cost | Wire format | |---|---|---|---| -| Groq | to add | free tier (real, no card required historically) | OpenAI-compatible | -| OpenRouter | to add | free tier (rate-limited) + pay-as-you-go | OpenAI-compatible | -| OpenAI | to add | prepaid credit, no ongoing free tier | OpenAI-compatible (native) | -| Google (Gemini) | already have paid account | paid | native (Gemini API) | -| Anthropic (Claude) | already have paid account | paid | native (Messages API) | +| Groq | to add (works once configured — Phase 1's `openaicompat` adapter, no dedicated phase needed) | free tier (real, no card required historically) | OpenAI-compatible | +| OpenRouter | to add (same as Groq) | free tier (rate-limited) + pay-as-you-go | OpenAI-compatible | +| OpenAI | to add (same as Groq) | prepaid credit, no ongoing free tier | OpenAI-compatible (native) | +| Google (Gemini) | to add — native adapter lands Phase 4 | paid (already have account) | native (Gemini API) | +| Anthropic (Claude) | **wired up (Phase 2)** — `agent.type: "anthropic"` works as soon as a key is in `config.toml` | paid (already have account) | native (Messages API) | > Note on freshness: signup flows and free-tier limits change without much notice. Treat the specific numbers below (rate limits, credit thresholds) as "true as of when this was written" and double-check the provider's own pricing/limits page before relying on them for capacity planning. @@ -38,7 +38,7 @@ default_model = "gpt-4o-mini" [providers.anthropic] api_key = "sk-ant-..." -default_model = "claude-sonnet-4-5" +default_model = "claude-sonnet-5" [providers.google] api_key = "AIza..." @@ -100,15 +100,17 @@ If you'd rather use Vertex AI (GCP's enterprise entry point to Gemini, with IAM- --- -## Anthropic (Claude) — you already have a paid account +## Anthropic (Claude) — you already have a paid account, and this one's live -Same situation as Gemini: `credentials/claude/` holds the `claude` CLI's OAuth session (`ContainerRunner`'s path). The native-API path needs a separate Console API key. +Same situation as Gemini: `credentials/claude/` holds the `claude` CLI's OAuth session (`ContainerRunner`'s path). The native-API path needs a separate Console API key — **do not** try to reuse the CLI's OAuth session or a `claude setup-token` credential here: Anthropic's own Agent SDK terms say subscription/OAuth auth is for Claude Code (or the Agent SDK, i.e. Claude Code as a library) specifically, not for powering a separate third-party product's API calls, which is what claudomator's native adapter is. Use a real Console API key. 1. Go to `console.anthropic.com`, sign in with your paid account. 2. **Settings → API Keys** → **Create Key**. Name it, select the workspace tied to your billing if you have more than one. 3. Copy the key (`sk-ant-...`) — shown once. -4. `[providers.anthropic]` needs no `endpoint` override — just `api_key` and `default_model` (e.g. `claude-sonnet-4-5` for the escalation ladder's cloud rung, or a Haiku-tier model for a cheaper intermediate rung before Sonnet). -5. Since this is a separate credential from the CLI's OAuth session, keep an eye on Console usage/billing separately from whatever the `claude` CLI itself reports — they draw from the same account but are tracked as distinct API consumers. +4. `[providers.anthropic]` needs no `endpoint` override — just `api_key` and `default_model` (e.g. `claude-sonnet-5` for the escalation ladder's cloud rung, or a Haiku-tier model for a cheaper intermediate rung before Sonnet). +5. Since this is a separate credential from the CLI's OAuth session, keep an eye on Console usage/billing separately from whatever the `claude` CLI itself reports — they draw from the same account but are tracked as distinct API consumers. This is intentional: `executions.agent = "anthropic"` (native path) and `"claude"` (CLI-subprocess `ContainerRunner` path) are tracked as **separate budget buckets** even though both bill the same account — set `[budget].provider_5h_usd.anthropic` independently of `.claude` if you want different caps on each. +6. As soon as the key is set, `claudomator serve`/`run` registers `agent.type: "anthropic"` as a usable runner — no restart-time flag needed beyond having the key present. To turn it off without removing the key, set `[runners] anthropic = false`. +7. Verify it's live: submit any task with `agent.type: "anthropic"`, then check `GET /api/budget` for a distinct `"anthropic"` row once the execution completes. --- -- cgit v1.2.3