Skip to main content
YouRouter is designed to support production model API traffic through one integration. For model calls, you should still build standard retry and concurrency handling because upstream model providers can enforce their own limits.

What to Expect

For model API calls, retry transient failures with exponential backoff.
Use retries for:
  • 429 rate limit or concurrency responses
  • 500 gateway or provider errors
  • temporary network failures
Do not retry immediately in a tight loop. That can make provider-side limits worse.

Concurrency Tips

  • Start with conservative concurrency in production and increase gradually.
  • Use vendor: auto unless your integration requires a specific provider.
  • Keep model IDs configurable so you can switch models without code changes.
  • Log the request timestamp, model, vendor mode, and request ID for troubleshooting.
  • For streaming responses, treat dropped connections as retryable only if your application can safely restart the request.

Example: Automatic Routing

Example: Provider Pinning

For routing behavior, see the Router guide. For request fields, see Create Chat Completion.