Dyad LogoDyad
Troubleshooting Topics

Rate limit

Handling rate limit errors from the AI provider

If you're hitting a rate limit error like "Resource has been exhausted (e.g. check quota)", please read this guide.

Why it happens

The most common reason for hitting a rate limit error is that you're using a free API key, and the AI provider is restricting your usage. We recommend going to the AI provider's site for docs on their rate limits. For example, you can find Google Gemini's rate limits here.

The actual rate limit you hit can be lower than the AI provider's documented rate limits. This can happen when AI providers have too much demand.

There are two main types of rate limits you can hit:

Too many tokens

If you're trying to use too many tokens at once, the AI provider can rate limit you. Even if you're under the model's maximum context window (e.g. 1 million tokens for Google Gemini models), you can still hit the rate limit because the free tier has a significantly lower limit than the model's maximum. In this case, you can either upgrade to Dyad Pro, upgrade to a paid API key, or use manual context management to work around this.

Too many requests

If you've sent too many requests in a period of time (e.g. a minute, an hour, or a day), the AI provider can rate limit you. The simplest way to address this is to just wait a while to cool down until you're under the rate limit. If you don't want to wait, you can upgrade to Dyad Pro, upgrade to a paid API key, or use another AI provider.

Solutions

You can use any of these solutions or a combination of solutions to address the rate limit errors.

Upgrade to Dyad Pro

The simplest way to avoid these rate limit errors is to upgrade to Dyad Pro, which lets you access the leading AI models using Dyad Pro AI credits.

Upgrade to paid API key

You can also upgrade your API key directly with the AI provider and enable billing.

You will be billed directly by the AI provider. Please monitor your usage directly with the AI provider.

Use another AI provider

You can also switch to another AI provider while you're waiting for the rate limit to cool down. For example, if you're using Google Gemini, you can switch to OpenRouter and create a free API key with them.

Use manual context management

To use fewer tokens, you can use the manual context management feature, which allows you to send only part of your codebase with each AI interaction.

FAQ

On this page