Skip to main content
Every limit, error status and error code of Moss Inference, with what to do about each. Responses and Chat Completions share them.

Limits

Limits apply per project. On moss/fastlane-1, the 262,144 tokens are the whole context. The prompt, the retrieved facts and the reply share them. On the Moss key, anthropic/claude-haiku-5.5 takes up to 64,000 prompt tokens. Models lists the prompt limit of every model. One request searches at most 32 indexes, named in X-Moss-Indexes. MCP servers add limits of their own. A request with too many servers or tools returns 400. Too many MCP requests at once return 429 with code mcp_loops_busy. A request with MCP servers can run for a few minutes. To raise a limit for your project, ask through Support.

Rate limit headers

These headers show how much of the project’s limits is left. The tokens headers come on moss/fastlane-1 only.

Errors

Every error has OpenAI’s shape: an error object with message, type and code.
429 Too Many Requests
On your own key, a bad key returns the vendor’s status: 401 from OpenAI and Anthropic, 400 from Google.

Errors after a stream starts

A failure after a stream starts arrives as a stream event. On Responses, the stream ends with response.failed, whose response.error has type, code and message. On Chat Completions, a last data: frame carries error in place of choices, then data: [DONE] follows. Without stream, the same failure returns 502, or 424 once an MCP call ran. Streaming shows both stream forms.

Retry rules

The Moss SDKs retry on their own, 2 times by default. They retry a connection failure, or a 408, 409, 429 or 5xx, before the response starts. Each retry waits for Retry-After when it is 60 seconds or less, and backs off otherwise. In the Moss SDKs, x-should-retry: false stops a retry, and x-should-retry: true forces one. They never retry a stream that has started. The OpenAI SDKs retry on their own as well. If you call the endpoint directly, follow the same rules. Fix a 400, 401, 403 or 413 before you send the request again. Never replay a request that failed with failed_after_tool_call. An MCP tool already ran and may have changed data. The 424 carries x-should-retry: false, so the SDKs do not retry it either. Every response carries X-Moss-Request-Id, a refused one included. Include it when you report a problem. Each SDK exposes it as the request id of the response and of the error.

SDK errors

Each Moss SDK has one error for a failed call. The error holds the status, type and code from the Errors table. It also holds the request id and the Retry-After wait. JavaScript and the browser name the code errorCode. The SDK sets five types itself, with no status: Android throws IllegalArgumentException in place of invalid_request_error. In C, a rejected argument returns ERR_NULL_POINTER or ERR_INVALID_ARG, with a NULL detail.