feat(check): global model configuration for MultiTool Checks (file/env/flag)#143
Merged
Conversation
…v/flag)
Replace the hardcoded `checks::config::configuration()` with a real
configuration-loading layer that resolves the global default provider,
model, and effort from three sources with standard CLI precedence
(`flag > env var > config file`), merged with figment, and constructs a
registry of ready-to-use model providers for a future executor.
- New `src/checks/config/` module:
- schema.rs: ProviderKind/Effort enums + the `[checks]` file schema and
the `CliOverrides` flag layer (serde + clap ValueEnum).
- file.rs: locate/read `MultiTool.toml` (.json/.jsonc) via the existing
`fs::StaticFile` machinery; tolerates legacy manifest keys so one file
carries both rollout and checks config.
- models.rs: hardcoded model allowlist + per-provider defaults; used to
validate the configured model.
- providers.rs: build one handle per provider whose credential env var is
present (<=3), dispatching on provider name only (no from_model_string),
honoring per-provider base_url overrides. Credentials are env-only.
- mod.rs: figment merge `file -> Env::prefixed("MULTI_") ->
Serialized::defaults(cli)` (flag > env > file), validation, and the
`Resolved { config, providers }` handoff.
- CLI: `multi check` gains `--provider/--model/--effort` as `Option<T>`
with no clap default, so unset flags don't clobber env/file layers.
- Deps: cersei-provider, figment (+ figment[test] dev-dep for Jail).
- Docs: Configuration section in guides/checks.md.
The execution path is out of scope: the provider registry is constructed
and handed off but not yet wired into the executor; `ClaudeExecutor` still
runs the checks. Retiring `run` + the legacy `Manifest` schema (so
`MultiTool.toml` is no longer consumed by `run`) is tracked separately as a
blocking follow-up; the two readers coexist for now.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Replace the hardcoded
checks::config::configuration()with a realconfiguration-loading layer that resolves the global default provider,
model, and effort from three sources with standard CLI precedence
(
flag > env var > config file), merged with figment, and constructs aregistry of ready-to-use model providers for a future executor.
src/checks/config/module:[checks]file schema andthe
CliOverridesflag layer (serde + clap ValueEnum).MultiTool.toml(.json/.jsonc) via the existingfs::StaticFilemachinery; tolerates legacy manifest keys so one filecarries both rollout and checks config.
validate the configured model.
present (<=3), dispatching on provider name only (no from_model_string),
honoring per-provider base_url overrides. Credentials are env-only.
file -> Env::prefixed("MULTI_") -> Serialized::defaults(cli)(flag > env > file), validation, and theResolved { config, providers }handoff.multi checkgains--provider/--model/--effortasOption<T>with no clap default, so unset flags don't clobber env/file layers.
The execution path is out of scope: the provider registry is constructed
and handed off but not yet wired into the executor;
ClaudeExecutorstillruns the checks. Retiring
run+ the legacyManifestschema (soMultiTool.tomlis no longer consumed byrun) is tracked separately as ablocking follow-up; the two readers coexist for now.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com