# Tasks — CLI-068: configure-provider failures name the actual cause

Spec: `.agents/spec-docs/active/CLI-068-configure-provider-messages.md`
Test Plan SSOT: the spec's TC table.

- [x] T1 (TC-01): `validateProviderProfile` checks `findProviderDefinition` BEFORE field
      presence — unknown provider type throws `Unknown provider "<name>". Supported
providers: <formatSupportedProviderTypes(definitions)>.`; `robota
--configure-provider doesnotexist` exits 1 with that message.
- [x] T2 (TC-02): `buildProviderProfile` validates `--api-key-env` existence at configure
      time (injected env, default process.env) — unset var throws an error naming the var
      and stating it must be set when configuring; exit 1.
- [x] T3 (TC-03): valid configure flow (known provider, set env var) succeeds unchanged
      (regression).
- [x] T4 (TC-04): known provider genuinely missing a model (e.g. openai — no default
      model) still reports `is missing model` (original diagnosis preserved where correct).
- [x] T5 (TC-05): framework SPEC.md error taxonomy documents both messages + configure-time
      env requirement.
- [x] T6: wrap-up — framework test/typecheck/lint/build green; PR to develop (squash);
      backlog scenario evidence + move to completed/.

## Test Plan

Authoritative TC table: `.agents/spec-docs/active/CLI-068-configure-provider-messages.md`
(## Test Plan). Summary: TC-01..TC-04 via provider-settings unit tests (unknown type,
unset env var via injected env, happy path, openai missing-model); TC-05 via SPEC.md diff
review at GATE-COMPLETE. User-execution scenarios: real binary `--configure-provider
doesnotexist` and `--configure-provider anthropic ... --api-key-env UNSET_VAR`.
