Repository navigation
fix(model): preserve upstream execution outcomes - #3761
Conversation
|
/claude review |
|
SHIP WITH CARE — mostly additive telemetry plumbing; one behavior change to double-check. This adds One finding worth a look (inline): stamping Everything else is low-risk. No async/API-compat concerns. |
| if execution is not None: | ||
| exchange.update(execution) | ||
| if execution["local_response_reason"] == "context_length_exceeded": | ||
| exchange["error_category"] = "context_length_exceeded" |
There was a problem hiding this comment.
RISK — Local context-overflow fallbacks are now classified as failed model calls.
What breaks: When propagate_context_overflow_errors is false (the default), vLLM's chat/completion paths swallow the upstream 400 and return a local empty completion (finish_reason="length", HTTP 200). Previously this exchange had error_category=None and _classify_status(200)=None, so health/checks.py::_is_failed treated it as a successful call. This line now stamps error_category="context_length_exceeded" on it, so _is_failed (checks.py:285, bool(call.get("error_category"))) returns True and _model_call_failed (checks.py:591) emits a model_call_failed finding for every context-truncated call.
Blast radius: Any existing run that relied on graceful local context-overflow truncation will start reporting those calls as failed in health reports / _is_successful accounting. The empty_assistant local reason is (correctly) left untouched, so this is specific to context overflow — but it silently reclassifies a previously-clean, expected outcome across all vLLM callers.
Fix: If the intent is purely observability, keep the distinction in local_response_reason/response_source (which is additive and harmless) and drop the error_category promotion; or, if flagging is intentional, confirm the health-check / metrics impact is desired and note it in the PR description. Worth verifying nothing downstream gates rollout acceptance on these findings.
There was a problem hiding this comment.
This is a problem in the health check implementation. For me this PR can be merged, I'll address this problem separately.
Signed-off-by: Michal Bien <[email protected]>
Signed-off-by: Michal Bien <[email protected]>
Signed-off-by: Michal Bien <[email protected]>
984e710 to
25a5da4
Compare
|
/ok to test 25a5da4 |
Recovered context-overflow rejections must not fail generation checks. Restrict failed-call findings to the final owned call of a finished root invocation; retain earlier and subagent failures in diagnostics. Emit model_call_last_failed; accept model_call_failed in ignore settings. Refs #3761 Signed-off-by: Giulio Lovisotto <[email protected]>
|
/ok to test 627d523 |
Recovered context-overflow rejections must not fail generation checks. Restrict failed-call findings to the final owned call of a finished root invocation; retain earlier and subagent failures in diagnostics. Emit model_call_last_failed; accept model_call_failed in ignore settings. Refs #3761 Signed-off-by: Giulio Lovisotto <[email protected]>
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/36713495083 |
Recovered context-overflow rejections must not fail generation checks. Restrict failed-call findings to the final owned call of a finished root invocation; retain earlier and subagent failures in diagnostics. Emit model_call_last_failed; accept model_call_failed in ignore settings. Refs #3761 Signed-off-by: Giulio Lovisotto <[email protected]>
A model call that fails and is then retried successfully can still make a rollout unhealthy because `model_call_failed` flags every bound failure. Remove that check and use `rollout_ended_on_failed_model_call` from NVIDIA-NeMo#3427 unchanged. Earlier failures remain in diagnostic counts. Existing ignore settings using `model_call_failed` map to the retained check. Keep the explicit context-overflow exemptions from this follow-up to NVIDIA-NeMo#3761: rejected requests do not trigger missing-token, zero-completion-token, or runaway-generation findings. The vLLM adapter records the rejection category with propagation enabled or disabled; HTTP behavior is unchanged. A final rejection still counts as a failure under the retained check. Its existing per-model semantics apply, including to subagent and auxiliary calls. No separate issue is needed for this focused follow-up. Rewards and benchmark scores are unchanged. Validation: - `python -m pytest tests/unit_tests/test_rollout_health.py responses_api_agents/opencode_agent/tests/test_trajectory.py tests/unit_tests/test_fern_docs_links.py --no-cov -q`: 173 passed, 17 subtests passed. - `python -m pytest responses_api_models/vllm_model/tests/test_app.py -k context_overflow_propagation_flag --no-cov -q`: 4 passed. - `python -m pre_commit run --all-files`: passed. - `cd fern && npm run check`: passed (0 errors, 1 warning). - MiniSWE/Terminus observability tests are delegated to full server CI; the combined local harness test command could not collect because `minisweagent` is not installed in the core environment. - [GitHub CI](https://github.com/NVIDIA-NeMo/Gym/actions/runs/37276179587) on rebased head `0dbbd3772`: passed, including the core coverage gate and all eight server shards. No unresolved CodeRabbit review threads. Live-model rollout: N/A. Changes are limited to postprocessing and captured error metadata; inference and agent execution behavior are unchanged. Signed-off-by: Giulio Lovisotto <[email protected]>
What does this PR do?
Preserve execution facts when vLLM returns a local empty response or adapts an upstream context-overflow rejection into HTTP 200. Four optional fields record the upstream attempt, response source, upstream status, and local reason through capture,
ModelCallRecord, and trajectory metadata. Adapted overflow recordscontext_length_exceeded.Closes #2792 / FEP-1477.
Four production files: 64 additions, 2 deletions. No test or documentation changes.
Validation
The unchanged production implementation also passed execution-metadata regression checks before those test additions were removed. No new regression tests are retained in this PR; the issue's request for durable automated coverage remains outstanding.
Rollouts
Model-route checks used mocked upstream responses. No live-model rollout or full CI suite was run locally. This remains a draft for author review.
Compatibility and benchmark impact
Response bodies, statuses, IDs, finish reasons, retries, and Harbor behavior remain unchanged. No new HTTP header. Existing records treat absent metadata as unknown. Successful upstream status remains unknown where the client only returns decoded JSON.
Harbor migration is deferred as permitted by the issue; its existing empty-assistant misclassification remains. Observability error counts now include adapted overflow; rewards are unchanged.