mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 08:41:13 +00:00
fix: auto-enable minimax plugin for API key auth route
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"enabledByDefault": true,
|
||||
"legacyPluginIds": ["minimax-portal-auth"],
|
||||
"providers": ["minimax", "minimax-portal"],
|
||||
"autoEnableWhenConfiguredProviders": ["minimax-portal"],
|
||||
"autoEnableWhenConfiguredProviders": ["minimax", "minimax-portal"],
|
||||
"providerAuthEnvVars": {
|
||||
"minimax": ["MINIMAX_API_KEY"],
|
||||
"minimax-portal": ["MINIMAX_OAUTH_TOKEN", "MINIMAX_API_KEY"]
|
||||
|
||||
@@ -522,6 +522,24 @@ describe("applyPluginAutoEnable", () => {
|
||||
expect(result.config.plugins?.entries?.["minimax-portal-auth"]).toBeUndefined();
|
||||
});
|
||||
|
||||
it("auto-enables minimax when minimax API key auth is configured", () => {
|
||||
const result = applyPluginAutoEnable({
|
||||
config: {
|
||||
auth: {
|
||||
profiles: {
|
||||
"minimax:default": {
|
||||
provider: "minimax",
|
||||
mode: "api_key",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
env: {},
|
||||
});
|
||||
|
||||
expect(result.config.plugins?.entries?.minimax?.enabled).toBe(true);
|
||||
});
|
||||
|
||||
it("does not auto-enable unrelated provider plugins just because auth profiles exist", () => {
|
||||
const result = applyPluginAutoEnable({
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user