|
I was able to make LiteLLM+OpenAI+Tools to work perfectly fine. For some reason, Gemini (Vertex or not) doesn't. It stops after detecting the tool call. A call like this agent("Hello, how are you? How much is 2+2")Renders the following output: |
Replies: 1 comment
|
Hey @dpolist, apologies for the extremely stale reply here. This one is old enough that a lot has changed since you asked, mostly in your favor. The biggest update: Strands now ships a native Gemini provider, so you don't need to go through LiteLLM for Gemini at all. Install with from strands.models.gemini import GeminiModel
model = GeminiModel(
client_args={"api_key": "<KEY>"},
model_id="gemini-2.5-flash",
)Tool calling works through the standard agent loop with this provider. Docs are here: Google provider. If you specifically need to stay on LiteLLM (for example behind a LiteLLM proxy), the LiteLLM provider has had several fixes to streamed tool call handling since mid-2025, so upgrade both |
Hey @dpolist, apologies for the extremely stale reply here. This one is old enough that a lot has changed since you asked, mostly in your favor. The biggest update: Strands now ships a native Gemini provider, so you don't need to go through LiteLLM for Gemini at all. Install with
pip install 'strands-agents[gemini]'and use it directly:Tool calling works through the standard agent loop with this provider. Docs are here: Google provider.
If you specifically need to stay on LiteLLM (for example behind a LiteLLM proxy), the LiteLLM provider has had sev…