Skip to content

fix(desktop): preserve named custom model providers - #45075

Closed
ivankhokholkov wants to merge 1 commit into
NousResearch:mainfrom
ivankhokholkov:fix/desktop-named-custom-provider-pr
Closed

fix(desktop): preserve named custom model providers#45075
ivankhokholkov wants to merge 1 commit into
NousResearch:mainfrom
ivankhokholkov:fix/desktop-named-custom-provider-pr

Conversation

@ivankhokholkov

Copy link
Copy Markdown

Summary

  • preserve named custom provider slugs such as custom:polza.ai in the Desktop model assignment API
  • prevent vendor-prefixed model IDs from incorrectly triggering the OpenRouter fallback
  • add a regression test covering the Desktop selection flow

Reproduction

  1. Configure a named OpenAI-compatible custom provider, for example Polza.ai.
  2. In Desktop Settings > Model, select that provider and a vendor-prefixed model such as deepseek/deepseek-v4-flash.
  3. Click Apply.
  4. Observe that model.provider is persisted as openrouter, so Gateway reports missing OpenRouter credentials.

Root cause

_normalize_main_model_assignment treated every provider absent from the built-in registry as a possible model vendor. Named custom provider slugs are user-defined and therefore absent from that registry, so models containing / caused the provider to be rewritten to the current aggregator or OpenRouter.

Verification

  • pytest tests/hermes_cli/test_web_server.py -q: 274 passed
  • ruff check hermes_cli/web_server.py tests/hermes_cli/test_web_server.py: passed
  • npm --prefix apps/desktop run build: passed
  • runtime resolution verified for custom:polza.ai with its configured base URL and credential pool

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 12, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #45069 — identical fix (preserve custom: provider slugs in _normalize_main_model_assignment, same file hermes_cli/web_server.py); #45069 was opened ~9 min earlier.

Copy link
Copy Markdown

Thanks for flagging this. Confirmed that #45069 addresses the same root cause. This PR also includes a focused regression test for custom:polza.ai with a vendor-prefixed model ID, in case that test is useful to cherry-pick. Closing in favor of #45069.

@ivankhokholkov

ivankhokholkov commented Jun 12, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants