Skip to content

Commit d017452

Browse files
committed
fix: only route to openai if prefixed with openai/
1 parent ea730ba commit d017452

File tree

1 file changed

+1
-2
lines changed
  • web/src/app/api/v1/chat/completions

1 file changed

+1
-2
lines changed

web/src/app/api/v1/chat/completions/_post.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ export async function postChatCompletions(params: {
207207
// Streaming request
208208
const model = (body as any)?.model
209209
const isOpenAIDirectModel =
210-
typeof model === 'string' &&
211-
(!model.includes('/') || model.startsWith('openai/'))
210+
typeof model === 'string' && model.startsWith('openai/')
212211
const stream = await (isOpenAIDirectModel
213212
? handleOpenAIStream({
214213
body,

0 commit comments

Comments
 (0)