Back
GoogleAntigravity
Prioritized inference tiers, real-time token usage streaming, and context-aware hook decorators
AI summary
Written by AI from the official notes. Check them for exact details.The 0.1.10 release adds prioritized inference tiers, real-time token usage streaming, and context-aware hook decorators.
- Gemini Prioritized Inference service tiers for high-priority model execution.
- Real-time token usage event streaming during agent execution.
- Context-aware hook decorators for maintaining state across callbacks.
- Tool call ID correlation for tracking multi-step tool invocations.
- Expanded local Gemma model documentation with guides and tutorials.
Why it matters: Developers and users of AI tools should care for improved execution efficiency and enhanced tracking capabilities.
Full release notes12 changes
The 0.1.10 release introduces support for Gemini Prioritized Inference service tiers, real-time token usage event streaming, stateful context-aware hook decorators, and explicit tool call correlation IDs across hook callbacks. It also standardizes default system instruction merging behavior, fixes WebSocket compaction events, and expands local Gemma model documentation.
- Gemini Prioritized Inference Service Tier: Configure agents to utilize Gemini Prioritized Inference service tiers for high-priority model execution with automated graceful fallback.
- Tool Call ID Correlation in Lifecycle Hooks: Inspect
call_idattributes on tool executions, errors, and hooks to correlate multi-step tool invocations across lifecycle callbacks. - Context-Aware Hook Decorators: Decorate hook handlers (
@hooks.pre_turn,@hooks.post_tool_call, etc.) that optionally acceptHookContextas a parameter to maintain state and share data across lifecycle callbacks. - ActionCompaction Event Emission & Hook: Track context window compaction notifications over WebSockets and intercept them using
@hooks.on_compaction. - Standardized System Instructions Strategy: Plain string instructions default to appending to built-in instructions. To override and completely replace built-in instructions, pass
CustomSystemInstructions. - Live Token Usage Reporting: Introduced real-time
UsageUpdateevent streaming so token usage accumulates live during agent execution rather than delaying updates until state transitions. - Interactive CLI Spinner: Updated CLI interactive loop spinner to list all active tool names when running concurrent tool calls (e.g.,
Running tools 'tool_a', 'tool_b'). - Module Re-exports: Re-exported
ReadUrlContentResultandSearchWebResultinconnections.localfor uniform tool result access. - Local Gemma Model Documentation: Added guides and tutorials for running agents locally with Gemma models using LiteRT and OpenAI-compatible endpoints.
- LiteRT Token Output Limit: Increased
max_output_tokensdefault in LiteRT local server configuration from 8,192 to 16,384 tokens to prevent truncation during complex reasoning and generation tasks. - ActionCompaction Event Emission: Fixed issue where compaction notifications were suppressed in external SDK releases, causing
@hooks.on_compactionhandlers andconversation.compaction_indicestracking to fail; compaction events now emit properly over WebSockets. - MCP Test Server Startup: Fixed a race condition where the HTTP port was exposed before uvicorn server startup completed, which previously caused intermittent
ConnectionRefusedErrorfailures during test initialization.