From 64b4f7df4c76c835e23bfeeda3b1578c36fd7b11 Mon Sep 17 00:00:00 2001
From: Frank
Date: Tue, 18 Aug 2026 22:55:47 -0400
Subject: [PATCH 1/7] sync
---
packages/console/app/src/i18n/en.ts | 3 +
.../routes/workspace/[id]/go/lite-section.tsx | 35 +
.../console/app/src/routes/zen/util/error.ts | 1 +
.../app/src/routes/zen/util/handler.ts | 11 +-
.../migration.sql | 1 +
.../snapshot.json | 3245 +++++++++++++++++
.../console/core/src/schema/billing.sql.ts | 1 +
.../console/core/src/schema/referral.sql.ts | 4 +-
.../console/core/src/schema/workspace.sql.ts | 1 +
packages/console/core/src/workspace.ts | 2 +
packages/web/src/content/docs/go.mdx | 7 +
11 files changed, 3308 insertions(+), 3 deletions(-)
create mode 100644 packages/console/core/migrations/20260819012908_flashy_arclight/migration.sql
create mode 100644 packages/console/core/migrations/20260819012908_flashy_arclight/snapshot.json
diff --git a/packages/console/app/src/i18n/en.ts b/packages/console/app/src/i18n/en.ts
index 726a9282d20..ac5efc73688 100644
--- a/packages/console/app/src/i18n/en.ts
+++ b/packages/console/app/src/i18n/en.ts
@@ -390,6 +390,8 @@ export const dict = {
"zen.api.error.modelDisabled": "Model is disabled",
"zen.api.error.regionNotAllowed":
"The latest version of this model is only available hosted in China and requires explicit opt in: {{consoleGoUrl}}",
+ "zen.api.error.nonZdrNotAllowed":
+ "This model collects data used to improve its quality and requires explicit opt in: {{consoleGoUrl}}",
"zen.api.error.trialEnded":
"Free promotion has ended for {{model}}. You can continue using the model by subscribing to OpenCode Go - {{link}}",
@@ -671,6 +673,7 @@ export const dict = {
'Select "OpenCode Go" as the provider in your opencode configuration to use Go models.',
"workspace.lite.providers.title": "Providers",
"workspace.lite.providers.description": "Control which providers are used for routing.",
+ "workspace.lite.providers.allowNonZdr": "Enable models without zero data retention",
"workspace.lite.providers.useChina": "Enable models hosted in China",
"workspace.lite.black.message":
"You're currently subscribed to OpenCode Black or on the waitlist. Please unsubscribe first if you'd like to switch to Go.",
diff --git a/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx b/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx
index 4de88cba3c3..dca06a196c4 100644
--- a/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx
@@ -39,6 +39,7 @@ export const queryLiteSubscription = query(async (workspaceID: string) => {
timeCreated: LiteTable.timeCreated,
lite: BillingTable.lite,
region: WorkspaceTable.region,
+ allowNonZdr: WorkspaceTable.allow_non_zdr,
})
.from(BillingTable)
.innerJoin(LiteTable, eq(LiteTable.workspaceID, BillingTable.workspaceID))
@@ -54,6 +55,7 @@ export const queryLiteSubscription = query(async (workspaceID: string) => {
return {
mine,
useBalance: row.lite?.useBalance ?? false,
+ allowNonZdr: row.allowNonZdr ?? false,
region:
row.region ?? (await Workspace.setDefaultRegion({ country: countryFromRequest(getRequestEvent()?.request) })),
rollingUsage: Subscription.analyzeRollingUsage({
@@ -154,6 +156,24 @@ const setGoProviderRouting = action(async (form: FormData) => {
)
}, "go.providerRouting.set")
+const setGoAllowNonZdr = action(async (form: FormData) => {
+ "use server"
+ const workspaceID = form.get("workspaceID") as string | null
+ if (!workspaceID) return { error: formError.workspaceRequired }
+ const allowNonZdr = (form.get("allowNonZdr") as string | null) === "true"
+
+ return json(
+ await withActor(
+ () =>
+ Workspace.update({ allow_non_zdr: allowNonZdr })
+ .then(() => ({ error: undefined }))
+ .catch((e) => ({ error: e.message as string })),
+ workspaceID,
+ ),
+ { revalidate: queryLiteSubscription.key },
+ )
+}, "go.allowNonZdr.set")
+
function LiteUsageItem(props: { label: string; usage: { usagePercent: number; resetInSec: number } }) {
const i18n = useI18n()
@@ -186,6 +206,7 @@ export function LiteSection(props: { lite: LiteSubscription | undefined }) {
const checkoutSubmission = useSubmission(createLiteCheckoutUrl)
const useBalanceSubmission = useSubmission(setLiteUseBalance)
const providerRoutingSubmission = useSubmission(setGoProviderRouting)
+ const allowNonZdrSubmission = useSubmission(setGoAllowNonZdr)
const [store, setStore] = createStore({
loading: undefined as undefined | "session" | "checkout" | "alipay" | "upi",
showModal: false,
@@ -264,6 +285,20 @@ export function LiteSection(props: { lite: LiteSubscription | undefined }) {
{i18n.t("workspace.lite.providers.title")}
{i18n.t("workspace.lite.providers.description")}
+
+
+ Muse Spark 1.2: {i18n.t("go.faq.a5.museRetention")}{" "}
+
+ {i18n.t("go.faq.a5.learnMore")}
+
+ .
+
DeepSeek V4 Flash: {i18n.t("go.faq.a5.deepseekRetention")}