Claude Desktop Tweak Models
August 20, 2026 · View on GitHub
中文说明 | English
Author website · X · Bilibili · YouTube · Sponsor
A Windows-only helper for Claude Desktop. It relaxes Claude Desktop's local model ID validation for third-party Gateway / Mantle providers, so a provider can use its real model name, such as glm-5.2, instead of a route that must look like an Anthropic model.
This project is for Claude Desktop on Windows. It is not Claude Code and not Claude Web.
Choose by client: this project is specifically for Claude Desktop on Windows. ClawGod targets Claude Code, with a broader feature set and better maintenance. They serve different products and are not direct replacements.
The patch is still the simplest path when Claude Desktop accepts real third-party model IDs. If a Claude Desktop update breaks the patch, use the optional Hanako-style local router and expose the real upstream model as a Claude-looking model ID. See docs/hanako-style-router.zh-CN.md.
Note: router/ is currently an experimental universal-routing foundation. In this round it has only been checked locally for syntax, /status, and /v1/models; real Claude Desktop end-to-end traffic and real upstream provider calls have not been tested yet.
Scope
- It only handles Claude Desktop's local model ID validation issue.
- It does not request, store, print, or upload API keys.
- It does not create a third-party model service for you.
- It does not enable Developer Mode for you.
- Third-party model endpoints, pricing, reliability, and terms are controlled by their providers.
Project relationship notice
This project is not an official project of Anthropic, Claude, or any third-party model provider, and it is not part of the official Claude Desktop or Claude Code codebase. Names such as Claude, Anthropic, Gateway, Mantle, and Zhipu are used only to describe compatibility targets, configuration scenarios, and user interface labels. Users are responsible for checking that their own use complies with the terms of the software and model services they choose to use.
Quick use
Open PowerShell and run the one-line launcher from this repository:
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm 'https://raw.githubusercontent.com/Guojiz/claude-desktop-tweak-models/main/Run-Latest.ps1')"
The helper opens a small Windows UI. Click Detect to inspect your Claude Desktop installation, then Apply Patch to apply the change. Windows may ask for administrator permission.
After it finishes, reopen Claude Desktop and configure your provider in Claude Desktop's own third-party inference / models / providers page.
Recommended order
- Open Claude Desktop once.
- Enable Developer Mode in Claude Desktop settings.
- Open the third-party inference / models / providers page once.
- Run the one-line launcher above and click Apply Patch.
- Reopen Claude Desktop, then add or save your provider.
If you already ran the helper first, that is also fine. Apply the change, reopen Claude Desktop, enable Developer Mode, then configure the provider.
Optional local router
The optional router under router/ follows openhanako's provider routing shape: provider catalog, provider registry, composite { provider, id } model refs, and a runtime model projection. Claude sees a configurable model ID, while the router keeps the real upstream provider/model internally.
Use it when you want multiple providers, or when a Claude Desktop update makes real third-party model IDs fail again. The status page tells you exactly which Model ID to paste into Claude Desktop.
What it does
- Finds the installed Windows Claude Desktop package.
- Closes running Claude Desktop processes before making changes.
- Checks Claude Desktop's bundled frontend files.
- Adjusts the Gateway / Mantle model ID validation logic.
- Backs up changed files under
backups/<Claude package name>/. - Provides a simple UI with Detect, Apply Patch, and Restore buttons.
- Does not store, print, or request any API key.
What it does not do
- The patch tool itself does not create or run a local gateway. The optional router under
router/is separate. - It does not configure Zhipu, OpenAI-compatible, or Anthropic-compatible endpoints for you.
- It does not enable Developer Mode for you.
- It does not edit
hosts. - It does not disable Claude Desktop, Microsoft Store, or system updates.
Configure your provider
After applying the change, open Claude Desktop:
- Open Settings.
- Enable Developer Mode if needed.
- Open the third-party inference / models / providers section.
- Add your provider using Claude Desktop's own UI.
- Enter the provider's base URL, auth scheme, API key, and real model ID.
Example for a Claude-compatible Zhipu endpoint:
Provider: Gateway
Gateway base URL: https://open.bigmodel.cn/api/anthropic
Gateway auth scheme: bearer
Model ID: glm-5.2
Display name: GLM-5.2
Model discovery: off
Zhipu's Claude-compatible gateway documentation:
https://docs.bigmodel.cn/cn/guide/develop/claude/introduction
Console use
If you cloned the repository locally, you can also run the main script directly:
.\Patch-Claude-ThirdParty-Models.ps1
Common parameters:
.\Patch-Claude-ThirdParty-Models.ps1 -NoGui -DryRun
.\Patch-Claude-ThirdParty-Models.ps1 -NoGui -Revert
Protect-Claude-Zhipu-GLM52.ps1 is kept only as a legacy compatibility filename from the original GLM-5.2 test case.
Troubleshooting
- If Detect says Claude Desktop was not found, install Claude Desktop, open it once, then rerun the helper.
- If Apply Patch asks for administrator permission, approve it.
- If Claude updates later, rerun the helper because the changed files may be replaced.
- If the script says no known validation snippet was found, Claude Desktop changed its bundled structure and this matching rule needs an update.
Contributing
Issues, pull requests, and compatibility notes are welcome, especially for:
- Claude Desktop packaging changes;
- other Anthropic-compatible model provider examples;
- Windows version differences;
- clearer screenshots or troubleshooting notes;
- detection, restore, and documentation improvements.
Website and other links
No separate product site is required for this repository. The public face of the work is the author website, this GitHub repo, and the projects below.
| Author website | https://guojiz.github.io/ |
| X | https://x.com/guojizh |
| Bilibili | https://space.bilibili.com/3493114115263006 |
| YouTube | https://youtube.com/@guojizh |
| Sponsor | https://github.com/Guojiz/Sponsors |
Other open-source projects
- GitLearnOS — learner-owned Git memory
- Word Snap — bilingual vocabulary matching
- AI Subtitle Extractor
- Design Master
- AI Video Studio
- llm-provider-compat
- Claude Desktop Tweak Models
- All projects: github.com/Guojiz
License
MIT License. See LICENSE.