Skip to content

Conversation

@zhongdaor-nv
Copy link
Contributor

@zhongdaor-nv zhongdaor-nv commented Oct 8, 2025

Overview:

  1. Remove batch_token_ids — unused across all engines and currently non-functional.
  2. Handle single element prompt arrays by passing them directly to token_ids.
  3. Added tests of different prompt type for /completions

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Refactor
    • Simplified request preprocessing by removing unused batch token storage and streamlining single-input tokenization.
  • Bug Fixes
    • Multi-prompt (batch) completion requests now return a clear error instead of attempting unsupported processing, improving consistency and transparency.
  • Tests
    • Added end-to-end tests for completion behavior with single-string, single-element array, and multi-element array prompts, asserting success for supported cases and error for unsupported multi-prompt inputs.

@zhongdaor-nv
Copy link
Contributor Author

make engine works when prompt is a array of string

@zhongdaor-nv
Copy link
Contributor Author

zhongdaor-nv commented Oct 8, 2025

This is just a simple fix. #1648
is still open, but no engine is currently using batch_token_ids

@zhongdaor-nv zhongdaor-nv changed the title fix: A WAR to make completion end point accept as StringArray as input fix: To make completion end point accept as StringArray as input Oct 8, 2025
Signed-off-by: zhongdaor <[email protected]>
Signed-off-by: zhongdaor <[email protected]>
Signed-off-by: zhongdaor <[email protected]>
@rmccorm4 rmccorm4 changed the title fix: To make completion end point accept single element StringArray as input fix: Add support for single element arrays for chat and completions prompts Oct 11, 2025
Signed-off-by: zhongdaor <[email protected]>
Signed-off-by: zhongdaor <[email protected]>
Signed-off-by: zhongdaor <[email protected]>
@zhongdaor-nv zhongdaor-nv merged commit 3dc2512 into main Oct 14, 2025
28 of 29 checks passed
@zhongdaor-nv zhongdaor-nv deleted the zhongdaor/dis-717-open-ai-chat-completion-prompt-is-not-respected-if-we-send branch October 14, 2025 20:03
shpgy-shpgy pushed a commit to shpgy-shpgy/dynamo that referenced this pull request Oct 15, 2025
ziqifan617 pushed a commit that referenced this pull request Oct 20, 2025
nv-tusharma pushed a commit that referenced this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants