Skip to content

test: qualify prompt-cache usage across Responses paths - #421

Merged
maralbahari merged 4 commits into
vllm-project:mainfrom
skyloevil:qualify-prompt-cache-usage
Oct 9, 2026
Merged

maralbahari merged 4 commits into
vllm-project:mainfrom
skyloevil:qualify-prompt-cache-usage

Conversation

@skyloevil

@skyloevil skyloevil commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add conformance coverage for Responses prompt-cache usage under #330. Verify cache reads and optional cache writes across direct and executor-backed HTTP JSON/SSE, WebSocket, tool rounds, and stored response retrieval.

  • Cover omitted, null, zero, and nonzero write counters without deriving writes from reads or recomputing upstream totals.
  • Verify HTTP JSON/SSE and WebSocket continuations restore item history while reporting only the current response's usage. GET returns the stored usage snapshot without inference.
  • Cover tool-round accumulation with mixed reported/unreported counters, including null plus a value and all-null rounds. Repeated SSE snapshots do not count an inference twice.
  • Document routing conditions and terminal-snapshot accounting. The pinned OpenAI SDK declares a required integer write counter; tolerating missing/null counters is the gateway's compatibility policy for other upstreams.

The changes are limited to tests and documentation. Cache options, breakpoint qualification, and backend capability enforcement remain separate work in #330.

Test Plan

  • cargo test --offline -p agentic-server --test responses_test --test responses_websocket_test — 132 passed (54 HTTP, 78 WebSocket).
  • cargo test --offline -p agentic-server-core --test web_search_tool_test — 27 passed.
  • cargo clippy --offline --all-targets -- -D warnings — passed.
  • pre-commit run --all-files — passed.

Reconciled the tests and documentation with main at 5216d593. All new scenarios use local synthetic upstream fixtures and SQLite storage; no provider cassettes were changed. These tests verify usage preservation, not real-model cache performance.

@skyloevil
skyloevil marked this pull request as draft October 5, 2026 19:14
@skyloevil skyloevil changed the title chore: qualify prompt-cache usage across Responses paths test: qualify prompt-cache usage across Responses paths Oct 6, 2026
Preserve both sets of appended tests and documentation. Clarify the upstream compatibility contract and cover HTTP continuation and null counters across tool rounds.

Signed-off-by: zitian zhao <[email protected]>
@skyloevil
skyloevil marked this pull request as ready for review October 6, 2026 21:03
@maralbahari
maralbahari merged commit 40d9be4 into vllm-project:main Oct 9, 2026
19 checks passed
avinashsingh77 pushed a commit to avinashsingh77/agentic-api that referenced this pull request Oct 9, 2026
…#421)

## Summary

Add conformance coverage for Responses prompt-cache usage under vllm-project#330.
Verify cache reads and optional cache writes across direct and
executor-backed HTTP JSON/SSE, WebSocket, tool rounds, and stored
response retrieval.

- Cover omitted, null, zero, and nonzero write counters without deriving
writes from reads or recomputing upstream totals.
- Verify HTTP JSON/SSE and WebSocket continuations restore item history
while reporting only the current response's usage. GET returns the
stored usage snapshot without inference.
- Cover tool-round accumulation with mixed reported/unreported counters,
including null plus a value and all-null rounds. Repeated SSE snapshots
do not count an inference twice.
- Document routing conditions and terminal-snapshot accounting. The
pinned OpenAI SDK declares a required integer write counter; tolerating
missing/null counters is the gateway's compatibility policy for other
upstreams.

The changes are limited to tests and documentation. Cache options,
breakpoint qualification, and backend capability enforcement remain
separate work in vllm-project#330.

## Test Plan

- `cargo test --offline -p agentic-server --test responses_test --test
responses_websocket_test` — 132 passed (54 HTTP, 78 WebSocket).
- `cargo test --offline -p agentic-server-core --test
web_search_tool_test` — 27 passed.
- `cargo clippy --offline --all-targets -- -D warnings` — passed.
- `pre-commit run --all-files` — passed.

Reconciled the tests and documentation with main at `5216d593`. All new
scenarios use local synthetic upstream fixtures and SQLite storage; no
provider cassettes were changed. These tests verify usage preservation,
not real-model cache performance.

Signed-off-by: zitian zhao <[email protected]>
Co-authored-by: Hao Shan <[email protected]>
Co-authored-by: Maral <[email protected]>
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.

3 participants