路由器采用显式启用(Opt-in)机制,并会明确告知实际响应的模型
为所有流量硬编码单一模型,意味着每次简单请求都要为您最复杂的请求买单。不妨启用 智能路由器;如果您未主动开启,系统绝不会擅自路由任何请求。
- 发布时间
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.