feat: mock Homarr Assistant in demo mode and fix board page crash (#6524)

This commit is contained in:
Thomas authored and ajnart committed 2026-08-13 19:56:41 +02:00
1 parent 5e6ebef961
commit c1aaa1a955
6 files changed
+127 -43

No files matched your search

@@ -0,0 +1,17 @@
/**
* The AI SDK resolves provider options by the provider name registered on the
* language model. The @ai-sdk/openai-compatible provider converts the raw
* provider name (for example `homarr-openrouter`) to camelCase
* (`homarrOpenrouter`) and warns when the raw key is still used. This helper
* mirrors that conversion so providerOptions reach the provider without a
* deprecation warning.
*/
export const toProviderOptionsKey = (name: string) =>
name
.split("-")
.filter(Boolean)
.map((segment, index) => {
if (index === 0) return segment;
return segment.charAt(0).toUpperCase() + segment.slice(1);
})
.join("");