Files
plugins/packages/minimax/package.json
T
yetone 80c9b495fc minimax 0.2.6: a model takes the video its config says, in magpie (#985)
configModels() and modelOf() said image or nothing: video, audio and pdf
were hard-coded false, so MiniMax-M3.1-Flash and M3 (whose model config
says modalities.input ["text","image","video"], attachment true) showed
as text and image only in magpie's /v1/models, on both sites.

Now parseModels keeps the config's modalities.input (text, image, audio,
video, pdf; unknown kinds dropped) and attachment, and the built-in list
says video for M3.1-Flash-Preview and M3. Where the plugin runs decides
what is advertised:
- magpie's host (the plugin input has `magpie`): every kind said. magpie's
  gateway writes the Anthropic body and the loader's fetch sends it to
  MiniMax byte for byte; the new test sends the issue's video block and
  checks the upstream got the same body.
- OpenCode: @ai-sdk/anthropic builds the body and throws on a file part
  that isn't an image, a PDF or text ("media type: video/mp4",
  dist/index.js in 4.0.102), so video and audio stay out there and
  OpenCode keeps saying the model can't read them. pdf is passed on.

Still dropping video before it reaches this plugin: magpie's gateway
(parseAnthropicRequest has no video block, and groups don't merge
Inputs): yetone/magpie#6135, the reporter's own issue.

Run at the pushed head, rebased on 4a78bec3 (wsl-run, magpie-desktop,
Bun 1.4.2, temp HOME):
- bun test packages/minimax: 159 pass, 0 fail
- bun scripts/check.mjs: exit 0
- modalities.test.mjs is new; its fixture is the issue's literal model
  config ({"modalities":{"input":["text","image","video"],"output":
  ["text"]},"attachment":true}) for minimax-code (MiniMax-M3.1-Flash)
  and minimax-code-global (MiniMax-M3.1-Flash-Preview).

Broken by hand:
- video kept false again in inputsOf: 5 of 8 modalities tests red
  (both sites' live and built-in lists, the every-kind test)
- video advertised in OpenCode too: 4 red (both sites' OpenCode tests,
  the every-kind test, models.test's config test)

Not tried: a real MiniMax account or a real video through magpie (the
gateway drops it until #6135); OpenCode itself with a video attachment
(read from @ai-sdk/anthropic's source, not run).

Reported-by: LingYingNX
2026-11-11 18:10:50 +08:00

13 lines
775 B
JSON

{
"name": "@magpie-community/opencode-minimax-auth",
"version": "0.2.6",
"description": "OpenCode provider plugins for MiniMax Code accounts: their credits and M Plan, China (minimax-code) and international (minimax-code-global), with MiniMax Code's own device sign-in",
"type": "module",
"main": "./opencode.mjs",
"exports": { "./server": "./magpie.mjs", ".": "./opencode2.mjs" },
"files": ["index.mjs", "opencode.mjs", "opencode2.mjs", "magpie.mjs", "connector-tools.mjs", "matrix-tools.json", "web-tools.mjs", "README.md"],
"keywords": ["opencode", "opencode-plugin", "minimax", "mcode", "minimax-code"],
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/minimax" }
}