Skip to content

Fallback Protection

AI model services may occasionally return errors, time out, or become temporarily unavailable. RouteAPI will try to continue processing requests when it is safe to do so, and returns clear error information when a request cannot be completed safely.

ScenarioExpected behavior
Temporary model service errorRouteAPI tries to continue processing when safe.
Timeout before response startsRouteAPI may try another available service path.
Model service rate limitIf a suitable option exists, RouteAPI continues processing.
Invalid request parametersRouteAPI returns an error and prompts the client to fix the request.
Account balance or permission issueRouteAPI returns an account-level error.
  • Non-streaming text requests are best suited for retries.
  • Streaming requests should only be retried before output begins.
  • Requests that trigger external actions should be designed to be idempotent.
  • Clients should still handle HTTP errors and show clear messages to users.
  1. Set a reasonable request timeout.
  2. Record the RouteAPI request ID when troubleshooting.
  3. Only retry on the client side when the business operation is confirmed to be idempotent.
  4. If service errors occur repeatedly, contact support with the request ID.