fix(oneshot): pass fallback_providers from profile config to AIAgent (#23368)#28409
Merged
Conversation
Salvages #23368 by @uzunkuyruk. Oneshot workers (e.g. kanban workers spawned via 'hermes -p <profile> chat -q ...') were not honouring the profile's fallback_providers / fallback_model chain because oneshot.py never read the config and never passed fallback_model= to AIAgent. Reads cfg.get('fallback_providers') (new list format) or cfg.get('fallback_model') (legacy single-dict) with the same normalization cli.py applies, then forwards as fallback_model=_fb.
4 tasks
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-argument-type |
1 |
First entries
hermes_cli/oneshot.py:324: [invalid-argument-type] invalid-argument-type: Argument to `AIAgent.__init__` is incorrect: Expected `dict[str, Any]`, found `(Any & ~AlwaysFalsy & ~Top[dict[Unknown, Unknown]]) | (list[Unknown] & ~AlwaysFalsy) | (list[Any & Top[dict[Unknown, Unknown]]] & ~AlwaysFalsy) | None`
✅ Fixed issues: none
Unchanged: 4625 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
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.
Salvages #23368 by @uzunkuyruk.
Oneshot workers (e.g. kanban workers spawned via
hermes -p <profile> chat -q ...) were not honouring the profile's fallback chain. Readsfallback_providers(new list format) orfallback_model(legacy single-dict) with the same normalization cli.py applies, then passes viafallback_model=to AIAgent.Original branch was stale; applied substantive change manually onto current main. Authorship preserved via rebase merge.