Skip to content

Commit 4228745

Browse files
committed
fix: Update condition for DeepSeek-R1 model identification in createMessage method
1 parent f1b7d7d commit 4228745

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/providers/chutes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class ChutesHandler extends BaseOpenAiCompatibleProvider<ChutesModelId> {
4747
override async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream {
4848
const model = this.getModel()
4949

50-
if (model.id.startsWith("deepseek-ai/DeepSeek-R1")) {
50+
if (model.id.includes("DeepSeek-R1")) {
5151
const stream = await this.client.chat.completions.create({
5252
...this.getCompletionParams(systemPrompt, messages),
5353
messages: convertToR1Format([{ role: "user", content: systemPrompt }, ...messages]),
@@ -91,7 +91,7 @@ export class ChutesHandler extends BaseOpenAiCompatibleProvider<ChutesModelId> {
9191

9292
override getModel() {
9393
const model = super.getModel()
94-
const isDeepSeekR1 = model.id.startsWith("deepseek-ai/DeepSeek-R1")
94+
const isDeepSeekR1 = model.id.includes("DeepSeek-R1")
9595
return {
9696
...model,
9797
info: {

0 commit comments

Comments
 (0)