Fix DeepSeek-only tests after env file moves to the repo root.

Give the routing tests a dummy key so they do not require a live .env.
This commit is contained in:
2026-09-20 14:33:23 +02:00
parent c362ef8a56
commit a0a2f5bdbf
2 changed files with 6 additions and 2 deletions
@@ -362,8 +362,9 @@ class DeepSeekProvider(LLMProvider):
api_key = settings.deepseek_api_key
if not api_key:
raise RuntimeError(
"DEEPSEEK_API_KEY is not set. Copy backend/.env.example to "
"backend/.env and add a key from https://platform.deepseek.com/"
"DEEPSEEK_API_KEY is not set. Copy "
"periscope/dependency/backend/.env.example to .env at the "
"repo root and add a key from https://platform.deepseek.com/"
)
self._client = AsyncOpenAI(
api_key=api_key,
+3
View File
@@ -21,7 +21,10 @@ def restore_routing():
"provider_validation": settings.provider_validation,
"fallback_provider_validation": settings.fallback_provider_validation,
"fallback_model_validation": settings.fallback_model_validation,
"deepseek_api_key": settings.deepseek_api_key,
}
if not settings.deepseek_api_key:
settings.deepseek_api_key = "sk-test-not-called"
yield
for k, v in snap.items():
setattr(settings, k, v)