/phaseo:phaseo-migrationfrom Phaseo
Migrates existing LLM integrations to Phaseo from OpenAI, Anthropic, OpenRouter, Vercel AI Gateway, LiteLLM, Cloudflare AI Gateway, Helicone, or LLM Gateway. Swaps base URL and API key with minimal diff, maps model IDs, fallbacks, caching, headers, and observability.
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.
Move an existing integration onto Phaseo at the client boundary first, then map platform-specific features deliberately. Keep rollback a configuration-only change (base URL and API key) until the cutover is stable.
Search runtime code, config, CI and deployment env files. Several platforms can appear in one repository; migrate each client separately.
| Platform | Code signals | Reference |
|---|---|---|
| OpenAI | api.openai.com, OPENAI_API_KEY, openai package with no baseURL, AzureOpenAI | openai.md |
| Anthropic | api.anthropic.com, ANTHROPIC_API_KEY, @anthropic-ai/sdk, anthropic (Python) | anthropic.md |
| OpenRouter | openrouter.ai, OPENROUTER_API_KEY, sk-or-v1 keys, X-Title headers | openrouter.md |
| Vercel AI Gateway | ai-gateway.vercel.sh, AI_GATEWAY_API_KEY, @ai-sdk/gateway, bare string models in ai calls | vercel-ai-gateway.md |
| LiteLLM | litellm package, config.yaml with model_list, proxy on port 4000, LITELLM_* vars | litellm.md |
| Cloudflare AI Gateway | gateway.ai.cloudflare.com, cf-aig-* headers, env.AI.run(..., { gateway }) | cloudflare-ai-gateway.md |
| Helicone | *.helicone.ai hosts, Helicone-Auth, Helicone-* headers, HELICONE_API_KEY | helicone.md |
| LLM Gateway | api.llmgateway.io, LLM_GATEWAY_API_KEY, other LLM_GATEWAY_* vars | llm-gateway.md |
Read only the reference for the platform you found.
Inventory. List every client factory, base URL, key variable, model ID, custom header, fallback chain, cache setting and logging callback. Record which environments (local, CI, staging, production) hold the old key.
Swap base URL and key with the smallest diff. Keep the existing SDK and request payloads. Change only the client constructor and the key variable:
| Client | Base URL | Key |
|---|---|---|
| OpenAI SDK, OpenAI-compatible clients, raw HTTP | https://api.phaseo.app/v1 | PHASEO_API_KEY as Authorization: Bearer |
| Anthropic SDK | https://api.phaseo.app (the SDK appends /v1/messages) | PHASEO_API_KEY passed as authToken / auth_token |
| Vercel AI SDK | @phaseo/ai-sdk-provider (defaults to https://api.phaseo.app/v1) | reads PHASEO_API_KEY |
Keep the key server-side. Do not add a secret value to source control, logs or client bundles. If there is no Phaseo key yet, ask the person to create one in the dashboard under Settings -> API Keys, or create it with POST /v1/keys and a management key; a CLI sign-in can't create keys, and never guess a key. BYOK, budgets and routing rules are also changed in the dashboard or with a management key; credits and reads have CLI commands: see Manage Phaseo from an agent.
Map model IDs. Call GET /v1/models?format=openai and check every production model ID against data[].id. Without format=openai the response is Phaseo's paged models list with no data array, so a data[].id check silently finds nothing. Phaseo IDs are <org>/<model> (for example openai/gpt-4.1-mini). Do not assume an ID carries over or guess a replacement; if callers use old names, translate them in one mapping function at the client boundary. The default list contains only models routable now; add availability=all to include inactive or coming-soon ones.
Map platform features. Use the reference file's mapping table. Shared Phaseo equivalents:
| Need | Phaseo equivalent |
|---|---|
| Model fallbacks | Request models array (1 to 25, tried after model on 429, 500, 502, 503 and 504, never on request errors) or dynamic routes |
| Automatic model choice | phaseo/auto (alpha for selected workspaces; not combined with models) |
| Provider order, allow and deny lists | provider.order, provider.only, provider.ignore, provider.sort |
| Zero data retention, regions | provider.require_zero_data_retention, provider.required_execution_region, provider.required_data_region |
| Shared prompts, parameters, routing defaults | Presets, invoked as "model": "@slug"; versioned prompt templates via "prompt": {"id": "@slug", "variables": {...}} |
| Response caching | No gateway response cache yet; keep any client-side cache |
| Prompt caching | cache_control (top level or per block); prompt_cache_retention on Chat Completions and Responses |
| App attribution | X-App-Id, X-App-Name, HTTP-Referer, X-App-Categories, X-Title |
| Custom properties, cost tags | X-Phaseo-Metadata: {"labels":[{"key":"team","value":"support"}]} |
| End-user ID | user body field or X-Phaseo-User-Id header |
| Session grouping and cache affinity | session_id body field |
| Rate limits, budgets, key restrictions | Rate limit policies, key limits and budgets (see phaseo-guardrails) |
| Request logs, telemetry export | phaseo logs list or GET /v1/logs, GET /v1/generations?id=<request_id>, observability destinations (Langfuse, LangSmith, Datadog, PostHog, Sentry, any OTLP collector, a webhook, or row exports to S3, BigQuery and similar), or keep client-side tracing |
If something has no equivalent, say so in the report and keep it in one adapter rather than at every call site. Remove headers that only the old platform understood.
Smoke test with phaseo/free (it works without a wallet balance), then repeat the non-streaming call with each mapped production model ID:
curl -s https://api.phaseo.app/v1/health
curl -s "https://api.phaseo.app/v1/models?format=openai" -H "Authorization: Bearer $PHASEO_API_KEY" | jq -r '.data[].id'
curl -s https://api.phaseo.app/v1/chat/completions \
-H "Authorization: Bearer $PHASEO_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"phaseo/free","messages":[{"role":"user","content":"Reply with: ok"}]}'
curl -N https://api.phaseo.app/v1/chat/completions \
-H "Authorization: Bearer $PHASEO_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"phaseo/free","stream":true,"messages":[{"role":"user","content":"Reply with: stream ok"}]}'
curl -s https://api.phaseo.app/v1/chat/completions \
-H "Authorization: Bearer $PHASEO_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"example/not-a-model","messages":[{"role":"user","content":"test"}]}'
Use the endpoint the app actually calls: /v1/responses bodies take input; /v1/chat/completions and /v1/messages bodies take messages (Anthropic-style bodies also send max_tokens). Then run the app's own client path once with phaseo/free, including streaming, tools and structured output if it uses them.
Roll out and report. Ship behind a flag or a small traffic slice, compare output, latency, token usage and cost against the old path, then promote.
- [ ] Source platform(s) detected; every client, env var and header inventoried
- [ ] Base URL and key swapped at the client boundary only; no secret in the diff
- [ ] PHASEO_API_KEY set in every environment that held the old key
- [ ] Every production model ID found in GET /v1/models, or mapped in one function
- [ ] Platform-only headers removed or mapped; feature gaps listed
- [ ] Health, models, non-streaming, streaming and invalid-model checks pass with phaseo/free
- [ ] Each mapped production model ID passes one real request
- [ ] Tools and structured outputs rechecked where used
- [ ] Rollback is a base URL and key change
Finish with: changed files; env var changes (old name to PHASEO_API_KEY, no values); model ID mapping (old to new); feature mapping and gaps; smoke test evidence; rollback switch.
process.env.PHASEO_API_KEY or os.environ["PHASEO_API_KEY"].Retry-After.phaseo-gateway: new integrations and general REST or SDK usage.openrouter-to-phaseo-migration: detailed OpenRouter playbook.phaseo-routing-presets: presets and routing policy.phaseo-guardrails: key restrictions, rate limits and budgets.phaseo-async-webhooks: batches, async jobs and webhooks.agents/openai.yaml (opens in a new tab)references/anthropic.md (opens in a new tab)references/cloudflare-ai-gateway.md (opens in a new tab)references/helicone.md (opens in a new tab)references/litellm.md (opens in a new tab)references/llm-gateway.md (opens in a new tab)references/openai.md (opens in a new tab)references/openrouter.md (opens in a new tab)references/vercel-ai-gateway.md (opens in a new tab)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
/openrouter-to-phaseo-migrationMigrates an existing OpenRouter integration to the Phaseo Gateway end to end: usage inventory, endpoint, key and SDK swap, model ID and suffix mapping, provider objects, plugins, presets and OpenRouter-only fields, validation and a migration report. Use when code contains openrouter.ai URLs, sk-or-v1 keys, OPENROUTER_API_KEY, @openrouter packages or OpenRouter provider objects and the user wants a full migration. Not for other source platforms (use phaseo-migration) or new Phaseo integrations (phaseo-gateway)./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).