hermes - ✅(Solved) Fix Provider validator's _KNOWN_KEYS is missing request_timeout_seconds / stale_timeout_seconds [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16779Fetched 2026-04-28 06:50:48
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×3commented ×1

The providers-entry validator in hermes_cli/config.py:2187-2191 has a _KNOWN_KEYS set that's out of sync with both the documented config example and the runtime code: it warns on request_timeout_seconds and stale_timeout_seconds as "unknown config keys ignored" even though those are valid keys read by hermes_cli/timeouts.py.

Net effect: the keys still work at runtime (the validator only warns, doesn't strip), but every CLI invocation prints noisy warnings for any user who follows the documented example.

Root Cause

(Filed as a separate issue from #16767 because the runtime impact is purely cosmetic / log-noise — the keys functionally work today.)

PR fix notes

PR #16786: fix(config): accept request_timeout_seconds / stale_timeout_seconds in providers entries (#16779)

Description (problem / solution / changelog)

Summary

  • _normalize_custom_provider_entry()'s _KNOWN_KEYS set was missing request_timeout_seconds and stale_timeout_seconds, both of which are valid runtime keys and are documented in cli-config.yaml.example.
  • Result: every CLI invocation that follows the documented example prints a spurious unknown config keys ignored: request_timeout_seconds, stale_timeout_seconds warning, even though hermes_cli/timeouts.py reads and applies both keys correctly.
  • Fix: add the two keys to _KNOWN_KEYS. One-line addition, plus a regression test.

The bug

hermes_cli/config.py:2187-2191 (pre-fix):

_KNOWN_KEYS = {
    "name", "api", "url", "base_url", "api_key", "key_env",
    "api_mode", "transport", "model", "default_model", "models",
    "context_length", "rate_limit_delay",
}

But hermes_cli/timeouts.py reads:

  • request_timeout_seconds at line 40 (get_provider_request_timeout).
  • stale_timeout_seconds at lines 65 and 69 (get_provider_stale_timeout).

And cli-config.yaml.example documents both keys under the top-level providers: block (request_timeout_seconds: 300, stale_timeout_seconds: 900, etc.).

So users following the documented example see the validator complain about keys it actually accepts. That's not just noise: a "validator" warning telling users a key is "ignored" trains them to delete keys that are in fact load-bearing for their endpoint behavior.

The fix

Add both keys to the existing _KNOWN_KEYS set in _normalize_custom_provider_entry(). No other path needs changing — the runtime readers in timeouts.py already do the right thing.

Test plan

  • Focused regression test: test_timeout_keys_not_warned in tests/hermes_cli/test_provider_config_validation.py — asserts a providers entry with both timeout keys produces zero "unknown config keys" warnings.
  • Adjacent suite: full tests/hermes_cli/test_provider_config_validation.py — 17 passed (16 existing + 1 new).
  • Regression guard: with only the test added (no _KNOWN_KEYS change), the test fails with AssertionError: ... got: ['providers.myhost: unknown config keys ignored: request_timeout_seconds, stale_timeout_seconds']. With the one-line fix applied, the test passes. So the test is genuinely guarding the runtime contract.

Related

  • Fixes #16779.
  • The runtime support for these keys landed in #12652 (request_timeout_seconds) and #12891 (stale_timeout_seconds); only the validator was out of sync.

Changed files

  • hermes_cli/config.py (modified, +1/-0)
  • tests/hermes_cli/test_provider_config_validation.py (modified, +23/-0)

PR #16812: fix(config): add request_timeout_seconds and stale_timeout_seconds to provider _KNOWN_KEYS (#16779)

Description (problem / solution / changelog)

Summary

The provider-entry validator in hermes_cli/config.py has a _KNOWN_KEYS set that's out of sync with both the documented config example and the runtime code. It warns on request_timeout_seconds and stale_timeout_seconds as "unknown config keys ignored" even though those are:

  1. Read at runtimehermes_cli/timeouts.py:40 reads provider_config.get("request_timeout_seconds") and :69 reads provider_config.get("stale_timeout_seconds")
  2. Documentedcli-config.yaml.example shows both keys in the providers: section

Fix

Add both keys to the _KNOWN_KEYS set (one-line change).

File changed: hermes_cli/config.py (+2 lines in set literal)

Impact

Eliminates false warnings for users who configure per-provider timeouts as documented. No behavioral change — the keys already work; this just stops the spurious warning.

Fixes #16779

Changed files

  • hermes_cli/config.py (modified, +1/-0)

Code Example

providers:
  my-endpoint:
    api: "http://localhost:8080/v1"
    default_model: "some-model"
    transport: "openai"
    request_timeout_seconds: 600   # documented in cli-config.yaml.example
    stale_timeout_seconds: 900

---

WARNING hermes_cli.config: providers.my-endpoint: unknown config keys ignored: request_timeout_seconds, stale_timeout_seconds

---

providers:
     ollama-local:
       request_timeout_seconds: 300
       stale_timeout_seconds: 900

---

_KNOWN_KEYS = {
       "name", "api", "url", "base_url", "api_key", "key_env",
       "api_mode", "transport", "model", "default_model", "models",
       "context_length", "rate_limit_delay",
   }

---

_KNOWN_KEYS = {
    "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",
}
RAW_BUFFERClick to expand / collapse

Summary

The providers-entry validator in hermes_cli/config.py:2187-2191 has a _KNOWN_KEYS set that's out of sync with both the documented config example and the runtime code: it warns on request_timeout_seconds and stale_timeout_seconds as "unknown config keys ignored" even though those are valid keys read by hermes_cli/timeouts.py.

Net effect: the keys still work at runtime (the validator only warns, doesn't strip), but every CLI invocation prints noisy warnings for any user who follows the documented example.

Reproduction

~/.hermes/config.yaml:

providers:
  my-endpoint:
    api: "http://localhost:8080/v1"
    default_model: "some-model"
    transport: "openai"
    request_timeout_seconds: 600   # documented in cli-config.yaml.example
    stale_timeout_seconds: 900

Run any hermes command. Observed in stderr:

WARNING hermes_cli.config: providers.my-endpoint: unknown config keys ignored: request_timeout_seconds, stale_timeout_seconds

Evidence the keys are valid

  1. Runtime reads themhermes_cli/timeouts.py:40 reads provider_config.get("request_timeout_seconds") and :69 reads provider_config.get("stale_timeout_seconds"). They're functional and applied to the OpenAI client.

  2. Example file documents themcli-config.yaml.example (top-level providers: section) shows:

    providers:
      ollama-local:
        request_timeout_seconds: 300
        stale_timeout_seconds: 900
  3. The warning sourcehermes_cli/config.py:2187-2191:

    _KNOWN_KEYS = {
        "name", "api", "url", "base_url", "api_key", "key_env",
        "api_mode", "transport", "model", "default_model", "models",
        "context_length", "rate_limit_delay",
    }

    Neither timeout key is in the set, so they fall through to the unknown branch at line 2200.

Suggested fix

One-line addition to _KNOWN_KEYS:

_KNOWN_KEYS = {
    "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",
}

A regression test could verify that providers config containing those keys parses without warnings (assert no caplog records at WARNING level for the providers normalizer).

Environment

  • Hermes Agent v0.11.0 (2026.4.23)
  • Python 3.11.14
  • Linux / Ubuntu

(Filed as a separate issue from #16767 because the runtime impact is purely cosmetic / log-noise — the keys functionally work today.)

extent analysis

TL;DR

Add request_timeout_seconds and stale_timeout_seconds to the _KNOWN_KEYS set in hermes_cli/config.py to silence unnecessary warnings.

Guidance

  • Verify the issue by checking the hermes_cli/config.py file and confirming that the _KNOWN_KEYS set does not include request_timeout_seconds and stale_timeout_seconds.
  • Update the _KNOWN_KEYS set with the suggested fix to prevent warnings for valid config keys.
  • Run a regression test to ensure that providers config containing the added keys parses without warnings.
  • Review the cli-config.yaml.example file to ensure it remains consistent with the updated _KNOWN_KEYS set.

Example

_KNOWN_KEYS = {
    "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",
}

Notes

This fix only addresses the cosmetic issue of unnecessary warnings and does not affect the functional behavior of the application.

Recommendation

Apply the suggested workaround by updating the _KNOWN_KEYS set, as it is a simple and effective solution to silence the unnecessary warnings.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING