
How routing works
Autoroute treats model selection as a process, not a single guess. Every Autoroute request moves through the same sequence:- Understand. The router reads your latest message and classifies the task and its requirements.
- Compare. It scores the allowed model pool across quality, cost, and latency.
- Validate. The top candidate is checked before it is committed. A high score alone does not win the request.
- Select. The router locks in the winning model.
- Respond. The selected model generates the completion, returned inline or streamed token by token.
- /autoroute picks the model and returns the completion in one call. Streaming is the default.
Authentication
Base URL:https://console.gmicloud.ai/api/v1/ie/recommendation
Send a bearer token in the Authorization header:
Authorization: Bearer YOUR_TOKEN
Most routed responses include an X-Recommendation-ID header. It is absent on auth and early validation errors. Keep this value if you plan to submit feedback later.
Quick start: Autoroute
Send an OpenAI-style messages[] array. The router reads the latest user message, ranks the model pool, and generates with the top candidate.Request fields
Streaming vs non-streaming
- Streaming (default). Returns text/event-stream. Chunks are proxied as they arrive, followed by a routing_metadata event, then [DONE]. One backup model may be tried before the first token on a 5xx, provider error, 429, or a 10-second first-token timeout. Once tokens start flowing, no further fallback happens; a mid-stream failure keeps the partial output, sends an error event, and closes the stream.
- Non-streaming (stream: false). Returns one JSON object with up to two ordered backups on a transient failure (5xx, provider error, 429, or a 30-second timeout).
Quick start: Recommendations
Get a ranked list of models without generating anything.- estimated_cost_savings appears only on the top recommendation, and only when the estimate is positive.
- V1 recommends LLMs only, so category is always llm.
Request fields
Submitting feedback
Feedback is write-once per recommendation. Use the recommendation_id from a recommendation or from autoroute routing metadata.signalisupordown.- For
down, include one or morereasonswith no duplicates. - For
up, omitreasonsentirely. - A second submission for the same recommendation returns
409.
not_the_model_i_want, wrong_task_type, model_quality_poor, too_slow, cost_not_meaningfully_lower, model_unavailable, not_allowed_by_policy, prefer_another_model, other.
Routing settings
Routing settings define which models are eligible and how they are ranked. Org owners set the hard bounds; each user sets a preference within those bounds.
Defaults when fields are omitted on the org update: model scope all, mode balanced, and Auto Mode on.