fix: handle list fallback_model config in streaming#1339
Closed
jimdawdy-hub wants to merge 1 commit intonesquena:masterfrom
Closed
fix: handle list fallback_model config in streaming#1339jimdawdy-hub wants to merge 1 commit intonesquena:masterfrom
jimdawdy-hub wants to merge 1 commit intonesquena:masterfrom
Conversation
When fallback_model is a list (chained fallback), the code called .get() directly on the list, causing: 'list' object has no attribute 'get'. Normalize both single-dict (legacy) and list (chained) formats, using the first valid entry as the fallback passed to AIAgent. Also reads fallback_providers (newer config key) in addition to fallback_model.
Collaborator
|
Shipped in v0.50.246 via batch release PR #1343 (merge commit Released alongside 4 other contributor fixes — see the v0.50.246 entry in CHANGELOG.md. |
pull Bot
pushed a commit
to JamesWilliam1977/hermes-webui
that referenced
this pull request
Apr 30, 2026
…single fallback_model dict From PR nesquena#1339. Co-authored-by: Jim Dawdy <[email protected]>
pull Bot
pushed a commit
to JamesWilliam1977/hermes-webui
that referenced
this pull request
Apr 30, 2026
fallback list - tests/test_issue765_streaming_persistence.py — replace timing-based polling in test_checkpoint_fires_on_activity_counter_increment with deterministic threading.Event-driven sync. The old version used time.sleep(0.15)+(0.25)+(0.25) with a 0.1s polling thread, which under CI scheduling jitter could miss the second increment and complete with only 1 save instead of 2. Now waits up to 3.0s for save_count to advance to the target after each increment. Locally observed flake on Python 3.11 in CI run 25175204451. - tests/test_pr1339_fallback_providers_list.py — new structural test that asserts streaming.py handles both legacy fallback_model (single dict) and new fallback_providers (list form) without calling .get() on a list. Three assertions: both keys consulted, list-form has explicit isinstance check, _fallback_resolved defaults to None.
pull Bot
pushed a commit
to JamesWilliam1977/hermes-webui
that referenced
this pull request
Apr 30, 2026
Combines: - 4 contributor PRs (nesquena#1335 user fenced code, nesquena#1337 mermaid+cache-bust, nesquena#1339 fallback_providers list, nesquena#1341 context_length persistence) - Self-built nesquena#1338 (cancel data-loss + activity panel) — already independently APPROVED by nesquena before absorption - CONTRIBUTORS.md and markdown refresh from nesquena#1340 See CHANGELOG.md for the full list with author credit.
GeoffBao
pushed a commit
to GeoffBao/hermes-webui
that referenced
this pull request
May 1, 2026
…single fallback_model dict From PR nesquena#1339. Co-authored-by: Jim Dawdy <[email protected]>
GeoffBao
pushed a commit
to GeoffBao/hermes-webui
that referenced
this pull request
May 1, 2026
fallback list - tests/test_issue765_streaming_persistence.py — replace timing-based polling in test_checkpoint_fires_on_activity_counter_increment with deterministic threading.Event-driven sync. The old version used time.sleep(0.15)+(0.25)+(0.25) with a 0.1s polling thread, which under CI scheduling jitter could miss the second increment and complete with only 1 save instead of 2. Now waits up to 3.0s for save_count to advance to the target after each increment. Locally observed flake on Python 3.11 in CI run 25175204451. - tests/test_pr1339_fallback_providers_list.py — new structural test that asserts streaming.py handles both legacy fallback_model (single dict) and new fallback_providers (list form) without calling .get() on a list. Three assertions: both keys consulted, list-form has explicit isinstance check, _fallback_resolved defaults to None.
GeoffBao
pushed a commit
to GeoffBao/hermes-webui
that referenced
this pull request
May 1, 2026
Combines: - 4 contributor PRs (nesquena#1335 user fenced code, nesquena#1337 mermaid+cache-bust, nesquena#1339 fallback_providers list, nesquena#1341 context_length persistence) - Self-built nesquena#1338 (cancel data-loss + activity panel) — already independently APPROVED by nesquena before absorption - CONTRIBUTORS.md and markdown refresh from nesquena#1340 See CHANGELOG.md for the full list with author credit.
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.
Problem
When
fallback_modelis configured as a list (chained fallback), the WebUI crashes with:api/streaming.pycalls.get()directly on the value, but lists dont have.get(). Hermes Agent supports both formats:Fix
Normalize both list and dict formats in
api/streaming.py:fallback_modelis a list, iterate to find the first valid entryfallback_providers(newer config key) in addition tofallback_model