openrouter-upgrade-migration
Migrate or upgrade your OpenRouter integration. Use when updating SDK versions, switching models, or modernizing your setup. Trigger with phrases like 'openrouter migrate', 'openrouter upgrade', 'openrouter update', 'switch openrouter model'.
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- openrouter-upgrade-migration
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Migrate or upgrade your OpenRouter integration. Use when updating SDK versions, switching models, or modernizing your setup. Trigger with phrases like 'openrouter migrate', 'openrouter upgrade', 'openrouter update', 'switch openrouter model'.
- allowed-tools
- Read, Write, Edit, Grep
- compatible-with
- claude-code, codex, openclaw
02 资源文件 7
- 参考文档references/code-pattern-updates.md1.7 KB
- 参考文档references/configuration-migration.md1.3 KB
- 参考文档references/errors.md323 B
- 参考文档references/examples.md3.0 KB
- 参考文档references/migration-from-direct-api-to-sdk.md1002 B
- 参考文档references/model-migration.md1.1 KB
- 参考文档references/testing-during-migration.md1.2 KB
03 SKILL.md 正文
Openrouter Upgrade Migration
Overview
This skill provides a step-by-step migration guide for upgrading SDK versions, switching between models, or migrating from direct provider APIs to OpenRouter.
Prerequisites
- Existing OpenRouter integration or direct provider API integration
- Test environment for validating the migration
Instructions
- Audit current integration: Document all API calls, models used, parameters set, and any provider-specific features relied upon
- Identify breaking changes: If upgrading the SDK, check the changelog for breaking changes; if switching models, compare parameter support and response format differences
- Update in a feature branch: Make all changes in a branch; update base URL, API key, model IDs, and any changed parameters; add the OpenRouter-specific headers
- Run comparison tests: Send the same prompts through old and new configurations; compare response quality, latency, and costs to validate the migration
- Deploy with a rollback plan: Use feature flags or traffic splitting to gradually migrate traffic; keep the old configuration available for quick rollback
Output
- Migration checklist with all changes documented
- Comparison report showing quality, latency, and cost differences
- Rollback runbook in case the migration needs to be reverted
Error Handling
| Error | Cause | Fix |
|---|---|---|
| Changed response format | New model or SDK version returns different structure | Update response parsing code; add version-specific handling |
| Missing parameter support | New model doesn't support a parameter used in old code | Remove or conditionally set the unsupported parameter; check /models for capabilities |
| Quality regression | New model performs worse on specific prompts | Adjust prompts for the new model; consider keeping the old model for affected use cases |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
Examples
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.
Resources
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.