-
Notifications
You must be signed in to change notification settings - Fork 304
Open
Labels
Milestone
Description
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
:pathheader is rewritten to/v1/chat/completions - Verify
content-lengthis 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
inputfield) - 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
- Parent PR: [Feat][Memory] Add OpenAI Response API support #802
- Config example:
config/testing/config.response-api.yaml
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog