zen: friendly trial ended message

This commit is contained in:
Frank
2026-04-02 03:15:33 -04:00
parent 0f488996b3
commit db93891373
19 changed files with 41 additions and 0 deletions

View File

@@ -404,6 +404,14 @@ export async function handler(
}),
)
if (modelData.trialEnded)
throw new ModelError(
`${t("zen.api.error.trialEnded", {
model: modelData.name,
link: "https://opencode.ai/go",
})}`,
)
logger.metric({ model: modelId })
return { id: modelId, ...modelData }