跳至正文

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

Errors and cold start

What Grid returns when something is wrong, and what to do about it. The one you must handle is 503 with Retry-After.

Most of this page is the usual list. One entry is not, and it is the one to read first.

Cold start on Serverless#

Grid Serverless scales to zero. When a lane has had no traffic it releases its capacity, and the next request has to wait for it to come back.

Grid does not hold your request open while that happens. It answers:

代码

HTTP/1.1 503 Service Unavailable
Retry-After: 5

This is a documented state, not a fault in your code. The correct handling is to wait for the interval in Retry-After and retry, with backoff if it happens again.

We do not promise zero cold start, and you should not design as though there were one. What we do promise is that the wait is visible: a header you can read and act on, rather than a request that hangs until your own timeout fires and leaves you guessing why.

Python

import time
import openai

def complete(client, **kwargs):
    for attempt in range(5):
        try:
            return client.chat.completions.create(**kwargs)
        except openai.APIStatusError as e:
            if e.status_code != 503 or attempt == 4:
                raise
            # Prefer the server's interval; fall back to exponential backoff.
            wait = float(e.response.headers.get("retry-after") or 2 ** attempt)
            time.sleep(wait)

If you already retry on 503, you are done. If your client treats 503 as fatal, change that before you go to production.

Workloads that cannot tolerate a warm-up wait at all are the case for Grid Dedicated, where capacity is committed rather than elastic.

Status codes#

CodeMeaningWhat to do
400The request is malformed or a parameter is invalid.Fix the request. Retrying will not help.
401The API key is missing or not valid.Check the Authorization header. See the note below on the body format.
403The key is not permitted to do this.Confirm the key has inference access, and that the model is in your catalog.
404No such route, or no such model for this account.Check the path, then list the catalog.
429Rate limited, or a quota is exhausted.Back off and retry. If it persists, it is a quota rather than a burst.
402Billing. The account cannot currently be charged for this request.Check billing status in the Console. Retrying will not help.
503Cold start, or capacity is momentarily unavailable.Retry per Retry-After. See above.
5xxSomething failed on our side.Retry with backoff. If it persists, tell us.

Retry 429, 503 and 5xx. Do not retry 400, 401, 402 or 403: they describe a condition that will still be true on the second attempt.

Error bodies are not always JSON#

Authentication failures currently answer with content-type: text/plain and a short message, rather than the JSON {"error": {...}} envelope the OpenAI SDKs expect.

The status code is correct and the SDKs surface it correctly. What may not work is code that reads a parsed error body, because on a 401 there is no JSON object to parse.

Branch on the status code. If you need the message, read the raw response text rather than a decoded field.

We would rather tell you this than let you find it in production. It is a gap against strict OpenAI compatibility and it is on the list to close.

Response headers#

x-grid-routed-model names the model that produced the response. It is present on every call, routed or pinned.

Log it. When someone asks in three months why an answer looked different, the resolved model next to your own request id is the difference between an investigation and a guess.

Other headers exist on responses. They are not documented here yet because their names are not settled, and a header name in docs is a name we would owe you stability on.

Timeouts and streaming#

Grid supports streaming on chat completions. A streamed response can fail after the first token has arrived, which means a 200 is not a guarantee of a complete answer: handle a stream that ends early as its own case rather than assuming success from the status.

When it is not you#

Platform status is published at status.forlex.ai. Grid's own component is not wired into that page yet, so during the invite the fastest answer to "is it me or is it you" is to ask us directly.

申请访问权限

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 声明