Repository navigation
feat(models): add Qwen3.8 Max on Alibaba - #3392
Conversation
Add qwen3.8-max, Alibaba's new flagship 2.4T-parameter MoE model (released Aug 2, 2026): 1M context, 131K max output, adaptive thinking with budget control, native vision, tools, web search, and structured outputs. $2/M input, $6/M output, implicit cache $0.25/M, explicit cache read $0.17/M, cache creation $2.5/M. Verified live on the Singapore endpoint: chat, vision input, json_object, reasoning_effort, enable_thinking toggle, and enable_search all work; tool_choice "required"/object is rejected in thinking mode (standard Qwen thinking constraint), so the mapping keeps the trimmed supportedParameters list. Claude-Session: https://claude.ai/code/session_01FtNvmWsGcGwGPPSdsaYN1y
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe Alibaba model registry now includes ChangesAlibaba Qwen model
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
packages/models/src/models/alibaba.ts (2)
1621-1625: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low valueAdd a comment documenting Alibaba Token Plan pricing semantics.
Alibaba Token Plan consumption is Cred-its-based and depends on model type, token usage, thinking mode, and tool calls; it does not expose a fixed per-token USD formula. These
inputPrice,outputPrice, and cache prices are gateway estimates only and should state that source.🤖 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 `@packages/models/src/models/alibaba.ts` around lines 1621 - 1625, Add a concise comment adjacent to the Alibaba pricing fields in the model definition explaining that Token Plan consumption is credit-based and varies by model type, token usage, thinking mode, and tool calls; clarify that input, output, and cache prices are gateway estimates rather than a fixed per-token USD formula.
1619-1620: 🗄️ Data Integrity & Integration | 🔵 TrivialDocument the Token Plan route for
qwen3.8-max.This model is Token Plan-only, but it is exposed as an international mapping without noting the Token Plan endpoint/credentials. Add documentation or a region label so deployers distinguish Token Plan routing from the existing Model Studio provider.
🤖 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 `@packages/models/src/models/alibaba.ts` around lines 1619 - 1620, Update the qwen3.8-max mapping near providerId "alibaba" to document that it uses Alibaba’s Token Plan route and credentials, or add the established region label that distinguishes Token Plan routing from the international Model Studio provider.
🤖 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 `@packages/models/src/models/alibaba.ts`:
- Around line 1638-1649: Update the Alibaba Qwen model mapping around
supportedParameters to match the Token Plan contract: either restrict
reasoning_effort to the documented supported range, or remove it from the
mapping if "none" would disable thinking and is invalid for this endpoint.
Ensure the exposed gateway parameters cannot request unsupported non-thinking
behavior.
- Around line 1619-1620: Update the Alibaba model mapping identified by
providerId "alibaba" to set externalId to the documented upstream model name
"qwen3.8-max-preview", preserving the rest of the mapping unchanged.
---
Nitpick comments:
In `@packages/models/src/models/alibaba.ts`:
- Around line 1621-1625: Add a concise comment adjacent to the Alibaba pricing
fields in the model definition explaining that Token Plan consumption is
credit-based and varies by model type, token usage, thinking mode, and tool
calls; clarify that input, output, and cache prices are gateway estimates rather
than a fixed per-token USD formula.
- Around line 1619-1620: Update the qwen3.8-max mapping near providerId
"alibaba" to document that it uses Alibaba’s Token Plan route and credentials,
or add the established region label that distinguishes Token Plan routing from
the international Model Studio provider.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b71d3c22-582f-4029-9e1a-2527543be75f
📒 Files selected for processing (1)
packages/models/src/models/alibaba.ts
Summary
Adds Qwen3.8 Max (
qwen3.8-max), Alibaba's new flagship 2.4-trillion-parameter MoE model released Aug 2, 2026, hosted on Alibaba Cloud Model Studio.Model details
$2/M, output$6/M, implicit cache$0.25/M, explicit cache read$0.17/M, explicit cache creation$2.5/M(source)reasoningMaxTokens,reasoningOutput: "omit"since thinking may be skipped for simple prompts), native vision, tools, web search ($0.01/call), structured outputsqwen3.7-maxmapping conventions; region-agnostic mapping (defaults to Singapore) matching howqwen3.7-maxlaunched — regional pricing overrides can be added once verifiedVerification
Verified live against the Singapore endpoint (
dashscope-intl):reasoning_contentby default (adaptive thinking)image_tokensbilled)response_format: json_objectandreasoning_effortacceptedenable_thinking: falsedisables thinking → supports thenoneeffort translationenable_search: trueacceptedtool_choice: "required"rejected in thinking mode ("The tool_choice parameter does not support being set to required or object in thinking mode"), confirming the standard trimmed Qwen thinking-modelsupportedParametersUS/Beijing region availability could not be verified (local key is Singapore-bound), hence no
regionsdeclared.TEST_MODELS="alibaba/qwen3.8-max" pnpm test:e2e— 99 passed, 0 failedpnpm build,pnpm formatall pass🤖 Generated with Claude Code
https://claude.ai/code/session_01FtNvmWsGcGwGPPSdsaYN1y
Summary by CodeRabbit
qwen3.8-maxmodel.