Skip to content

feat(models): add new Alibaba and Moonshot model entries - #624

Merged
steebchen merged 1 commit into
mainfrom
feat/modelsx
Aug 22, 2025
Merged

steebchen merged 1 commit into
mainfrom
feat/modelsx

Conversation

@steebchen

@steebchen steebchen commented Aug 22, 2025

Copy link
Copy Markdown
Member

Added support for new models:

  1. Qwen3 Coder 480B A35B Instruct
  2. Qwen3 Coder 30B A3B Instruct
  3. Qwen3 30B A3B Instruct 2507
  4. Qwen3 30B A3B Thinking 2507
  5. Moonshot Kimi-K2 Instruct

These models include metadata for pricing, features, and configurations.

Summary by CodeRabbit

  • New Features
    • Added support for new Alibaba Qwen3 models: qwen3-coder-480b-a35b-instruct, qwen3-coder-30b-a3b-instruct, qwen3-30b-a3b-instruct-2507, and qwen3-30b-a3b-thinking-2507 (reasoning-enabled).
    • These models support streaming, tool use, JSON output, large context windows, and up to 8k token outputs.
  • Enhancements
    • Added Nebius as an additional provider option for the Kimi-K2 Instruct model, expanding availability and flexibility.

@coderabbitai

coderabbitai Bot commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds four new Alibaba Qwen models with NEBIUS provider configurations and appends a NEBIUS provider to the Moonshot Kimi-K2 model. No existing providers or exports are modified. Fields include pricing, context/output limits, streaming, vision, tools, jsonOutput, and one model with reasoning enabled.

Changes

Cohort / File(s) Summary
Alibaba Qwen NEBIUS additions
packages/models/src/models/alibaba.ts
Added four NEBIUS-backed models: qwen3-coder-480b-a35b-instruct, qwen3-coder-30b-a3b-instruct, qwen3-30b-a3b-instruct-2507, qwen3-30b-a3b-thinking-2507 (with reasoning: true). Each includes pricing, contextSize 262000, maxOutput 8192, streaming true, vision false, tools true, jsonOutput true.
Moonshot Kimi-K2 NEBIUS provider
packages/models/src/models/moonshot.ts
Appended NEBIUS provider for Kimi-K2-Instruct with specified pricing, contextSize 131072, maxOutput 8192, streaming true, vision false, tools true. Existing providers unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • smakosh

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/modelsx

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Added support for new models:

1. Qwen3 Coder 480B A35B Instruct
2. Qwen3 Coder 30B A3B Instruct
3. Qwen3 30B A3B Instruct 2507
4. Qwen3 30B A3B Thinking 2507
5. Moonshot Kimi-K2 Instruct

These models include metadata for pricing, features, and configurations.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
packages/models/src/models/alibaba.ts (4)

290-311: Use 262144 (power-of-two) for contextSize unless 262000 is provider-accurate

262000 looks like a rounded 256k. If NEBIUS advertises 262144 tokens, prefer exact. If 262000 is the documented limit, keep as-is and add a brief comment.

-				contextSize: 262000,
+				contextSize: 262144,

312-333: Same contextSize precision check for qwen3-coder-30b-a3b-instruct

Mirror the precision fix here as well if applicable.

-				contextSize: 262000,
+				contextSize: 262144,

334-355: Same contextSize precision check for qwen3-30b-a3b-instruct-2507

Apply the exact 256k token window if that’s the real limit.

-				contextSize: 262000,
+				contextSize: 262144,

356-378: Reasoning flag: verify ModelDefinition support and runtime handling

  • You’ve added reasoning: true for the “Thinking 2507” variant—nice. Please confirm ModelDefinition includes this field and that downstream routing enables “reasoning” paths (e.g., tool-use restrictions, token accounting, or special headers).
  • Same contextSize note as above.
-				contextSize: 262000,
+				contextSize: 262144,

Optional follow-up: if reasoning requires additional metadata (e.g., reasoningMaxTokens, reasoningPrice), ensure those are modeled consistently across “thinking” models in this repo.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0737dc0 and beeb5d7.

📒 Files selected for processing (2)
  • packages/models/src/models/alibaba.ts (1 hunks)
  • packages/models/src/models/moonshot.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use localStorage instead of cookies for client-side data persistence

Files:

  • packages/models/src/models/moonshot.ts
  • packages/models/src/models/alibaba.ts
**/*.{js,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{js,ts}: Use drizzle with the latest object syntax for database operations
For read queries, always use db().query.<table>.findMany() or db().query.<table>.findFirst()

Files:

  • packages/models/src/models/moonshot.ts
  • packages/models/src/models/alibaba.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use as any or : any in TypeScript files.

Files:

  • packages/models/src/models/moonshot.ts
  • packages/models/src/models/alibaba.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build / run
  • GitHub Check: e2e / run
🔇 Additional comments (1)
packages/models/src/models/moonshot.ts (1)

49-60: Please verify NEBIUS K2 settings and CI gating

  • Confirm that maxOutput for the nebius provider (currently 8192) is correct. Other K2 providers use 131072; if the lower cap is intentional, document it in the release notes, otherwise align them.
  • Ensure the modelName slug casing is accurate. It’s "moonshotai/Kimi-K2-Instruct" here vs. "moonshotai/kimi-k2-instruct" for Novita—normalize if the endpoint is case-insensitive.
  • If your CI environment lacks NEBIUS credentials, add test: "skip" to the nebius entry to mirror Cloudrift’s approach and avoid flaky tests.

No automatic patch applied—please review and adjust as needed:

 {
     providerId: "nebius",
     modelName: "moonshotai/Kimi-K2-Instruct",
     inputPrice: 0.5 / 1e6,
     outputPrice: 2.4 / 1e6,
     requestPrice: 0,
     contextSize: 131072,
-    maxOutput: 8192,
+    // TODO: confirm if this should be 131072 to match other K2 providers
     streaming: true,
     vision: false,
     tools: true,
+    // TODO: add `test: "skip"` if NEBIUS creds aren’t available in CI
 },

Comment on lines +290 to +378
{
id: "qwen3-coder-480b-a35b-instruct",
name: "Qwen3 Coder 480B A35B Instruct",
family: "alibaba",
deprecatedAt: undefined,
deactivatedAt: undefined,
providers: [
{
providerId: "nebius",
modelName: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
inputPrice: 0.4 / 1e6,
outputPrice: 1.8 / 1e6,
requestPrice: 0,
contextSize: 262000,
maxOutput: 8192,
streaming: true,
vision: false,
tools: true,
},
],
jsonOutput: true,
},
{
id: "qwen3-coder-30b-a3b-instruct",
name: "Qwen3 Coder 30B A3B Instruct",
family: "alibaba",
deprecatedAt: undefined,
deactivatedAt: undefined,
providers: [
{
providerId: "nebius",
modelName: "Qwen/Qwen3-Coder-30B-A3B-Instruct",
inputPrice: 0.1 / 1e6,
outputPrice: 0.3 / 1e6,
requestPrice: 0,
contextSize: 262000,
maxOutput: 8192,
streaming: true,
vision: false,
tools: true,
},
],
jsonOutput: true,
},
{
id: "qwen3-30b-a3b-instruct-2507",
name: "Qwen3 30B A3B Instruct 2507",
family: "alibaba",
deprecatedAt: undefined,
deactivatedAt: undefined,
providers: [
{
providerId: "nebius",
modelName: "Qwen/Qwen3-30B-A3B-Instruct-2507",
inputPrice: 0.1 / 1e6,
outputPrice: 0.3 / 1e6,
requestPrice: 0,
contextSize: 262000,
maxOutput: 8192,
streaming: true,
vision: false,
tools: true,
},
],
jsonOutput: true,
},
{
id: "qwen3-30b-a3b-thinking-2507",
name: "Qwen3 30B A3B Thinking 2507",
family: "alibaba",
deprecatedAt: undefined,
deactivatedAt: undefined,
providers: [
{
providerId: "nebius",
modelName: "Qwen/Qwen3-30B-A3B-Thinking-2507",
inputPrice: 0.1 / 1e6,
outputPrice: 0.3 / 1e6,
requestPrice: 0,
contextSize: 262000,
maxOutput: 8192,
streaming: true,
vision: false,
tools: true,
reasoning: true,
},
],
jsonOutput: true,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Sanity checks for IDs, pricing units, and caps across new Qwen entries

Everything else reads clean (ids, names, pricing units per 1e6, jsonOutput/tooling flags). To avoid subtle drift, run the quick verifications below:

If all checks are green (no output for 1 and 3; no CAP MISMATCH in 2), we’re good to ship.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="packages/models/src/models/alibaba.ts"

echo "1) Check for duplicate model ids in alibaba.ts"
rg -nP 'id:\s*"[A-Za-z0-9\.\-]+"' "$FILE" | \
  awk -F'"' '{print $2}' | sort | uniq -d | sed 's/^/DUPLICATE ID: /' || true

echo "2) Ensure maxOutput <= contextSize for all providers"
python - <<'PY'
import re, sys, json
text=open("packages/models/src/models/alibaba.ts").read()
blocks=re.split(r'\},\s*\{', text)
for b in blocks:
    idm=re.search(r'id:\s*"([^"]+)"', b)
    if not idm: continue
    mid=idm.group(1)
    for prov in re.finditer(r'contextSize:\s*(\d+).+?maxOutput:\s*(\d+)', b, re.S):
        ctx=int(prov.group(1)); out=int(prov.group(2))
        if out>ctx:
            print(f"CAP MISMATCH: {mid} maxOutput {out} exceeds contextSize {ctx}")
PY

echo "3) Flag non power-of-two-ish context sizes around 256k"
rg -nP 'contextSize:\s*262000' "$FILE" || true

echo "4) Quick scan of modelName slugs for new entries"
rg -nP -n -C1 'Qwen/Qwen3-(Coder-480B-A35B-Instruct|Coder-30B-A3B-Instruct|30B-A3B-(Instruct|Thinking)-2507)' "$FILE"

Length of output: 1477


Verify non–power-of-two contextSize values in alibaba.ts

The sanity checks for IDs and pricing caps passed with no duplicates and no maxOutput exceeding contextSize. However, the script flagged four occurrences of contextSize: 262000, which is not a power-of-two (the typical 256 KiB value would be 262144):

• packages/models/src/models/alibaba.ts:303
• packages/models/src/models/alibaba.ts:325
• packages/models/src/models/alibaba.ts:347
• packages/models/src/models/alibaba.ts:369

Please confirm whether 262000 is intentional or if these should be updated to 262144 (or another exact power-of-two) to accurately reflect the supported context window.

🤖 Prompt for AI Agents
In packages/models/src/models/alibaba.ts around lines 290 to 378, four model
entries set contextSize: 262000 which is not a power-of-two and likely meant to
be 262144 (256 KiB); update the contextSize field for the entries at ~lines 303,
325, 347, and 369 from 262000 to 262144 (or confirm the intended exact
power-of-two and use that), then run typechecks/lint/tests to ensure no other
references need updating.

@steebchen
steebchen added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit a3932eb Aug 22, 2025
13 checks passed
@steebchen
steebchen deleted the feat/modelsx branch August 22, 2025 01:32
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