Skip to content

[bugfix] Fix CLI flags that modify model_config when using --deploy-config - #8289

Merged
princepride merged 5 commits into
vllm-project:mainfrom
MaciejBalaNV:mbala/fix_no_guardrails_cli
Oct 11, 2026
Merged

princepride merged 5 commits into
vllm-project:mainfrom
MaciejBalaNV:mbala/fix_no_guardrails_cli

Conversation

@MaciejBalaNV

@MaciejBalaNV MaciejBalaNV commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes an issue with silently dropping CLI options that modify model_config when using --deploy-config setup. One example of such CLI option that was being dropped is --no-guardrails.

Purpose

Before this PR when we launched e.g. vllm serve nvidia/Cosmos3-Nano --omni --no-guardrails --deploy-config <custom_deploy_config> the --no-guardrails flag would be ignored. This PR fixes this issue.

Test Plan

Unit tests

We add 2 new unit tests targeting this change.

Serving tests

To test this PR in practice, first modify vllm_omni/deploy/cosmos3_omni.yaml deploy config file so that it has guardrails: true, or use any other config file that targets Cosmos3 model and doesn't already disable the guardrails. That's because we want to test whether the --no-guardrails flag works and it wouldn't be possible if the deploy config file already disabled them.

After the correct deploy config file is created, run this command: vllm serve nvidia/Cosmos3-Nano --omni --deploy-config vllm_omni/deploy/cosmos3_omni.yaml --no-guardrails.
Before this PR, you are going to see [guardrails.py:148] Cosmos3 guardrails initialized. in logs, which means that --no-guardrails flag is ignored and the guardrails are initialized. After this PR this is fixed and the guardrails are not initialized.

vLLM Version:
0.30
vLLM-Omni Commit:
ToT

Test Result

Unit tests

All the unit tests from tests/config/test_omni_config.py pass

Serving tests

The guardrails are indeed disabled with the setup mentioned above.

BEFORE SUBMITTING: read CONTRIBUTING.md and run the precheck-pr skill with the code agent for a self-check against project conventions.

Note

To avoid agent spam, vLLM-Omni limits contributors without write access to 5 open PRs. If this blocks well-intentioned critical work, please contact a committer to request bypass list access.
(anything written below this line will be removed by GitHub Actions)

Signed-off-by: Maciej Bala <mbala@nvidia.com>
@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to belong to: docs/design/module/vllm_omni_config.md, docs/design/module/entrypoints.md, docs/design/module/stage_runtime.md.

Module owners: @alex-jw-brooks @lishunyang12 @NickCao

Routing: @alex-jw-brooks via module of the changed files, semantic router, CODEOWNERS; @lishunyang12 via module of the changed files, semantic router, CODEOWNERS; @NickCao via module of the changed files, CODEOWNERS

@MaciejBalaNV, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer.

Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment.

@MaciejBalaNV MaciejBalaNV left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a simple 2 lines change that targets how the config is merged.

}
runtime_overrides = build_stage_runtime_overrides(stage_id, dict(cli_overrides))
global_stage_fields = _global_stage_cli_fields()
global_stage_fields = _global_stage_cli_fields() | _OWNER_ONLY_GLOBAL_STAGE_CLI_FIELDS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main point of the change.

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot routing record

Assigned Strict under experiment vllm-omni-strict-5050-20260829.

@vllm-omni-review-bot vllm-omni-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omni ReviewBot review

PR description

With --deploy-config, global CLI model_config overrides (including --no-guardrails → guardrails: false) were filtered out of per-stage CLI overlays because model_config was not treated as a global stage field. This change adds an owner-only allowlist so diffusion stages keep that override and deep-merge it into deploy model_config, while LLM stages still skip it. User-visible effect: --no-guardrails (and other global model_config CLI knobs) apply under --deploy-config instead of being silently ignored.

Change flow

flowchart TD
  A["[EXISTING] CLI --no-guardrails / global model_config"]:::existing --> B["[CHANGED] _stage_cli_overrides global field filter"]:::changed
  C["[NEW] _OWNER_ONLY_GLOBAL_STAGE_CLI_FIELDS"]:::new --> B
  B --> D["[EXISTING] Diffusion stage deep-merge into deploy model_config"]:::existing
  B --> E["[EXISTING] LLM stages skip unowned model_config"]:::existing
  D --> F["[NEW] tests: global merge + LLM skip"]:::new
  classDef existing fill:#e5e7eb,stroke:#6b7280,color:#111827
  classDef changed fill:#fef3c7,stroke:#d97706,color:#451a03,stroke-width:2px
  classDef new fill:#dcfce7,stroke:#16a34a,color:#052e16,stroke-width:2px
  classDef removed fill:#fee2e2,stroke:#dc2626,color:#450a0a,stroke-width:2px
Loading

CI at c22ca2f42f9c (2026-09-29T20:14:12.526897+00:00): required check(s) blocking: buildkite/vllm-omni (missing).

See inline comments below.


🤖 This review was generated by InferMatrix Copilot, an open-source repo-maintenance agent for PR review, CI debugging and issue triage. Try it on your own repo, and ⭐ star it if it helped!

Comment thread tests/config/test_omni_config.py Resolved
@vllm-omni-review-bot

Copy link
Copy Markdown

Omni ReviewBot: finding feedback

[p1] Test Result omits covering L1 Simple · Other selector — tests/config/test_omni_config.py:175

Covering always-on L1 guard .buildkite/cuda/test-ready.yml / .buildkite/cuda/test-merge.yml step Simple · Other Test runs pytest -sv tests/ -m 'core_model and cpu' --ignore=tests/diffusion --ignore=tests/model_executor --ignore=tests/entrypoints --ignore=tests/engine, which collects tests/config/test_omni_config.py (pytestmark = core_model, cpu). The PR Test Result only reports that the two new unit tests pass (plus a manual Cosmos3 serve check) and does not state that the broader Simple · Other suite was left uncovered. Re-run or explicitly document the subset vs that guard selector before merge-ready sign-off. Separately, vllm_omni/config/omni_config.py is also under tts_qwen3_tts_* source deps, but those E2E selectors do not pin this merge path.

This finding appears in the bot's COMMENT review, but GitHub could not place it as an inline diff comment. If you are the PR author and disagree, react 👎 to this comment. The disagreement will be shown to the maintainer; it does not approve or merge the PR.

@hsliuustc0106 hsliuustc0106 added bug Something isn't working core related to core module: cache, scheduler, engine, worker, modelrunner labels Sep 29, 2026
@hsliuustc0106 hsliuustc0106 added the high priority high priority issue, needs to be done asap label Sep 30, 2026 — with ChatGPT Codex Connector
@MaciejBalaNV

Copy link
Copy Markdown
Contributor Author

@vllm-omni-review-bot
I made sure that the test suite passes, as mentioned in the resolved thread.

Is there anything blocking from merging this simple fix?

@vllm-omni-review-bot vllm-omni-review-bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omni ReviewBot review

Correction: The two earlier P2 findings about generic model_config forwarding and hypothetical future ownership validation are withdrawn. Neither demonstrates a current defect at the reviewed head. One test-integrity finding remains.

Scan:

Category Result
Tests / verification 1 finding
Security no finding reported
Docs / comments no finding reported
Behavior / compatibility no finding reported
Correctness no finding reported

The production overlay is accepted: the owner-only allowlist forwards model_config to DIFFUSION stages and omits it from LLM_AR stages. Forwarding an optional value to a consumer that does not use it does not establish breakage. _validate_global_stage_cli_ownership checks _global_stage_cli_fields(), which does not include model_config at this head; the earlier validator finding depended on a hypothetical future change.

The remaining finding is the skipped merge test: test_global_model_config_override_deep_merges_structured_model_config selects cosmos3_nano_sim_bimanual, which is absent from OMNI_PIPELINES. resolve_pipeline_config returns None, and _resolve_pipeline_or_skip calls pytest.skip before the new merge assertions execute. Use a registered diffusion pipeline or the existing synthetic builder to exercise the override and preservation of nested values.

Verdict: REQUEST CHANGES

Original CI snapshot (unchanged by this correction):

CI at fab4be3d5c40 (2026-10-02T10:52:20.632483+00:00): required check(s) blocking: buildkite/vllm-omni (missing).


🤖 This review was generated by InferMatrix Copilot, an open-source repo-maintenance agent for PR review, CI debugging and issue triage. Try it on your own repo, and ⭐ star it if it helped!

Comment thread tests/config/test_omni_config.py Resolved
Comment thread vllm_omni/config/omni_config.py Resolved
@vllm-omni-review-bot

Copy link
Copy Markdown

Omni ReviewBot: finding feedback

