mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-11-29 02:17:48 +08:00
When an organization-scoped Kilo token is rejected with a 401, the model catalog comes back empty, which removes the provider from `all` in the /provider response. `pickBy` can only filter existing keys, so the `failedSet.has(id)` retention clause was unreachable: clients received `failed: ["kilo"]` with no row to attach a reason to, and the picker just showed "No results found" with the cause visible only in the logs. Add a typed `failures` array to the provider list contract and emit a models-less placeholder for any failed provider missing from `all`, so the CLI, TUI, and VS Code can name the cause and offer re-authentication. The placeholder is synthetic and never sourced from the raw catalog, so the public models.dev model list still cannot leak into an org context, and it respects enabled_providers/disabled_providers.