Identify the real lock-in layers
SDK syntax is the shallowest layer. Deeper dependencies include proprietary tool semantics, prompt tuning, safety behavior, fine-tunes, hosted retrieval, cached state, media formats, evaluation assumptions, and operational dashboards.
Inventory dependencies explicitly. A standard API helps, but it cannot make model behavior identical.
Create a narrow inference boundary
Centralize authentication, base URL, timeouts, retries, model IDs, and response normalization. Expose the capabilities the product needs rather than every provider field.
Allow a controlled escape hatch for genuinely valuable provider features. Keep it isolated and covered by a migration decision, not scattered through the codebase.
Make portability measurable
Maintain an evaluation set and run it against at least one substitute for every important workload. Record quality, schema reliability, latency, and cost. A fallback that has never been tested is a comforting string in a config file, not resilience.
Keep prompts, tool schemas, and output contracts versioned independently of provider consoles.
Own your operational history
Retain the request metadata and business outcomes needed to compare providers and investigate incidents. Exportability matters because provider dashboards use different names, windows, and cost models.
Review portability before adopting fine-tunes, proprietary agents, or hosted memory. The feature may still be worth it; the dependency should be a conscious trade.
