fix(conversations): model official input and output item unions - #747
Draft
leseb wants to merge 5 commits into
Draft
fix(conversations): model official input and output item unions#747leseb wants to merge 5 commits into
leseb wants to merge 5 commits into
Conversation
Replace the broad opaque Conversation item schema with the official OpenAI InputItem and ConversationItem unions at locally owned API boundaries. Generate deterministic recursive item contracts from the pinned OpenAI specification, compile runtime validators from the same artifact, validate accepted inputs and normalized stored outputs, and merge the official discriminator-based components into the generated OpenAPI document. Cover representative messages, tool calls, tool outputs, reasoning items, supported extensions, and malformed or unknown variants, then refresh the conformance report. Closes praxis-proxy#567 Signed-off-by: Sébastien Han <seb@redhat.com>
Regenerate the Conversations conformance report after the include-projection changes landed on main. Remove stale query-parameter drift for item endpoints and record the current item-union results: two exact operations, four request-drift operations, and four response-drift operations. Closes praxis-proxy#567 Signed-off-by: Sébastien Han <seb@redhat.com>
Resolve rebase conflicts between the request-contract alignment (praxis-proxy#566/praxis-proxy#625) and the item union modeling (praxis-proxy#567). Removes the dead nullable_initial_items_schema, adds a null-to-default deserializer for create items, fixes the integration test to include required OutputTextContent fields, and drops unused imports. Signed-off-by: Sébastien Han <seb@redhat.com>
leseb
marked this pull request as draft
August 14, 2026 09:52
leseb
force-pushed
the
leseb/issue-567-conversation-item-unions
branch
from
August 14, 2026 09:56
d92dae5 to
ac19b50
Compare
The jsonschema crate brings in borrow-or-share which uses the MIT-0 (MIT No Attribution) license. Add it to the deny.toml allowlist. Signed-off-by: Sébastien Han <seb@redhat.com>
…ovement Signed-off-by: Sébastien Han <seb@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #567.
InputItemandConversationItemunions usingoneOfvariants withtypediscriminators.xtaskcommand (sync-item-contracts), compiled at startup withjsonschemafor runtime validation.InputItemon create,ConversationItemon normalize/append-back, rejecting structurally invalid items with OpenAI-style error responses.nullable_vecdeserializer for null-as-empty items, remove deadnullable_initial_items_schema, fix integration test to include requiredOutputTextContentfields.Test plan
make lintpasses (clippy, fmt, deps, docs, examples)make testpasses (2534 unit + 457 integration + schema tests)append_back_persists_items_after_responsefixed and passing