Skip to content

feat: auto-detect models from server probe in custom endpoint setup#4218

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5c3ebbce
Mar 31, 2026
Merged

feat: auto-detect models from server probe in custom endpoint setup#4218
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5c3ebbce

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Re-implements the custom endpoint model flow change from PR #4194 (by @sudoingX) against current main. The original PR couldn't be cherry-picked due to three recent refactors (#4165, #4172, #4182) that significantly changed _model_flow_custom.

What changed

_model_flow_custom now probes the server before asking for a model name and uses the results:

  • 1 model detected → prints the name and asks Use this model? [Y/n]: (Enter to confirm)
  • Multiple models → numbered list picker, or type a name directly
  • No models / probe failed → falls back to the existing manual input prompt

Context length prompt also moved after model selection — the user sees the verified endpoint status before being asked for details.

What's preserved (unchanged)

All three recent fixes in _model_flow_custom are untouched:

Affected paths

Both hermes model (via select_provider_and_model) and hermes setup (via setup_model_provider) call _model_flow_custom, so both get the improvement.

Tests

Updated test_model_flow_custom_saves_verified_v1_base_url to match the new input sequence (confirm detected model instead of typing it). 956 tests pass; 2 pre-existing test pollution failures unrelated to this change (confirmed same on clean main).

Credit: @sudoingX for the original idea and approach in PR #4194.

Custom endpoint setup (_model_flow_custom) now probes the server first
and presents detected models instead of asking users to type blind:

- Single model: auto-confirms with Y/n prompt
- Multiple models: numbered list picker, or type a name
- No models / probe failed: falls back to manual input

Context length prompt also moved after model selection so the user sees
the verified endpoint before being asked for details.

All recent fixes preserved: config dict sync (#4172), api_key
persistence (#4182), no save_env_value for URLs (#4165).

Inspired by PR #4194 by sudoingX — re-implemented against current main.
@teknium1 teknium1 merged commit 344239c into main Mar 31, 2026
4 of 5 checks passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…ousResearch#4218)

Custom endpoint setup (_model_flow_custom) now probes the server first
and presents detected models instead of asking users to type blind:

- Single model: auto-confirms with Y/n prompt
- Multiple models: numbered list picker, or type a name
- No models / probe failed: falls back to manual input

Context length prompt also moved after model selection so the user sees
the verified endpoint before being asked for details.

All recent fixes preserved: config dict sync (NousResearch#4172), api_key
persistence (NousResearch#4182), no save_env_value for URLs (NousResearch#4165).

Inspired by PR NousResearch#4194 by sudoingX — re-implemented against current main.

Co-authored-by: Xpress AI (Dip KD) <200180104+sudoingX@users.noreply.github.com>
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…ousResearch#4218)

Custom endpoint setup (_model_flow_custom) now probes the server first
and presents detected models instead of asking users to type blind:

- Single model: auto-confirms with Y/n prompt
- Multiple models: numbered list picker, or type a name
- No models / probe failed: falls back to manual input

Context length prompt also moved after model selection so the user sees
the verified endpoint before being asked for details.

All recent fixes preserved: config dict sync (NousResearch#4172), api_key
persistence (NousResearch#4182), no save_env_value for URLs (NousResearch#4165).

Inspired by PR NousResearch#4194 by sudoingX — re-implemented against current main.

Co-authored-by: Xpress AI (Dip KD) <200180104+sudoingX@users.noreply.github.com>
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…ousResearch#4218)

Custom endpoint setup (_model_flow_custom) now probes the server first
and presents detected models instead of asking users to type blind:

- Single model: auto-confirms with Y/n prompt
- Multiple models: numbered list picker, or type a name
- No models / probe failed: falls back to manual input

Context length prompt also moved after model selection so the user sees
the verified endpoint before being asked for details.

All recent fixes preserved: config dict sync (NousResearch#4172), api_key
persistence (NousResearch#4182), no save_env_value for URLs (NousResearch#4165).

Inspired by PR NousResearch#4194 by sudoingX — re-implemented against current main.

Co-authored-by: Xpress AI (Dip KD) <200180104+sudoingX@users.noreply.github.com>
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…ousResearch#4218)

Custom endpoint setup (_model_flow_custom) now probes the server first
and presents detected models instead of asking users to type blind:

- Single model: auto-confirms with Y/n prompt
- Multiple models: numbered list picker, or type a name
- No models / probe failed: falls back to manual input

Context length prompt also moved after model selection so the user sees
the verified endpoint before being asked for details.

All recent fixes preserved: config dict sync (NousResearch#4172), api_key
persistence (NousResearch#4182), no save_env_value for URLs (NousResearch#4165).

Inspired by PR NousResearch#4194 by sudoingX — re-implemented against current main.

Co-authored-by: Xpress AI (Dip KD) <200180104+sudoingX@users.noreply.github.com>
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…ousResearch#4218)

Custom endpoint setup (_model_flow_custom) now probes the server first
and presents detected models instead of asking users to type blind:

- Single model: auto-confirms with Y/n prompt
- Multiple models: numbered list picker, or type a name
- No models / probe failed: falls back to manual input

Context length prompt also moved after model selection so the user sees
the verified endpoint before being asked for details.

All recent fixes preserved: config dict sync (NousResearch#4172), api_key
persistence (NousResearch#4182), no save_env_value for URLs (NousResearch#4165).

Inspired by PR NousResearch#4194 by sudoingX — re-implemented against current main.

Co-authored-by: Xpress AI (Dip KD) <200180104+sudoingX@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants