Skip to content

Add MiniMax M3 provider defaults#273

Open
octo-patch wants to merge 1 commit into
linuxhsj:mainfrom
octo-patch:octo/20260708-add-target-provider-model-to-existing-provider-registry-recvoNmj63a7U8
Open

Add MiniMax M3 provider defaults#273
octo-patch wants to merge 1 commit into
linuxhsj:mainfrom
octo-patch:octo/20260708-add-target-provider-model-to-existing-provider-registry-recvoNmj63a7U8

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 9, 2026

Copy link
Copy Markdown

Reason: add target provider/model to existing provider registry

Summary

  • Add MiniMax-M3 to the MiniMax provider catalog and make it the default model.
  • Update MiniMax Anthropic-compatible endpoints to the documented /anthropic/v1 paths for global and CN regions.
  • Refresh MiniMax M3 context and pricing defaults in provider model definitions and tests.

Test plan

  • git diff --check
  • Secret scan with the configured Octopatch regex
  • pnpm install --frozen-lockfile (failed: environment has Node v20.20.2 but package requires >=22.12.0, then disk filled during install with ENOSPC)
  • pnpm exec vitest run minimax/model-definitions.test.ts minimax/onboard.test.ts extensions/minimax/model-definitions.test.ts extensions/minimax/onboard.test.ts (not run successfully: vitest unavailable because install failed)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 新功能

    • MiniMax 相关配置默认升级到新模型,新增对最新模型标识的支持。
    • 默认接口地址更新为新版路径,连接更稳定一致。
  • Bug 修复

    • 修正了默认上下文窗口与费用信息,确保模型配置与实际接口保持一致。
    • 更新测试覆盖的默认模型与别名匹配,减少配置解析偏差。

Reason: add target provider/model to existing provider registry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

将 minimax 与 extensions/minimax 两套代码中的 MiniMax API 基础地址追加 /v1 路径段,默认模型从 MiniMax-M2.7 切换为 MiniMax-M3,同时提升默认上下文窗口至 1000000,并更新计费系数(移除 cacheWrite 字段)。相应测试断言同步更新。

Changes

minimax 目录变更

Layer / File(s) Summary
基础 URL 与计费参数更新
minimax/index.ts, minimax/model-definitions.ts, minimax/provider-catalog.ts, minimax/model-definitions.test.ts
默认基础 URL 追加 /v1,上下文窗口提升至 1000000,MINIMAX_API_COST 数值更新并移除 cacheWrite,相应测试断言同步调整。
默认模型切换为 M3
minimax/provider-models.ts
MINIMAX_DEFAULT_MODEL_ID/MINIMAX_DEFAULT_MODEL_REF 改为 M3,模型顺序与目录新增 M3 条目,现代模型匹配器扩展支持 minimax-m3
onboard 默认 modelId 与测试
minimax/onboard.ts, minimax/onboard.test.ts
四个导出的 onboard 函数默认 modelId 改为 MiniMax-M3,测试断言同步更新 baseUrl 与模型 id 列表。

extensions/minimax 目录变更

Layer / File(s) Summary
基础 URL 与计费参数更新
extensions/minimax/index.ts, extensions/minimax/model-definitions.ts, extensions/minimax/provider-catalog.ts, extensions/minimax/model-definitions.test.ts
默认基础 URL 追加 /v1,上下文窗口提升至 1000000,MINIMAX_API_COST 数值更新并移除 cacheWrite,相应测试断言同步调整。
默认模型切换为 M3
extensions/minimax/provider-models.ts
默认模型常量与目录切换为 M3,现代模型匹配器扩展支持 minimax-m3
onboard 默认 modelId 与测试
extensions/minimax/onboard.ts, extensions/minimax/onboard.test.ts
四个导出的 onboard 函数默认 modelId 改为 MiniMax-M3,测试断言同步更新。

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning 仅包含原因、摘要和测试计划,未按模板提供大部分必填分节。 补齐模板中的 Change Type、Scope、Linked Issue/PR、User-visible、Security Impact、Repro+Verification、Evidence、Human Verification 等分节。
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 标题简洁且准确概括了主要变更:为 MiniMax 增加 M3 默认配置。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
minimax/provider-models.ts (1)

3-22: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

更新 Minimax 默认模型对应的测试断言

MINIMAX_DEFAULT_MODEL_ID 已切到 "MiniMax-M3"src/commands/onboard-auth.test.ts:420-435 里这条合并测试仍断言最后一个模型是 "MiniMax-M2.7";把它改成 "MiniMax-M3",否则这条测试会和默认配置不一致。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@minimax/provider-models.ts` around lines 3 - 22, The Minimax default model
has changed to MiniMax-M3, so the onboarding auth test in onboard-auth.test.ts
still asserting MiniMax-M2.7 is now out of sync. Update the affected test
expectation to match MINIMAX_DEFAULT_MODEL_ID and the default model selection
logic used by the Minimax provider model constants, so the merged-model
assertion reflects MiniMax-M3.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@extensions/minimax/model-definitions.ts`:
- Around line 5-15: `MINIMAX_API_COST` in
`MINIMAX_API_BASE_URL`/`MINIMAX_API_COST` definitions is missing the
`cacheWrite` entry, which makes it incompatible with places expecting a full
`ModelDefinitionConfig["cost"]`. Add the missing `cacheWrite` field to
`MINIMAX_API_COST` alongside `input`, `output`, and `cacheRead`, keeping the
existing naming and structure in `model-definitions.ts`.

In `@minimax/index.ts`:
- Around line 32-33: The MiniMax default base URL has changed, so the onboard
auth test is still asserting the old value. Update the `applyMinimaxApiConfig`
expectation in `src/commands/onboard-auth.test.ts` to match the new
`DEFAULT_BASE_URL_GLOBAL` value used by `minimax/index.ts`, so the baseUrl
assertion checks `https://api.minimax.io/anthropic/v1` instead of the outdated
URL.

In `@minimax/model-definitions.ts`:
- Around line 5-15: `MINIMAX_API_COST` is missing the `cacheWrite` field, which
is used by `buildMinimaxApiModelDefinition`, `provider-catalog.ts`, and
`estimateUsageCost` when computing usage cost. Update the `MINIMAX_API_COST`
object in `model-definitions` to include `cacheWrite` with a default value of 0
so cost estimation remains valid and does not produce undefined/NaN results.

In `@minimax/provider-catalog.ts`:
- Around line 11-17: The Minimax config behavior has changed, but the onboarding
auth test still asserts the old values. Update the assertions in
onboard-auth.test.ts to match applyMinimaxApiConfig and the Minimax provider
behavior now using https://api.minimax.io/anthropic/v1 and the new model value
instead of the old baseUrl and "MiniMax-M2.7". Keep the test expectations
aligned with the relevant Minimax symbols so the suite reflects the current
provider catalog behavior.

---

Outside diff comments:
In `@minimax/provider-models.ts`:
- Around line 3-22: The Minimax default model has changed to MiniMax-M3, so the
onboarding auth test in onboard-auth.test.ts still asserting MiniMax-M2.7 is now
out of sync. Update the affected test expectation to match
MINIMAX_DEFAULT_MODEL_ID and the default model selection logic used by the
Minimax provider model constants, so the merged-model assertion reflects
MiniMax-M3.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 62a82df7-d54a-46ff-bcbb-9141744b37cb

📥 Commits

Reviewing files that changed from the base of the PR and between a654bcf and 5f431e5.

📒 Files selected for processing (14)
  • extensions/minimax/index.ts
  • extensions/minimax/model-definitions.test.ts
  • extensions/minimax/model-definitions.ts
  • extensions/minimax/onboard.test.ts
  • extensions/minimax/onboard.ts
  • extensions/minimax/provider-catalog.ts
  • extensions/minimax/provider-models.ts
  • minimax/index.ts
  • minimax/model-definitions.test.ts
  • minimax/model-definitions.ts
  • minimax/onboard.test.ts
  • minimax/onboard.ts
  • minimax/provider-catalog.ts
  • minimax/provider-models.ts

Comment on lines +5 to +15
export const MINIMAX_API_BASE_URL = "https://api.minimax.io/anthropic/v1";
export const MINIMAX_CN_API_BASE_URL = "https://api.minimaxi.com/anthropic/v1";
export const MINIMAX_HOSTED_MODEL_ID = MINIMAX_DEFAULT_MODEL_ID;
export const MINIMAX_HOSTED_MODEL_REF = `minimax/${MINIMAX_HOSTED_MODEL_ID}`;
export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 204800;
export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 1000000;
export const DEFAULT_MINIMAX_MAX_TOKENS = 131072;

