Skip to content

Commit 019630b

Browse files
authored
fix(vllm): pass env.VLLM_API_KEY to chat requests (#3865)
1 parent 90f5927 commit 019630b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sim/lib/api-key/byok.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { workspaceBYOKKeys } from '@sim/db/schema'
33
import { createLogger } from '@sim/logger'
44
import { and, eq } from 'drizzle-orm'
55
import { getRotatingApiKey } from '@/lib/core/config/api-keys'
6+
import { env } from '@/lib/core/config/env'
67
import { isHosted } from '@/lib/core/config/feature-flags'
78
import { decryptSecret } from '@/lib/core/security/encryption'
89
import { getWorkspaceById } from '@/lib/workspaces/permissions/utils'
@@ -69,7 +70,7 @@ export async function getApiKeyWithBYOK(
6970
const isVllmModel =
7071
provider === 'vllm' || useProvidersStore.getState().providers.vllm.models.includes(model)
7172
if (isVllmModel) {
72-
return { apiKey: userProvidedKey || 'empty', isBYOK: false }
73+
return { apiKey: userProvidedKey || env.VLLM_API_KEY || 'empty', isBYOK: false }
7374
}
7475

7576
const isBedrockModel = provider === 'bedrock' || model.startsWith('bedrock/')

0 commit comments

Comments
 (0)