Routing & Failover
The service validates the API key's model scope, matches the requested model against configured channel routes, and records request status, latency, and token usage. Failures return the corresponding HTTP status and a readable error message.
How Models Are Matched
Channels are ordered by priority and weight. The service first matches an exact model route; without an explicit mapping it falls back to the channel's available model list. A model outside the API key's scope returns 403.
Traceable Request Outcomes
- Both successful and failed requests record model, channel, status, latency, and error details.
- Input, output, and cache-hit tokens are recorded on completion; failed requests without token usage are not billed as normal usage.
- Users can view per-key summaries and request logs by date range in the usage console.
Failure Handling Boundaries
When no channel matches, the network connection fails, or the model service returns an error, the service responds with the corresponding error status; clients should apply bounded retries based on the error code.