mirror of https://github.com/openclaw/openclaw.git
fix: auto-enable minimax plugin for API key auth route
This commit is contained in:
parent
26a891aaeb
commit
bcda46cb95
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue