Skip to content

test: add regression coverage for structured input_text without message type (#150) - #248

Open
Zheng-Lu wants to merge 1 commit into
vllm-project:mainfrom
Zheng-Lu:test/issue-150-structured-input-regression
Open

test: add regression coverage for structured input_text without message type (#150)#248
Zheng-Lu wants to merge 1 commit into
vllm-project:mainfrom
Zheng-Lu:test/issue-150-structured-input-regression

Conversation

@Zheng-Lu

@Zheng-Lu Zheng-Lu commented Sep 5, 2026

Copy link
Copy Markdown

Summary

PR #144 (commit 8746709) already fixed the deserialization failure reported in #150 via InputItem's custom Deserialize implementation, 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:

  • Unit tests in 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).
  • End-to-end integration test in agentic-server (crates/agentic-server/tests/responses_test.rs):
    • test_structured_input_without_message_type_is_accepted: posts the issue's payload to POST /v1/responses and 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 -- --check
  • cargo 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)

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input field (enum ResponsesInput) validation error

1 participant