الموجّه اختياري، ويخبرك بمن أجاب
إن تثبيت نموذج واحد في الكود لجميع حركة المرور لديك يجعل كل طلب يدفع تكلفة أصعب طلب لديك. فعّل الموجّه الذكي بدلاً من ذلك. فإذا لم تطلب التوجيه، فلن يتم توجيه أي شيء.
- تاريخ النشر
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.