Skip to content

feat(model): forward explicit Anthropic output effort - #5962

Draft
RyaliNvidia wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
RyaliNvidia:codex/anthropic-effort-forwarding
Draft

RyaliNvidia wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
RyaliNvidia:codex/anthropic-effort-forwarding

Conversation

@RyaliNvidia

@RyaliNvidia RyaliNvidia commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Forward an explicit Anthropic output_config.effort from Gym's /v1/messages handler into Responses reasoning.effort. This feature was split from #5464 following review. The SDK upgrade has now merged; main continues ignoring this control.

The SDK prerequisite #5464 is merged. This PR now targets main and contains only the five effort-related files.

Missing or null output_config, missing or null effort, and unrelated output configuration leave reasoning unset. Explicit low, medium, high, xhigh and max forward unchanged. Invalid non-null controls return a static HTTP 400 JSON error before a backend call or SSE headers; unrelated conversion errors retain their previous handling.

Compatibility and readiness

Do not merge yet: Claude Code against a vLLM model still needs rollout evidence. No live provider, model rollout, image build or remote-sandbox qualification was performed.

Forwarding effort can change model prompts and rollout behavior:

  • vLLM 0.29.0 enables thinking for any effort other than none unless the request explicitly supplies enable_thinking; see the pinned vLLM implementation.
  • Its Harmony path rejects unsupported efforts such as xhigh and max for gpt-oss; see Harmony validation.
  • Gym still does not translate Anthropic thinking: {"type": "disabled"}. Combined with effort forwarding, that can enable reasoning despite the client disabling thinking. Resolve this behavior and qualify it before marking the PR ready; this split does not introduce an unreviewed mapping.

Shared components for review: Anthropic request conversion and the shared Messages handler.

Validation

  • Rebased the single feature commit onto main 1d1dbb4f on 2026-11-17; git range-diff confirms the feature patch is unchanged. Re-ran the converter, Messages and streaming suites: 387 passed. Full available hooks and whitespace checks passed.

  • Converter, Messages, streaming, base-model and API checks: 1,350 passed, using this worktree's source.

  • Explicit-effort regression tests fail with forwarding removed: 15 expected failures.

  • Independent review: 48 focused tests and 7 probes passed; verifier and simplifier approved the five-file draft scope while retaining the readiness gates above.

  • Tests cover null/omitted controls in streaming and non-streaming requests, static errors without request-content leakage, JSON errors before SSE/backend invocation, and preservation of unrelated error behavior.

  • Full available pre-commit hooks, import-linter and whitespace checks passed. The private guardwords catalog is unavailable.

  • Fern validation: 0 errors, 1 warning.

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 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 force-pushed the codex/anthropic-effort-forwarding branch from 6f89b56 to a8844dc Compare November 10, 2026 23:58
@RyaliNvidia
RyaliNvidia changed the base branch from codex/g5-sdk245-stack-base to main November 10, 2026 23:58
@RyaliNvidia
RyaliNvidia marked this pull request as ready for review November 12, 2026 17:52
@RyaliNvidia
RyaliNvidia force-pushed the codex/anthropic-effort-forwarding branch from a8844dc to 6c338b0 Compare November 12, 2026 17:54
@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 6c338b0

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 12, 2026 17:56
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Nov 13, 2026
@yaoyu-33
yaoyu-33 requested review from gchlebus and removed request for cynthiagao-nv November 16, 2026 00:15
@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 16, 2026
@RyaliNvidia
RyaliNvidia force-pushed the codex/anthropic-effort-forwarding branch 2 times, most recently from 0b77dca to 2a4a8c5 Compare November 17, 2026 17:36
@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 2a4a8c5

@RyaliNvidia
RyaliNvidia force-pushed the codex/anthropic-effort-forwarding branch from 2a4a8c5 to 12591ff Compare November 18, 2026 20:40
@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 12591ff

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the risk:high Autobot PR risk: high label Nov 18, 2026
@athitten

Copy link
Copy Markdown
Contributor

@RyaliNvidia the description says not to merge until Claude Code on a vLLM model has rollout evidence and the thinking: disabled case is settled. Neither is in yet, so could you move this back to draft until then? One point for that pass: vLLM 0.29.0 turns thinking on for any effort except none unless the request sets enable_thinking, so thinking: disabled plus an effort ends up with thinking on. An opt-in flag would keep existing Claude Code runs unchanged. @ananthsub, you asked for this split in #5464; could you review it once it's ready?

@RyaliNvidia
RyaliNvidia marked this pull request as draft November 30, 2026 16:44
@RyaliNvidia

RyaliNvidia commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Moved this back to draft. The readiness gates in the description are still open: the current patch forwards output_config.effort without handling thinking: {"type": "disabled"}, and there is no Claude Code → Gym → vLLM rollout evidence in this PR.

Before marking this ready, we need to agree the compatibility behavior (including the suggested opt-in flag), cover disabled thinking combined with explicit effort, and attach rollout evidence for Claude Code against a vLLM-served model, including model-supported effort values. The existing unit-test results do not settle those rollout requirements.

Related work: #6904 now proposes forward_anthropic_reasoning_effort, off by default, and reports a Claude Code rollout against an OpenAI-compatible Chat Completions endpoint. We should reconcile the two PRs before advancing this one. That reported rollout does not establish the specific vLLM 0.29.0 thinking: disabled interaction raised here.

@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Nov 30, 2026

This branch has not been deployed

No deployments
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 risk:high Autobot PR risk: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants