[Bug] Model picker creates duplicate provider:custom entries in models.json with wrong baseUrl
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:
{
"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
- Configure two providers with different base URLs
- Open the desktop app
- Use model dropdown to add or switch to a different provider's model
- Check
HERMES_HOME/models.json— the previous model now has aprovider: "custom"duplicate with wrongbaseUrl
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)
Source: fathah/hermes-desktop