Skip to content

fix: Python 3.9 compatibility, CLI MEDIA tags, model switch for custom providers#13789

Open
vominh1919 wants to merge 1 commit into
NousResearch:mainfrom
vominh1919:fix/python39-compatibility-cli-media-tags
Open

fix: Python 3.9 compatibility, CLI MEDIA tags, model switch for custom providers#13789
vominh1919 wants to merge 1 commit into
NousResearch:mainfrom
vominh1919:fix/python39-compatibility-cli-media-tags

Conversation

@vominh1919

Copy link
Copy Markdown
Contributor

Fixes

Changes

Issue #13766 - CLI MEDIA tags

  • agent/prompt_builder.py: Extend CLI platform hint to prevent MEDIA: tag emission
    • Added: "IMPORTANT: There is NO attachment channel on the CLI. Do NOT emit MEDIA:/path tags"

Issue #13765 - Python 3.9 compatibility

  • 64 files: Add from __future__ import annotations for Python 3.9 PEP-604 syntax support
  • Eliminates ImportError on /model command when system Python is 3.9

Issue #13764 - Model switch custom providers

  • cli.py: Load custom_providers unconditionally (not just for picker)
  • hermes_cli/model_switch.py:
    • Add _find_model_in_custom_providers() helper function
    • Insert step c2 in PATH B to search custom_providers before aggregator conversion
    • Extend is_custom guard to cover custom:* slugs
  • hermes_cli/models.py: normalize_provider() handles custom:* slugs

Testing

  • Python 3.9: ✓ modules import without error
  • Python 3.11: ✓ All unit tests passing
  • /model command: now works with bare model names on custom providers

…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
@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 comp/agent Core agent loop, run_agent.py, prompt builder labels Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder 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.

2 participants