Description
I am implementing an AI assistant using the Gemini 3.1 Flash Live Preview model over WebSockets in Node.js. I am trying to provide a PDF document as initial context for the session but consistently encounter Error 1008.
Steps to Reproduce
- Upload a PDF via Files API (Status is
ACTIVE). - Establish a WebSocket connection to
v1betaLive API. - Send a
setupmessage withhistory_config: { "initial_history_in_client_content": true }. - After receiving
setupComplete, send aclient_contentmessage containingfile_datawith the PDF’sfile_uri.
Observed Behavior
Immediately after the client_content message is sent, the server returns:
Error 1008: Operation not supported
Questions
- Does the Multimodal Live API officially support
application/pdfviafile_datain the real-time stream? - If yes, what is the exact required schema for Gemini 3.1, since putting
initial_contentin thesetupmessage returnsError 1007 (Unknown name)? - Is this a temporary limitation or is PDF parsing restricted to the Unary/REST API only?
Environment:
- Model:
gemini-3.1-flash-live-preview - Environment: Node.js / Next.js
- SDK:
@google/generative-ai