summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFrank <[email protected]>2026-03-26 00:47:16 -0400
committerFrank <[email protected]>2026-03-26 00:47:23 -0400
commit2d502d6ffe1aaf8c02d26b863ad4fd8d82bf28b5 (patch)
tree565c6caba1eedc65d0ae55242af94430392ca5b3
parent2ad190e4828aa8e098f7871c38f7620937290866 (diff)
downloadopencode-2d502d6ffe1aaf8c02d26b863ad4fd8d82bf28b5.tar.gz
opencode-2d502d6ffe1aaf8c02d26b863ad4fd8d82bf28b5.zip
go: do not respect disabled zen models
-rw-r--r--packages/console/app/src/routes/zen/util/handler.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/console/app/src/routes/zen/util/handler.ts b/packages/console/app/src/routes/zen/util/handler.ts
index ab075a24d..ee73b056d 100644
--- a/packages/console/app/src/routes/zen/util/handler.ts
+++ b/packages/console/app/src/routes/zen/util/handler.ts
@@ -132,7 +132,7 @@ export async function handler(
retry,
stickyProvider,
)
- validateModelSettings(authInfo)
+ validateModelSettings(billingSource, authInfo)
updateProviderKey(authInfo, providerInfo)
logger.metric({ provider: providerInfo.id })
@@ -768,9 +768,10 @@ export async function handler(
return "balance"
}
- function validateModelSettings(authInfo: AuthInfo) {
- if (!authInfo) return
- if (authInfo.isDisabled) throw new ModelError(t("zen.api.error.modelDisabled"))
+ function validateModelSettings(billingSource: BillingSource, authInfo: AuthInfo) {
+ if (billingSource === "lite") return
+ if (billingSource === "anonymous") return
+ if (authInfo!.isDisabled) throw new ModelError(t("zen.api.error.modelDisabled"))
}
function updateProviderKey(authInfo: AuthInfo, providerInfo: ProviderInfo) {