docs: document openai-compatible provider and FIXME_M9 corrections
Update GUIDE_DEV_PYTHON.md, TODO.md, and AGENTS.md to reflect the decisions and work done in the FEAT_M9 and FIXME_M9 sessions. GUIDE_DEV_PYTHON.md: - Header: add entry in recent updates - 3.1.2: AI_PROVIDER now documents openai-compatible with Literal type; add AI_ALLOW_INSECURE_HTTP row; move decision block after table to fix rendering - 3.2: AISettings code block updated with openai-compatible and allow_insecure_http field; decision note extended - 3.1.3: .env.example adds OpenRouter (HTTPS) and Ollama (HTTP) examples, both commented TODO.md: - M9 factory line now mentions openai-compatible with URL validation - Add FEAT_M9 and FIXME_M9 notes after M9 acceptance criteria AGENTS.md: - Section 5: new subsection for openai-compatible provider contract documenting validation rules, degraded mode, and security constraints Co-authored-by: opencode/tech-writer anthropic.claude-sonnet-4-5 <anthropic.claude-sonnet-4-5@agents.invalid>
This commit is contained in:
13
TODO.md
13
TODO.md
@@ -176,7 +176,7 @@ Générer une synthèse optionnelle via un fournisseur IA, avec mode dégradé s
|
||||
- [x] Créer `synthesis/provider.py` : protocole `SynthesisProvider.generate → Optional[SynthesisResult]` (ne lève jamais d'exception).
|
||||
- [x] Créer `synthesis/openai.py` : `OpenAISynthesisProvider` (httpx, prompt système FR, max 800 car., timeout 30 s, temp 0.3).
|
||||
- [x] Créer `synthesis/litellm.py` : `LiteLLMSynthesisProvider` (optionnel, extra `ai-litellm`).
|
||||
- [x] Créer `synthesis/__init__.py` : factory `get_synthesis_provider(settings)` (OpenAI par défaut, litellm si `AI_PROVIDER=litellm`).
|
||||
- [x] Créer `synthesis/__init__.py` : factory `get_synthesis_provider(settings)` (OpenAI par défaut, litellm si `AI_PROVIDER=litellm`, `openai-compatible` si `AI_PROVIDER=openai-compatible` avec validation d'URL).
|
||||
- [x] Mode dégradé : clé absente / timeout / exception → retour `None` (le pipeline continue sans synthèse).
|
||||
- [x] Respecter les contraintes (3-5 phrases, ton sobre, pas d'emoji dans le texte IA).
|
||||
|
||||
@@ -185,6 +185,17 @@ Générer une synthèse optionnelle via un fournisseur IA, avec mode dégradé s
|
||||
- Clé absente ou erreur réseau → `None` (aucune exception propagée).
|
||||
- La factory renvoie le bon provider ; litellm derrière l'extra optionnel.
|
||||
|
||||
> **Évolution FEAT_M9 — Provider `openai-compatible`** :
|
||||
> Le provider `openai-compatible` a été ajouté à `get_synthesis_provider` (commit `13e058f` sur `feat/m9-custom-endpoint`).
|
||||
> Il réutilise `OpenAISynthesisProvider` avec un `base_url` validé (HTTPS obligatoire, HTTP via `AI_ALLOW_INSECURE_HTTP=true`).
|
||||
> Configuration incomplète → `None` + warning (mode dégradé). Aucun appel réseau à la factory.
|
||||
> Couverture synthesis : 91,57 % (13 tests factory ajoutés).
|
||||
>
|
||||
> **Corrections FIXME_M9 — Audit synthèse IA** :
|
||||
> Cinq points d'audit corrigés (commit `19cbf8f` sur `fix/m9-fixme`, mergé en `2a27225`) :
|
||||
> `redact_secrets(extra_secrets=...)`, `SecretStr` préservé dans les providers, contenu du message dans `_build_prompt`,
|
||||
> `_validate_output` (rejet emoji/titre/liste/HTML), `importorskip` pour les tests litellm.
|
||||
|
||||
---
|
||||
|
||||
## M10. Canal XMPP — Priorité : Haute
|
||||
|
||||
Reference in New Issue
Block a user