Undocumented function call usage quotas in Gemini API via ADK
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 1.3k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 34
Description
**Describe the bug**
When working around FunctionTool issues in ADK (see [#1331](https://github.com/google/adk-python/issues/1331)), I switched to making raw Gemini function-calling requests via GeminiModel. During testing, I hit usage limits that weren’t documented or surfaced clearly.
There was no warning in the ADK or Gemini model layer about:
- Total allowable function calls per session
- Cost attribution per tool invocation
- Quota resets or limits on LLM-calling tools
This led to unexpected behavior during high-volume multi-agent tests and debugging.
**To Reproduce**
Steps to reproduce the behavior:
- Use ADK with GeminiModel to call functions repeatedly in a session (e.g., in a multi-agent orchestration).
- Observe silent failures or abrupt errors once usage limits are exceeded.
- Note absence of any quota warnings or guidance in logs or docs.
**Expected behavior**
- Clear documentation and/or runtime warnings about function call usage quotas and limits.
- Transparent reporting of quota usage and reset timing.
- Graceful handling or informative errors when usage limits are approached or exceeded.
**Why it matters**
For devs who use GeminiModel directly (especially as a workaround for FunctionTool bugs), undocumented quota ceilings can cause:
- Mid-session silent failures
- Unexpected billing costs
- Confusion during local testing vs production
**Suggested Fix**
- Add quota-related warnings or logging at the ADK level (when using GeminiModel).
- Update documentation with clear guidance on function call limits and costs.
- Optionally: expose usage_info in agent logs or responses.
**Related**
- [#1331](https://github.com/google/adk-python/issues/1331)
- [#1592](https://github.com/google/adk-docs/issues/826)
- [#1594](https://github.com/google/adk-docs/issues/473)
**Desktop**
- ADK version(pip show google-adk): 1.2.1
Thanks again!
Contributor guide
Assessment
This issue has not been assessed yet.