Commit 5cd7e0e
fix: unwrap SendMessageResponse RootModel in A2A adapter
The A2A SDK's SendMessageResponse is a Pydantic RootModel that wraps
a union of JSONRPCSuccessResponse and JSONRPCErrorResponse. We need
to unwrap the .root attribute to access the actual response object
with .result or .error attributes.
This fix enables proper error handling and response processing when
communicating with A2A agents.
Verified against test-agent.adcontextprotocol.org:
- get_info() works ✓
- list_tools() works ✓
- Tool calls now properly return authentication errors instead of
"Invalid response from A2A client"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c703600 commit 5cd7e0e
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
0 commit comments