Conversation
Replace the custom pydantic-settings wrapper (BaseSettings, parse_argv, toml_files inheritance) with the external pydantic_config library which provides tyro-backed CLI parsing, @ syntax for TOML files, and deep merge of configs + CLI overrides. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| Field( | ||
| description="Extra arguments to pass to vLLM. These are applied as attributes on the vLLM namespace after config translation.", | ||
| ), | ||
| ] = {} |
There was a problem hiding this comment.
New vllm_extra field leaks into vLLM namespace
Medium Severity
The new vllm_extra field gets included in to_vllm() via the get_all_fields(self) loop, setting namespace.vllm_extra = {} (the raw dict) as a vLLM namespace attribute. This is unintended — the individual entries from the dict are correctly applied in server(), but the raw dict itself persists on the namespace. Since vllm_extra is not a recognized vLLM argument, this spurious attribute could cause issues if vLLM validates namespace attributes or uses vars(args) downstream.
Additional Locations (1)
…for tyro - Switch dependency from refactor-tyro to fix-tyro branch (includes validators moved upstream) - Simplify config.py by removing validators now in pydantic_config - Fix benchmark script to use tyro subcommand syntax for optional nested configs (compile, ac, ac-offloading) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The benchmark script's --model.compile and --model.ac bare flags now work without changes, thanks to upstream pydantic_config handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes dict[str, Any] tyro parser errors and union subcommand issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>


Summary
pydantic-settingswrapper (BaseSettings,parse_argv,toml_filesinheritance) with the externalpydantic_configlibrary backed by tyrosrc/prime_rl/utils/pydantic_config.py(302 lines) and replace with a thin 50-line wrapper insrc/prime_rl/utils/config.pyallow_extraspattern in inference server with avllm_extra: dictfield onInferenceConfigtoml_filesinheritance from example SLURM configs (use@ base.toml @ slurm.tomlcomposition instead)Breaking Changes
Boolean negation flags changed location
The
--no-prefix now attaches to the field name, not the full dotted path:vLLM extra arguments use
vllm_extradict instead of passthrough CLI argsThe old system captured unknown CLI args and forwarded them to vLLM. The new system uses an explicit
vllm_extrafield:Test plan
uv sync --all-extrasresolves successfullyuv run pytest tests/unit/test_configs.py -v— all 58 tests passuv run python -c "from prime_rl.utils.config import BaseConfig, cli"— imports workprime_rl.utils.pydantic_configin codebasepydantic_settingsin codebase🤖 Generated with Claude Code