feat(providers): add Mistral embedding provider, route registry through dynaconf

Adds a hosted Mistral embedding option (mistral-embed, 1024-dim) alongside
the existing Bedrock / OpenAI / Ollama / Simple providers. Implementation
mirrors OpenAIProvider: lazy dimension detection with a known-models lookup,
chunked batch requests, defensive index sort, and a 429-aware retry decorator.

In the same change, ProviderRegistry switches from os.getenv to the
dynaconf-backed Settings dataclass so all five providers share a single
configuration path. config.py gains the previously-uncovered Bedrock keys,
the new Mistral keys, the missing OPENAI_GENERATION_MODEL /
OLLAMA_GENERATION_MODEL, and SIMPLE_EMBEDDING_DIMENSION.

Auto-detection priority: Bedrock → OpenAI → Mistral → Ollama → Simple.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-05-08 17:25:24 +02:00
co-authored by Claude Opus 4.7
parent 61cadf7935
commit 3268a13d11
10 changed files with 862 additions and 138 deletions
+1
View File
@@ -43,6 +43,7 @@ dependencies = [
"pymupdf4llm>=0.2.2",
"openai>=2.8.1",
"dynaconf>=3.2.13,<4.0",
"mistralai>=2.4.5",
]
classifiers = [
"Development Status :: 4 - Beta",