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.
What is protected
Section titled “What is protected”| Scenario | Expected behavior |
|---|---|
| Temporary model service error | RouteAPI tries to continue processing when safe. |
| Timeout before response starts | RouteAPI may try another available service path. |
| Model service rate limit | If a suitable option exists, RouteAPI continues processing. |
| Invalid request parameters | RouteAPI returns an error and prompts the client to fix the request. |
| Account balance or permission issue | RouteAPI returns an account-level error. |
Developer notes
Section titled “Developer notes”- 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.
Recommended client behavior
Section titled “Recommended client behavior”- Set a reasonable request timeout.
- Record the RouteAPI request ID when troubleshooting.
- Only retry on the client side when the business operation is confirmed to be idempotent.
- If service errors occur repeatedly, contact support with the request ID.