LCORE-3314: Use typed AddItemsRequest for conversation item creates - #2361
LCORE-3314: Use typed AddItemsRequest for conversation item creates#2361asimurka wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
| "type": "message", | ||
| "role": "user", | ||
| "content": [ | ||
| {"type": "input_text", "text": f"{MARKER_SENTINEL} {summary_text}"} |
There was a problem hiding this comment.
This can be simplified to plaintext message
| None otherwise. | ||
| """ | ||
| try: | ||
| return ConversationItem.from_dict(data) |
There was a problem hiding this comment.
New client types use automatic anyOf validators that create the actual model instances from plain dicts. This is preferable to importing internal client models with obscurely long names.
Description
Switch conversation item appends (turns, shield responses, compaction markers) to AddItemsRequest, parsing raw dicts through
ConversationItem.from_dictso OGX oneOf wrappers are validated beforeconversations.items.create. Drop the old items= / StainlessItemcast path and cover the helpers plus append flows in unit tests.Type of change
pyproject.toml+uv.lock]requirements.*.txtfor Konflux]Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing