Skip to content

feat: VF_* env-var config overrides for the v1 CLIs#1954

Draft
mikasenghaas wants to merge 3 commits into
mainfrom
feat/vf-env-prefix
Draft

feat: VF_* env-var config overrides for the v1 CLIs#1954
mikasenghaas wants to merge 3 commits into
mainfrom
feat/vf-env-prefix

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Enables VF_* environment-variable config overrides for the v1 CLIs (eval, validate, serve, init, debug, replay): any config field is settable as VF_<PATH>, with nesting levels joined by a double underscore — VF_MODEL__NAME--model.name.
  • Precedence: CLI > TOML > VF_* env var > class default. Lookup is model-driven, so unrelated VF_* variables are ignored; bad values are reported against the variable name (VF_MAX_TURNS (from env)).
  • Each CLI passes env_prefix="VF" explicitly at its cli(...) call sites (help + parse paths).
  • The toolserver debug fallback in verifiers/v1/mcp/server.py intentionally stays unprefixed: it parses arbitrary user-defined Toolset/User configs in processes where VF_CONFIG/VF_STATE_URL/VF_STATE_SECRET/VF_LOG_LEVEL control vars live, so field names could collide. (No current top-level config field collides with those names.)

Depends on the env_prefix feature in PrimeIntellect-ai/pydantic-config#17. The prime-pydantic-config pin bump (+ lockfile) follows as a commit on this branch once that PR merges and release-dev.yml publishes the dev version — until then this stays draft.

Verification

  • With the feature build installed locally: uv run eval --help renders normally; VF_NAME=env-smoke-v1 populates InitConfig, and CLI flags beat env values.
  • uv run pytest tests/v1/test_configs.py tests/test_client_config.py — 14 passed.

🤖 Generated with Claude Code

mikasenghaas and others added 3 commits July 8, 2026 22:38
Wraps pydantic_config.cli with env_prefix=VF in verifiers.v1.configs
and routes the v1 CLI entrypoints through it: any config field is
settable as VF_<PATH> (nesting levels joined with a double underscore),
below TOML and CLI in precedence. The toolserver debug fallback in
mcp/server.py stays unprefixed - it parses arbitrary user-defined
Toolset/User configs in a process where VF_* control vars are set.

Requires the pydantic-config env_prefix feature
(PrimeIntellect-ai/pydantic-config#17); pin bump follows once the
dev release is published.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drops the configs shim wrapper - explicit beats implicit, and the
prefix is visible where each CLI parses its config.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant