Repository navigation
feat(model): support MAX effort and OpenAI 2.45 schemas - #5464
Merged
RyaliNvidia merged 15 commits intoNov 10, 2026
Merged
Conversation
Signed-off-by: RyaliNvidia <[email protected]>
Signed-off-by: RyaliNvidia <[email protected]>
Signed-off-by: RyaliNvidia <[email protected]>
RyaliNvidia
marked this pull request as ready for review
November 2, 2026 21:43
Contributor
Author
|
/ok to review bef22eb |
Signed-off-by: RyaliNvidia <[email protected]>
Contributor
Author
|
/ok to test d5d5909 |
Contributor
Signed-off-by: RyaliNvidia <[email protected]>
Contributor
Author
|
/ok to test eff3bbd |
RyaliNvidia
enabled auto-merge
November 3, 2026 00:12
Contributor
Author
|
/ok to test c6bc903 |
ananthsub
previously approved these changes
Nov 10, 2026
kajalj22
self-requested a review
November 10, 2026 22:45
kajalj22
previously approved these changes
Nov 10, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42917598070 |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
Signed-off-by: RyaliNvidia <[email protected]>
Contributor
Author
|
/ok to test cd44477 |
ananthsub
approved these changes
Nov 10, 2026
kajalj22
approved these changes
Nov 10, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42923202305 |
6 of 7 tasks
This branch had an error being 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 does this PR do?
Upgrade Gym's pinned OpenAI Python SDK from 2.44.0 to 2.45.0 so Responses accepts
reasoning.effort="max", and adapt Gym's schemas and converters to the SDK's usage and programmatic-tool types.Responses replay preserves typed cache options, tool
callerfields and opaque program items. Chat Completions and supported Anthropic conversion paths accept ordinary direct tool callers and reject program-linked callers and unsupported tool constraints with static errors. Unknown cache-write counts remain unknown; an empty usage sum starts at known zero so subsequent reported counts are preserved.Anthropic
output_config.effortforwarding has been removed from this PR and moved to draft #5962, stacked on this PR. The Messages handler here continues to ignore that control, including null values. The draft requires Claude Code against vLLM rollout evidence before landing.Updated from main through
65dd99e96, including the nine managed components identified in review and the subsequently merged Copilot agent. All 272 Gym environments resolve OpenAI 2.45. All 279 managed locks validate; the seven independent locks are unchanged. A parsed audit confirms no unrelated package, source, security-constraint or artifact changes.Shared components for review: Responses schemas, Chat Completions and Anthropic converters, usage/SSE handling, strict ATIF export, and managed dependency policy. A separate issue is unnecessary because rejection of MAX was reproduced on untouched main.
Compatibility
reasoning.effort="max"now validates and forwards it to the backend asreasoning_effort="max", rather than receiving 422.forward_unvalidated_reasoning_effortis no longer needed for MAX. Omitting effort does not insert MAX. The backend still determines which values its model supports.function_callandfunction_call_outputitems now include"caller": nullwhen no caller is supplied. Non-streaming Responses and rollout-file usage includeinput_tokens_details.cache_write_tokens: nullwhen the provider does not report cache writes. Explicit zero and known counts are retained; an empty sum reports zero. Synthesized streamed Responses omit an unknowncache_write_tokenswithout changing captured usage.allowed_callers, functionoutput_schema, and program items/callers. These cases fail before a backend call; converter errors are static and do not echo the supplied schema. Direct tool callers remain supported. This PR does not redesign that route's HTTP error mapping.Validation
Latest merge-queue follow-up: main's perf(model): drop repeated dumps and validation in chat conversion #5934 changed
ChatCompletionsConverterStatefrom a Pydantic model to a dataclass. Replaced the regression test'smodel_dump()snapshots with a deep copy and object equality, retaining the state-preservation assertion. Reproduced all four CI failures before the fix; the merged-tree model/schema/export suite passed 2,688 tests (12 skipped) afterward, along with all 279 lock checks and full available hooks.Merge-queue follow-up: the newly merged Copilot agent still had an OpenAI 2.44 lock, causing both lock checks and server shard 6 to fail before tests. Reproduced the stale-lock failure and regenerated only that lock, preserving all 160 non-OpenAI package records. On the updated main integration, 279 lock checks passed, the fresh locked Copilot suite passed 133 tests (11 skipped), and model/schema/export checks passed 2,666 tests (12 skipped). Full available hooks also passed.
CI follow-up: corrected SciCode's expected cache-write count for prefilled, context-rejected and skipped steps from unknown to known zero. Reproduced the failing test before the fix; all 344 SciCode agent and core response-schema tests passed afterward. This changes only a test expectation.
Focused schema/converter/Messages review checks: 381 passed.
Broader converter, streaming, export and API/import checks: 1,779 passed, 13 skipped; four targeted vLLM effort cases passed. These suites overlap and their totals are not additive.
Seven negative controls fail with the previous direct-caller, output-schema and empty-sum implementations; the corrected regressions pass.
Independent verification: 113 focused tests and 19 probes passed, including actual vLLM non-streaming route checks for requested/omitted MAX, direct callers, the six unsupported-feature 500 cases, and null/SSE serialization.
Component lock check: 279 projects, zero failures. Parsed comparison against main: 272 Gym closures, no unrelated package/source/artifact differences.
Full available pre-commit hooks, import-linter, PR-relative whitespace and Fern checks passed (Fern: 0 errors, 1 warning). The private guardwords catalog is unavailable.
No live provider, model rollout, remote-sandbox qualification or image publication was performed. Full all-server testing was not rerun. New-head CI remains separate from this local evidence. Commits include DCO sign-off.