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:
Dorian
2026-03-02 14:30:19 +00:00
parent 88e211c87d
commit a5a32e3566
5 changed files with 305 additions and 71 deletions
+1
View File
@@ -8,6 +8,7 @@ declare module '*.vue' {
interface ImportMetaEnv {
readonly VITE_OPENROUTER_API_KEY: string
readonly VITE_ANTHROPIC_API_KEY: string
readonly VITE_TMDB_API_KEY: string
readonly VITE_DEV_MODE: string
readonly VITE_MOCK_MEDIA_SOURCES: string