-
Notifications
You must be signed in to change notification settings - Fork 520
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
AssistantMessage.error Not Parsed β Cannot Detect rate_limit Errors
The SDK defines AssistantMessage.error (including "rate_limit"), but the message parser never sets this field. This makes it impossible for applications to detect rate limits or implement retry logic.
Expected
AssistantMessage.error should be populated when the API returns an error.
Actual
The parser only extracts content, model, and parent_tool_use_id; the error field is ignored.
Suggested Fix
Add error parsing, e.g.:
error = data["message"].get("error")
return AssistantMessage(..., error=error)mnocito
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working