feat: add Anthropic API provider support and missing env vars

- Add LLM_PROVIDER env var (openai/anthropic) to switch cloud backend
- Use ChatAnthropic for anthropic provider with custom base_url
- Add CONTEXT_MAX_TOKENS, CONTEXT_KEEP_RECENT, SESSIONS_DIR,
  HISTORY_MAX_SNAPSHOTS to .env and .env.example
- Add langchain-anthropic dependency to requirements.txt

Note: E2E testing blocked — the configured MiniMax API key
(sk-cp-...) returns 401 across all endpoints (Anthropic and OpenAI).
The API key may be expired or lack text-generation model access.
This commit is contained in:
2026-05-14 23:39:00 +08:00
parent d0f5d05316
commit 76f98a7aeb
3 changed files with 16 additions and 1 deletions
+1
View File
@@ -3,6 +3,7 @@ streamlit>=1.28.0
langgraph>=0.2.0
langchain>=0.3.0
langchain-openai>=0.2.0
langchain-anthropic>=0.3.0
langchain-ollama>=0.2.0
langchain-community>=0.3.0