Skip to content

fix: honor custom provider context in web model info - #15060

Open
qsunyi wants to merge 1 commit into
NousResearch:mainfrom
qsunyi:fix/web-model-info-custom-provider-context
Open

fix: honor custom provider context in web model info#15060
qsunyi wants to merge 1 commit into
NousResearch:mainfrom
qsunyi:fix/web-model-info-custom-provider-context

Conversation

@qsunyi

@qsunyi qsunyi commented Apr 24, 2026

Copy link
Copy Markdown

Summary

  • make /api/model/info honor per-model context_length from custom providers
  • add a regression test covering a custom provider like roy/gpt-5.4

Test Plan

  • bash scripts/run_tests.sh tests/hermes_cli/test_web_server.py -k custom_provider_context_length
  • bash scripts/run_tests.sh tests/hermes_cli/test_web_server.py

@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 Apr 24, 2026
@alt-glitch alt-glitch added the comp/dashboard Web dashboard / control panel UI (dashboard/, landing) label Jun 27, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for covering a real dashboard/runtime mismatch. Current main still has the gap: get_model_info() reads only model.context_length at hermes_cli/web_server.py:5140 and calls metadata resolution without custom providers at hermes_cli/web_server.py:5153-5158.

Problems

  • The added resolver duplicates the canonical get_custom_provider_context_length() helper at hermes_cli/config.py:5092. Its break paths differ from the shared helper's malformed-entry handling at hermes_cli/config.py:5133-5153, so the two paths can disagree.
  • The new elif provider guard is narrower than runtime resolution: agent/agent_init.py:1668-1678 resolves matching custom-provider overrides from model and base URL without that guard.
  • The regression test covers providers only. The shared helper supports legacy custom_providers as well (hermes_cli/config.py:5118-5125).

Suggested changes

  • Reuse get_custom_provider_context_length(model=model_name, base_url=base_url, config=cfg) directly and report its result as the config-derived override.
  • Add the same endpoint contract for both compatible configuration forms.

The linked #10690 discussion also recommended consolidating this bug class around the shared resolver. This is an automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 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 comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform 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.

3 participants