Expand description
Onboard catalog endpoint — exposes the model_provider + model catalog the CLI wizard already uses, so the dashboard’s “+ Add model_provider” affordance and model-picker dropdown share the same source of truth as the CLI.
No catalog data is hand-maintained at this layer. list_model_providers() lives
in zeroclaw-providers and is the canonical list; list_models() per
model_provider fetches from models.dev (cached) or the model_provider’s own /models
endpoint. Same code paths as the CLI wizard.
Structs§
- Agent
Options Response - All alias-reference choices an agent form needs, in one round-trip.
Channels and model model_providers are returned in dotted form
(
telegram.default,anthropic.work); the bundle/profile/namespace lists are bare HashMap keys. - Catalog
Model Provider - Catalog
Response - Models
Query - Models
Response - Onboard
Repair Item - Onboard
Status Response - Picker
Item - Picker
Response - Section
Info - Section
Item Path - Section
Path - Section
Select Body POST /api/onboard/sections/<section>/items/<key>— instantiate the selected item in the live config (idempotent) and return the dotted prefix the frontend should fetch fields under.- Sections
Response - Select
Item Response
Functions§
- build_
agent_ options - Build the
AgentOptionsResponsefrom a config snapshot. Pure function so tests can drive the same code path the handler runs without spinning up anAppState. - derive_
onboard_ status - Pure derivation of the onboard-status response from a config snapshot.
needs_onboardingisfalseiff at least one enabled[agents.<alias>]block has a resolved model provider with a selected model plus resolved risk/runtime profile refs. A provider without a bound, runnable agent is not a completion signal: chat dispatch still bounces with a setup error in that state. - handle_
agent_ options GET /api/onboard/agent-options— every alias-reference list the agent form needs, derived from the live config. Mirrors the lists the TUI computes locally for its alias pickers.- handle_
catalog GET /api/onboard/catalog— list every model provider the CLI wizard knows about. The dashboard shows these in the “+ Add model provider” picker so CLI / web stay in sync.- handle_
catalog_ models GET /api/onboard/catalog/models?model_provider=<name>— fetch the model list for one model_provider. Same code path the CLI wizard uses (zeroclaw_providers::create_model_provider(...).list_models()), which goes through the models.dev cached catalog for OpenAI / Anthropic / Gemini, the live/v1/modelsendpoint for OpenRouter, etc.- handle_
onboard_ status GET /api/onboard/status— boolean signal for the dashboard’s fresh-install redirect. The daemon writes a defaultconfig.tomlon first init, so file existence isn’t a useful “is the user new?” check. Onboarding is complete iff at least one agent has itsmodel_provider,risk_profile, andruntime_profilebound.- handle_
section_ picker GET /api/onboard/sections/<section>— picker items for that section.- handle_
section_ select - handle_
sections GET /api/onboard/sections— list every top-level config section.