Skip to content

fix(oneshot): pass fallback_providers from profile config to AIAgent (#23368)#28409

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-de55f5dd
May 19, 2026
Merged

fix(oneshot): pass fallback_providers from profile config to AIAgent (#23368)#28409
teknium1 merged 1 commit into
mainfrom
hermes/hermes-de55f5dd

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

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. Reads fallback_providers (new list format) or fallback_model (legacy single-dict) with the same normalization cli.py applies, then passes via fallback_model= to AIAgent.

Original branch was stale; applied substantive change manually onto current main. Authorship preserved via rebase merge.

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.
@teknium1 teknium1 merged commit 666b66a into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-de55f5dd branch May 19, 2026 03:37
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-de55f5dd vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8814 on HEAD, 8813 on base (🆕 +1)

🆕 New issues (1):

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants