Skip to content

Anthropic (Claude)

Claude models through the Claude API. Strong at tool use, long agent runs and following instructions. No embedding model: keep embeddings on Ollama. Official docs: models · pricing · console.

Setup

  1. Create an account in the Claude Console, add credits and set a spend limit.
  2. Create an API key in the Console; it is shown once.
  3. From the ai-learning folder: uv pip install -e '.[hosted]', then cp .env.example .env (if you haven't) and set:
    LLM_MODEL=anthropic/claude-haiku-5-5
    ANTHROPIC_API_KEY=sk-ant-...
    EMBED_MODEL=ollama/nomic-embed-text   # Anthropic has no embeddings; keep Ollama running for RAG and RnR's Ask
    
  4. Check: python -c "import door; print(door.describe())", then cd agents && python 01_agent_loop.py (agents labs need the MCP server: see the agents README).

Models for the labs

Use LLM_MODEL Note
Start here anthropic/claude-haiku-5-5 Fastest and cheapest; fine for every lab
Harder agent runs anthropic/claude-sonnet-5-5 Better planning and fewer check failures, higher price

Names checked November 2026 against the models overview.

What's different

  • Thinking is adaptive on current Claude models, and some can't turn it off fully, so think=False doesn't guarantee zero reasoning tokens. think=True asks for more.
  • Tool calls and structured output are translated by LiteLLM from the OpenAI shape the door sends; the labs see the same Reply as on Ollama.
  • Embeddings: none. RAG, MCP's docs server and RnR's "Ask the reviews" still need Ollama for nomic-embed-text, or set EMBED_MODEL to OpenAI or Gemini.

Troubleshooting

Symptom Fix
401 AuthenticationError Wrong or missing ANTHROPIC_API_KEY
400 about temperature or thinking That model's thinking settings differ: try claude-haiku-5-5, or run the call with think=False
ConnectionError in a RAG lab That's Ollama for embeddings: start it, or switch EMBED_MODEL

Shared rules for data, keys, cost and evals: README.md.