How Grid routes
See how Grid turns an AI request into a model choice.
#1. Understand the request
Grid first determines what the request is asking the model to do and how difficult it is. It separately identifies requirements such as streaming, attachments, web access, tools, or other capabilities the request needs.
#2. Find models that can do it
Grid removes models that cannot handle the request or are not currently available. Only models that support the capabilities the request needs remain.
#3. Choose a model
Grid compares the remaining models on quality, cost, and availability, then selects one for the request.
The exact model can change as models, prices, and Elektric’s reviewed evidence change.
#4. Fall back when needed
If the selected route fails before output begins, Grid can try another eligible model. Once streaming output has started, Elektric does not silently restart the response with a different model.
If no eligible route succeeds, the request returns an error with its Request ID.
#5. Record
Elektric records the model and provider used, request status, latency, token usage, fallback activity, and provider cost where available. The Request ID connects the response to its Usage Log entry.
That means you can see what Grid chose without putting model-selection logic in your application.
#Examples
| AI request | What Grid considers |
|---|---|
| Simple text request | No special capabilities; lower complexity |
| Difficult code or quantitative request | Higher difficulty |
| Web request | Web access is required |
| Image or document request | Multimodal capability is required |
| YouTube request | Supported video capability is required |
Grid chooses a suitable model for each request; that may not always be the model with the highest benchmark score.
