Skip to content

fix(astraflow): MiniMax-H3 视频模型标注 ark-video 端点 - #167

Merged
mergify[bot] merged 1 commit into
suanova:mainfrom
skeeey:fix/astraflow-minimax-h3-endpoint
Oct 26, 2026
Merged

mergify[bot] merged 1 commit into
suanova:mainfrom
skeeey:fix/astraflow-minimax-h3-endpoint

Conversation

@skeeey

@skeeey skeeey commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

问题

AstraFlow(59)渠道上的 MiniMax-H3 是视频任务模型,但定价页和 GET /v1/models 的 supported_endpoint_types 返回 ["openai","openai-response"],代码示例也按聊天渲染。

原因

GetEndpointTypesByChannelType 的 AstraFlow 分支用 IsOpenAIVideoModel 判断视频模型;VideoGenerationModels 只有 seedance/sora/kling/wan3.0-video,MiniMax-H3 落到文本分支。

修改

  • common/model.go:VideoGenerationModels 增加 minimax-h3;IsOpenAIVideoModel 排除 minimax-h3-context-ir(上游按 token 计费的文本模型,避免同名子串误标)。
  • common/endpoint_type_test.go:补 AstraFlow 表驱动用例,锁定 MiniMax-H3 → ark-video 与 minimax-h3-context-ir → openai/openai-response。

验证

  • 新增用例先失败(actual ["openai","openai-response"]),修改后通过
  • GOWORK=off go build ./...
  • GOWORK=off go test -race ./common/
  • GOWORK=off go test -race ./controller/ -skip '^TestRunPluginLoop'
  • GOWORK=off go test -race ./model/ -run 'TestPricing|TestGetPreferredModelOwnerChannelTypes'
  • 全量 go test -race -skip '^TestRunPluginLoop' 通过;TestRunPluginLoop* 会访问 127.0.0.1:1,本机 WSL 下连接挂起(与本改动无关,单独跑也超时)

部署注意

若线上模型元数据显式写了 endpoints,部署后需要清理:元数据端点是追加语义,非空值还会覆盖管理页显示。视频模型按规范留空,由渠道类型推导。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for MiniMax-H3 in video generation model recognition and routing.
    • MiniMax-H3 Context IR is now recognized with OpenAI and OpenAI Responses endpoints.
  • Bug Fixes
    • MiniMax-H3 Context IR is no longer classified as a video generation model, helping requests use the appropriate endpoint.

AstraFlow 渠道的端点推导按模型名识别视频模型,VideoGenerationModels
缺少 minimax-h3,导致 MiniMax-H3 落到文本分支,定价页与 /v1/models
显示 openai/openai-response。

- 名单补充 minimax-h3;IsOpenAIVideoModel 排除上游按 token 计费的
  minimax-h3-context-ir,避免同名文本模型被误标为视频
- 补 AstraFlow 表驱动用例,锁定 ark-video 与 context-ir 的回归

Co-Authored-By: Claude Code <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 20f33c9 and 8eaab32.

📒 Files selected for processing: 2
  • common/endpoint_type_test.go
  • common/model.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The video model list now includes minimax-h3. The video-model check excludes names containing minimax-h3-context-ir, and endpoint-mapping tests cover both models.

Changes: MiniMax model mapping

Layer / File(s) Summary
Model classification and endpoint mapping
common/model.go, common/endpoint_type_test.go
VideoGenerationModels includes minimax-h3. IsOpenAIVideoModel excludes names containing minimax-h3-context-ir. AstraFlow endpoint-mapping tests cover the video and text mappings.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: clyang82

Merge Risk: ⚪ Minimal · up to 8eaab

The MiniMax model classifications map to the intended video and text endpoints, so the change is mergeable.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the AstraFlow change: classifying the MiniMax-H3 video model as an ark-video endpoint.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
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 a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@mergify
mergify Bot merged commit 1b8ee5f into suanova:main Oct 26, 2026
7 checks passed
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

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.

2 participants