Fix timeouts for named custom providers - #33153
Open
bainianlaoyao wants to merge 1 commit into
Open
bainianlaoyao wants to merge 1 commit into
bainianlaoyao wants to merge 1 commit into
Conversation
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for isolating the normalized-custom timeout regression; current main still has the reported primary-path bug (run_agent.py:1253 → hermes_cli/timeouts.py:56-69).
Problems
- The proposed helper uses
config.model.provideras the identity source. Runtime resolution already preserves the actual requested identity (hermes_cli/runtime_provider.py:1612-1619), so the config value can differ from the provider selected for this call. - This leaves a verified sibling path unfixed: fallback activation keeps
custom:nameinfb_provider(agent/chat_completion_helpers.py:1378), assigns it toagent.provider(:1507), then callsget_provider_request_timeout(fb_provider, fb_model)(:1554). The PR only translates an ID exactly equal tocustom, soproviders.custom:namestill does not resolve toproviders.name.
Suggested changes
- Carry the resolver's
requested_providerinto the agent and use it as the config lookup identity for named custom providers. - Add production-path tests for primary, explicit, and fallback named custom selections.
Automated hermes-sweeper review.
| if isinstance(direct_config, dict): | ||
| return direct_config | ||
|
|
||
| if provider_id != "custom" or not isinstance(config, dict): |
Collaborator
There was a problem hiding this comment.
This only handles the generic runtime label custom. Fallback activation can pass custom:name directly to the timeout helper (agent/chat_completion_helpers.py:1378,1554), so this branch is skipped and the lookup remains providers["custom:name"]. Resolve the actual runtime requested-provider identity and normalize custom:name to name instead.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
custommodel.provider: custom:<name>Test
uv run --extra dev pytest tests/hermes_cli/test_timeouts.py