PLUGIN brewtools / Skills

Provider Switch

Configure DeepSeek, Z.ai/GLM, Qwen/DashScope, MiniMax or OpenRouter for Claude Code. The skill writes a provider alias to ~/.zshrc, keeps existing choices unless you select a change, and offers status and connectivity checks. Provider billing and rate limits are separate from your Anthropic subscription.

Quick reference

FieldValue
Command/brewtools:provider-switch [prompt] [status|install|verify|model-check|help|<provider-name>]
DefaultRead-only status, never an install
OutputProvider alias and selected configuration in ~/.zshrc
Modelopus
CredentialsExisting shell environment variable or private local file; never paste keys into chat

Modes

ArgumentModeWhat it does
(none)statusProvider table, read-only; prints the install command if nothing is configured
installinstallInteractive selection of one or more providers
deepseek / ds / dpskprovider-deepseekConfigure DeepSeek V4 only (priority default)
glm / zai / z.aiprovider-glmConfigure Z.ai/GLM only
qwen / dashscopeprovider-qwenConfigure Qwen/DashScope only
minimax / miniprovider-minimaxConfigure MiniMax only
openrouter / routerprovider-openrouterConfigure OpenRouter and pick a model
help / howhelpHow aliases, env vars and dashboards work
verify / testverifyMinimal API request to each configured endpoint; can consume provider usage
model-check / identifymodel-check5 diagnostic questions to identify the model; run inside a provider session

Setup

  1. Choose the provider

    Get a key in that provider’s console. For Qwen, identify billing product, region and workspace first.

  2. Run the skill

    Use /brewtools:provider-switch install or name a provider. Supply the key through a shell variable or a private file, then confirm alias and models.

  3. Launch a session

    Load the alias in your shell and run it. To return to Anthropic, launch from a shell without the provider overrides.

Default aliases: claudeds, claudeglm, claudeqwen, claudeminimax, claudeor; custom names start with claude and use lowercase letters and digits only.

Providers, models and pricing

One model serves all four roles (opus, sonnet, haiku, fable), so subagents pinned to any of them stay on the provider. USD per 1M tokens, input/output, per the skill’s references checked 2026-10-12; confirm on the provider page.

ProviderAliasModelDirect priceReference
DeepSeek V4 (priority)claudedsdeepseek-v4-pro, 1M context$1.32 / $3.96 peak, $0.66 / $1.98 off-peak (cache miss)Pricing
Z.ai / GLMclaudeglmglm-5.2, 1M context$1.40 / $4.40Pricing
Qwen / DashScopeclaudeqwenqwen3.7-plus[1m]$0.40 / $1.60 up to 256K input, $1.20 / $4.80 aboveClaude Code guide, pricing
MiniMaxclaudeminimaxMiniMax-M3, up to 1M context$0.30 / $1.20 up to 512K, $0.60 / $2.40 abovePricing
OpenRouterclaudeoruser-selected, default qwen/qwen3.7-plus[1m]route-dependentLive catalog

DeepSeek is the priority provider by configuration policy, not benchmark. Direct and OpenRouter prices differ; cache support depends on provider and route.

Qwen: key, region and plan

A key works only with the endpoint of the region, workspace and billing product it was created in (pay-as-you-go: Beijing, Singapore, Virginia; Coding Plan and Token Plan use others). The default alias uses dashscope-intl.aliyuncs.com, so create the key in the matching region. Prefix or length reveals nothing about region. An existing endpoint is kept unless you change it.

OpenRouter model selection

Every selected ID (menu, default or custom) must match the live public catalog exactly. A missing ID gets suggestions and at most two retries; a fetch or parser failure writes nothing. The ID fills all four role slots with no automatic [1m] suffix. See the variant reference.

Credentials, environment variables and compatibility flags
  • Keys enter the writer on stdin, never as arguments. A key file readable by group or world is refused until chmod 600.
  • The shell backup is private and removed after a successful write.

Each alias exports seven variables: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, an explicit empty ANTHROPIC_API_KEY (avoids OAuth fallback), and ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL, ANTHROPIC_DEFAULT_FABLE_MODEL.

ProviderCompatibility flags
DeepSeek, OpenRouterNone
Z.ai / GLM and MiniMaxCLAUDE_ENABLE_BYTE_WATCHDOG=0, CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
Qwen / DashScopeCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
Reference refresh

One research agent per provider (delegation) returns a Current/Fetched/Source table; verified differences are shown for your choice before any write.

Brewtools overview

Text, provider and deployment utilities.

GitHub source

Skill, provider references and validation helpers.

Plugin Update

Keep installed plugin source current before refreshing provider configuration.

Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