Files
picoclaw/pkg/providers
Zane Tung 8d97896a0d fix(providers): handle nil input in GLM series tool_use blocks
- add defensive nil check for tool call Arguments field
- replace nil input with empty object to comply with Anthropic spec
- prevent API errors when GLM models return null input in tool_use blocks

Zhipu AI's GLM series models may return tool_use blocks with null input field,
which causes their API to reject subsequent requests with error:
"ClaudeContentBlockToolResult object has no attribute id"

This fix ensures compatibility by converting nil inputs to empty objects {},
matching the Anthropic Messages API specification while maintaining backward
compatibility with other providers.
2026-03-17 12:16:24 +08:00
..
2026-03-15 12:45:11 +08:00
2026-03-01 18:24:11 +11:00
2026-02-18 21:48:23 +02:00
2026-02-25 21:14:19 +11:00
2026-03-01 18:24:11 +11:00
2026-02-18 21:48:23 +02:00
2026-03-01 18:17:32 +11:00