Configure Claude Code to use alternative AI model providers by setting up custom API endpoints and authentication. Use this skill when users want to switch from default Anthropic models to providers like Z.AI, OpenRouter, or other custom endpoints with compatible APIs.
This skill configures .claude/settings.local.json to use alternative AI model providers that offer Anthropic-compatible APIs. It guides the setup of custom base URLs, model selections, and API authentication for providers beyond the default Anthropic service.
Use this skill when users:
Read the provider configurations from references/providers.json to understand available providers, their base URLs, and supported models.
The JSON structure contains:
Use the AskUserQuestion tool to present available providers to the user. Structure the question as follows:
Question format:
After the user selects a provider, use AskUserQuestion again to let them choose a model from that provider's available models.
Question format:
Use AskUserQuestion to collect the API key for the selected provider.
Question format:
Important: If the user selects "Other" and provides a custom text input, that is their API key. If they choose "I'll add it manually later", use the placeholder "<YOUR_API_KEY_HERE>".
Read the existing .claude/settings.local.json file if it exists. If it doesn't exist, create a new one.
Update or create the configuration with the following structure:
{
"env": {
"ANTHROPIC_BASE_URL": "<selected provider's baseUrl>",
"ANTHROPIC_MODEL": "<selected model's id>",
"ANTHROPIC_AUTH_TOKEN": "<user's API key or placeholder>"
}
}
Important considerations:
After updating the configuration file, inform the user:
.claude/settings.local.json<YOUR_API_KEY_HERE> with their actual API keyTo add new model providers to this skill, edit references/providers.json and add a new provider object with the following structure:
{
"id": "unique-provider-id",
"name": "Display Name",
"description": "Brief description of the provider",
"baseUrl": "https://api.example.com/v1",
"models": [
{
"id": "model-identifier",
"name": "Model Display Name",
"description": "Brief description of the model"
}
]
}
Contains the configuration database for all supported model providers. This file includes:
This file should be read at the start of the workflow to populate the provider and model selection options.
npx skills add aicodingstack/model-provider-setup下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer