Replace custom provider abstraction with litellm
Drops the src/providers/ package (base class, AnthropicProvider, OpenAIProvider, factory) in favour of a single src/llm.py that calls litellm.completion() directly. litellm handles provider routing, authentication, and SDK differences for 100+ providers without any code we need to maintain. Changes: - Delete src/providers/ entirely - Add src/llm.py — one complete() function wrapping litellm - src/agent/core.py: EmailAgent takes model: str instead of LLMProvider - src/config.py: ai_provider + api key fields → single ai_model string in litellm format (e.g. "anthropic/claude-opus-4-6") - main.py: remove provider factory wiring; pass config.ai_model to agent - .env.example: simplify AI section, show litellm model string examples - pyproject.toml: replace anthropic + openai deps with litellm>=1.0.0 - uv.lock: regenerated https://claude.ai/code/session_01HaUFs7SaLD5SoiuGCY27Tw
This commit is contained in:
+2
-4
@@ -4,10 +4,8 @@ version = "0.1.0"
|
||||
description = "AI-powered conversational registration agent for Spielgruppe Pumuckl"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
# At least one AI provider SDK is required; both are included so the
|
||||
# operator can choose at runtime via the AI_PROVIDER env variable.
|
||||
"anthropic>=0.40.0",
|
||||
"openai>=1.50.0",
|
||||
# LLM access — supports any provider (Anthropic, OpenAI, Gemini, …)
|
||||
"litellm>=1.0.0",
|
||||
# Configuration
|
||||
"python-dotenv>=1.0.0",
|
||||
# Registration schema validation
|
||||
|
||||
Reference in New Issue
Block a user