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.
How often has this issue occurred?:
Describe the Bug:
AnthropicLlm.part_to_message_block()only handlesFunctionResponse.responsedicts that contain a"content"or"result"key. WhenSkillToolset.load_skill()returns a response with keysskill_name,instructions,frontmatter, the method falls through and returns an empty string. This means Claude models never see the skill instructions after callingload_skill.Steps to Reproduce:
AnthropicLlm(any Claude model)SkillToolsetwith at least one skillload_skillbut receives an empty tool response — it cannot follow the skill instructionsExpected 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 forresponse.get("content")andresponse.get("result")but doesn't handle other dict structures. Theload_skilltool returns{"skill_name": ..., "instructions": ..., "frontmatter": ...}which matches neither key.Environment Details:
Model Information:
Additional Context:
Add any other context about the problem here.
Suggested fix
Add a fallback that serializes arbitrary response dicts:
This ensures any FunctionResponse dict is passed to the model, regardless of key names.
How often has this issue occurred?: