Skip to content

Fix EPP legacy tokenization failures for null-namespace tool calls - #3633

Closed
weizhoublue wants to merge 1 commit into
llm-d:mainfrom
weizhoublue:fix/pr-3524-2604900-57222
Closed

weizhoublue wants to merge 1 commit into
llm-d:mainfrom
weizhoublue:fix/pr-3524-2604900-57222

Conversation

@weizhoublue

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:

vLLM v0.31.0 and v0.32.0 include namespace: null when returning ordinary function calls.

// Example response to POST /v1/responses, with unrelated fields omitted.
{
  "output": [
    {
      "type": "function_call",
      "call_id": "call_123",
      "name": "get_weather",
      "arguments": "{\"city\":\"Paris\"}",

      // An ordinary function has no tool namespace, so this value is null.
      // This field does not represent a tenant.
      // Default value:
      // https://github.com/vllm-project/vllm/blob/v0.32.0/vllm/tool_parsers/utils.py#L202-L205
      "namespace": null

      // Response serialization does not exclude null values,
      // so namespace remains present as null.
      // Source:
      // https://github.com/vllm-project/vllm/blob/v0.32.0/vllm/entrypoints/openai/responses/api_router.py#L72-L73
    }
  ]
}

This behavior remains in these releases. vllm-project/vllm#47184 proposes omitting null namespace fields and includes an actual response containing namespace: null from live validation. The PR remains unmerged.

The client includes this function call in the next inference request as part of the conversation history. This is normal usage.

However, EPP's legacy conversion path rejects any function call with a namespace field. It does not distinguish between a null value and an actual namespace, so tokenization fails.

The inference request can still complete successfully, but scheduling cannot use its token-derived prefix-cache information or actual input length. This may increase redundant computation and response latency.

EPP should treat namespace: null the same as an absent field.

Which issue(s) this PR fixes:

Fixes #

Release note (write NONE if no user-facing change):

Fix EPP legacy tokenization failures for null-namespace tool calls

Signed-off-by: weizhou.lan@daocloud.io <weizhou.lan@daocloud.io>
@github-actions github-actions Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. area/epp area/scheduling and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 26, 2026
@weizhoublue
weizhoublue marked this pull request as ready for review October 26, 2026 08:15
@weizhoublue
weizhoublue requested review from a team, liu-cong, sagearc and vMaroon as code owners October 26, 2026 08:15
@weizhoublue
weizhoublue requested review from ahg-g, elevran and hexfusion and a balanced review from Copilot October 26, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow change correctly handles null namespaces and includes regression coverage; tests were inspected but not executed.

No open issues 🎉

What changed in this PR

This PR fixes EPP's legacy Responses tokenization for ordinary function calls containing namespace: null, preserving token-derived scheduling information.

Changes:

  • Treat null namespaces like absent namespaces while continuing to reject non-null values.
  • Add regression coverage for translating a null-namespace function call and its output.
File Description
pkg/​epp/​framework/​plugins/​requestcontrol/​dataproducer/​tokenizer/​responses.go Allow null namespaces in legacy function-call translation.
pkg/​epp/​framework/​plugins/​requestcontrol/​dataproducer/​tokenizer/​responses_test.go Verify the translated conversation for a null-namespace tool call.

Review effort: Balanced

@weizhoublue

weizhoublue commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Duplicate of #3530.
Close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/epp area/scheduling size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants