BasePlugin system. Call enable() to get a plugin that plugs into Runner(plugins=[...]), keeping runtime measurement and enforcement close to the ADK execution flow instead of pushing it out to a separate proxy layer.
Install
Quick Start
Configuration
Supported Gemini Models
| Model | Input $/1M | Output $/1M | Energy Coeff |
|---|---|---|---|
| gemini-2.5-flash | $0.15 | $0.60 | 0.30 |
| gemini-2.5-pro | $1.25 | $10.00 | 1.20 |
| gemini-2.0-flash | $0.10 | $0.40 | 0.25 |
| gemini-1.5-flash | $0.075 | $0.30 | 0.20 |
| gemini-1.5-pro | $1.25 | $5.00 | 1.00 |
Budget Enforcement
When budget is exceeded inenforce mode, the plugin returns an LlmResponse with error_code="BUDGET_EXCEEDED". The ADK runner handles this as a graceful stop.
Why This Integration Matters
- ADK runners can stay framework-native while gaining runtime governance
- Budget control and traces apply at the actual execution boundary
- The integration keeps the in-process latency advantage intact
Limitations
- Tool gating is not applied (intentional design choice — ADK manages tool execution internally)
- Model switching depends on ADK’s model configuration