claude-agent-sdk-python icon indicating copy to clipboard operation
claude-agent-sdk-python copied to clipboard

Fix a error about KeyError.

Open crazyss opened this issue 4 months ago • 0 comments

Fix KeyError 'model' in message_parser.py

In my macbook, I encountered this issue during try quicky_start.py .

.venv/lib/python3.13/site-packages/claude_code_sdk/_internal/message_parser.py", line 112, in parse_message
         content=content_blocks, model=data["message"]["model"]
                                       ~~~~~~~~~~~~~~~^^^^^^^^^
     KeyError: 'model'

crazyss avatar Aug 14 '25 09:08 crazyss