Anahata Gemini
The bridge between the Anahata Core and Google's GenAI ecosystem.
The Gemini module acts as a high-performance adapter, translating Anahata's domain model into native Google GenAI requests and responses.
The Content Translation Engine
The core of the Gemini module is the GeminiPartAdapter. It performs bidirectional translation between Anahata's provider-agnostic domain model and the native Google GenAI structures.
Multimodal Parts
Seamlessly handles BlobPart conversion for images, audio, and PDF attachments, ensuring MIME types are correctly mapped for Gemini's vision and hearing capabilities.
Ghost Metadata
Translates Anahata's "In-Band Metadata" into standard text content while maintaining the semantic cues required for Gemini to respect context pruning.
Native Tool Calling
Gemini's FunctionDeclaration system is bridged via the GeminiFunctionDeclarationAdapter. This component automatically generates Google-compatible tool schemas from Anahata's AbstractTool definitions.
Recursive Schema Support: Unlike standard libraries, the Gemini module supports deep recursive objects in tool parameters, enabling the model to return complex nested trees directly as tool responses.
Dynamic Request Mapping
The RequestConfigAdapter ensures that session-level settings (Temperature, TopK, Stop Sequences) are precisely applied to each API call. It also manages the Thinking Level mapping for models like Gemini 2.0 Flash Thinking.