> ## Documentation Index
> Fetch the complete documentation index at: https://cndoc-langchain.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MODEL_RATE_LIMIT

<Note>
  目前仅在 `langchainjs`（JavaScript/TypeScript）中使用。
</Note>

您已达到模型提供商在给定时间段内允许的最大请求次数，因此被临时阻止。

当您在特定时间范围内超出模型提供商允许的最大请求次数时，就会发生此错误，导致临时阻止。此限制通常是临时性的，并在限制重置后解除。

## 故障排除

要解决此错误，您可以：

1. **实施速率限制**：部署速率限制器以调节发送到模型的请求频率。
   参阅[速率限制](/oss/python/langchain/models#rate-limiting)文档。

2. **实施响应缓存**：使用模型响应缓存，以在传入查询重复时减少冗余请求。

3. **使用多个提供商**：如果您的应用程序架构支持此方法，可将请求分散到多个提供商。

4. **联系您的提供商**：联系您的模型提供商，请求提高您的速率限制。

***

<div className="source-links">
  <Callout icon="terminal-2">
    [将这些文档](/use-these-docs)通过 MCP 连接到 Claude、VSCode 等，以获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/oss/langchain/errors/MODEL_RATE_LIMIT.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
