# AI use cases for Uni Switch (dieqiyun/uni-switch)

Repo: [dieqiyun/uni-switch](https://github.com/dieqiyun/uni-switch) | Use cases: 4 | Page: https://dedupedai.com/use-cases/dieqiyun-uni-switch/

uni-switch is an open-source desktop app for Windows, Linux and macOS that manages API provider settings for Codex and Claude Code clients.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Switch Codex and Claude Code to a new API provider: https://dedupedai.com/use-cases/dieqiyun-uni-switch/switch-codex-claude-provider/
- Sync a provider's models and set context limits: https://dedupedai.com/use-cases/dieqiyun-uni-switch/sync-and-tune-provider-models/
- Edit ZCode, DSH or WorkBuddy config files with backups: https://dedupedai.com/use-cases/dieqiyun-uni-switch/edit-zcode-dsh-workbuddy-configs/
- Build and test Uni Switch from source: https://dedupedai.com/use-cases/dieqiyun-uni-switch/build-uni-switch-from-source/

## How to switch Codex and Claude Code to a new API provider with Uni Switch

Repo: [dieqiyun/uni-switch](https://github.com/dieqiyun/uni-switch) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Add a provider once with its API address and key, then switch between providers with one click.

**Who it is for:** A developer who has an API address and API Key from a provider and wants Codex or Claude Code to use it without editing config files by hand.

**The problem:** Setting up each client by hand means finding the right config files, the right protocol and the right model IDs for each provider.

**The outcome:** The provider is saved, the client is configured to use it, and the client restarts into a new conversation with the provider's models.

### Steps

1. Download the installer for your system from the GitHub Releases page, for example uni-switch_0.5.25_x64-setup.exe on Windows x64.
2. Open Uni Switch and select Codex or Claude Code on the left. For Claude Code, choose desktop or CLI.
3. Click 添加供应商, enter the API address and API Key, then click 添加并使用.
4. Restart the client as prompted and start a new conversation to confirm the model and thinking level.
5. To switch later, click 使用 on the provider's row.

### Prompt to paste into your agent

```text
Using the uni-switch project at github.com/dieqiyun/uni-switch, add a provider with API address <api-address> and the API key stored in <key-env-var>, then confirm the provider appears in use for the chosen client. Expected output: the provider listed as in use, with a note to restart the client and start a new conversation. Verify that the local config backup was created before the change.
```

### Caveat

Claude desktop third-party model support depends on the client's own Gateway support, and a successful build does not mean every client version was tested on real hardware.

Risk, credentials: Your API key is stored on your own machine, so keep the computer and its config backups private.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dieqiyun-uni-switch/switch-codex-claude-provider/

## How to sync a provider's models and set context limits with Uni Switch

Repo: [dieqiyun/uni-switch](https://github.com/dieqiyun/uni-switch) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Refresh the model list after a provider changes its models and set the default and context length for each.

**Who it is for:** A user whose API provider adds, removes or renames models and who needs Codex or Claude Code to use only the models that still exist.

**The problem:** Stale model lists send requests to models the provider no longer offers, and default models can point to models that were removed.

**The outcome:** The enabled model list matches the provider's current models, the default model is valid, and each model has its context length set.

### Steps

1. Open the provider and click 管理模型.
2. Click the sync action to load the current upstream models.
3. Choose which models stay enabled and select the default model.
4. Set the context length for each model. The default is 256k.
5. Confirm to save. Cancelling the dialog discards the draft and writes nothing.

### Prompt to paste into your agent

```text
Using the uni-switch project at github.com/dieqiyun/uni-switch, sync the model list for the provider <provider-name> and report which models were removed and which default model was chosen. Expected output: a list of enabled models and the new default. Verify that the default model is still present in the synced list.
```

### Caveat

Model names and thinking labels from the upstream provider do not guarantee what a model can actually do, so test important tasks after changing the list.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dieqiyun-uni-switch/sync-and-tune-provider-models/

## How to edit ZCode, DSH or WorkBuddy config files with backups with Uni Switch

Repo: [dieqiyun/uni-switch](https://github.com/dieqiyun/uni-switch) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

View the real config file for another client, edit it inside the app, and keep a backup before saving.

**Who it is for:** A user of ZCode, DSH (DeepSeek Harness) or WorkBuddy who wants to set up the client from its own config file and revert safely if something breaks.

**The problem:** Hand-editing a client config risks overwriting changes made elsewhere or breaking the file with no easy way back.

**The outcome:** The client config is updated after validation and backup, and the user knows to restart the client.

### Steps

1. Open Uni Switch and select ZCode, DSH or WorkBuddy.
2. Use the one-click setup to write the native config, or open the config file to edit it manually.
3. Edit the file in the app and save. The app validates the file and makes a backup first.
4. If the file was changed outside the app, review the conflict warning before you confirm an overwrite.
5. Restart the client as the app prompts, then check the new settings.

### Prompt to paste into your agent

```text
Using the uni-switch project at github.com/dieqiyun/uni-switch, show the current config path for the client <client-name> and the backup location created before any edit. Expected output: the config path and a backup file name. Verify that the backup exists before saving any change.
```

### Caveat

Automatic client restart is available only on Windows, so on macOS and Linux you must restart the client yourself after saving.

Risk, credentials: Config files for these clients can contain API keys, so do not paste the file contents into shared chats or tickets.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dieqiyun-uni-switch/edit-zcode-dsh-workbuddy-configs/

## How to build and test Uni Switch from source with Uni Switch

Repo: [dieqiyun/uni-switch](https://github.com/dieqiyun/uni-switch) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Install dependencies, run the checks and build the desktop app from the repository.

**Who it is for:** A developer who wants to audit, modify or contribute to Uni Switch and needs a local build that matches the released code.

**The problem:** Reviewing or changing the app requires a reproducible build and test run on your own machine.

**The outcome:** The frontend checks and Rust tests pass, and a desktop build is produced in the bundle output folder.

### Steps

1. Install Node.js 20 or newer, Rust 1.89 or newer, and the platform build tools named in the README.
2. Run `corepack enable` in the repository folder.
3. Run `corepack pnpm install --frozen-lockfile`.
4. Run `corepack pnpm typecheck` and `corepack pnpm test`.
5. Run `powershell -NoProfile -ExecutionPolicy Bypass -File scripts/with-msvc.ps1 -Action build` on Windows to create the installer.

### Prompt to paste into your agent

```text
Clone github.com/dieqiyun/uni-switch and run the frontend typecheck and tests with pnpm. Expected output: typecheck and test results with pass or fail counts. Verify that the lockfile install completed with --frozen-lockfile before running the tests.
```

### Caveat

The README gives the exact build commands only for Windows PowerShell, so Linux and macOS builds need you to follow the platform notes and the linked docs.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dieqiyun-uni-switch/build-uni-switch-from-source/
