Gemini 3 Support :thread:
# dev-help
c
Gemini 3 Support đź§µ
🙌 1
there seems to be some LLM error when i try our hello world example w/ latest SDK:
Copy code
LLM_MODEL="litellm_proxy/vertex_ai/gemini-3-pro-preview" uv run examples/01_standalone_sdk/01_hello_world.py
Copy code
ands-sdk/openhands/sdk/conversation/impl/local_conversation.py", line 337, in run
    raise ConversationRunError(self._state.id, e) from e
openhands.sdk.conversation.exceptions.ConversationRunError: Conversation run failed for id=4af8e118-92a4-44da-925b-b3fb4640f543: litellm.BadRequestError: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: Vertex_aiException BadRequestError - {\n  "error": {\n    "code": 400,\n    "message": "Request contains an invalid argument.",\n    "status": "INVALID_ARGUMENT"\n  }\n}\n. Received Model Group=vertex_ai/gemini-3-pro-preview\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
Based on traces from Laminar (
examples/01_standalone_sdk/27_observability_laminar.py
), the error seems to happen when we send "thinking_blocks" to Gemini
@calm-artist-7206 should we actually send thinking blocks to Gemini? đź‘€
c
I think so… the signature at least, I think it identifies the thinking on provider side But I’m not sure what happens here,
thinking
has the tool call
l
From someone at Google Cloud
c
Thank you! Yes, found this:
To ensure the model maintains full context across multiple turns of a conversation, you must return the thought signatures from previous responses in your subsequent requests. If a required thought signature is not returned when using Gemini 3 Pro, the model returns a 400 error.
Noticed this
If the model returns parallel function calls (for example, FC1+signature, FC2), your response must contain all function calls followed by all function responses (FC1+signature, FC2, FR1, FR2). Interleaving responses (FC1+signature, FR1, FC2, FR2) results in a 400 error.
c
we need to figure out how to include those responses first đź‘€
c
Could we send back the signatures, but maybe not “thinking” ? Could be a bad idea, but this is what I get from this spec…
c
Looking at this, we probably need to figure a way to feed
ThinkingBlock
back to LiteLLM so it works. Asking OH on how we can do that.. https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures#chat-completions_1
👍 1
c
No “thinking” here, only the signature
c
ah this seems to fix the issue
LiteLLM tells me we should just send back
thinking_blocks
i wonder why would our previous approach work with anthropic..
ha, this also works with anthropic
it is probably just us doing things wrong before
m
awesome
l
it seems that gemini-3-pro got 74.2 in the minimal swe-bench agent: https://www.linkedin.com/posts/klieret_gemini-3-pro-sets-new-record-on-swe-bench-acti[…]m=member_desktop&rcm=ACoAACh2WhsB4oi4KzCcxCLc9vpiZl7WAwlADTg If we’re getting 4 points worse than this it seems like there might be some issue. I don’t know if it’s because the Claude edit tools are confusing the agent, our prompt is too complex, or what. Maybe we should figure out a way to reproduce the minimal SWE-bench agent within the OpenHands agent SDK and see if we can reproduce this result?
@millions-crayon-32880 Could you take a look at this one? https://github.com/OpenHands/benchmarks/issues/106 I added three potential things we could try
đź‘€ 1