ClipSpacesClipSpaces Docs
Back to app

All releases

AI composer redesign + in-chat model switcher

The Ask AI composer was restyled to match the reference chat aesthetic and now lets you switch models inline, without opening AI settings.

Added

  • components/AIPanel.tsx — composer control row rebuilt: a model switcher pill on the left (AI badge + model name + caret → dropdown of models for the active provider, with a "Manage in AI settings…" link) and a Send pill on the right with a ⌘↵ hint. The picked model is remembered in localStorage and sent as a per-request override; a short disclaimer line sits under the composer.
  • lib/ai/types.tsMODEL_PRESETS per provider plus modelsForProvider() / shortModelLabel() helpers (client-safe). The configured model is always included and listed first.

Changed

  • app/api/ai/route.ts — accepts an optional model in the request body and applies it over the resolved config (provider/key/endpoint unchanged), so the switcher only swaps the model id.
  • app/api/ai/credentials/route.tsGET now also returns the effective { provider, model } (post-resolution, no secret), so the composer can seed its switcher even when the config comes from the host/env rather than a saved credential.