test: add regression coverage for structured input_text without message type (#150) - #248
Open
Zheng-Lu wants to merge 1 commit into
Open
Conversation
…ge type (vllm-project#150) PR vllm-project#144 (commit 8746709) already fixed this via InputItem's custom Deserialize impl, which treats a missing/None "type" field as shorthand for "message". This adds regression tests so vllm-project#150 can be closed with guard coverage instead of relying on the fix staying accidental. - Unit tests in agentic-server-core reproduce the exact issue payload, plus edge cases mixing a shorthand message with typed items (function_call, custom_tool_call_output) and with multiple content part types (input_text + input_image). - An end-to-end integration test in agentic-server posts the issue's payload to POST /v1/responses and asserts it is accepted and forwarded upstream correctly. Signed-off-by: Zheng Lu <Lz429671594@gmail.com>
Zheng-Lu
requested review from
bbrowning,
franciscojavierarceo,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
September 5, 2026 22:30
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
PR #144 (commit
8746709) already fixed the deserialization failure reported in #150 viaInputItem's customDeserializeimplementation, which treats a missing/None"type"field as shorthand for"message". This PR leaves production code untouched and adds regression test coverage so #150 can be closed with guard coverage instead of relying on the fix staying accidental:agentic-server-core(crates/agentic-server-core/src/types/io/input.rs):issue_150_structured_input_without_message_type: reproduces the exact reported issue payload.issue_150_shorthand_message_mixes_with_typed_items: verifies shorthand messages alongside explicitly typed items (function_call,custom_tool_call_output).issue_150_shorthand_message_with_mixed_content_parts: verifies shorthand messages with multiple content part types (input_text+input_image).agentic-server(crates/agentic-server/tests/responses_test.rs):test_structured_input_without_message_type_is_accepted: posts the issue's payload toPOST /v1/responsesand asserts it is accepted (HTTP 200) and forwarded upstream intact.Fixes #150
Test Plan
All local tests, linting, and formatting checks passed cleanly:
cargo fmt -- --checkcargo clippy --all-targets -- -D warnings(0 warnings)cargo test -p agentic-server-core types::io::input::tests(14/14 passed, including all 3 new regression tests)cargo test -p agentic-server --test responses_test test_structured_input_without_message_type_is_accepted(passed)