[p1] test_global_model_config_override_deep_merges_structured_model_config (tests/co… — tests/config/test_omni_config.py:185

test_global_model_config_override_deep_merges_structured_model_config (tests/config/test_omni_config.py:182) never runs its merge assertions. It calls _from_pipeline_key("cosmos3_nano_sim_bimanual", deploy_config_path=get_deploy_config_path("cosmos3_nano_sim_bimanual_full_history.yaml")) (line 185). _resolve_pipeline_or_skip (lines 107-111) pytest.skips when resolve_pipeline_config returns None. Unchanged pipeline_registry.py:238-240 returns None for unregistered keys; live Cosmos3 keys are only cosmos3_omni_deploy and cosmos3_policy (lines 151-152). cosmos3_nano_sim_bimanual_full_history.yaml is not in vllm_omni/deploy/; get_deploy_config_path only returns str(_DEPLOY_DIR / rel_path) with no existence check, so skip wins before any YAML open. pytestmark is core_model+cpu, so collected runs skip rather than fail. test_global_model_config_override_skips_llm_stages only checks _stage_cli_overrides membership and does not pin from_pipeline_config deep-merge. In-tree cosmos3_omni.yaml:30 and cosmos3_policy_droid.yaml:39 already ship guardrails: false, so retargeting those without a True nested baseline still cannot detect a dropped overlay. Point the test at _build_single_diffusion_config whose engine_extras model_config starts with guardrails: True plus nested keys, then apply global {"model_config": {"guardrails": False}}.

Evidence: Changed test at PR-time head: tests/config/test_omni_config.py:184-186 config = _from_pipeline_key( / "cosmos3_nano_sim_bimanual", / deploy_config_path=get_deploy_config_path("cosmos3_nano_sim_bimanual_full_history.yaml"),. Unchanged by this diff, present in the PR-time tree: tests/config/test_omni_config.py:107-111 pipeline = resolve_pipeline_config(model_type, hf_config) / if pipeline is None: / pytest.skip(f"Pipeline {model_type!r} requires an HF config to resolve"). Unchanged by this diff: vllm_omni/config/pipeline_registry.py:238-240 if model_type not in OMNI_PIPELINES: / logger.warning("Model type %s is not registered to OMNI_PIPELINES", model_type) / return None. Unchanged by this diff: vllm_omni/config/pipeline_registry.py:151-152 "cosmos3_omni_deploy": COSMOS3_OMNI_DEPLOY_PIPELINE, / "cosmos3_policy": COSMOS3_POLICY_PIPELINE, — no cosmos3_nano_sim_bimanual key. Unchanged by this diff: tests/config/test_omni_config.py:64 pytestmark = [pytest.mark.core_model, pytest.mark.cpu]. Unchanged by this diff: tests/helpers/stage_config.py:694 return str(_DEPLOY_DIR / rel_path) (no existence check). Unchanged by this diff: vllm_omni/deploy/cosmos3_omni.yaml:30 guardrails: false and vllm_omni/deploy/cosmos3_policy_droid.yaml:39 guardrails: false. No cosmos3_nano_sim_bimanual_full_history.yaml exists under vllm_omni/deploy/ in this tree.

Suggestion: config = _build_single_diffusion_config(
engine_extras={
"model_config": {
"guardrails": True,
"inference_overrides": {"history_mode": "full"},
"action_gen": True,
}
},
cli_overrides={"model_config": {"guardrails": False}},
)

This finding appears in the bot's COMMENT review, but GitHub could not place it as an inline diff comment. If you are the PR author and disagree, react 👎 to this comment. The disagreement will be shown to the maintainer; it does not approve or merge the PR.

Signed-off-by: Maciej Bala <mbala@nvidia.com>
@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (step 'fetch' (pr.fetch_diff): cannot pin PR #8289 to 3766676: git fetch failed: From https://github.com/vllm-project/vllm-omni

  • [new branch] main -> refs/imx/run-20261002-193846-73277e/base
  • [new ref] refs/pull/8289/head -> refs/imx/run-20261002-193846-; retrying stri).

@MaciejBalaNV

Copy link
Copy Markdown
Contributor Author

Fixed the comment from review above and verified the tests pass:

pytest -v tests/config/test_omni_config.py passes for all tests. All tests are run as well, so the skip issue is fixed as well.

I've also verified the new tests by commenting out the | _OWNER_ONLY_GLOBAL_STAGE_CLI_FIELDS merge. With this commented out, the tests fail as expected:

FAILED tests/config/test_omni_config.py::test_global_model_config_override_deep_merges_structured_model_config - assert True is False FAILED tests/config/test_omni_config.py::test_global_model_config_override_skips_llm_stages - KeyError: 'model_config' FAILED tests/config/test_omni_config.py::test_from_pipeline_config_warns_when_single_stage_async_chunk_enabled - assert False

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as stale.

@princepride princepride self-assigned this Oct 6, 2026
@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (failed; retrying strict/cursor/cursor-grok-4.6-high in 120s (try 2 of 3)).

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (failed; retrying strict/cursor/cursor-grok-4.6-high in 600s (try 3 of 3)).

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (failed; falling back to direct/cursor/auto).

@princepride princepride left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@princepride princepride added the ready label to trigger buildkite CI label Oct 11, 2026
@princepride
princepride enabled auto-merge (squash) October 11, 2026 08:27
@princepride
princepride merged commit 46dedaf into vllm-project:main Oct 11, 2026
6 of 9 checks passed
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core related to core module: cache, scheduler, engine, worker, modelrunner high priority high priority issue, needs to be done asap ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants