Skip to content

feat(GH-34): ajout du provider LLM OpenRouter#35

Open
simodev25 wants to merge 5 commits into
mainfrom
feat/GH-34/openrouter-provider-llm
Open

feat(GH-34): ajout du provider LLM OpenRouter#35
simodev25 wants to merge 5 commits into
mainfrom
feat/GH-34/openrouter-provider-llm

Conversation

@simodev25

Copy link
Copy Markdown
Owner

Résumé

Ajout d'OpenRouter comme 4ème provider LLM dans Kairos Mesh. OpenRouter expose une API OpenAI-compatible qui donne accès à 300+ modèles (Claude, Gemini, DeepSeek R1, etc.).

Changements

  • 6 variables d'env OPENROUTER_* (Settings)
  • openrouter dans SUPPORTED_LLM_PROVIDERS (model_selector)
  • OpenAICompatibleClient('openrouter') + dispatch (provider_client)
  • AgentScope model_factory et formatter_factory
  • Points d'intégration : health, benchmark, news, optimizer
  • Documentation : docs/configuration.md + .env.example
  • Tests : 10 nouveaux cas unitaires dans 4 fichiers

Issue liée

Closes #34

Tests exécutés

cd backend && pytest -q
# Résultat : 672 passed, 2 failed (pré-existants), 8 errors (pré-existants)
# Zéro régression introduite par GH-34

Utilisation

LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=sk-or-v1-...
OPENROUTER_MODEL=openrouter/auto  # ou anthropic/claude-3-opus, etc.

Risques

  • Faible : OpenRouter est 100% OpenAI-compatible → pas de nouveau code client
  • Aucun impact sur backend/app/risk/ ni ALLOW_LIVE_TRADING

Checklist

  • Aucun secret ajouté
  • Tests unitaires passent (672/674)
  • Documentation mise à jour
  • 0 régression sur providers existants

simodev25 added 5 commits July 4, 2026 18:21
Artefacts de planification pour l'intégration d'OpenRouter comme
4ème provider LLM (API OpenAI-compatible). 16 fichiers à modifier,
6 critères d'acceptation, 4 fichiers de test.
- 6 variables d'env OPENROUTER_* (Settings)
- openrouter dans SUPPORTED_LLM_PROVIDERS
- OpenAICompatibleClient('openrouter') + dispatch
- AgentScope model_factory et formatter_factory
- Points d'intégration: health, benchmark, news, optimizer
- Documentation: configuration.md + .env.example
- Tests: 4 fichiers, 10 nouveaux cas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ajouter OpenRouter comme provider LLM (API OpenAI-compatible)

1 participant