Query Tool Error - Resource Exhausted
# support
h
@Vapi Support Bot @Vapi I’m encountering the following error when using the query tool to retrieve data from the knowledge base:
Copy code
{
  "error": {
    "code": 429,
    "message": "Resource has been exhausted (e.g. check quota).",
    "status": "RESOURCE_EXHAUSTED"
  }
}
I am using Gemini 2.0 Flash. Here's the Call ID: 019e2707-51a2-7000-ba90-5598598ed433
@Shaunak Can you please guide on this.
c
Hi Hamza, It looks like the request is running into a 429 RESOURCE_EXHAUSTED error, which generally indicates a quota or rate limit has been reached. Please check the usage limits and quota settings for the configured setup, then try the request again. Best, Akash Customer Support
d
@hamza-007 I’ve run into similar issues with Vapi tools, especially when querying knowledge bases. A 429 usually means the underlying provider or retrieval layer is hitting a quota/rate limit, so switching models may not fully solve it. My preferred approach is to build the tools outside of Vapi and connect them through a custom endpoint or MCP server. For knowledge-base queries, I usually set up my own vector database and retrieval logic so I have more control over speed, cost, rate limits, and fallback behavior. That setup has been much more reliable for me than relying only on Vapi’s built-in query tools. I’d be happy to help you think through the architecture if you want to go that route.
h
How to do that. This is handled by Vapi itself, how to bypass Vapi's rate-limited infrastructure?