Repository navigation
fix(config): preserve request_timeout_seconds and stale_timeout_seconds in custom_providers normalization - #28869
Conversation
2404870 to
b815be9
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the fix. The core premise still holds on current main: hermes_cli/config.py:3803 accepts both timeout keys as known, but hermes_cli/config.py:3891-3895 only copies rate_limit_delay before moving on to discover_models.
Problems
- The PR fixes the runtime normalizer, but the legacy migration path still drops the same fields. hermes_cli/config.py:4474 migrates v11 custom_providers through _custom_provider_entry_to_provider_config, and hermes_cli/config.py:3921-3930 copies context_length/rate_limit_delay/etc. but not request_timeout_seconds or stale_timeout_seconds before hermes_cli/config.py:4491 removes custom_providers.
- The schema metadata set at hermes_cli/config.py:4128-4134 still omits both timeout keys even though hermes_cli/config.py:3803 treats them as supported custom provider fields.
Suggested changes
- Add both timeout fields to _custom_provider_entry_to_provider_config's copied field tuple and extend the migration coverage in tests/hermes_cli/test_config.py:750-814.
- Add both fields to _VALID_CUSTOM_PROVIDER_FIELDS, with a small invariant test near tests/hermes_cli/test_runtime_provider_resolution.py:2279.
Automated hermes-sweeper review.
| if isinstance(rate_limit_delay, (int, float)) and rate_limit_delay >= 0: | ||
| normalized["rate_limit_delay"] = rate_limit_delay | ||
|
|
||
| request_timeout_seconds = entry.get("request_timeout_seconds") |
There was a problem hiding this comment.
This preserves the runtime compatibility view, but current main also migrates legacy custom_providers through _custom_provider_entry_to_provider_config; please copy request_timeout_seconds and stale_timeout_seconds there too, otherwise v11->v12 migration still discards them before removing custom_providers.
|
Thanks for the focused normalization fix. The premise is verified on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
b815be9 to
1069610
Compare
|
Implemented the requested changes on current main:
The branch is now conflict free and mergeable. Relevant tests and Ruff pass. Thanks for the review. |
|
Implemented the requested follow-up on current
The branch is conflict-free and GitHub reports it as mergeable. The custom-provider compatibility tests and runtime-provider regression pass, and Ruff is clean. |
Bug
request_timeout_secondsandstale_timeout_secondsare accepted custom-provider keys, but currentmainsilently drops them from the runtime compatibility view. The v11 to v12 migration passes through the same normalizer and transfer helper, so it also deletes both values before removingcustom_providers.Fix
_normalize_custom_provider_entry().providers.<name>entry._VALID_CUSTOM_PROVIDER_FIELDSso config validation agrees with runtime behavior.Verification
scripts/run_tests.sh tests/hermes_cli/test_config.py -k TestCustomProviderCompatibility: 4 passed.scripts/run_tests.sh tests/hermes_cli/test_runtime_provider_resolution.py -k timeout_fields: 1 passed.A broader two-file Windows run reached 278 passing tests; the only two failures were existing
TestEnvWriteDenylistcases that expect lowercase POSIX environment names to remain case-sensitive on Windows, unrelated to this diff.