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:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user