Skip to content

fix(cli): prompt reasoning after provider route changes - #110468

Open
ehz0ah wants to merge 1 commit into
NousResearch:mainfrom
ehz0ah:fix/cli-reasoning-picker-context
Open

fix(cli): prompt reasoning after provider route changes#110468
ehz0ah wants to merge 1 commit into
NousResearch:mainfrom
ehz0ah:fix/cli-reasoning-picker-context

Conversation

@ehz0ah

@ehz0ah ehz0ah commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

hermes model skipped the reasoning-effort prompt when a user changed providers but kept the same model ID. The post-picker check only compared model.default, so it treated a real route change as a no-op.

Track the effective provider route before the picker and compare it with the route persisted by the selected flow. Provider aliases and casing remain equivalent, while named custom endpoints, direct custom endpoint changes, and nested flows such as Bedrock API Key are handled as distinct routes. Capability lookup now uses the persisted route instead of the outer picker row.

This is a regression from the model-picker reasoning work merged in #110346. No separate issue currently tracks it.

Related Issue

No linked issue.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Preserve the pre-pick model, provider, base URL, and canonical picker route.
  • Prompt when the effective model route changes, even if the model ID is unchanged.
  • Suppress prompts for alias-only, case-only, and unchanged route selections.
  • Use the persisted provider identity for route-specific reasoning capabilities.
  • Add regressions for provider-only switches, legacy and direct custom endpoints, Bedrock API Key routing, and equivalent provider aliases.

How to Test

  1. Run scripts/run_tests.sh tests/hermes_cli/test_reasoning_effort_menu.py -q.
  2. Run the related model-picker, custom-provider, Bedrock, and reasoning suites listed below.
  3. Verify a same-model provider change prompts for reasoning, while an alias-only re-selection does not.

Related suite executed:

scripts/run_tests.sh \
  tests/hermes_cli/test_reasoning_effort_menu.py \
  tests/hermes_cli/test_main_model_custom_provider_normalization.py \
  tests/hermes_cli/test_custom_provider_identity.py \
  tests/hermes_cli/test_custom_provider_model_switch.py \
  tests/hermes_cli/test_bedrock_model_picker.py \
  tests/hermes_cli/test_bedrock_mantle_key_env.py \
  tests/hermes_cli/test_model_picker_excluded_providers.py \
  tests/hermes_cli/test_model_validation.py \
  tests/hermes_cli/test_nous_reasoning_metadata.py \
  tests/hermes_cli/test_openrouter_reasoning_metadata.py -q

Result: 146 passed.

Also passed:

.venv/bin/ruff check hermes_cli/main.py hermes_cli/main_provider_setup.py tests/hermes_cli/test_reasoning_effort_menu.py
.venv/bin/python -m compileall -q hermes_cli/main.py hermes_cli/main_provider_setup.py tests/hermes_cli/test_reasoning_effort_menu.py
git diff --check upstream/main...HEAD

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

Not applicable. This changes interactive CLI control flow and includes behavioral regression coverage.

@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 Sep 14, 2026
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.

2 participants