File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99# Install SAM from PyPI (clean, no build hook)
1010RUN pip install --no-cache-dir "solace-agent-mesh==1.16.4"
1111
12+ # Upgrade litellm for Gemini 3.x thought_signature support.
13+ # SAM pins litellm==1.76.3 which lacks thought_signature handling
14+ # required by gemini-3.1-pro-preview (400 BadRequest on multi-turn tool calls).
15+ # litellm>=1.82.0 auto-extracts and preserves thought_signatures.
16+ RUN pip install --no-cache-dir "litellm>=1.82.0,<2.0"
17+
1218# Install medexpert
1319COPY pyproject.toml .
1420COPY src/ src/
Original file line number Diff line number Diff line change @@ -22,7 +22,15 @@ RUN pip install --no-cache-dir mcp-memgraph
2222# SAM pins litellm==1.76.3 which predates these models. The override installs 1.82.0
2323# without re-resolving SAM's dependency tree (--force-reinstall --no-deps).
2424# Verified: gemini-2.5-flash works correctly under 1.82.0 (backward compatible).
25- RUN pip install --force-reinstall --no-deps "litellm>=1.81.14,<2.0.0"
25+ RUN pip install --force-reinstall --no-deps "litellm>=1.82.0,<2.0.0"
26+
27+ # Override google-adk for Gemini 3.x thought_signature support.
28+ # SAM 1.16.4 pins google-adk==1.18.0 which predates thought_signature handling.
29+ # Gemini 3.x models (gemini-3.1-pro-preview) require thought_signatures in multi-turn
30+ # tool calls — without them, the model returns 400 BadRequest after multiple tool uses.
31+ # ADK 1.23.0+ preserves thought_signatures in FunctionCall conversions.
32+ # See: https://github.com/google/adk-python/issues/3705
33+ RUN pip install --force-reinstall --no-deps "google-adk>=1.23.0,<2.0.0"
2634
2735# Cold store data directory
2836RUN mkdir -p /app/data
You can’t perform that action at this time.
0 commit comments