Environment
-
Model: gemini-3-flash-preview
-
SDK: @google/genai (JavaScript/TypeScript)
-
API: Interactions API
Issue
After successfully executing function calls and sending results back via ai.interactions.create(), the API throws an internal Spanner database error when the model attempts to generate a response in Korean.
Error
BadRequestError: 400 {“error”:{“message”:“[original: spanner::Bad usage] New value is not valid UTF-8 for string column: Interactions.ResponseTruncatedText; at participant db88977682989677/g6332_1960988”,“code”:“invalid_request”}}
Context
-
User message was in Korean
-
Model successfully called multiple tools (function calls)
-
Tool results were sent back as JSON via ai.interactions.create() with previous_interaction_id
-
Error occurred when model tried to generate its final Korean response
Observations
-
The error references internal column Interactions.ResponseTruncatedText
-
Tool execution completed successfully before the error
-
Appears to happen when model generates non-ASCII (Korean) response text
-
Error is intermittent
Expected Behavior
Model should generate Korean response without internal database errors.