mirror of
https://github.com/Open-Dev-Society/OpenStock.git
synced 2026-09-03 06:15:16 +08:00
Merge pull request #87 from octo-patch/octo/20260729-model-add-recvq9hH1JfM5I
feat(ai-provider): default MiniMax to the current MiniMax-M3 model
This commit is contained in:
@@ -10,7 +10,7 @@ import { callAIProvider } from "@/lib/ai-provider";
|
||||
describe.skipIf(!process.env.MINIMAX_API_KEY)(
|
||||
"MiniMax integration",
|
||||
() => {
|
||||
it("generates a response from MiniMax M2.7", async () => {
|
||||
it("generates a response from MiniMax M3", async () => {
|
||||
const result = await callAIProvider(
|
||||
"Reply with exactly: MINIMAX_OK",
|
||||
"minimax"
|
||||
|
||||
@@ -29,7 +29,7 @@ describe("getProviderConfig", () => {
|
||||
const config = getProviderConfig("minimax");
|
||||
expect(config.name).toBe("minimax");
|
||||
expect(config.baseUrl).toBe("https://api.minimax.io/v1");
|
||||
expect(config.model).toBe("MiniMax-M2.7");
|
||||
expect(config.model).toBe("MiniMax-M3");
|
||||
expect(config.apiKey).toBe("test-key");
|
||||
});
|
||||
|
||||
@@ -176,7 +176,7 @@ describe("callAIProvider", () => {
|
||||
"Bearer test-minimax-key"
|
||||
);
|
||||
const body = JSON.parse(options.body);
|
||||
expect(body.model).toBe("MiniMax-M2.7");
|
||||
expect(body.model).toBe("MiniMax-M3");
|
||||
expect(body.messages[0].content).toBe("test prompt");
|
||||
expect(body.temperature).toBe(0.7);
|
||||
});
|
||||
|
||||
@@ -36,7 +36,9 @@ export function getProviderConfig(
|
||||
apiKey: process.env.MINIMAX_API_KEY || "",
|
||||
baseUrl:
|
||||
process.env.MINIMAX_BASE_URL || "https://api.minimax.io/v1",
|
||||
model: process.env.MINIMAX_MODEL || "MiniMax-M2.7",
|
||||
// Defaults to the current MiniMax-M3 model. Set MINIMAX_MODEL to
|
||||
// select another model (e.g. the previous MiniMax-M2.7).
|
||||
model: process.env.MINIMAX_MODEL || "MiniMax-M3",
|
||||
};
|
||||
|
||||
case "siray":
|
||||
|
||||
Reference in New Issue
Block a user