O roteador é opcional (opt-in) e informa quem respondeu
Fixar um único modelo no código para todo o seu tráfego faz com que cada requisição pague o custo da requisição mais complexa. Em vez disso, ative o Roteador Inteligente. Se você não solicitar, nada será roteado.
- Publicado
Hardcoding one model for all of your traffic makes every request pay the cost of your hardest
request. Smart Router is the alternative: you describe the work, and Grid selects a lane that
can do it. Set model to grid-auto and everything else about the request is unchanged.
resp = client.chat.completions.create(
model="grid-auto",
messages=[{"role": "user", "content": "Summarise this contract clause."}],
)
Two properties matter more than the routing itself. It is opt in. If you do not ask for it, nothing is routed, and a request naming a model gets that model. And it always tells you which model actually answered, so a routed request is auditable after the fact rather than a decision made on your behalf and forgotten.
One caveat, and it is on the Smart Router page too: grid-auto is not
currently returned by GET /v1/models, so you cannot discover it from the catalog listing.
Confirm it is enabled for your account before you build on it.