fix(doctor): recognize OPENAI_API_KEY custom endpoint config
This commit is contained in:
17
tests/hermes_cli/test_doctor.py
Normal file
17
tests/hermes_cli/test_doctor.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Tests for hermes doctor helpers."""
|
||||
|
||||
from hermes_cli.doctor import _has_provider_env_config
|
||||
|
||||
|
||||
class TestProviderEnvDetection:
|
||||
def test_detects_openai_api_key(self):
|
||||
content = "OPENAI_BASE_URL=http://localhost:1234/v1\nOPENAI_API_KEY=sk-test-key\n"
|
||||
assert _has_provider_env_config(content)
|
||||
|
||||
def test_detects_custom_endpoint_without_openrouter_key(self):
|
||||
content = "OPENAI_BASE_URL=http://localhost:8080/v1\n"
|
||||
assert _has_provider_env_config(content)
|
||||
|
||||
def test_returns_false_when_no_provider_settings(self):
|
||||
content = "TERMINAL_ENV=local\n"
|
||||
assert not _has_provider_env_config(content)
|
||||
Reference in New Issue
Block a user