Conversation
The SDK's CreateResponseRequestInput oneOf model couldn't be auto-coerced from a raw string by Pydantic. Added _normalize_input() to properly wrap string and simple dict inputs into the generated model types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new private helper function Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
client.responses.create(input="some string", ...)failing because the generated PydanticCreateResponseRequestInputoneOf model can't be auto-coerced from a raw string_normalize_input()helper in the client resource layer that properly wraps input into the generated model types[{"role": "user", "content": "text"}]), and fully-structured API formatTest plan
input="What does amy talk about"input=[{"role": "user", "content": "text"}]🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores