Skip to content

fix(cli): discover keyless local LM Studio in pickers - #74079

Open
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/lmstudio-picker-discovery
Open

konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/lmstudio-picker-discovery

Conversation

@konsisumer

Copy link
Copy Markdown
Contributor

What changed and why

Per the thread's current-main reproduction, a default LM Studio server with authentication disabled was callable at runtime but hidden from picker surfaces until an unrelated LM_API_KEY or LM_BASE_URL signal was set. Interactive picker paths now probe the default loopback endpoint, treat a non-empty no-auth model response as a selectable local provider, and retain that explicitly marked discovery in the Desktop configured-provider view. Non-picker discovery still does not probe an unconfigured localhost server.

Addressing maintainer feedback

How to test

  1. Clear LM_API_KEY and LM_BASE_URL, configure a different active provider, and run LM Studio's server at http://127.0.0.1:1234 with a loaded chat model and auth disabled.
  2. Open a model picker in the CLI, TUI, Desktop, or gateway. Confirm LM Studio appears with the loaded model and can be selected.
  3. With no local LM Studio server, confirm non-picker provider listing does not attempt the default localhost probe.
  4. Run pytest tests/hermes_cli/test_model_switch_custom_providers.py tests/hermes_cli/test_inventory.py -q -x --timeout=60.

What platforms tested on

  • macOS (local development environment)

Fixes #41370

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jul 29, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused picker fix. The reported behavior is still present on current main: hermes_cli/model_switch.py:2055-2057 only probes LM Studio when LM_API_KEY, LM_BASE_URL, or the active provider supplies a signal. The PR's for_picker path directly addresses that current gate and preserves the non-picker behavior.

Problems

  • The regression-test hunks need rework before salvage. Against current main, git apply --check <(gh pr diff 74079 --repo NousResearch/hermes-agent) fails only for tests/hermes_cli/test_inventory.py:276 and tests/hermes_cli/test_model_switch_custom_providers.py:958; those test sections were removed by later test-pruning commits.

Suggested changes

  • Port the two behavior contracts to the current test layout: a default no-auth LM Studio server must appear through interactive picker inventory, while a non-picker listing must not probe the unconfigured default endpoint.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 30, 2026
@konsisumer

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and relocated the LM Studio picker regression contracts to the current test layout. Verified keyless default-server discovery through picker inventory and that non-picker listings do not probe an unconfigured localhost endpoint.

Local checks passed: the full pytest tests/ suite, both affected test modules (29 tests), scoped Ruff lint, Windows footguns, and git diff --check.

@konsisumer
konsisumer force-pushed the fix/lmstudio-picker-discovery branch from e491e77 to db3e25b Compare July 30, 2026 21:37
@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Summary

Two PRs address #41370 through different code paths: #41419 generalized keyless credential resolution and setup for local/private endpoints, while #74079 fixes the remaining LM Studio picker-discovery gate when neither an API key nor a base-URL override is configured.

Related pull requests

  • feat(auth): allow local/private-network providers without API key #41419 [closed] best fix — (+318/-15) — already implemented on main: this closed PR generalized no-auth placeholders and setup prompts for providers on local/private addresses, but it did not remove the picker-discovery gate reported for an inactive default LM Studio instance. It remains relevant as the broader credential-resolution approach, now covered by commit ee066b7 and the paths cited by the maintainer-bot verdict: hermes_cli/runtime_provider.py:1022, hermes_cli/runtime_provider.py:1175, tests/hermes_cli/test_runtime_provider_resolution.py:1859, and website/docs/integrations/providers.md:570.
  • fix(cli): discover keyless local LM Studio in pickers #74079 best fix — (+142/-13) — keep open with a salvage path: this focused diff adds picker-only probing of the default loopback LM Studio endpoint and retains successful keyless discovery in configured-provider views, while preserving the no-probe behavior for non-picker listings. Consistent with the maintainer-bot keep_open review, the contributor reports that the stale regression-test hunks were relocated onto current main and that both picker and non-picker behavior contracts now pass.

Suggested consolidation

Keep #74079 open with the concrete salvage path identified by the maintainer-bot review: preserve its picker-only default LM Studio discovery and the paired regression contracts proving picker visibility without unsolicited non-picker probing. Leave #41419 closed as already implemented on main via commit ee066b7; the PRs overlap on #41370 but are not duplicates because #41419 covers credential resolution whereas #74079 addresses the still-distinct picker gate.

Complex graph

flowchart LR
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    I41370(["issue #41370 (open)"])
    P74079["PR #74079 (open)"]
    P74079 -->|best fix| I41370
    class I41370 open
    class P74079 open
    class P74079 best
    class P74079 target
    click I41370 "https://github.com/NousResearch/hermes-agent/issues/41370"
    click P74079 "https://github.com/NousResearch/hermes-agent/pull/74079"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 2 pull requests and 1 issue in this complex. Diffs were read for 1 of 2 PRs (rest unavailable); Assessment working set: 16 kB of PR diffs, 5 kB of issue/PR text, 5 kB of discussion (5 comments), 5 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

@konsisumer

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main and resolved the in-scope test-placement conflict while retaining current-main custom-provider coverage. The PR remains confined to its original five files (142 additions, 13 deletions).

Local checks passed: 55 focused tests across the two affected modules, the bounded full pytest tests/ suite, scoped Ruff, Windows-footguns, and git diff --check.

@konsisumer
konsisumer force-pushed the fix/lmstudio-picker-discovery branch from db3e25b to 0b4e5ac Compare August 5, 2026 20:38
@konsisumer
konsisumer force-pushed the fix/lmstudio-picker-discovery branch from 0b4e5ac to 077dbdb Compare August 19, 2026 03:03
@konsisumer

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main and resolved the in-scope test-layout conflict while preserving the LM Studio picker and non-picker regression contracts. Also corrected two Windows encoding diagnostics in the same existing test file.

Local checks passed: both affected test modules, the bounded full pytest tests/ suite, scoped Ruff, Windows footguns, and git diff --check. The final PR diff remains confined to its original five files (144 additions, 15 deletions).

@konsisumer

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main and resolved the in-scope credential-gate conflict in hermes_cli/model_switch.py, preserving upstream keyless-provider support together with picker-only no-auth LM Studio discovery. The PR remains confined to its original five files (145 additions, 16 deletions).

Local checks passed: the four added regression contracts; all 87 tests in the two affected modules (the final node was rerun independently); scoped Ruff; Windows footguns; and git diff --check. The bounded full pytest tests/ run was started but did not report a completion result in this environment.

@konsisumer
konsisumer force-pushed the fix/lmstudio-picker-discovery branch from 077dbdb to 2ef6afe Compare August 22, 2026 00:38
@alt-glitch alt-glitch added the area/local-models Local model inference/runtimes: llama.cpp, Ollama, LM Studio, MLX/vLLM, GGUF, VRAM and offload label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/local-models Local model inference/runtimes: llama.cpp, Ollama, LM Studio, MLX/vLLM, GGUF, VRAM and offload 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-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Local model providers without API key

4 participants