Commit f6e2e76
authored
feat: add LiteLLM unified LLM provider (RFC-012) (#108)
Introduces a new provider: litellm that routes to 100+ LLM backends
through LiteLLM's model-name prefix matching. Single provider replaces
the need for separate openai_compat, anthropic, bedrock, vertex, and
similar dedicated providers.
Changes:
- Create src/zettelforge/llm_providers/litellm_provider.py with
LiteLLMProvider class implementing the LLMProvider protocol
- Register 'litellm' provider in __init__.py (conditional on SDK)
- Add litellm>=1.60.0 optional dependency to pyproject.toml
- Update config.default.yaml with provider docs and examples
- Add 11 unit tests: construction, generate, api_key, system prompt,
json_mode, protocol satisfaction, registration check
- Remove placeholder lines for openai_compat and anthropic (now
superseded by LiteLLM)
- Create docs/rfcs/RFC-012-litellm-unified-provider.md (369 lines)
RFC: docs/rfcs/RFC-012-litellm-unified-provider.md1 parent e41dca4 commit f6e2e76
6 files changed
Lines changed: 725 additions & 2 deletions
File tree
- docs/rfcs
- src/zettelforge/llm_providers
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
151 | 152 | | |
152 | | - | |
153 | | - | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
174 | 173 | | |
175 | 174 | | |
176 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
177 | 189 | | |
178 | 190 | | |
179 | 191 | | |
| |||
0 commit comments