fix: Python 3.9 compatibility, CLI MEDIA tags, model switch for custom providers - #13789
fix: Python 3.9 compatibility, CLI MEDIA tags, model switch for custom providers#13789vominh1919 wants to merge 1 commit into
Conversation
…m providers Fixes: - NousResearch#13766: CLI agents no longer emit MEDIA:/path tags (CLI has no attachment channel) - NousResearch#13765: Add 'from __future__ import annotations' to 64 files for Python 3.9 PEP-604 compatibility - NousResearch#13764: Model switch now searches custom_providers catalog before API probe Changes: - agent/prompt_builder.py: Extend CLI platform hint to prevent MEDIA: tag emission - cli.py: Load custom_providers unconditionally (not just for picker) - hermes_cli/model_switch.py: Add _find_model_in_custom_providers() helper, insert step c2 in PATH B - hermes_cli/models.py: normalize_provider() handles custom:* slugs - 64 files: Add 'from __future__ import annotations' for Python 3.9 compatibility
|
Thanks for collecting fixes for three real user-facing areas. Problems
Suggested changes
Automated hermes-sweeper review. |
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Four open PRs share essentially the same large, unrelated 69-file parent diff, while their stated fixes target different causes. #13789 combines superseded CLI MEDIA handling, unsupported Python 3.9 compatibility work, and flawed custom-provider routing; #15554 adds a valid QQ dispatch wrapper change at an obsolete path, #15556 adds a valid but incomplete browser-vision None guard, and #15557 amends an RL module removed from current main.
Related pull requests
- #13789
related— (+1680/-343) — close without merge: the CLI MEDIA fix and configured-model routing are already implemented on current main, Python 3.9 is outside the declared >=3.11 support range, and the custom-provider helper reads the wrong schema fields and does not actually skip the following conversion path. Despite the keep_open review on #13789, its own contributor analysis identifies these portions as superseded or unsafe to apply verbatim and assigns no salvageable scope. - #15554
related— (+1681/-344) — salvage as a new focused change: replacing bare asyncio.create_task with the adapter wrapper addresses the reported synchronous-dispatch failure, but this diff edits the pre-rename gateway/platforms/qqbot.py and carries the unrelated 69-file parent. Consistent with the keep_open review on #15554, transplant the one-line fix to gateway/platforms/qqbot/adapter.py and add synchronous message-event regression coverage before merge. - #15556
related— (+1683/-344) — salvage as a focused class-wide fix: guarding response.choices[0].message prevents the stated None dereference in Camofox, but the same unsafe access remains in tools/browser_tool.py and the PR includes the unrelated shared parent without a message=None regression test. Consistent with the keep_open review on #15556, retain the targeted idea while covering both browser-vision backends and adding the missing test. - #15557
related— (+1683/-343) — close without merge: the three RunState declarations only modify tools/rl_training_tool.py, which has been removed from current main together with the RL integration, so there is no live symbol or assignment to fix. Despite the keep_open review on #15557, the current-main diff evidence leaves no salvageable target; any future RL restoration must be proposed against the then-current architecture.
Duplicates
#13789, #15554, #15556, and #15557 substantially duplicate the same unrelated 69-file parent change set; their small stated fixes are otherwise distinct from one another.
Suggested consolidation
Merge none of these PRs as submitted. Close #13789 and #15557; replace #15554 with a minimal adapter.py wrapper fix plus dispatch regression test, and replace #15556 with a minimal two-backend None-message guard plus regression tests, then close the original broad PRs once those scoped replacements exist.
Cross-PR triage: Reviewed 4 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 743 kB of PR diffs, 3 kB of issue/PR text, 5 kB of discussion (4 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
Fixes
MEDIA:/pathtags (CLI has no attachment channel)from __future__ import annotationsto 64 files for Python 3.9 PEP-604 compatibilityChanges
Issue #13766 - CLI MEDIA tags
agent/prompt_builder.py: Extend CLI platform hint to prevent MEDIA: tag emissionIssue #13765 - Python 3.9 compatibility
from __future__ import annotationsfor Python 3.9 PEP-604 syntax support/modelcommand when system Python is 3.9Issue #13764 - Model switch custom providers
cli.py: Loadcustom_providersunconditionally (not just for picker)hermes_cli/model_switch.py:_find_model_in_custom_providers()helper functionis_customguard to covercustom:*slugshermes_cli/models.py:normalize_provider()handlescustom:*slugsTesting
/modelcommand: now works with bare model names on custom providers