[Bug] Model picker creates duplicate provider:custom entries in models.json with wrong baseUrl

Author: Remielle9Created Jul 16, 2026Updated Sep 7, 2026
Labelsbug

Describe the Bug

When using multiple providers with different base_urls (e.g., DeepSeek + GLM/Zhipu), the desktop app's model picker creates duplicate entries in models.json with provider: "custom" and the wrong baseUrl baked in.

Details

The models.json file is written by the Hermes One model library compatibility endpoint (hermes_cli/web_server.py_hermes_one_model_library_path()models.json).

After adding/switching to a GLM model in the desktop picker, models.json gains a duplicate entry:

json
{
  "name": "deepseek-v4-pro",
  "provider": "custom",
  "model": "deepseek-v4-pro",
  "baseUrl": "https://open.bigmodel.cn/api/paas/v4"
}

Now switching back to deepseek-v4-pro picks this custom entry first, sending requests to the wrong endpoint.

To Reproduce

  1. Configure two providers with different base URLs
  2. Open the desktop app
  3. Use model dropdown to add or switch to a different provider's model
  4. Check HERMES_HOME/models.json — the previous model now has a provider: "custom" duplicate with wrong baseUrl

Expected

Switching models should NOT create provider: "custom" duplicates or bake stale baseUrl values.

Workaround

Manually delete provider: "custom" entries from models.json.

Environment

  • OS: Windows 10
  • Providers: DeepSeek + zai (GLM/BigModel)