跳至正文

本页面仅提供英文版本。在已翻译的页面上将保留您的中文语言偏好。

Smart Router

Send model grid-auto and Grid selects a capable lane for the request. It is opt in, per request, and it always tells you which model answered.

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.

It is opt in. If you do not ask for it, nothing is routed.

Turning it on#

Set model to grid-auto. Everything else about the request is unchanged.

Python

resp = client.chat.completions.create(
    model="grid-auto",
    messages=[{"role": "user", "content": "Summarise this contract clause."}],
)
Shell

curl https://api.genai.forlex.cloud/v1/chat/completions \
  -H "Authorization: Bearer $FORLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grid-auto",
    "messages": [{"role": "user", "content": "Summarise this contract clause."}]
  }'

It is a per-request decision, not an account setting. The same key can pin a model on one call and route on the next, which is what makes it safe to adopt gradually: route the traffic where you do not care which model answers, and pin the traffic where you do.

What it optimises for#

Smart Router reads the request, matches it against the curated catalog, and selects a lane capable of serving it. Where a safe semantic cache applies, it can serve from cache instead of running inference again.

The selection target is capability: the right lane for the work. Choosing a capable lane rather than always choosing the largest one is what tends to reduce cost, but capability is what is being optimised, and a request that needs a bigger model will get one.

The resolved model determines the token rate. Your account agreement specifies any routing charge and the applicable rate card. See Pricing and Billing.

Seeing which model answered#

Every routed response names the model that produced it:

代码

x-grid-routed-model: livia-e1-mini

This is the part that matters. A router you cannot inspect is a router you cannot debug, cannot audit, and cannot justify to whoever asks why an answer changed. The header is present on every call, so logging it next to your own request id is enough to reconstruct any response later.

The Console usage dashboard shows the same breakdown over time, by model, by run mode and by period, in tokens.

When to pin instead#

Pin a model when you need determinism or release control.

Routing means the model can differ between two identical requests, because the catalog and the router both change over time. That is the right trade for most traffic and the wrong trade for a regression suite, a benchmark, or an output your users have learned to expect.

Pinning is just naming the id:

Python

resp = client.chat.completions.create(
    model="livia-e1-mini",
    messages=[{"role": "user", "content": "Summarise this contract clause."}],
)

A pinned version does not move when the catalog changes. If you need both, route the bulk of your traffic and pin the paths you have committed to.

Connect#

Connect is how that same router shows up inside coding agents and IDEs. The engine is Smart Router. The product is Connect. Grid remains the factory. Connect is by invitation. It does not change the API contract on this page.

申请访问权限

Agent API 与 Grid 访问权限均实行邀请制。具体启用的服务与条款将在入驻引导期间确认。

草稿仅在本次浏览器访问期间保留。刷新页面将清空草稿。

依据我们的 隐私与数据保护声明 (GDPR、LGPD 与 CCPA)进行处理。绝不出售或共享任何个人数据。

联系我们

请告知您的基本信息和需要评估的需求内容。

草稿仅在本次浏览器访问期间保留。刷新页面将清空草稿。

在本次访问期间,每个主题都会保留各自的需求内容。切换主题不会丢失您的联系方式。

依据我们的 隐私与数据保护声明 (GDPR、LGPD 与 CCPA)进行处理。绝不出售或共享任何个人数据。

[隐私与遥测控制]

数据保护与遥测偏好设置

Forward Intelligence (国际业务由 Forlex, LLC 运营,巴西业务由 Forlex Ltda运营) 尊重您在欧盟/英国 GDPR、巴西 LGPD(Lei nº 13.709/2018)以及加利福尼亚州 CCPA/CPRA 下享有的权利。

严格必要的存储始终启用

在您的浏览器本地存储颜色主题 (grid-theme)、文档导航状态以及您的隐私偏好设置 (fwdi_privacy_consent_v1)。不会设置任何第三方 Cookie 或跨站追踪器。

语言选择器仅将您的语言偏好保存在第一方 Cookie (fwdi-language) 中,有效期最长为一年。这不会启用任何可选的分析功能。

脱敏路由与漏斗分析已禁用

收集列入白名单的营销路由上的汇总页面浏览量及粗粒度商业漏斗事件,采集工具为 @vercel/analytics。查询字符串、动态路径和个人数据在发送前均会在客户端进行脱敏处理。

阅读完整的 GDPR / LGPD / CCPA 声明