Skip to main content

What actually changes

That is the whole migration for most codebases. Your SDK, your request shapes, your streaming code, your retry logic and your tool definitions all stay exactly as they are.

You can leave the model ids alone at first

A finite list of stock ids that SDKs commonly ship hard-coded — gpt-4o, claude-sonnet-4-5, o3, codex and others — resolve to catalog models, so an app you have not fully audited keeps working the moment you flip the base URL. Treat that as a bridge, not a destination. Move to lx1-* ids before you depend on specific behavior: the compatibility mapping points at whichever model is the right landing spot today, and it can move. See Model routing.
Find what you're actually sending

Check these five things

1

Model capabilities

Vision, documents, tools and structured output are per-model. Read capabilities and supported_parameters off GET /v1/models for the ids you plan to use — a capability the model cannot guarantee is a 422, not a silent downgrade.
2

Output ceilings on reasoning models

Hidden reasoning counts against max_tokens. A ceiling tuned for a non-reasoning model can be consumed entirely by thinking. See Reasoning.
3

Rate limits and concurrency

Published per plan on Plans & limits. If you are moving a fleet, size against the concurrency figure, not just requests/min — that is the axis parallel agents hit first.
4

Your retry logic

429 carries retry-after; 5xx is transient and worth retrying with backoff; other 4xx never are. If you hand-rolled an HTTP client, check it honors retry-after — the official SDKs already do. See Errors.
5

Response headers

Usage and limit state ride on x1-* and x-ratelimit-* headers. If you had dashboards reading a previous provider’s headers, repoint them. See Headers.

Things that behave differently

  • One meter, not per-model billing. Every plan includes the whole catalog and draws from a single pool measured in list-price dollars, so “which model” is a cost decision rather than an access decision. Plans & limits
  • Saturation waits instead of failing. A request that would have been shed under load takes a place in line, so allow headroom in client timeouts. Reliability
  • Model ids are not versioned in the URL. Models are added, retired and repriced without an API version bump. Pin ids, and read the catalog at runtime if you need to know what exists.
  • Prompt caching depends on the model. Where a model publishes a cached input rate, repeated context counts at that rate; where it does not, it counts at the ordinary input rate. Prompt caching

Cut over safely

1

Run both in parallel

Point a copy of your service at the gateway with a separate key, replay real traffic shapes through it, and diff the outputs you care about.
2

Start on a low-stakes path

Move background jobs, summarization, or an internal tool first. Keep the user-facing path on the old provider until the numbers agree.
3

Watch the allowance headers

x1-allowance-remaining is the live figure the monthly cap is enforced against. Alert on it before it reaches zero, because at zero it is a hard stop, not a throttle.
4

Then flip the base URL

One environment variable, no code change — which also makes the rollback one environment variable.

Coding agents

If what you are migrating is a coding agent rather than an app, skip all of the above:
One command configures Claude Code, Codex, Cursor, Aider, Continue, Cline or Windsurf, and npx layerx1 unset reverses it from timestamped backups. See the CLI.