Skip to content

feat(model): support MAX effort and OpenAI 2.45 schemas - #5464

Merged
RyaliNvidia merged 15 commits into
NVIDIA-NeMo:mainfrom
RyaliNvidia:codex/g5-openai-245-effort
Nov 10, 2026
Merged

RyaliNvidia merged 15 commits into
NVIDIA-NeMo:mainfrom
RyaliNvidia:codex/g5-openai-245-effort

Conversation

@RyaliNvidia

@RyaliNvidia RyaliNvidia commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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 caller fields 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.effort forwarding 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

  • With default vLLM model-server settings, a request that explicitly supplies reasoning.effort="max" now validates and forwards it to the backend as reasoning_effort="max", rather than receiving 422. forward_unvalidated_reasoning_effort is no longer needed for MAX. Omitting effort does not insert MAX. The backend still determines which values its model supports.
  • Serialized function_call and function_call_output items now include "caller": null when no caller is supplied. Non-streaming Responses and rollout-file usage include input_tokens_details.cache_write_tokens: null when the provider does not report cache writes. Explicit zero and known counts are retained; an empty sum reports zero. Synthesized streamed Responses omit an unknown cache_write_tokens without changing captured usage.
  • Requests using newly accepted 2.45 schemas can now reach conversion and fail with HTTP 500 on the vLLM model server's non-streaming path where schema validation previously returned 422. This includes unsupported non-null allowed_callers, function output_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.
  • Strict ATIF export continues rejecting program items and caller metadata it cannot represent.
  • Anthropic effort forwarding is deliberately excluded from this SDK upgrade.

Validation

  • Latest merge-queue follow-up: main's perf(model): drop repeated dumps and validation in chat conversion #5934 changed ChatCompletionsConverterState from a Pydantic model to a dataclass. Replaced the regression test's model_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.

@copy-pr-bot

copy-pr-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@RyaliNvidia
RyaliNvidia marked this pull request as ready for review November 2, 2026 21:43
@RyaliNvidia
RyaliNvidia requested a review from a team as a code owner November 2, 2026 21:43
@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to review bef22eb

@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test d5d5909

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test eff3bbd

@RyaliNvidia
RyaliNvidia enabled auto-merge November 3, 2026 00:12
@svcnvidia-nemo-ci svcnvidia-nemo-ci added feature New capabilities, enhancements, or enablement work area:model Model servers, inference providers, and model adapters needs-review PR is ready for code review and waiting on a reviewer labels Nov 3, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 3, 2026
@RyaliNvidia
RyaliNvidia dismissed stale reviews from kajalj22 and ananthsub via c6bc903 November 10, 2026 22:09
@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test c6bc903

ananthsub
ananthsub previously approved these changes Nov 10, 2026
@kajalj22
kajalj22 self-requested a review November 10, 2026 22:45
kajalj22
kajalj22 previously approved these changes Nov 10, 2026
@RyaliNvidia
RyaliNvidia added this pull request to the merge queue Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42917598070

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@RyaliNvidia
RyaliNvidia dismissed stale reviews from kajalj22 and ananthsub via cd44477 November 10, 2026 23:09
@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test cd44477

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42923202305

This branch had an error being deployed

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

Labels

area:model Model servers, inference providers, and model adapters feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants