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
can_use_output_schema_with_tools with tools using LiteLLM #5130
While it can works with some providers (e.g. OpenAI), looks like in general it can mislead.
For example, in case vLLM and Qwen with thinking the behavior changed completely: the LLM returns structured output, but without expected tool calls. Meanwhile we see that reasoning part contains something like this:
I need to call `cx_get_guidance(section='order_management_refunds')` first to understand the refund process and what information I need.
After getting guidance, I may need to:
- Check customer's recent purchases to identify the cancelled one
- Get purchase details if I can identify it
Let me start with getting the guidance.
So the LLM inference tool call, but looks like output schema take precedence and return structured output immediately without further tool calls.
ModelResponse(id='chatcmpl-bcc5ab3b1b83e8dd', created=1775249582, model='dashscope/hosted_vllm/Qwen/Qwen3.5-397B-A17B-FP8', object='chat.completion', system_fingerprint=None, choices=[Choices(finish_reason='stop', index=0, message=Message(content='{\n "escalation_reason": "N/A",\n "reply": "<reply_from_llm>",\n "to_escalate": false\n}', role='assistant', tool_calls=None, function_call=None, reasoning_content='Let me analyze this step by step.\n\n**STEP 1: Read Input & Context**\n- Customer is female (sex: \'Female\')\n- ...
It's not reproducing with thinking=off in Qwen what might suggest that behavior depends on LLM configuration / usage usecase and cannot just rely on isinstance(model, LiteLlm).
Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:
Install 'pip install google-adk==1.27.0'
Create agent with output_schema and tools
Use LiteLLM with local model (e.g. Qwen)
Check the result doesn't contain tool calls
Expected Behavior:
LLM returns tool calls with structured output even if it's not supported by LLM.
Observed Behavior:
LLM can omit tools calls when output schema defined.
Environment Details:
ADK Library Version: 1.27.0
Desktop OS: macOS
Python Version (python -V): 3.12.10
Model Information:
Are you using LiteLLM: Yes
Which model is being used: Qwen3.5-397B-A17B-FP8 with thinking
closing as a duplicate of #6954, which is the same gate.
LiteLlm.capabilities reports output_schema_and_tools=True for every model it wraps, whatever that model can actually do. so adk applies the response schema directly and never falls back to SetModelResponseTool. that's still true on main and in both current releases, so there's nothing to upgrade to yet. #6955 is the open fix.
yours is the older report by five months, and #6954 doesn't have your qwen and vllm data point. paste it over there.
Activity
kedar49 commentedon Apr 5, 2026
@Jacksunwei assign me this issue, Will work on this
xuanyang15 commentedon Apr 10, 2026
@GWeale Could you please help take a look or assign to @kedar49?
kedar49 commentedon Apr 10, 2026
@xuanyang15 , @GWeale Yes, Assign me this
GWeale commentedon Sep 3, 2026
closing as a duplicate of #6954, which is the same gate.
LiteLlm.capabilities reports output_schema_and_tools=True for every model it wraps, whatever that model can actually do. so adk applies the response schema directly and never falls back to SetModelResponseTool. that's still true on main and in both current releases, so there's nothing to upgrade to yet. #6955 is the open fix.
yours is the older report by five months, and #6954 doesn't have your qwen and vllm data point. paste it over there.