mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 15:46:22 +00:00
* fix: fallback to default BrowserOS provider when provider is null When the extension first loads, provider config is loaded async from storage. If a chat request fires before loading completes (race condition), provider is null and the server receives provider: undefined, causing a Zod validation error. This adds a fallback to createDefaultBrowserOSProvider() in both chat paths (sidepanel and scheduled tasks) so provider.type is always defined. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: fallback to first provider when default provider ID is stale When defaultProviderId in storage doesn't match any loaded provider (e.g. after Kimi/Moonshot rollout), selectedProvider was null causing provider: undefined in chat requests. Now falls back to providers[0]. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: repair stale defaultProviderId in storage on load When the stored default provider ID doesn't match any loaded provider, write back the corrected ID (providers[0].id) to storage so it doesn't silently persist across sessions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>