@ai-sdk/google@4.0.70
Patch Changes
-
2a32459: fix(google): preserve JSON Schema instead of converting to OpenAPI schema
-
d93e295: fix(google): keep a realtime
functionResponse.responsean objectGemini types that field as a
google.protobuf.Struct, which accepts an object and
nothing else.onToolCallreturnsunknownandaddToolOutputtakesunknown, so a
string, number, array ornulltool result reached the wire unwrapped, Gemini closed
the socket with1007, and the close code was dropped on the way back so the
application saw a plain disconnect. A non-object result is now wrapped under the
outputkey the field's own docstring prescribes; an object is passed through
unchanged, as before.An
outputthat is not valid JSON no longer becomes{}. That branch told the model
the tool had returned an empty object, with nothing thrown and the socket still up, so
the answer was wrong with nothing to notice. The text is kept instead.