feat(llm): прокси до LLM и ключ OPENROUTER_API_KEY — OpenRouter для агента логов
CI / ruff · mypy · pytest (pull_request) Successful in 2m44s

- LLM_PROXY_URL (SecretStr): запросы к LLM через HTTP/SOCKS-прокси — OpenRouter
  не принимает IP из РФ, как в meditron (OPENROUTER_PROXY_URL)
- ключ читается из LLM_API_KEY или OPENROUTER_API_KEY (первый важнее)
- .env.example, README, DEPLOY: настройка OpenRouter

Refs #52

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 14:09:19 +03:00
co-authored by Claude Opus 5.5
parent a0d48d8cbc
commit 38bb238651
6 changed files with 57 additions and 8 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
"""Any OpenAI-style `/chat/completions` endpoint: OpenAI, YandexGPT compatibility API, a local model server."""
"""Any OpenAI-style `/chat/completions` endpoint: OpenRouter, OpenAI, YandexGPT compatibility API, a local server."""
import asyncio
import logging
@@ -34,6 +34,7 @@ class OpenAICompatProvider:
headers={"Authorization": f"Bearer {settings.api_key.get_secret_value()}"},
timeout=settings.timeout,
transport=transport,
proxy=settings.proxy_url.get_secret_value() if settings.proxy_url else None,
)
async def aclose(self) -> None: