Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

coerce types

Steven Tey41871cb04af2
diff --git a/apps/web/app/api/ai/completion/route.ts b/apps/web/app/api/ai/completion/route.ts
index 75255a515c..9667289ce8 100644
--- a/apps/web/app/api/ai/completion/route.ts
+++ b/apps/web/app/api/ai/completion/route.ts
@@ -28,7 +28,9 @@ export const POST = withWorkspace(async ({ req, workspace }) => {
throwIfAIUsageExceeded(workspace);
const result = streamText({
- model: anthropic(model),
+ model: anthropic(
+ model as "claude-3-5-haiku-latest" | "claude-sonnet-4-20250514",
+ ),
messages: [
{
role: "user",