Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/public/js/lib/model-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const getAuthProviderFromModelProvider = (provider) => {
if (normalized === "openai-codex") return "openai";
if (normalized === "volcengine-plan") return "volcengine";
if (normalized === "byteplus-plan") return "byteplus";
if (normalized === "minimax-cn") return "minimax";
return normalized;
};

Expand Down
10 changes: 10 additions & 0 deletions lib/server/model-catalog-bootstrap.json
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,11 @@
"provider": "minimax",
"label": "MiniMax-M2.7-highspeed"
},
{
"key": "minimax/MiniMax-M3",
"provider": "minimax",
"label": "MiniMax-M3"
},
{
"key": "minimax-cn/MiniMax-M2.7",
"provider": "minimax-cn",
Expand All @@ -1559,6 +1564,11 @@
"provider": "minimax-cn",
"label": "MiniMax-M2.7-highspeed"
},
{
"key": "minimax-cn/MiniMax-M3",
"provider": "minimax-cn",
"label": "MiniMax-M3"
},
{
"key": "mistral/codestral-latest",
"provider": "mistral",
Expand Down
9 changes: 9 additions & 0 deletions tests/frontend/model-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ describe("frontend/model-config", () => {
expect(modelConfig.getAuthProviderFromModelProvider("byteplus-plan")).toBe(
"byteplus",
);
expect(modelConfig.getAuthProviderFromModelProvider("minimax-cn")).toBe(
"minimax",
);
expect(modelConfig.getAuthProviderFromModelProvider("google")).toBe("google");
});

it("lets CN model selections reuse the MiniMax API key", async () => {
const modelConfig = await loadModelConfig();
const keys = modelConfig.getVisibleAiFieldKeys("minimax-cn");
expect(keys.has("MINIMAX_API_KEY")).toBe(true);
});

it("returns visible AI field keys for provider", async () => {
const modelConfig = await loadModelConfig();
const keys = modelConfig.getVisibleAiFieldKeys("openai-codex");
Expand Down