Moving an LLM application to a new provider is not just an endpoint change. This reusable LLM provider migration checklist helps you inventory dependencies, compare API behavior, test quality and reliability, plan a controlled cutover, and preserve a practical rollback path before changing models or vendors.
Overview
Provider portability begins with separating your application from assumptions about a particular API. Two providers may support similar chat, embeddings, tool calling, or structured output features while differing in message formats, validation behavior, context limits, streaming events, authentication, rate limits, and safety responses. A migration is successful only when the complete application still behaves acceptably—not merely when one request returns a response.
Start by defining the migration scope. You may be replacing a model within the same provider, moving between providers, adding a fallback provider, or migrating only one workflow such as content generation, retrieval-augmented generation (RAG), classification, or an AI agent. Record the current configuration before making changes:
- Provider, model identifier, SDK, API version, and deployment region, if applicable.
- System prompts, user prompts, few-shot examples, output schemas, and model parameters.
- Input types, maximum expected input size, output limits, and conversation history rules.
- Tool definitions, function names, argument schemas, retries, timeouts, and streaming logic.
- Observed quality, latency, failure rates, token usage, and cost under representative traffic.
- Data handling, logging, retention, access controls, and review requirements.
Keep this inventory in version control or a shared technical document. It becomes the baseline for the model provider comparison and gives reviewers a concrete definition of “no regression.” For production systems, pair the migration plan with an LLM observability checklist so quality, cost, latency, and failures remain visible after launch.
Checklist by scenario
Scenario 1: Replacing a model for the same workflow
When the application stays with one provider but changes models, begin with capability and behavior differences rather than code. Confirm that the replacement model supports the input modalities, context size, structured output mode, tool calling, and streaming features your workflow uses. Treat the model identifier, system prompt, sampling settings, and output limits as a versioned configuration.
- Run a fixed evaluation set containing ordinary, difficult, ambiguous, and adversarial examples.
- Compare required fields, refusals, citations, tool selection, and formatting—not just overall fluency.
- Check whether prompt instructions still have the same priority and interpretation.
- Test long conversations and near-limit inputs separately from short examples.
- Use a feature flag, shadow traffic, or a small controlled release before full cutover.
If the workflow depends heavily on prompts, review how to version and maintain prompts across models. A prompt that works well for one model should be treated as an input to test, not as a portable guarantee.
Scenario 2: Moving between providers
A cross-provider migration needs an adapter layer. Normalize your internal request and response types, then translate them into each provider's API format. Your application should not need to know whether a provider calls a message a content part, a block, a tool call, or a function invocation.
Compare these areas before selecting the target:
| Area | Questions to answer |
|---|---|
| Authentication | How are keys, project identifiers, regions, service accounts, and permissions configured? Can credentials be rotated without deployment changes? |
| Messages | Are roles, multimodal inputs, tool results, and system instructions represented in the format your adapter expects? |
| Tool calls | How are tools declared, selected, streamed, validated, and returned to the model? What happens when arguments are invalid? |
| Structured output | Is a schema enforced by the API, requested through instructions, or validated only by your application? |
| Limits | What input, output, request-size, concurrency, and context limits apply to the selected deployment? |
| Operations | How are timeouts, retries, rate limits, error codes, streaming interruptions, and usage records exposed? |
| Commercial terms | Which pricing inputs, minimum commitments, discounts, quotas, and deprecation notices affect your forecast? |
Confirm each item in current provider documentation and your own tests. Capabilities, SDK conventions, pricing, and model limits can change, so avoid embedding unverified assumptions in a permanent comparison.
Scenario 3: Adding a fallback provider
A fallback is not automatically a resilience solution. Define when it activates and what the application should do if the primary request has already streamed partial output, invoked a tool, or consumed part of a user workflow. A safe fallback policy usually distinguishes transient transport failures from model refusals, invalid output, quota exhaustion, and application-level validation errors.
- Set explicit timeout, retry, and fallback boundaries.
- Prevent duplicate side effects when a request includes tools or external actions.
- Pass only the minimum necessary conversation state to the fallback.
- Mark fallback responses for monitoring and later review.
- Test degraded behavior when both providers are unavailable or return unusable output.
For applications with external tools, migration testing should include prompt injection and untrusted tool-result scenarios. The prompt injection defense checklist provides a useful companion review.
Scenario 4: Migrating a RAG or agent workflow
Retrieval and agent systems introduce dependencies beyond the text-generation endpoint. Record embedding model, vector dimensions, chunking rules, metadata filters, reranking logic, tool schemas, maximum action steps, and approval gates. Changing an embedding model may require rebuilding the index; changing a generation model may alter query rewriting, citation selection, or tool usage.
Evaluate the complete workflow from user request through retrieval, generation, validation, and any external action. A response that sounds correct but cites the wrong passage or triggers the wrong tool is a functional failure. Keep retrieval tests and action-safety tests separate from general writing-quality tests.
What to double-check before cutover
Use a staged validation process rather than one broad “does it work?” test.
- Contract tests: Verify authentication, request serialization, response parsing, streaming events, tool arguments, structured output validation, and error mapping.
- Golden-set evaluation: Run the same curated examples through the old and new configurations. Include examples that represent business-critical edge cases.
- Human review: Have reviewers compare factuality, instruction following, tone, refusal behavior, citations, and usefulness using a defined scorecard.
- Load and failure tests: Exercise concurrency, rate limits, timeouts, retries, partial streams, oversized inputs, malformed tool arguments, and provider errors.
- Cost and latency review: Compare measured usage under realistic prompts and traffic. Do not rely solely on nominal model labels or a single test request.
- Security review: Recheck secret storage, access scopes, logging, personal-data handling, prompt injection defenses, and tool permissions.
- Rollback rehearsal: Confirm that the previous provider configuration, prompts, schemas, credentials, and deployment artifact can be restored quickly.
For structured output, validate at the application boundary even when the target provider advertises schema support. Decide whether invalid output should be repaired, retried, rejected, or routed to a human. For streaming, test both complete responses and interrupted responses; consumers should not publish incomplete content or execute a partially received action.
Measure more than response quality. A migration can appear successful while increasing retries, token usage, latency, moderation interventions, or manual review. Use the LLM prompt evaluation framework to formalize test cases and scoring, and consult the LLM API cost checklist when the target changes usage patterns.
Common mistakes
- Changing provider and prompt at the same time: Keep variables separate where possible. Otherwise, a quality change is difficult to diagnose.
- Testing only successful requests: Include authentication errors, throttling, timeouts, invalid schemas, empty retrieval results, and refusal cases.
- Assuming “OpenAI-compatible” means behaviorally identical: A compatible surface can still differ in validation, defaults, tool calls, limits, and error handling.
- Ignoring downstream consumers: Check parsers, databases, dashboards, CMS integrations, moderation steps, and webhooks that depend on exact output shapes.
- Using retries without idempotency: Retried tool calls or publishing actions can create duplicate side effects.
- Comparing only average performance: Review tail latency, difficult prompts, failure clusters, and the worst acceptable user outcomes.
- Leaving provider details scattered: Centralize model configuration, adapters, limits, and feature flags so the next migration is smaller.
- Skipping documentation: Record the chosen model, tested date, known limitations, fallback rules, and rollback owner.
When to revisit this checklist
Revisit the migration plan before every provider switch, model retirement, architecture review, contract renewal, or major seasonal planning cycle. It is also worth reopening when your workflow changes: adding image or audio input, introducing tools, increasing context length, launching a new region, changing retention requirements, or moving from assisted drafting to automated publishing.
Set a recurring review for the inputs that can change outside your codebase. Check provider documentation for model availability, API versions, SDK behavior, context and rate limits, pricing, deprecation notices, safety controls, and regional availability. Because these details are time-sensitive, record the date and source of each important assumption rather than presenting it as permanent.
Before the next migration, turn this article into a project ticket with five owners or checkpoints:
- Inventory: application dependencies and current performance baseline.
- Comparison: target capabilities, limits, operational requirements, and commercial assumptions.
- Evaluation: golden-set results, human review, security checks, and load tests.
- Cutover: feature flag, monitoring dashboard, release window, and communication plan.
- Rollback: tested restoration path, decision thresholds, and named owner.
Finally, keep provider-specific code behind a small interface and store prompts, schemas, model parameters, and evaluation cases as versioned assets. That portability pattern will not remove every migration cost, but it makes future model provider comparisons clearer, failures easier to isolate, and each cutover more deliberate.