Files
openclaw/extensions/minimax/openclaw.plugin.json
Peter Lee 9a7d615dfc fix(agents): use fetchWithSsrFGuard in minimax-vlm.ts instead of raw fetch (#106163)
* fix(agents): use fetchWithSsrFGuard in minimax-vlm.ts instead of raw fetch

Replace raw fetch() with fetchWithSsrFGuard + withTrustedEnvProxyGuardedFetchMode
in minimaxUnderstandImage, aligning with all other agent network transport
paths (provider-transport-fetch, mcp-http-fetch, web-guarded-fetch, tools-manager).

This adds SSRF protection, redirect safety, debug capture, and proper
dispatcher lifecycle management. The ensureGlobalUndiciEnvProxyDispatcher
call is removed since guarded fetch handles proxy routing in trusted env-proxy
mode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agents): preserve configured MiniMax origins in guarded-fetch migration

* fix(agents): resolve lint and type-suppression regressions in MiniMax VLM guarded-fetch tests

Replace as-any casts in vi.mock vi.importActual calls with generic type
parameters, and replace the opts:any parameter in the fetch-guard bridge
with an inline type. Add SSRF policy assertions covering default hosts,
custom public hosts, and explicitly-authorized loopback origins.

* fix(minimax-vlm): thread allowPrivateNetwork into guarded-fetch policy

Honor the explicit provider request private-network opt-out in the MiniMax
VLM guarded-fetch path. When an operator sets
models.providers.<id>.request.allowPrivateNetwork: false, skip the origin
exception for non-default hosts so the explicit denial is authoritative.

Also fix an invalid Vitest fn generic (two-parameter form -> function
signature) that caused check-test-types to fail.

* fix(agents): use canonical provider SSRF policy for MiniMax VLM

* fix(media): harden MiniMax VLM transport

Co-authored-by: Peter Lee <li.xialong@xydigit.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-18 09:29:24 +01:00

167 lines
4.8 KiB
JSON

{
"id": "minimax",
"icon": "https://cdn.simpleicons.org/minimax",
"activation": {
"onStartup": false
},
"enabledByDefault": true,
"legacyPluginIds": ["minimax-portal-auth"],
"providers": ["minimax", "minimax-portal"],
"providerEndpoints": [
{
"endpointClass": "minimax-native",
"hosts": ["api.minimax.io", "api.minimaxi.com"]
}
],
"providerCatalogEntry": "./provider-discovery.ts",
"autoEnableWhenConfiguredProviders": ["minimax", "minimax-portal"],
"nonSecretAuthMarkers": ["minimax-oauth"],
"setup": {
"providers": [
{
"id": "minimax",
"envVars": ["MINIMAX_CODE_PLAN_KEY", "MINIMAX_CODING_API_KEY", "MINIMAX_API_KEY"]
},
{
"id": "minimax-portal",
"envVars": ["MINIMAX_OAUTH_TOKEN", "MINIMAX_API_KEY"]
}
]
},
"providerAuthAliases": {
"minimax-cn": "minimax",
"minimax-portal-cn": "minimax-portal"
},
"providerAuthChoices": [
{
"provider": "minimax-portal",
"method": "oauth",
"choiceId": "minimax-global-oauth",
"appGuidedAuth": "device-code",
"choiceLabel": "MiniMax OAuth (Global)",
"choiceHint": "Global endpoint - api.minimax.io",
"groupId": "minimax",
"groupLabel": "MiniMax",
"groupHint": "M3 (recommended)"
},
{
"provider": "minimax",
"method": "api-global",
"choiceId": "minimax-global-api",
"appGuidedSecret": true,
"deprecatedChoiceIds": ["minimax", "minimax-api", "minimax-cloud", "minimax-api-lightning"],
"choiceLabel": "MiniMax API key (Global)",
"choiceHint": "Global endpoint - api.minimax.io",
"groupId": "minimax",
"groupLabel": "MiniMax",
"groupHint": "M3 (recommended)",
"optionKey": "minimaxApiKey",
"cliFlag": "--minimax-api-key",
"cliOption": "--minimax-api-key <key>",
"cliDescription": "MiniMax API key"
},
{
"provider": "minimax-portal",
"method": "oauth-cn",
"choiceId": "minimax-cn-oauth",
"appGuidedAuth": "device-code",
"choiceLabel": "MiniMax OAuth (CN)",
"choiceHint": "CN endpoint - api.minimaxi.com",
"groupId": "minimax",
"groupLabel": "MiniMax",
"groupHint": "M3 (recommended)"
},
{
"provider": "minimax",
"method": "api-cn",
"choiceId": "minimax-cn-api",
"appGuidedSecret": true,
"deprecatedChoiceIds": ["minimax-api-key-cn"],
"choiceLabel": "MiniMax API key (CN)",
"choiceHint": "CN endpoint - api.minimaxi.com",
"groupId": "minimax",
"groupLabel": "MiniMax",
"groupHint": "M3 (recommended)",
"optionKey": "minimaxApiKey",
"cliFlag": "--minimax-api-key",
"cliOption": "--minimax-api-key <key>",
"cliDescription": "MiniMax API key"
}
],
"contracts": {
"speechProviders": ["minimax"],
"mediaUnderstandingProviders": ["minimax", "minimax-portal"],
"imageGenerationProviders": ["minimax", "minimax-portal"],
"musicGenerationProviders": ["minimax", "minimax-portal"],
"videoGenerationProviders": ["minimax", "minimax-portal"],
"webSearchProviders": ["minimax"],
"usageProviders": ["minimax"]
},
"configContracts": {
"compatibilityRuntimePaths": ["tools.web.search.apiKey"]
},
"mediaUnderstandingProviderMetadata": {
"minimax": {
"capabilities": ["image"],
"defaultModels": {
"image": "MiniMax-VL-01"
},
"documentModels": {
"pdf": {
"textExtraction": "MiniMax-M2.7",
"image": false
}
},
"autoPriority": {
"image": 40
}
},
"minimax-portal": {
"capabilities": ["image"],
"defaultModels": {
"image": "MiniMax-VL-01"
},
"documentModels": {
"pdf": {
"textExtraction": "MiniMax-M2.7",
"image": false
}
},
"autoPriority": {
"image": 50
}
}
},
"uiHints": {
"webSearch.apiKey": {
"label": "MiniMax Token Plan key",
"help": "MiniMax Token Plan key or OAuth token (fallback: MINIMAX_CODE_PLAN_KEY, MINIMAX_CODING_API_KEY, MINIMAX_OAUTH_TOKEN, or MINIMAX_API_KEY if it already points at a token-plan credential).",
"sensitive": true,
"placeholder": "sk-cp-..."
},
"webSearch.region": {
"label": "MiniMax Search Region",
"help": "Search endpoint region override. Leave unset to reuse your configured MiniMax host or MINIMAX_API_HOST."
}
},
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"webSearch": {
"type": "object",
"additionalProperties": false,
"properties": {
"apiKey": {
"type": ["string", "object"]
},
"region": {
"type": "string",
"enum": ["global", "cn"]
}
}
}
}
}
}