You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LiteLlm drops GenerateContentConfig.thinking_config; map it to litellm's reasoning_effort #7360
google.adk.models.lite_llm.LiteLlm._get_completion_inputs builds the litellm kwargs from a fixed allow-list of GenerateContentConfig fields (temperature, max_output_tokens, top_p, top_k, seed, stop_sequences, presence_penalty, frequency_penalty). thinking_config is present in config_dict but never forwarded, so an agent that sets e.g. ThinkingConfig(thinking_level=ThinkingLevel.LOW) gets the backend's default reasoning effort when run through LiteLlm, with no warning.
Verified on 2.8.0 and 2.10.0 (src/google/adk/models/lite_llm.py, the param_mapping / for key in (...) block, around line 3024 in v2.10.0). The only thinking handling in the file is the Anthropic thinking-block parsing on the response side.
litellm already normalises this across providers: reasoning_effort (low / medium / high, translated per provider, e.g. to Gemini thinkingConfig), and thinking={"type": "enabled", "budget_tokens": N} for budget-style providers.
Picking this one up now — opening a PR shortly. Flagging it here so nobody duplicates the work; if someone is already on it, say so and I will drop mine.
changed the title [-]LiteLlm drops GenerateContentConfig.thinking_config; map it to litellm's reasoning_effort[/-][+]`LiteLlm` drops `GenerateContentConfig.thinking_config`; map it to litellm's `reasoning_effort`[/+]on Sep 30, 2026
Reproduced this on 2.10.0 @chriswithers-fuse. temperature reaches litellm but neither thinking_level=LOW nor thinking_budget=1024 does so no release fixes it yet.
Until #7361 lands a workaround worth trying: pass the litellm param straight to the model, e.g. LiteLlm(model="...", reasoning_effort="low") or thinking={"type": "enabled", "budget_tokens": N} for budget-style providers. Could you check that this actually changes the reasoning behaviour with your backend? Only checked the kwargs going into litellm not a real provider call.
@chelsealong the mapping looks right. Before review could you also decide how thinking_budget=0/-1 should be handled and add a test for when a constructor reasoning_effort and thinking_config are both set (config currently wins)?
Activity
chelsealong commentedon Sep 30, 2026
Picking this one up now — opening a PR shortly. Flagging it here so nobody duplicates the work; if someone is already on it, say so and I will drop mine.
[-]LiteLlm drops GenerateContentConfig.thinking_config; map it to litellm's reasoning_effort[/-][+]`LiteLlm` drops `GenerateContentConfig.thinking_config`; map it to litellm's `reasoning_effort`[/+]surajksharma07 commentedon Oct 1, 2026
Reproduced this on 2.10.0 @chriswithers-fuse. temperature reaches litellm but neither thinking_level=LOW nor thinking_budget=1024 does so no release fixes it yet.
Until #7361 lands a workaround worth trying: pass the litellm param straight to the model, e.g. LiteLlm(model="...", reasoning_effort="low") or thinking={"type": "enabled", "budget_tokens": N} for budget-style providers. Could you check that this actually changes the reasoning behaviour with your backend? Only checked the kwargs going into litellm not a real provider call.
@chelsealong the mapping looks right. Before review could you also decide how thinking_budget=0/-1 should be handled and add a test for when a constructor reasoning_effort and thinking_config are both set (config currently wins)?
fix: forward thinking_config to litellm reasoning params