DEDUPED Hot AI repos, turned into use cases Get 5 a day

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

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

Who it is forA 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 problemStale model lists send requests to models the provider no longer offers, and default models can point to models that were removed.

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

What you need first

  • A desktop computer running Windows, Linux or macOS
  • An API address and API Key from your provider
  • Codex or Claude Code installed on the same machine
  • For building from source: Node.js 20 or newer, Rust 1.89 or newer, and the platform build tools listed in the README

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 for your agent

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.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page