The Open Standard for Generative UI
fix: hardcode thesys base url (#1132)
ABa47bb1934c51
diff --git a/examples/agent-frameworks/mastra/src/openui-cloud-gateway.ts b/examples/agent-frameworks/mastra/src/openui-cloud-gateway.tsindex 401ebe8de..cc1f80428 100644--- a/examples/agent-frameworks/mastra/src/openui-cloud-gateway.ts+++ b/examples/agent-frameworks/mastra/src/openui-cloud-gateway.ts@@ -1,8 +1,6 @@import { createOpenAICompatible } from "@ai-sdk/openai-compatible";import { MastraModelGateway, type GatewayLanguageModel, type ProviderConfig } from "@mastra/core/llm";-const OPENUI_CLOUD_BASE_URL = "https://api.thesys.dev/v1/embed";-/** Full OpenUI Cloud model id, including the provider prefix Cloud expects. */export const OPENUI_CLOUD_MODEL = "google/gemini-3.6-flash-free";@@ -62,13 +60,13 @@ export class OpenUICloudGateway extends MastraModelGateway {models: [OPENUI_CLOUD_MODEL],apiKeyEnvVar: "THESYS_API_KEY",gateway: this.id,- url: OPENUI_CLOUD_BASE_URL,+ url: "https://api.thesys.dev/v1/embed",},};}buildUrl(): string {- return OPENUI_CLOUD_BASE_URL;+ return "https://api.thesys.dev/v1/embed";}async getApiKey(): Promise<string> {@@ -90,7 +88,7 @@ export class OpenUICloudGateway extends MastraModelGateway {return createOpenAICompatible({name: OPENUI_CLOUD_GATEWAY_ID,apiKey,- baseURL: OPENUI_CLOUD_BASE_URL,+ baseURL: "https://api.thesys.dev/v1/embed",supportsStructuredOutputs: true,transformRequestBody: sanitizeCompletionsBody,}).chatModel(modelId || OPENUI_CLOUD_MODEL);diff --git a/examples/design-systems/material-ui/src/app/api/chat/route.ts b/examples/design-systems/material-ui/src/app/api/chat/route.tsindex 8c26d5e8c..0380b779a 100644--- a/examples/design-systems/material-ui/src/app/api/chat/route.ts+++ b/examples/design-systems/material-ui/src/app/api/chat/route.ts@@ -1,6 +1,6 @@import { appToolDeclarations, appToolExecutors } from "@/lib/app-tools";import { cloudInstructions } from "@/lib/cloud-prompt";-import { CLOUD_EMBED_URL, DEFAULT_MODEL, requiredEnv } from "@/lib/env";+import { DEFAULT_MODEL, requiredEnv } from "@/lib/env";import { runChatToolLoop } from "@/lib/tool-loop";import { NextResponse } from "next/server";import OpenAI from "openai";@@ -19,7 +19,7 @@ export async function POST(req: Request) {}const client = new OpenAI({- baseURL: CLOUD_EMBED_URL,+ baseURL: "https://api.thesys.dev/v1/embed",apiKey: requiredEnv("THESYS_API_KEY"),});diff --git a/examples/design-systems/material-ui/src/lib/env.ts b/examples/design-systems/material-ui/src/lib/env.tsindex 86a8cff9f..3abcc3777 100644--- a/examples/design-systems/material-ui/src/lib/env.ts+++ b/examples/design-systems/material-ui/src/lib/env.ts@@ -4,5 +4,4 @@ export function requiredEnv(name: string): string {return value;}-export const CLOUD_EMBED_URL = "https://api.thesys.dev/v1/embed";export const DEFAULT_MODEL = "google/gemini-3.6-flash-free";diff --git a/examples/design-systems/shadcn/src/app/api/chat/route.ts b/examples/design-systems/shadcn/src/app/api/chat/route.tsindex 8c26d5e8c..0380b779a 100644--- a/examples/design-systems/shadcn/src/app/api/chat/route.ts+++ b/examples/design-systems/shadcn/src/app/api/chat/route.ts@@ -1,6 +1,6 @@import { appToolDeclarations, appToolExecutors } from "@/lib/app-tools";import { cloudInstructions } from "@/lib/cloud-prompt";-import { CLOUD_EMBED_URL, DEFAULT_MODEL, requiredEnv } from "@/lib/env";+import { DEFAULT_MODEL, requiredEnv } from "@/lib/env";import { runChatToolLoop } from "@/lib/tool-loop";import { NextResponse } from "next/server";import OpenAI from "openai";@@ -19,7 +19,7 @@ export async function POST(req: Request) {}const client = new OpenAI({- baseURL: CLOUD_EMBED_URL,+ baseURL: "https://api.thesys.dev/v1/embed",apiKey: requiredEnv("THESYS_API_KEY"),});diff --git a/examples/design-systems/shadcn/src/lib/env.ts b/examples/design-systems/shadcn/src/lib/env.tsindex 86a8cff9f..3abcc3777 100644--- a/examples/design-systems/shadcn/src/lib/env.ts+++ b/examples/design-systems/shadcn/src/lib/env.ts@@ -4,5 +4,4 @@ export function requiredEnv(name: string): string {return value;}-export const CLOUD_EMBED_URL = "https://api.thesys.dev/v1/embed";export const DEFAULT_MODEL = "google/gemini-3.6-flash-free";diff --git a/examples/miscellaneous/handsontable/src/app/api/chat/route.ts b/examples/miscellaneous/handsontable/src/app/api/chat/route.tsindex 9075f87b8..8746a1e0a 100644--- a/examples/miscellaneous/handsontable/src/app/api/chat/route.ts+++ b/examples/miscellaneous/handsontable/src/app/api/chat/route.ts@@ -1,5 +1,5 @@import { cloudInstructions } from "@/lib/cloud-prompt";-import { CLOUD_EMBED_URL, DEFAULT_MODEL, requiredEnv } from "@/lib/env";+import { DEFAULT_MODEL, requiredEnv } from "@/lib/env";import { NextRequest } from "next/server";import OpenAI from "openai";import type { ChatCompletionMessageParam } from "openai/resources/chat/completions.mjs";@@ -166,7 +166,7 @@ export async function POST(req: NextRequest) {// Chat Completions → POST /v1/embed/chat/completionsconst client = new OpenAI({apiKey: requiredEnv("THESYS_API_KEY"),- baseURL: CLOUD_EMBED_URL,+ baseURL: "https://api.thesys.dev/v1/embed",});const encoder = new TextEncoder();let controllerClosed = false;diff --git a/examples/miscellaneous/handsontable/src/lib/env.ts b/examples/miscellaneous/handsontable/src/lib/env.tsindex 86a8cff9f..3abcc3777 100644--- a/examples/miscellaneous/handsontable/src/lib/env.ts+++ b/examples/miscellaneous/handsontable/src/lib/env.ts@@ -4,5 +4,4 @@ export function requiredEnv(name: string): string {return value;}-export const CLOUD_EMBED_URL = "https://api.thesys.dev/v1/embed";export const DEFAULT_MODEL = "google/gemini-3.6-flash-free";diff --git a/examples/miscellaneous/html-artifact/src/app/api/chat/route.ts b/examples/miscellaneous/html-artifact/src/app/api/chat/route.tsindex 1d74e44a9..b9a4beef5 100644--- a/examples/miscellaneous/html-artifact/src/app/api/chat/route.ts+++ b/examples/miscellaneous/html-artifact/src/app/api/chat/route.ts@@ -1,5 +1,5 @@import { cloudInstructions } from "@/lib/cloud-prompt";-import { CLOUD_EMBED_URL, DEFAULT_MODEL, requiredEnv } from "@/lib/env";+import { DEFAULT_MODEL, requiredEnv } from "@/lib/env";import { NextRequest } from "next/server";import OpenAI from "openai";import type { ChatCompletionMessageParam } from "openai/resources/chat/completions.mjs";@@ -16,7 +16,7 @@ export async function POST(req: NextRequest) {// Chat Completions → POST /v1/embed/chat/completionsconst client = new OpenAI({apiKey: requiredEnv("THESYS_API_KEY"),- baseURL: CLOUD_EMBED_URL,+ baseURL: "https://api.thesys.dev/v1/embed",});const stream = await client.chat.completions.create({diff --git a/examples/miscellaneous/html-artifact/src/lib/env.ts b/examples/miscellaneous/html-artifact/src/lib/env.tsindex 86a8cff9f..3abcc3777 100644--- a/examples/miscellaneous/html-artifact/src/lib/env.ts+++ b/examples/miscellaneous/html-artifact/src/lib/env.ts@@ -4,5 +4,4 @@ export function requiredEnv(name: string): string {return value;}-export const CLOUD_EMBED_URL = "https://api.thesys.dev/v1/embed";export const DEFAULT_MODEL = "google/gemini-3.6-flash-free";