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
AnthropicLlm.part_to_message_block() drops non-standard FunctionResponse dicts (breaks SkillToolset with Claude)` #4779
Describe the Bug: AnthropicLlm.part_to_message_block() only handles FunctionResponse.response dicts that contain a "content" or "result" key. When SkillToolset.load_skill() returns a response with keys skill_name, instructions, frontmatter, the method falls through and returns an empty string. This means Claude models never see the skill instructions after calling load_skill.
Steps to Reproduce:
Create an agent with AnthropicLlm (any Claude model)
Add a SkillToolset with at least one skill
Ask the agent to use the skill
The agent calls load_skill but receives an empty tool response — it cannot follow the skill instructions
Expected Behavior:
The tool response should contain the full skill instructions returned by load_skill.
Observed Behavior:
The tool response is empty. The agent sees no skill instructions.
Root cause
In anthropic_llm.py, part_to_message_block() checks for response.get("content") and response.get("result") but doesn't handle other dict structures. The load_skill tool returns {"skill_name": ..., "instructions": ..., "frontmatter": ...} which matches neither key.
Environment Details:
google-adk: main branch (post-1.26.0)
Python: 3.13
Model Information:
Are you using LiteLLM: No
Which model is being used: claude sonnet 4.6 (Other models as well)
Additional Context:
Add any other context about the problem here.
Suggested fix
Add a fallback that serializes arbitrary response dicts:
# In part_to_message_block(), after existing content/result checks:else:
content=json.dumps(response_data)
This ensures any FunctionResponse dict is passed to the model, regardless of key names.
Activity
akashbangad commentedon Mar 10, 2026
This PR should fix it - #4780
lachezartodorov-sg commentedon Mar 18, 2026
+1 I've been struggling with this issue for 2 days.
It will be great to see the fix in the next versions.
10x @akashbangad & @wukath
wukath commentedon Mar 18, 2026
we have imported the PR internally and are working on a fix!
kvodenicharov-sg commentedon Mar 19, 2026
Amazing!
wukath commentedon Mar 19, 2026
merged in c26d359