Skip to content

Commit 1b8b987

Browse files
committed
refactor: remove unnecessary bit
1 parent 7f2592d commit 1b8b987

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

  • apps/backend-convex/convex/http

apps/backend-convex/convex/http/ai.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,6 @@ aiApp
6262

6363
await rateLimiter.limit(c.env, 'aiChat', { key: userIdentity?.subject ?? lockerKey, throws: true })
6464

65-
const _providerSdk = (() => {
66-
switch (provider) {
67-
case 'openai':
68-
return createOpenAI({ apiKey })
69-
case 'openrouter':
70-
return createOpenRouter({ apiKey })
71-
default:
72-
return undefined
73-
}
74-
})()
75-
7665
// Cast type and runQuery to check for permission
7766
const threadId = _threadId as Id<'threads'>
7867
const thread = await c.env.runQuery(api.threads.get, { threadId, lockerKey })

0 commit comments

Comments
 (0)