[https://nvbugs/6507081][fix] Refresh the fakes only — add reasoning_parser = None to… - #16841
Conversation
…erver surface Signed-off-by: handongl <handongl@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe OpenAI prompt-streaming test scaffolding now includes missing ChangesStreaming test mock alignment
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run |
|
PR_Github #61605 [ run ] triggered by Bot. Commit: |
Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com>
|
PR_Github #61605 [ run ] completed with state |
|
/bot run |
|
PR_Github #61944 [ run ] triggered by Bot. Commit: |
|
PR_Github #61944 [ run ] completed with state |
Summary
_FakeCompletionGeneratorArgslacksreasoning_parserand the fake server lacks_input_proc_executor, both of which the realopenai_completionpath reads (openai_server.py:1923, 1955); the resulting AttributeError is caught and returned as a JSONResponse (nobody_iterator).reasoning_parser = Noneto_FakeCompletionGeneratorArgs(safe:add_thinking_budget_logits_processorshort-circuits whenthinking_token_budget is None), and setserver._input_proc_executor = None(safe:loop.run_in_executor(None, ...)uses the default executor).Test plan
Links
Dev Engineer Review
tests/unittest/llmapi/test_llm.pyOpenAI prompt-streaming reuse test scaffolding to better match the real server interface by adding missing fake attributes:_FakeCompletionGeneratorArgs.reasoning_parser = None.server._input_proc_executor = None.AttributeErrorfailures from test doubles that didn’t expose fields expected by theopenai_completionpath.tests/integration/test_lists/waives.txtto remove the waiver entry forunittest/llmapi/test_llm.py::test_openai_completion_list_prompt_stream_reuses_stream_metadata, re-enabling the test in integration runs.QA Engineer Review
tests/unittest/llmapi/test_llm.py:test_openai_completion_list_prompt_stream_reuses_stream_metadata: adjusted mocked server/fake objects to includereasoning_parserand_input_proc_executorattributes required by the code under test.tests/integration/test_lists/waives.txt.tests/integration/test_lists/waives.txt: removed waiver forunittest/llmapi/test_llm.py::test_openai_completion_list_prompt_stream_reuses_stream_metadata.