mirror of
https://github.com/hanzoai/ai.git
synced 2026-11-20 14:13:23 +00:00
The SDK reaches cloud.google.com/go/auth for credentials, which drags s2a-go, gax-go, google.golang.org/api, gRPC and protobuf into every binary that links this module. Gemini is an API-key REST service; none of that machinery buys anything. internal/gemini covers exactly the four calls we make — countTokens, generateContent, batchEmbedContents and models.list — against the same v1beta endpoints and x-goog-api-key auth the SDK used, and errors where the SDK call sites used to risk a nil deref on a candidate-less (safety-blocked) response. Co-authored-by: Hanzo Dev <[email protected]>