kimi-code/docs/designs
liruifengv c0fede246d
feat(desktop): add custom provider management in settings (#93)
* feat(desktop): add custom provider management in settings

Add a Providers tab to the settings dialog where users manage API
providers in place (accordion rows; view = edit = add):

- Manual add/edit/rename/delete with a unified form (wire protocol,
  api key with password field + visibility toggle + stored-key prefill,
  base URL, model rows); renames migrate aliases and default pointers
  server-side; provider writes never move the global default model.
- Import from the server-proxied models.dev directory: searchable
  catalog with ineligible entries greyed out, minimal import form
  (name / API key / base URL only when required).
- Import from a private api.json registry (URL + optional Bearer key);
  re-importing the same URL refreshes it.
- Old-daemon degradation: when the connected server predates the
  catalog routes the directory source hides and the flow falls back to
  manual-only.

web-core gains the matching client methods (add/update/delete provider,
catalog list/get/import, registry import) with snake_case wire types and
envelope parsing hardened for bare 204s and non-envelope errors.

Bumps the kimi-code submodule to the provider-write-endpoints branch
(MoonshotAI/kimi-code PR #2110) which backs every new endpoint; the
pointer moves to the main merge commit once that PR lands.

* fix(desktop): refresh config when the providers panel mounts

Model counts and the edit form's rows derive from the config models
section, which another client may have rewritten since app launch —
reload it alongside providers and models so edits never start from a
stale snapshot. Exposes loadConfig on the client facade and bumps the
kimi-code submodule for the comment-convention cleanup.

* fix(desktop): re-probe auth readiness in the send gate before prompting login

The cached authReady flag predates readiness changes that never re-ran
checkAuth through this client — a provider added in settings, a default
model bumped by a composer pick. The gate re-checks GET /auth on a stale
negative before concluding sign-in is required, so a user with a
configured provider and picked model can send without a login prompt.

Also records the fresh-setup default-model seeding rule in the plan doc.

* feat(desktop): add a custom-provider entry on the onboarding login step

A second card below the Kimi sign-in option completes onboarding (same
as skipping login) and deep-links into Settings -> Providers via a new
initialTab prop on SettingsDialog, so first-run users with their own
API key can configure a provider instead of signing in.
2026-07-24 14:08:53 +08:00
..
providers-tab-proposals.html feat(desktop): add custom provider management in settings (#93) 2026-07-24 14:08:53 +08:00