Studio: persist external provider selection across page refresh (#5697)
Selecting a connected external provider (Anthropic, OpenAI, Google, etc.) and refreshing the page reverted the picker back to no selection. Root cause is that `PersistedInferenceParams` in `chat-settings-api.ts` excludes `checkpoint` from the server-side settings payload by design. Local model selections survive refresh because the backend re-derives them from `/api/inference/status.active_model`, but external selections have no backend mirror, so they were lost. Fix: persist `external::*` checkpoints to a small dedicated `localStorage` key (`unsloth_chat_last_external_checkpoint`) and hydrate from it on store init. Local checkpoints continue to come from the backend status as before; only external ids are mirrored client-side. `setCheckpoint` writes the key when an external id is selected and clears it when switching back to a local id, and `clearCheckpoint` clears it so the picker does not snap back after an explicit reset.
D
Daniel Han committed
228d1cd40ceb05b2cdae41f913aa22528439bc88
Parent: a226b7e
Committed by GitHub <noreply@github.com>
on 5/22/2026, 1:45:27 PM