/openrouter:build [project-name] [--existing]from openrouter
Sets up OpenRouter integration with model routing, provider switching, and fallback chains for new or existing projects. Also supports adding Vercel AI SDK or LangChain wrappers.
Ships in openrouter. Installing the plugin adds it to Claude Code.
What the command file sets; muted values are Claude Code's defaults
Project Name: $0
Mode: $1 (--existing for existing project, omit for new)
Goal: Understand project context
Actions:
Task(openrouter-setup-agent) Analyze project for OpenRouter setup.
Detect: Existing AI framework, language
Check: Current LLM integrations
Output: Integration strategy
Goal: Set up OpenRouter client
Actions:
Task(openrouter-setup-agent) Set up OpenRouter core.
Requirements:
- Configure API key
- Set up client instance
- Configure base parameters
- Test connection
- Add error handling
Goal: Configure model routing
Actions:
Task(openrouter-routing-agent) Set up model routing.
Requirements:
- Configure model preferences
- Set up fallback chains
- Add cost optimization
- Configure latency requirements
- Set up provider priorities
Goal: Integrate with AI framework
Actions:
Based on detected framework:
If Vercel AI SDK:
Task(openrouter-vercel-integration-agent) Integrate with Vercel AI SDK.
If LangChain:
Task(openrouter-langchain-agent) Integrate with LangChain.
Requirements:
- Create provider wrapper
- Configure streaming
- Add tool support
- Set up response handling
Output:
✅ OpenRouter Integration Complete
To add features:
/openrouter:add vercel-ai # Vercel AI SDK
/openrouter:add langchain # LangChain
/openrouter:add routing <strategy> # Model routing
/openrouter:add fallback # Fallback config
To use:
Import provider from configured location
7-day visitors to each command page
2 commands in this plugin
npx claudepluginhub vanman2024/ai-dev-marketplace --plugin openrouterOther plugins' commands for the same job