export const MINIMAX_API_COST = {
input: 0.3,
output: 1.2,
cacheRead: 0.06,
cacheWrite: 0.375,
input: 0.6,
output: 2.4,
cacheRead: 0.12,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 查找 MINIMAX_API_COST 的类型定义,确认 cacheWrite 是否为可选字段
rg -n "cacheWrite" extensions/minimax/ --type=ts -C3
rg -n "interface.*cost\|type.*cost\|cacheWrite\?:" extensions/minimax/ src/ --type=ts -C3

Repository: linuxhsj/openclaw-zero-token

Length of output: 1497


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant source file and shared type definitions for cost typing.
sed -n '1,120p' extensions/minimax/model-definitions.ts

printf '\n--- SEARCH ModelDefinitionConfig / cost typing ---\n'
rg -n "type ModelDefinitionConfig|interface ModelDefinitionConfig|cost:" src extensions -g '*.ts' -C 3

printf '\n--- SEARCH cost references in minimax ---\n'
rg -n "MINIMAX_API_COST|MINIMAX_.*COST|cacheWrite" extensions/minimax -g '*.ts' -C 2

Repository: linuxhsj/openclaw-zero-token

Length of output: 50385


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- extensions/minimax/model-definitions.ts ---'
sed -n '1,120p' extensions/minimax/model-definitions.ts

printf '\n%s\n' '--- cost type definitions ---'
rg -n "type ModelDefinitionConfig|interface ModelDefinitionConfig|cost\s*:\s*\{" src extensions -g '*.ts' -C 3 | sed -n '1,220p'

printf '\n%s\n' '--- direct MINIMAX_API_COST usages ---'
rg -n "MINIMAX_API_COST" extensions src -g '*.ts' -C 3

Repository: linuxhsj/openclaw-zero-token

Length of output: 23693


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the shared ModelDefinitionConfig type and the cost shape.
rg -n "export (type|interface) ModelDefinitionConfig|cost\s*[:?]" src extensions packages openclaw -g '*.ts' -C 4

printf '\n--- provider-model-shared files ---\n'
fd -a "provider-model-shared" . -t f

printf '\n--- files that define cacheWrite in model cost types ---\n'
rg -n "cacheWrite.*\?" src extensions packages openclaw -g '*.ts' -C 2

Repository: linuxhsj/openclaw-zero-token

Length of output: 50385


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the shared model-definition type file, then inspect the cost shape directly.
fd -a "provider-model-shared*.ts" src extensions packages openclaw -t f
printf '\n--- possible matches for ModelDefinitionConfig ---\n'
rg -n "export (type|interface) ModelDefinitionConfig|type ModelDefinitionConfig|interface ModelDefinitionConfig" src extensions packages openclaw -g '*.ts' -C 4 | sed -n '1,200p'

printf '\n--- cacheWrite optional/required in shared types ---\n'
rg -n "cacheWrite\??:" src extensions packages openclaw -g '*.ts' -C 4 | sed -n '1,220p'

Repository: linuxhsj/openclaw-zero-token

Length of output: 1273


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- src/config/types.models.ts (ModelDefinitionConfig) ---'
sed -n '1,180p' src/config/types.models.ts

printf '\n%s\n' '--- src/plugin-sdk/provider-model-shared.ts ---'
sed -n '1,220p' src/plugin-sdk/provider-model-shared.ts

Repository: linuxhsj/openclaw-zero-token

Length of output: 4117


补回 cacheWrite 字段 extensions/minimax/model-definitions.ts:12-15 里的 MINIMAX_API_COST 少了 cacheWrite,但它会被传给要求完整 ModelDefinitionConfig["cost"] 的位置,当前会产生类型不匹配。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@extensions/minimax/model-definitions.ts` around lines 5 - 15,
`MINIMAX_API_COST` in `MINIMAX_API_BASE_URL`/`MINIMAX_API_COST` definitions is
missing the `cacheWrite` entry, which makes it incompatible with places
expecting a full `ModelDefinitionConfig["cost"]`. Add the missing `cacheWrite`
field to `MINIMAX_API_COST` alongside `input`, `output`, and `cacheRead`,
keeping the existing naming and structure in `model-definitions.ts`.

Comment thread minimax/index.ts
Comment on lines +32 to +33
const DEFAULT_BASE_URL_CN = "https://api.minimaxi.com/anthropic/v1";
const DEFAULT_BASE_URL_GLOBAL = "https://api.minimax.io/anthropic/v1";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 检查下游测试文件中是否仍有旧的 baseUrl 断言
rg -n 'api\.minimax\.io/anthropic"' src/commands/onboard-auth.test.ts
# 检查下游测试文件中是否仍有旧的 MiniMax-M2.7 默认模型断言
rg -n 'MiniMax-M2\.7' src/commands/onboard-auth.test.ts

Repository: linuxhsj/openclaw-zero-token

Length of output: 888


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) 定位实现与测试,确认 baseUrl 的实际生成逻辑和相关断言
rg -n 'DEFAULT_BASE_URL_(CN|GLOBAL)|applyMinimaxApiConfig|baseUrl' minimax/index.ts src/commands/onboard-auth.test.ts

# 2) 只读取相关小片段,避免整文件过大输出
sed -n '1,120p' minimax/index.ts
printf '\n--- onboard-auth.test.ts excerpt ---\n'
sed -n '370,440p' src/commands/onboard-auth.test.ts

Repository: linuxhsj/openclaw-zero-token

Length of output: 10325


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 找出 applyMinimaxApiConfig 的实现和它默认写入 baseUrl 的位置
rg -n 'function applyMinimaxApiConfig|export .*applyMinimaxApiConfig|baseUrl: .*anthropic|DEFAULT_BASE_URL_GLOBAL|DEFAULT_BASE_URL_CN' -S .

# 只读相关实现片段
printf '\n--- plugin-sdk/minimax.js / onboard.ts candidates ---\n'
fd -a 'minimax.*' .
fd -a 'onboard.*' .

Repository: linuxhsj/openclaw-zero-token

Length of output: 22472


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 读取 applyMinimaxApiConfig 的实现,确认它是否使用了新的 /v1 默认值
sed -n '1,180p' minimax/onboard.ts

printf '\n--- src/commands/onboard-auth.test.ts excerpt ---\n'
sed -n '380,435p' src/commands/onboard-auth.test.ts

printf '\n--- extensions/minimax/onboard.test.ts excerpt ---\n'
sed -n '1,120p' extensions/minimax/onboard.test.ts

Repository: linuxhsj/openclaw-zero-token

Length of output: 9171


同步更新 src/commands/onboard-auth.test.ts 的 MiniMax baseUrl 断言

applyMinimaxApiConfig({}) 现在写入的是 https://api.minimax.io/anthropic/v1,但这里仍在断言旧值 https://api.minimax.io/anthropic,会导致这条测试失败。把断言改成新默认值即可。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@minimax/index.ts` around lines 32 - 33, The MiniMax default base URL has
changed, so the onboard auth test is still asserting the old value. Update the
`applyMinimaxApiConfig` expectation in `src/commands/onboard-auth.test.ts` to
match the new `DEFAULT_BASE_URL_GLOBAL` value used by `minimax/index.ts`, so the
baseUrl assertion checks `https://api.minimax.io/anthropic/v1` instead of the
outdated URL.

Comment on lines +5 to +15
export const MINIMAX_API_BASE_URL = "https://api.minimax.io/anthropic/v1";
export const MINIMAX_CN_API_BASE_URL = "https://api.minimaxi.com/anthropic/v1";
export const MINIMAX_HOSTED_MODEL_ID = MINIMAX_DEFAULT_MODEL_ID;
export const MINIMAX_HOSTED_MODEL_REF = `minimax/${MINIMAX_HOSTED_MODEL_ID}`;
export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 204800;
export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 1000000;
export const DEFAULT_MINIMAX_MAX_TOKENS = 131072;

export const MINIMAX_API_COST = {
input: 0.3,
output: 1.2,
cacheRead: 0.06,
cacheWrite: 0.375,
input: 0.6,
output: 2.4,
cacheRead: 0.12,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 搜索下游代码中对 MINIMAX_API_COST.cacheWrite 的引用
rg -n 'cacheWrite' minimax/ src/ --type=ts -g '!**/*.test.ts' -g '!**/node_modules/**'
# 搜索 MINIMAX_API_COST 的所有使用点
rg -n 'MINIMAX_API_COST' minimax/ src/ --type=ts -g '!**/node_modules/**'

Repository: linuxhsj/openclaw-zero-token

Length of output: 32636


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## minimax/model-definitions.ts\n'
cat -n minimax/model-definitions.ts | sed -n '1,120p'

printf '\n## minimax/provider-catalog.ts\n'
cat -n minimax/provider-catalog.ts | sed -n '1,120p'

printf '\n## minimax/api.ts\n'
cat -n minimax/api.ts | sed -n '1,120p'

printf '\n## minimax/model-definitions.test.ts\n'
cat -n minimax/model-definitions.test.ts | sed -n '1,120p'

printf '\n## minimax files outline\n'
ast-grep outline minimax/model-definitions.ts --view expanded
ast-grep outline minimax/provider-catalog.ts --view expanded

Repository: linuxhsj/openclaw-zero-token

Length of output: 9212


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## ModelDefinitionConfig / cost types\n'
rg -n 'interface ModelDefinitionConfig|type ModelDefinitionConfig|cost:' src minimax -g '!**/*.test.ts' -g '!**/node_modules/**'

printf '\n## config defaults / merge logic around cost\n'
rg -n 'DEFAULT_MODEL_COST|cacheWrite.*cost|raw\.cost|cost\.cacheWrite|merge.*cost' src minimax -g '!**/*.test.ts' -g '!**/node_modules/**'

printf '\n## minimax-specific cost references\n'
rg -n 'MINIMAX_API_COST|MINIMAX_HOSTED_COST|MINIMAX_LM_STUDIO_COST|cacheWrite' minimax -g '!**/*.test.ts' -g '!**/node_modules/**'

Repository: linuxhsj/openclaw-zero-token

Length of output: 23160


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## src/config/types.models.ts\n'
cat -n src/config/types.models.ts | sed -n '58,90p'

printf '\n## src/config/defaults.ts\n'
cat -n src/config/defaults.ts | sed -n '30,90p'
printf '\n--\n'
cat -n src/config/defaults.ts | sed -n '260,285p'

printf '\n## src/utils/usage-format.ts\n'
cat -n src/utils/usage-format.ts | sed -n '235,265p'

printf '\n## minimax/model-definitions.ts references\n'
rg -n 'MINIMAX_API_COST|MINIMAX_HOSTED_COST|MINIMAX_LM_STUDIO_COST' minimax src -g '!**/*.test.ts' -g '!**/node_modules/**'

Repository: linuxhsj/openclaw-zero-token

Length of output: 6265


补上 MINIMAX_API_COST.cacheWrite

buildMinimaxApiModelDefinitionprovider-catalog.ts 都直接复用这个成本对象,而 estimateUsageCost 会读取 cost.cacheWrite 参与计算。这里缺少字段会让 Minimax API 的成本估算变成 undefined/NaN;直接补 cacheWrite: 0 即可。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@minimax/model-definitions.ts` around lines 5 - 15, `MINIMAX_API_COST` is
missing the `cacheWrite` field, which is used by
`buildMinimaxApiModelDefinition`, `provider-catalog.ts`, and `estimateUsageCost`
when computing usage cost. Update the `MINIMAX_API_COST` object in
`model-definitions` to include `cacheWrite` with a default value of 0 so cost
estimation remains valid and does not produce undefined/NaN results.

Comment on lines +11 to +17
const MINIMAX_PORTAL_BASE_URL = "https://api.minimax.io/anthropic/v1";
const MINIMAX_DEFAULT_CONTEXT_WINDOW = 1000000;
const MINIMAX_DEFAULT_MAX_TOKENS = 131072;
const MINIMAX_API_COST = {
input: 0.3,
output: 1.2,
cacheRead: 0.06,
cacheWrite: 0.375,
input: 0.6,
output: 2.4,
cacheRead: 0.12,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 验证下游测试中的断言是否已更新
rg -n 'api\.minimax\.io/anthropic"' src/commands/onboard-auth.test.ts
rg -n 'MiniMax-M2\.7' src/commands/onboard-auth.test.ts

Repository: linuxhsj/openclaw-zero-token

Length of output: 888


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '380,440p' src/commands/onboard-auth.test.ts
printf '\n---\n'
sed -n '1,120p' minimax/provider-catalog.ts

Repository: linuxhsj/openclaw-zero-token

Length of output: 3805


同步 src/commands/onboard-auth.test.ts 中的 Minimax 断言
applyMinimaxApiConfig 现在返回 https://api.minimax.io/anthropic/v1,但 src/commands/onboard-auth.test.ts 里仍有旧的 baseUrl"MiniMax-M2.7" 断言;这些用例需要一起改成新行为,否则测试会继续失败。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@minimax/provider-catalog.ts` around lines 11 - 17, The Minimax config
behavior has changed, but the onboarding auth test still asserts the old values.
Update the assertions in onboard-auth.test.ts to match applyMinimaxApiConfig and
the Minimax provider behavior now using https://api.minimax.io/anthropic/v1 and
the new model value instead of the old baseUrl and "MiniMax-M2.7". Keep the test
expectations aligned with the relevant Minimax symbols so the suite reflects the
current provider catalog behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant