Backend: Add Anthropic/Claude provider integration

- Add anthropic.rs module with streaming support
- Convert between internal and Anthropic tool/message formats
- Add keyring dependency for secure API key storage
- Add API key management commands (get_exists, set)
- Auto-detect provider from model name (claude-* prefix)
- Support SSE streaming from Anthropic API
- Handle tool calling with Anthropic's format
- Add cancellation support for Anthropic streams
This commit is contained in:
Dave
2025-12-27 19:41:20 +00:00
parent e71dcd8226
commit 1529ca77e7
6 changed files with 431 additions and 8 deletions

View File

@@ -32,3 +32,5 @@ chrono = { version = "0.4.42", features = ["serde"] }
async-trait = "0.1.89"
tauri-plugin-store = "2.4.1"
tokio = { version = "1", features = ["sync"] }
keyring = "3.2"
eventsource-stream = "0.2.3"