/phaseo:openrouter-to-phaseo-migrationfrom Phaseo
Migrates an existing OpenRouter integration to Phaseo Gateway: inventories usage, swaps endpoints/keys/SDKs, maps model IDs and request fields, validates, and produces a migration report.
Ships in Phaseo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to complete a full migration from OpenRouter to Phaseo Gateway with minimal risk. Phaseo speaks the same OpenAI-compatible API and reads most OpenRouter request fields unchanged, so most of the work is model IDs and a short list of fields that Phaseo rejects.
Deliver a working integration that:
https://api.phaseo.app/v1)PHASEO_API_KEYGET /v1/models?format=openaiUse references/openrouter-migration-playbook.md for the full mapping tables, the mapping boundary template and the validation commands.
openrouter.ai, OPENROUTER_API_KEY, OPENROUTER_BASE_URL, sk-or-v1HTTP-Referer, X-Title and X-OpenRouter-* headers@openrouter/ai-sdk-provider, @openrouter/sdk, openrouter (PyPI)org/ prefix, a : suffix (:free, :nitro, :floor, :online), a ~ prefix, or the openrouter/ routersprovider: objects, models: arrays, plugins, transforms, usage: { include, @preset//api/v1/generation, /api/v1/credits, /api/v1/keyhttps://api.phaseo.app/v1.PHASEO_API_KEY. Auth stays Authorization: Bearer <key>.HTTP-Referer and X-Title. Rename X-OpenRouter-Title to X-Title and X-OpenRouter-Categories to X-App-Categories; Phaseo ignores the X-OpenRouter-* names. Add X-App-Id for stable app grouping.// Before
const client = new OpenAI({
apiKey: process.env.OPENROUTER_API_KEY,
baseURL: "https://openrouter.ai/api/v1",
});
// After
const client = new OpenAI({
apiKey: process.env.PHASEO_API_KEY,
baseURL: "https://api.phaseo.app/v1",
});
@openrouter/ai-sdk-provider: use @phaseo/ai-sdk-provider. createOpenRouter becomes createPhaseo, openrouter.chat(id) becomes phaseo(id) (there is no .chat()), and providerOptions.openrouter or extraBody become providerOptions.phaseo, which is merged into the request body. Match the installed ai major: the default tag for AI SDK 7, @ai-sdk-v6 or @ai-sdk-v5 otherwise.@openrouter/sdk and Python openrouter use their own call shapes, so changing the base URL is not enough. Move those calls to the OpenAI SDK above, @phaseo/sdk or Python phaseo.<org>/<model> shape and most carry over, but not all. Known org differences: x-ai/ is spacex-ai/, meta-llama/ is meta/, mistralai/ is mistral/. Version spelling can differ too.data[].id from GET /v1/models?format=openai. Without format=openai the response is Phaseo's paged models list, which has no data array.:nitro (throughput), :cheap and :fast. Map :floor to :cheap. Remove :online and add web search (step 4). Remove :thinking and set reasoning. Any other suffix stays in the ID and the lookup fails.openrouter/auto becomes phaseo/auto (alpha; workspaces without access get 400 auto_routing_feature_flag_disabled). openrouter/free becomes phaseo/free. ~org/model-latest aliases have no equivalent; pin a current ID.provider objects. order, only, ignore, sort, allow_fallbacks, require_parameters, zdr, quantizations, max_price, preferred_min_throughput and preferred_max_latency work unchanged. Remove data_collection: "deny" and enforce_distillable_text: true (400 unsupported_routing_filter); use zdr: true instead. Use base provider IDs, not endpoint slugs such as deepinfra/turbo.models fallbacks work (1 to 25), but model is required: move models[0] into model. They cannot be combined with phaseo/auto.web, web-fetch and response-healing (non-streaming only) exist. file-parser, context-compression and auto-router return 400 unknown_gateway_plugin, even with enabled: false. Rename openrouter:web_search tools to phaseo:web_search.transforms, the preset body field and usage: { include: true } (usage and cost are always returned, and an object usage is a 400). reasoning.exclude is ignored, so reasoning is still returned.@preset/<slug> becomes @<slug>, created in Phaseo first. model@preset/<slug> has no equivalent.usage.cost, usage.cost_details.upstream_inference_cost, message.reasoning, reasoning_details and provider are returned. Normalize only what callers read and Phaseo lacks (native_finish_reason, is_byok, split upstream costs) in one compatibility layer.Run this validation sequence:
GET /v1/healthGET /v1/models?format=openai, checking every mapped IDphaseo/free (works without a wallet balance)phaseo/freeMigration is complete only when:
openrouter.aiPHASEO_API_KEYAlways include:
sk-or-v1 key was ever committed, tell the user to rotate it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub phaseoteam/phaseo --plugin phaseo15 skills in this plugin
/phaseoUses the connected Phaseo MCP for live data: the interactive model explorer, model and provider details, token cost estimates, credits, activity, analytics and privacy-minimised request health, and reviewed text inference. Use when comparing AI models or provider availability through Phaseo, estimating costs, or investigating a Phaseo account's usage or a request. Also manages API keys, budgets, spend rules, provider keys, guardrails, presets, settings, webhooks and observability destinations when the user connected with account management. Not for writing integration code (use phaseo-gateway or an SDK skill) or billing and payments./phaseo-agent-sdk-typescriptBuilds agent loops on the Phaseo Gateway with the TypeScript Agent SDK, `@phaseo/agent-sdk`: `createAgent`, `defineTool`, `createGatewayAgentClient`, bounded model retries, resumable runs from app-owned state, presets, managed search and concurrent tool calls. Use when a project imports `@phaseo/agent-sdk` or needs a tool-calling agent, a resumable workflow or a human review step on Phaseo. Not for single requests (use phaseo-sdk-typescript) or agent SDKs in other languages./phaseo-async-webhooksBuilds Phaseo async video, batch and webhook integrations: creating jobs and persisting their IDs, polling or websocket status helpers, idempotent webhook consumers for the standard payload, and recovery when local state and the gateway disagree. Use when a project generates video, submits batches, receives Phaseo webhooks or has stuck long-running jobs. Not for synchronous text, image or audio requests (use phaseo-gateway or an SDK skill)./phaseo-cliOperates Phaseo from the terminal with the official `phaseo` CLI: install and update, browser or device OAuth login, API keys, workspaces, presets, BYOK, budgets, spend rules, rate limits, notifications, observability, routing, identity and other workspace settings, plus credits and human-confirmed top-ups, analytics and request lookup by ID, with `--json` output for automation. Use when the user runs or wants `phaseo` commands, scripts Phaseo admin work or debugs a request from a shell. Not for application code that calls the API (use phaseo-gateway or an SDK skill)./phaseo-gatewayIntegrates applications with the Phaseo Gateway over OpenAI-compatible REST, the TypeScript SDK (`@phaseo/sdk`), the Python SDK (`phaseo`) or the Vercel AI SDK provider (`@phaseo/ai-sdk-provider`): base URL, API key auth, attribution headers, model IDs and smoke tests. Use when adding Phaseo to a codebase, wiring a new endpoint, seeing api.phaseo.app or PHASEO_API_KEY, or debugging auth, routing or response-shape errors. Not for moving off another provider or gateway (use phaseo-migration) or choosing models (phaseo-model-selection)./phaseo-guardrailsConfigures and debugs Phaseo guardrails on API keys: model and provider restrictions, budget limits, prompt-injection handling, sensitive-information detection, preview testing and verification in activity and request logs. Use when a rollout needs to limit what a key can call or spend, or a request was blocked by a guardrail. Not for routing or fallbacks (use phaseo-routing-presets) or reviewing spend after the fact (phaseo-usage-monitoring).