Repository navigation
v1.13.9
Changes
What broke
A turn that carried an image failed on these paths with Object of type ImageContent is not JSON serializable. They passed the universal {"type": "image", "source": ImageContent} blocks straight to the provider SDK instead of running _prepare_messages first:
OpenAIDriver/AsyncOpenAIDriver:generate_messages_with_tools_stream(chat-completions branch)GroqDriver/AsyncGroqDriver:generate_messages_with_tools_streamClaudeDriver/AsyncClaudeDriver:generate_messages_with_tools,generate_messages_stream,generate_messages_with_tools_stream
So Agent.run_live(..., images=...) and AsyncConversation.ask_live with images could not send a picture to OpenAI, Groq or Claude.
The fix
- Each of those paths now converts messages with the driver's
_prepare_messages, asgenerate_messagesand the Responses API branch already did. _prepare_claude_vision_messagespasses through a block that is already in Anthropic's shape (itssourcea plain dict), so preparing twice is harmless. The async Claude_do_generatenow prepares as well.
Tests
tests/test_vision.py adds checks that the OpenAI tool stream (sync and async), the async Claude tools / stream / tools-stream paths and the sync Claude streams all hand the SDK converted image blocks, plus a double-prepare check for the Claude helper. The vision, driver, streaming and live-event suites pass (250 passed, 1 skipped).