Expand description
lev doctor - prove the provider wiring works, one layer at a time.
Four checks run in order and each one is reported, so a failure names the layer that broke instead of leaving the caller to guess:
config- the config file parses and a provider registry can be built.resolve- the user’s defaults pick a provider that is actually registered. This is the check that catches a stage resolving toanthropic/claude-sonnet-4-6(the hard-coded last resort inModelConfig::provider) on a machine with no Anthropic key - the root cause of a fleet of runs that spawned, sat at iteration 0, and never took a turn.inference- one real call to that provider, straight throughProvider::infer. No world, no run, nothing on disk.daemon- a throwaway one-stage agent spawned over the control socket and waited on, then deleted. This is the only check that exercises the handoff, which is why it is worth the second billed call: checks 1-3 passing while this one fails is exactly the “credentials are fine, the daemon is wedged” verdict that used to take a hand-built canary agent to establish.
The daemon-touching I/O lives behind crate::dispatch::RiskyExecutors, so
the cores here are driven by unit tests against injected registries and a
scripted control socket. The registry builder is a &dyn Fn rather than a
generic for the coverage reason documented on
crate::commands::models’s equivalent seam.
Structs§
- Check
- One layer’s verdict, with whatever detail makes it actionable.
- Doctor
Args - Arguments for
lev doctor.
Enums§
- Check
Status - Whether a check proved what it set out to prove.
- Daemon
Target - What the fourth check has to work with.
Constants§
- DOCTOR_
LONG_ ABOUT lev doctor --help. What each check proves, and what a failure at it means.
Functions§
- execute
lev doctor. The binary decides what the fourth check gets to talk to; seeDaemonTarget.- format_
report - Render the checks as the table
lev doctorprints. - run_
checks - Run the checks in order, stopping at the first failure.