Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions packages/models/src/models/alibaba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,93 @@ export const alibabaModels = [
],
jsonOutput: true,
},
{
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,
},
Comment on lines +290 to +378

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.

] as const satisfies ModelDefinition[];
12 changes: 12 additions & 0 deletions packages/models/src/models/moonshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ export const moonshotModels = [
tools: true,
test: "skip",
},
{
providerId: "nebius",
modelName: "moonshotai/Kimi-K2-Instruct",
inputPrice: 0.5 / 1e6,
outputPrice: 2.4 / 1e6,
requestPrice: 0,
contextSize: 131072,
maxOutput: 8192,
streaming: true,
vision: false,
tools: true,
},
],
jsonOutput: true,
},
Expand Down