llm: auto-load active config from arcadia on app boot
Adds <LlmConfigBootstrap /> in root.tsx that, when localStorage has no active LLM settings, fetches enabled configurations from arcadia and seeds the active settings (provider/model/baseURL/secretName + reasoning effort) from the preferred row. Idempotent and silent on auth failure; retries on session change. Selection: prefer metadata.default === true, otherwise first enabled row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import "./app.css"
|
||||
import { ToastProvider, Toaster } from "@crema/notification-ui"
|
||||
import { CommandBusProvider } from "@crema/action-bus"
|
||||
import { ArcadiaProvider } from "@crema/arcadia-client"
|
||||
import { LlmConfigBootstrap } from "~/lib/llm-config-bootstrap"
|
||||
// CREMA:PROVIDERS-IMPORTS
|
||||
|
||||
const ARCADIA_URL = import.meta.env.VITE_ARCADIA_URL ?? "http://localhost:4000"
|
||||
@@ -61,6 +62,7 @@ export default function App() {
|
||||
}}
|
||||
>
|
||||
<CommandBusProvider>
|
||||
<LlmConfigBootstrap />
|
||||
<Outlet />
|
||||
<Toaster />
|
||||
</CommandBusProvider>
|
||||
|
||||
Reference in New Issue
Block a user