MODEL_RATE_LIMIT
Currently only used in `langchainjs` (JavaScript/TypeScript).
You have hit the maximum number of requests that a model provider allows over a given time period and are being temporarily blocked.
This error occurs when you exceed the maximum number of requests permitted by your model provider within a specific timeframe, resulting in temporary blocking. The restriction is generally temporary and lifts after the limit resets.
Troubleshooting
To resolve this error, you can:
- Implement Rate Limiting: Deploy a rate limiter to regulate the frequency of requests sent to the model. :::python See rate limiting (opens in a new tab) docs. :::
- Implement Response Caching: Use model response caching to reduce redundant requests when incoming queries are repetitive.
- Use Multiple Providers: Distribute requests across multiple providers if your application architecture supports this approach
- Contact Your Provider: Reach out to your model provider requesting an increase to your rate limits