You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(live): forward groundingMetadata, thought/code parts, goAway, usageMetadata, and waitingForInput #362
Decode serverContent field 4 (index 3, groundingMetadata) via decodeGroundingMetadata into BidiEventGrounding instead of falling through to raw provider (verified live on gemini-4-live with googleSearch enabled).
Decode serverContent field 8 (index 7, waitingForInput, verified in YUh4Se.jsXsi) into BidiEventWaitingForInput.
Decode message[5] (usageMetadata) via decodeUsage into BidiEvent.Usage and message[6] (goAway[Duration([seconds, nanos])]) into BidiEvent.GoAwayTimeLeft (preserving Raw).
Expose grounding on /v1/live server messages (BidiEventGrounding).
internal/api/live_gemini.go:
Forward BidiEventGrounding (serverContent.groundingMetadata), BidiEventWaitingForInput (serverContent.waitingForInput), BidiEventGoAway (goAway.timeLeft), BidiEventUsage (usageMetadata using Live API responseTokenCount / responseTokensDetails), and embedded EventReasoning / EventExecutableCode / EventCodeExecutionResult parts from BidiEventProvider (modelTurn.parts) on /ws/...BidiGenerateContent.
docs/protocol.md: sync Live server message lists.
internal/aistudio/bidi_events_test.go, internal/api/live_gemini_events_test.go: unit tests covering Playground protobuf-array and Build JSON decoding plus standard Gemini Live event formatting.
验证 / Verification
go test -mod=readonly -trimpath -count=1 ./internal/aistudio/... ./internal/api/... (internal/aistudio0.056s, internal/api0.096s) — passed.
go vet -mod=readonly ./internal/aistudio/... ./internal/api/... ./internal/i18n/... — passed.
Activity