this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(docker): configure Letta to use LiteLLM via OPENAI_API_BASE

- Set OPENAI_API_BASE=http://litellm:4000 for Letta container
- Pass session ID as OPENAI_API_KEY for proxy chain auth
- Letta now routes Claude requests through LiteLLM -> anthropic-proxy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

alice 44e9db85 e9edef22

+52 -3
+52 -3
docker-compose.yml
··· 3 3 driver: bridge 4 4 5 5 services: 6 + # anthropic-proxy: OAuth proxy for Anthropic API 6 7 anthropic-proxy: 7 8 build: 8 9 context: . ··· 25 26 timeout: 10s 26 27 retries: 3 27 28 29 + # Auth adapter: adds Accept-Encoding: identity to prevent gzip responses 30 + auth-adapter: 31 + image: oven/bun:latest 32 + working_dir: /app 33 + command: ["bun", "run", "src/auth-adapter.ts"] 34 + ports: 35 + - "4002:4002" 36 + environment: 37 + - ANTHROPIC_PROXY_INTERNAL_URL=http://anthropic-proxy:4001 38 + - AUTH_ADAPTER_PORT=4002 39 + volumes: 40 + - ./src/auth-adapter.ts:/app/src/auth-adapter.ts:ro 41 + networks: 42 + - assistant-net 43 + restart: unless-stopped 44 + depends_on: 45 + anthropic-proxy: 46 + condition: service_healthy 47 + healthcheck: 48 + test: ["CMD", "bun", "-e", "fetch('http://localhost:4002/health').then(r => process.exit(r.ok ? 0 : 1))"] 49 + interval: 30s 50 + timeout: 10s 51 + retries: 3 52 + 53 + # LiteLLM: OpenAI-compatible API that proxies to auth-adapter -> anthropic-proxy 54 + litellm: 55 + image: ghcr.io/berriai/litellm:main-latest 56 + ports: 57 + - "4000:4000" 58 + environment: 59 + - ANTHROPIC_PROXY_SESSION_ID=${ANTHROPIC_PROXY_SESSION_ID} 60 + volumes: 61 + - ./litellm-config.yaml:/app/config.yaml:ro 62 + command: ["--config", "/app/config.yaml", "--port", "4000"] 63 + networks: 64 + - assistant-net 65 + restart: unless-stopped 66 + depends_on: 67 + auth-adapter: 68 + condition: service_healthy 69 + healthcheck: 70 + test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:4000/health')"] 71 + interval: 30s 72 + timeout: 10s 73 + retries: 3 74 + 28 75 letta: 29 76 image: letta/letta:latest 30 77 ports: 31 78 - "8283:8283" 32 79 environment: 33 - # OpenAI for embeddings only 34 - - OPENAI_API_KEY=${OPENAI_API_KEY} 80 + # Use LiteLLM as OpenAI-compatible endpoint for Claude models 81 + - OPENAI_API_BASE=http://litellm:4000 82 + # Session ID is passed as API key to LiteLLM -> auth-adapter -> anthropic-proxy 83 + - OPENAI_API_KEY=${ANTHROPIC_PROXY_SESSION_ID} 35 84 volumes: 36 85 - letta-data:/var/lib/postgresql/data 37 86 networks: 38 87 - assistant-net 39 88 restart: unless-stopped 40 89 depends_on: 41 - anthropic-proxy: 90 + litellm: 42 91 condition: service_healthy 43 92 healthcheck: 44 93 test: ["CMD", "curl", "-f", "http://localhost:8283/v1/health"]