diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 13337316e0..772025845d 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -2205,6 +2205,7 @@ def _normalize_custom_provider_entry( "name", "api", "url", "base_url", "api_key", "key_env", "api_mode", "transport", "model", "default_model", "models", "context_length", "rate_limit_delay", + "request_timeout_seconds", "stale_timeout_seconds", } for camel, snake in _CAMEL_ALIASES.items(): if camel in entry and snake not in entry: diff --git a/tests/hermes_cli/test_provider_config_validation.py b/tests/hermes_cli/test_provider_config_validation.py index ffc036b31b..cbfffea785 100644 --- a/tests/hermes_cli/test_provider_config_validation.py +++ b/tests/hermes_cli/test_provider_config_validation.py @@ -82,7 +82,7 @@ class TestNormalizeCustomProviderEntry: """Unknown config keys should produce a warning.""" entry = { "base_url": "https://api.example.com/v1", - "api_key": "sk-test-key", + "api_key": "***", "unknownField": "value", "anotherBad": 42, } @@ -91,6 +91,19 @@ class TestNormalizeCustomProviderEntry: assert result is not None assert any("unknown config keys" in r.message.lower() for r in caplog.records) + def test_timeout_keys_not_flagged_unknown(self, caplog): + """request_timeout_seconds and stale_timeout_seconds should not produce warnings.""" + entry = { + "base_url": "https://api.example.com/v1", + "api_key": "***", + "request_timeout_seconds": 300, + "stale_timeout_seconds": 900, + } + with caplog.at_level(logging.WARNING): + result = _normalize_custom_provider_entry(entry, provider_key="test") + assert result is not None + assert not any("unknown config keys" in r.message.lower() for r in caplog.records) + def test_camel_case_warning_logged(self, caplog): """camelCase alias mapping should produce a warning.""" entry = {