Migrate to iRouter
Update endpoints, credentials, and models, then verify streaming, tools, and costs.
Record the current integration
Record SDK versions, protocol, model IDs, timeouts, retries, and optional parameters. Preserve the old configuration and use a separate test environment and iRouter key so changes do not immediately affect production.
Replace configuration
Setting | iRouter value |
|---|---|
OpenAI SDK base URL | |
Anthropic SDK base URL | |
API key | A key created in iRouter |
Model | A complete ID available to the key |
Pricing | Actual iRouter model and line prices |
Before removing old hosts, authentication headers, or proprietary parameters, check whether they serve other functions. Do not carry over another service's group names, automatic model aliases, task endpoints, or model aliases without verification.
Test each capability
Check model discovery, non-streaming text, stream completion, tool round trips, structured-output validation, and required image or audio inputs. Responses state management, background jobs, and other extensions require separate validation.
Adapt parsing to actual responses. Raw HTTP objects can differ from SDK convenience properties such as Responses output_text. Ensure retries cannot repeat tool actions or duplicate generation jobs.
Switch and roll back
Shift traffic gradually after testing and monitor errors, latency, usage, and cost. Restore the previous configuration if needed and retain sanitized timestamps, model IDs, and request identifiers for investigation. After migration, retire unused credentials through the previous service and schedule iRouter key rotation.
Continue with the API overview and errors and retries.