feat(llm): прокси до LLM и ключ OPENROUTER_API_KEY — OpenRouter для агента логов
CI / ruff · mypy · pytest (pull_request) Successful in 2m44s
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user