Skip to content

Commit 82dd23a

Browse files
committed
Remove Minimax override
1 parent 2b95396 commit 82dd23a

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

src/api/providers/minimax.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import { Anthropic } from "@anthropic-ai/sdk"
21
import { type MinimaxModelId, minimaxDefaultModelId, minimaxModels } from "@roo-code/types"
32

43
import type { ApiHandlerOptions } from "../../shared/api"
5-
import { XmlMatcher } from "../../utils/xml-matcher"
6-
import { ApiStream } from "../transform/stream"
7-
import type { ApiHandlerCreateMessageMetadata } from "../index"
84

95
import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"
106

@@ -20,43 +16,4 @@ export class MiniMaxHandler extends BaseOpenAiCompatibleProvider<MinimaxModelId>
2016
defaultTemperature: 1.0,
2117
})
2218
}
23-
24-
override async *createMessage(
25-
systemPrompt: string,
26-
messages: Anthropic.Messages.MessageParam[],
27-
metadata?: ApiHandlerCreateMessageMetadata,
28-
): ApiStream {
29-
const stream = await this.createStream(systemPrompt, messages, metadata)
30-
31-
const matcher = new XmlMatcher(
32-
"think",
33-
(chunk) =>
34-
({
35-
type: chunk.matched ? "reasoning" : "text",
36-
text: chunk.data,
37-
}) as const,
38-
)
39-
40-
for await (const chunk of stream) {
41-
const delta = chunk.choices[0]?.delta
42-
43-
if (delta?.content) {
44-
for (const matcherChunk of matcher.update(delta.content)) {
45-
yield matcherChunk
46-
}
47-
}
48-
49-
if (chunk.usage) {
50-
yield {
51-
type: "usage",
52-
inputTokens: chunk.usage.prompt_tokens || 0,
53-
outputTokens: chunk.usage.completion_tokens || 0,
54-
}
55-
}
56-
}
57-
58-
for (const chunk of matcher.final()) {
59-
yield chunk
60-
}
61-
}
6219
}

0 commit comments

Comments
 (0)