feat(ai): add Anthropic Claude adapter as primary AI provider
Wire up Claude Messages API with SSE streaming, supporting the different event format (content_block_delta) vs OpenRouter's OpenAI-compatible format. Claude is the default when its API key is present. - Dual provider system: Anthropic (direct) and OpenRouter - Claude streams via content_block_delta events, OpenRouter via choices[0].delta.content - Model picker dropdown in chat header (click model name to switch) - Available models: Claude Sonnet 4, Opus 4, Haiku 3.5, Llama 4 Maverick/Scout (free), Mistral Small 3.1 (free) - Sidebar status shows active provider name - anthropic-dangerous-direct-browser-access header for browser use Made-with: Cursor
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
# Get your key at: https://openrouter.ai/keys
|
||||
VITE_OPENROUTER_API_KEY=sk-or-your-key-here
|
||||
|
||||
# Anthropic Claude (direct API access)
|
||||
# Get your key at: https://console.anthropic.com/settings/keys
|
||||
VITE_ANTHROPIC_API_KEY=sk-ant-your-key-here
|
||||
|
||||
# TMDB API (free, for real film poster images)
|
||||
# Get your key at: https://www.themoviedb.org/settings/api
|
||||
VITE_TMDB_API_KEY=your-tmdb-key-here
|
||||
|
||||
Reference in New Issue
Block a user