fix(doctor): recognize OPENAI_API_KEY custom endpoint config
This commit is contained in:
parent
b4fbb6fe10
commit
5609117882
2 changed files with 39 additions and 6 deletions
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue