Repository navigation
refactor(models): rename ResponsesConverter to ChatCompletionsConverter - #5528
Merged
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Nov 3, 2026
ananthsub
force-pushed
the
ananthsub/rename-chat-completions-converter
branch
from
November 3, 2026 21:45
aead1f6 to
1ff1187
Compare
ananthsub
marked this pull request as ready for review
November 3, 2026 21:48
This was referenced Nov 3, 2026
ananthsub
force-pushed
the
ananthsub/rename-chat-completions-converter
branch
from
November 4, 2026 01:00
1ff1187 to
f171d06
Compare
ananthsub
force-pushed
the
ananthsub/rename-chat-completions-converter
branch
from
November 4, 2026 20:23
f171d06 to
619a2a9
Compare
The class converts between the Responses API and Chat Completions, but its name only named the Responses side. AnthropicConverter also converts to and from the Responses API, so the old name no longer says which converter it is. Name it for the API on the other side. ResponsesConverterState becomes ChatCompletionsConverterState with it. The VLLMConverter aliases now point at the new names. The old names keep resolving, with a DeprecationWarning naming the new name, until nemo_gym 0.10.0: at nemo_gym.responses_converter (released in 0.7.0), nemo_gym.models.chat_completions_converter, nemo_gym.models, and the token capture completion module, which imported the class. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
force-pushed
the
ananthsub/rename-chat-completions-converter
branch
from
November 5, 2026 06:18
619a2a9 to
4ae5f5b
Compare
The VLLMConverter aliases name the same class as ChatCompletionsConverter. Every use in the repository now names ChatCompletionsConverter: the vLLM, LiteLLM, Azure OpenAI and GenRM model servers, the BrowseComp, SWE, tau2, Terminus 2 and Harbor agents, their tests, READMEs, configs and the vLLM model server docs. The aliases themselves stay, and the vLLM model server still re-exports them, so code that imports them keeps working. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Contributor
|
🌿 Preview your docs: https://nvidia-preview-pr-5528-b35aa6f55ee2.docs.buildwithfern.com/nemo/gym |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
ResponsesConverterinnemo_gym/models/chat_completions_converter.pyconverts between the Responses API and Chat Completions. Its name only says the Responses side. That was enough when it was the only converter. NowAnthropicConverteralso converts to and from the Responses API, so the name no longer says which converter it is. Every converter innemo_gym.modelshas the Responses API on one side, so the name now says the API on the other side:ChatCompletionsConverter.Part of the
nemo_gym/reorganization tracked in #5166.Renamed
ResponsesConverter→ChatCompletionsConverterResponsesConverterState→ChatCompletionsConverterState(the per-conversion state the class builds; same naming problem)Every in-repo use is updated: the
nemo_gym.modelspublic API, token capture's completion module, the inference provider model server, the Pi, OpenCode sandboxed, Hermes and three conversational tool use agents, the IHEval data preparation and tests, the partner IF judge test, and the core unit tests. The uses of theVLLMConverterandVLLMConverterResponsesToChatCompletionsStatealiases also move to the new names: the vLLM, LiteLLM, Azure OpenAI and GenRM model servers, the BrowseComp, SWE, tau2, Terminus 2 and Harbor agents, their tests, the vLLM model server and SWE agent READMEs, two config comments, and the latest vLLM model server docs. Frozen docs underfern/versions/v*/are untouched.Left alone
VLLMConverterandVLLMConverterResponsesToChatCompletionsStatealiases themselves: they point at the new names, and the vLLM model server still re-exports them, so code that imports them keeps working. Nothing in the repository uses them now. Deprecating them is refactor(models): retire VLLMConverter aliases #5531, stacked on this PR.AnthropicConverter: Anthropic has a single API it could convert, so the name is not ambiguous, and it matches its module.fern/docs.ymlredirects for the oldnemo_gym/responses_converterAPI page.Compatibility
The old names resolve to the identical new objects until nemo_gym 0.10.0. The first use of each old path emits a
DeprecationWarningthat names the new name and the removal release. The entries are one groupedMOVED_NAMESblock innemo_gym/_moved_paths.py:nemo_gym.responses_converter.ResponsesConverter(released in 0.7.0)ChatCompletionsConverternemo_gym.responses_converter.ResponsesConverterState(released in 0.7.0)ChatCompletionsConverterStatenemo_gym.models.chat_completions_converter.ResponsesConverterChatCompletionsConverternemo_gym.models.chat_completions_converter.ResponsesConverterStateChatCompletionsConverterStatenemo_gym.models.ResponsesConverterChatCompletionsConverternemo_gym.models.token_capture.completion.ResponsesConverter(and itsnemo_gym.token_id_capture.completionpath)ChatCompletionsConverterThe completion module only imported the class, but the recorded import surface lists that name, so it keeps resolving rather than being dropped from the fixture.
import_surface.jsonis unchanged.Each old path warns once per process, including through the
nemo_gym.modelspackage (#5530).Tests
The new tests in
tests/unit_tests/test_moved_paths.pycheck, for each old path above, in a fresh interpreter, that the old name is the identical new class and that exactly one deprecation warning names the new class and the 0.10.0 removal. With the newMOVED_NAMESblock removed, every one of them fails, and so does the existing check that every recorded import surface name still resolves.Validation
All pass, as does the package layering check (import-linter), and
python scripts/migrate_imports.py --check .finds nothing left to rewrite for the converter. The partner IF judge tests also pass:The vLLM, LiteLLM and Azure OpenAI model server tests and the BrowseComp agent tests also pass:
NEMO_GYM_EXTRA_ROOTS=$PWD pytest -n 8 responses_api_models/vllm_model/tests \ responses_api_models/litellm_model/tests responses_api_models/azure_openai_model/tests \ responses_api_agents/browsecomp_agent/testsThe IHEval, GenRM, SWE, tau2, Terminus 2 and Harbor tests need those servers' own dependencies, so they and the other server test suites are left to CI. The touched model servers, agents and data preparation script were imported directly, except the Hermes agent and the policy tool generation agent, whose own dependencies are not in the core venv.
Rollout evidence
N/A: a pure rename with compatibility aliases. No conversion logic, request shape or verifier behavior changes, so a model rollout would exercise identical code.