Skip to content

feat(http): add pod/namespace/request-id response headers to /embeddings#374

Open
sbekkerm wants to merge 1 commit intollm-d:mainfrom
sbekkerm:emb
Open

feat(http): add pod/namespace/request-id response headers to /embeddings#374
sbekkerm wants to merge 1 commit intollm-d:mainfrom
sbekkerm:emb

Conversation

@sbekkerm
Copy link
Contributor

@sbekkerm sbekkerm commented Mar 4, 2026

Summary

Adds the same optional response headers to /v1/embeddings that are already sent for chat/text completions: pod, port, namespace, and request-id (when EnableRequestIDHeaders is set). This makes embeddings responses consistent with completions for testing and debugging (e.g. in multi-pod setups).

Changes

  • addResponseHeaders helper — New helper on VllmSimulator that sets pod, port, namespace, and request-id on the response when configured. Only adds the request-id header when it is non-empty.
  • EmbeddingsHandleEmbeddings now calls addResponseHeaders(ctx, s.getRequestID(ctx)) before sending the JSON response.
  • CompletionshandleHTTP now uses the same helper with reqCtx.request().GetRequestID() instead of inlining the header logic.

Use shared addResponseHeaders helper so embeddings matches completions.

Signed-off-by: Sergey Bekkerman <[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.

1 participant