Skip to content

test(model): isolate custom-provider grouping tests from live discovery - #62421

Closed
virtualex-itv wants to merge 1 commit into
NousResearch:mainfrom
virtualex-itv:alex/pr-model-switch-invariants-20260710
Closed

virtualex-itv wants to merge 1 commit into
NousResearch:mainfrom
virtualex-itv:alex/pr-model-switch-invariants-20260710

Conversation

@virtualex-itv

Copy link
Copy Markdown
Contributor

Summary

  • Disable live custom-provider probing in three model-picker tests whose assertions cover configured grouping behavior.
  • Keep the existing dedicated live-probe tests unchanged.
  • Make the grouping suite deterministic on hosts that run a real Ollama or OpenAI-compatible endpoint at the fixture URL.

Problem

Three tests build custom-provider fixtures around http://localhost:11434/v1 and assert the configured model names, grouping, and total model count. list_authenticated_providers() may probe that endpoint by default. On a machine with Ollama listening there, live models replace the fixture models and the tests fail based on the host's current catalog rather than the invariant they are named for.

On untouched origin/main, the hermetic wrapper reproduced exactly three failures:

  • test_list_authenticated_providers_groups_same_endpoint
  • test_list_authenticated_providers_distinct_endpoints_stay_separate
  • test_list_authenticated_providers_total_models_reflects_grouped_count

Baseline result: 38 passed, 3 failed.

Fix

Pass probe_custom_providers=False in those three tests. This keeps their inputs limited to the configured fixtures while preserving live discovery coverage in the probe-specific tests elsewhere in the same file.

Verification

python scripts/run_tests_parallel.py tests/hermes_cli/test_model_switch_custom_providers.py -q
git diff --check origin/main...HEAD

Result:

  • 41 passed, 0 failed
  • git diff --check passed

Scope and risk

  • Test-only change: three added keyword arguments in one file.
  • No production behavior changes.
  • Dedicated probe behavior coverage remains enabled.

@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels Jul 11, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

This is a sound, narrow test-isolation change. Current main defaults probe_custom_providers=True in hermes_cli/model_switch.py:1462; its custom-provider path probes authenticated endpoint rows and replaces configured models with a non-empty live catalog at hermes_cli/model_switch.py:2326-2343. The three affected grouping tests instead assert configured fixture models for http://localhost:11434/v1 (for example tests/hermes_cli/test_model_switch_custom_providers.py:648-678).

Dedicated live-probe coverage remains present at tests/hermes_cli/test_model_switch_custom_providers.py:336-369, so the proposed probe_custom_providers=False calls isolate only static grouping invariants.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 11, 2026
@virtualex-itv
virtualex-itv force-pushed the alex/pr-model-switch-invariants-20260710 branch 2 times, most recently from 3a528d1 to 3c2b0b0 Compare July 13, 2026 19:02
@virtualex-itv
virtualex-itv force-pushed the alex/pr-model-switch-invariants-20260710 branch from 3c2b0b0 to 72c0220 Compare July 16, 2026 12:18
@virtualex-itv

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (a79b818); diff unchanged (+3), focused suite 41/41 green.

@teknium1

Copy link
Copy Markdown
Collaborator

Merged via PR #67921 — your commit was cherry-picked onto current main with your authorship preserved in git log. Thanks for the clean hermeticity fix and the repro documentation!

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 P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants