While migrating from the standard generateContent workflow to the newer Interactions API (Gemini Next Gen API) using
the @google/genai SDK, I noticed a lack of parity regarding token log probability support.
In the standard generateContent flow, GenerateContentConfig correctly exposes responseLogprobs and logprobs when I activate the ‘vertexai’ param. However,
in the newer Interactions pattern, the configuration interfaces seem to have omitted these fields.
The current flow to use it on generateContent:
client = genai.Client(vertexai=True, project=PROJECT_ID, location=LOCATION)
response = client.models.generate_content(
model=MODEL_ID,
contents=prompt,
config=GenerateContentConfig(
response_logprobs=True,
logprobs=3,
temperature=0.0
)
)
But I could’t find any reference about logprob in the new API/endpoint (interactions)