Skip to content

[CI] Add E2E tests for Response API #805

@Xunzhuo

Description

@Xunzhuo

Summary

Add end-to-end tests for the Response API to ensure the complete request/response flow works correctly through Envoy and the semantic-router extproc.

Background

PR #802 introduced Response API support. E2E tests are needed to validate:

  • Request translation from Response API to Chat Completions
  • Response translation back to Response API format
  • Path rewriting (/v1/responses/v1/chat/completions)
  • Conversation chaining with previous_response_id
  • All CRUD endpoints work correctly

Test Scenarios

Basic Operations

  • POST /v1/responses - Create a new response
  • GET /v1/responses/{id} - Retrieve a response
  • DELETE /v1/responses/{id} - Delete a response
  • GET /v1/responses/{id}/input_items - List input items

Translation Tests

  • Verify request body is correctly translated to Chat Completions format
  • Verify response body is correctly translated to Response API format
  • Verify :path header is rewritten to /v1/chat/completions
  • Verify content-length is recalculated after body mutation

Conversation Chaining

  • Create initial response, verify ID is returned
  • Create follow-up with previous_response_id
  • Verify conversation history is included in backend request
  • Test chain of 3+ responses

Error Handling

  • Invalid request format (missing input field)
  • Non-existent previous_response_id
  • Non-existent response ID for GET/DELETE
  • Backend error passthrough

Edge Cases

  • Empty input
  • Large input (token limit)
  • Special characters in input
  • Concurrent requests

Test Infrastructure

  • Set up test Envoy config with Response API enabled
  • Mock or stub vLLM backend for consistent responses
  • Add to CI pipeline

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions