feat(M3-004,M3-006): add OpenRouter adapter and Ollama embedding support
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed

- M3-004: Implement OpenRouterAdapter using openai SDK with custom base URL
  (https://openrouter.ai/api/v1). Fetches model catalog on registration,
  gracefully degrades when OPENROUTER_API_KEY is absent, streams completions
  via OpenAI-compatible API.

- M3-006: Enhance OllamaAdapter with embedding model registration
  (nomic-embed-text, mxbai-embed-large) and an embed(text, model?) method
  that calls Ollama's /api/embeddings endpoint. listModels() now returns
  both completion and embedding models. Prepares for M3-009 EmbeddingService.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 16:31:36 -05:00
parent cfdd2b679c
commit ad98755014
6 changed files with 313 additions and 7 deletions

View File

@@ -46,6 +46,7 @@
"dotenv": "^17.3.1",
"fastify": "^5.0.0",
"node-cron": "^4.2.1",
"openai": "^6.32.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.0",
"socket.io": "^4.8.0",