fix: 同步 PI_CODING_AGENT_DIR 并更新模型列表
Some checks failed
CI / build-check-test (push) Has been cancelled

- build.sh 导出 PI_CODING_AGENT_DIR 以对齐 pi-mcp-adapter 配置路径
- 更新 models.generated.ts
- 移除 bmi-calculator.html 示例文件
This commit is contained in:
2026-06-26 13:21:14 +08:00
parent 539599dbb8
commit a7fb0a4369
3 changed files with 507 additions and 528 deletions

View File

@@ -1,404 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BMI 指数计算器</title>
<style>
:root {
--bg: #f4f7fa;
--card: #ffffff;
--text: #1f2937;
--muted: #6b7280;
--primary: #3b82f6;
--primary-dark: #2563eb;
--radius: 16px;
--shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.container {
width: 100%;
max-width: 480px;
background: var(--card);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 32px;
}
h1 {
text-align: center;
font-size: 1.6rem;
margin-bottom: 8px;
}
.subtitle {
text-align: center;
color: var(--muted);
font-size: 0.9rem;
margin-bottom: 28px;
}
.form-group {
margin-bottom: 18px;
}
label {
display: block;
margin-bottom: 6px;
font-size: 0.9rem;
font-weight: 500;
}
.unit-toggle {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.unit-toggle button {
flex: 1;
padding: 10px;
border: 1px solid #d1d5db;
background: #f9fafb;
border-radius: 10px;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.2s;
}
.unit-toggle button.active {
background: var(--primary);
color: #fff;
border-color: var(--primary);
}
input[type="number"] {
width: 100%;
padding: 12px 14px;
border: 1px solid #d1d5db;
border-radius: 10px;
font-size: 1rem;
transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="number"]:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.input-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px;
}
.btn {
width: 100%;
padding: 14px;
margin-top: 10px;
border: none;
border-radius: 10px;
background: var(--primary);
color: #fff;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.btn:hover {
background: var(--primary-dark);
}
.result {
margin-top: 24px;
text-align: center;
display: none;
}
.result.show {
display: block;
animation: fadeIn 0.3s ease;
}
.bmi-value {
font-size: 3rem;
font-weight: 700;
line-height: 1;
}
.bmi-category {
font-size: 1.2rem;
margin-top: 8px;
font-weight: 600;
}
.bmi-tip {
margin-top: 10px;
color: var(--muted);
font-size: 0.9rem;
}
.scale {
margin-top: 22px;
display: flex;
height: 14px;
border-radius: 999px;
overflow: hidden;
position: relative;
}
.scale span {
flex: 1;
}
.scale .under { background: #60a5fa; }
.scale .normal { background: #22c55e; }
.scale .over { background: #f59e0b; }
.scale .obese { background: #ef4444; }
.scale-marker {
position: absolute;
top: -4px;
width: 4px;
height: 22px;
background: #1f2937;
border-radius: 2px;
transform: translateX(-50%);
transition: left 0.4s ease;
}
.scale-labels {
display: flex;
justify-content: space-between;
margin-top: 6px;
font-size: 0.75rem;
color: var(--muted);
}
.info-cards {
margin-top: 28px;
display: grid;
gap: 10px;
}
.info-card {
display: flex;
align-items: center;
padding: 12px 14px;
border-radius: 10px;
background: #f9fafb;
font-size: 0.9rem;
}
.dot {
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 10px;
flex-shrink: 0;
}
.dot.under { background: #60a5fa; }
.dot.normal { background: #22c55e; }
.dot.over { background: #f59e0b; }
.dot.obese { background: #ef4444; }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
body {
padding: 0;
}
.container {
border-radius: 0;
min-height: 100vh;
max-width: 100%;
padding: 24px;
display: flex;
flex-direction: column;
justify-content: center;
}
h1 {
font-size: 1.4rem;
}
.bmi-value {
font-size: 2.6rem;
}
.input-row {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div class="container">
<h1>BMI 指数计算器</h1>
<p class="subtitle">输入身高体重,快速了解你的身体质量指数</p>
<div class="unit-toggle">
<button id="unitMetric" class="active" onclick="setUnit('metric')">公制 (cm / kg)</button>
<button id="unitImperial" onclick="setUnit('imperial')">英制 (ft+in / lb)</button>
</div>
<form id="bmiForm" onsubmit="event.preventDefault(); calculateBMI();">
<div id="metricInputs">
<div class="form-group">
<label for="heightCm">身高(厘米)</label>
<input type="number" id="heightCm" placeholder="例如175" min="1" step="0.1" />
</div>
<div class="form-group">
<label for="weightKg">体重(公斤)</label>
<input type="number" id="weightKg" placeholder="例如65" min="1" step="0.1" />
</div>
</div>
<div id="imperialInputs" style="display: none;">
<div class="input-row">
<div class="form-group">
<label for="heightFt">身高(英尺)</label>
<input type="number" id="heightFt" placeholder="ft" min="1" step="1" />
</div>
<div class="form-group">
<label for="heightIn">身高(英寸)</label>
<input type="number" id="heightIn" placeholder="in" min="0" step="0.1" />
</div>
</div>
<div class="form-group">
<label for="weightLb">体重(磅)</label>
<input type="number" id="weightLb" placeholder="例如150" min="1" step="0.1" />
</div>
</div>
<button type="submit" class="btn">计算 BMI</button>
</form>
<div id="result" class="result">
<div class="bmi-value" id="bmiValue">--</div>
<div class="bmi-category" id="bmiCategory">--</div>
<div class="bmi-tip" id="bmiTip">--</div>
<div class="scale">
<span class="under"></span>
<span class="normal"></span>
<span class="over"></span>
<span class="obese"></span>
<div class="scale-marker" id="scaleMarker" style="left: 0%;"></div>
</div>
<div class="scale-labels">
<span>偏瘦</span>
<span>正常</span>
<span>偏胖</span>
<span>肥胖</span>
</div>
</div>
<div class="info-cards">
<div class="info-card"><span class="dot under"></span>偏瘦BMI &lt; 18.5</div>
<div class="info-card"><span class="dot normal"></span>正常18.5 ≤ BMI &lt; 24</div>
<div class="info-card"><span class="dot over"></span>偏胖24 ≤ BMI &lt; 28</div>
<div class="info-card"><span class="dot obese"></span>肥胖BMI ≥ 28</div>
</div>
</div>
<script>
let currentUnit = 'metric';
function setUnit(unit) {
currentUnit = unit;
document.getElementById('unitMetric').classList.toggle('active', unit === 'metric');
document.getElementById('unitImperial').classList.toggle('active', unit === 'imperial');
document.getElementById('metricInputs').style.display = unit === 'metric' ? 'block' : 'none';
document.getElementById('imperialInputs').style.display = unit === 'imperial' ? 'block' : 'none';
document.getElementById('result').classList.remove('show');
}
function calculateBMI() {
let bmi = 0;
if (currentUnit === 'metric') {
const heightCm = parseFloat(document.getElementById('heightCm').value);
const weightKg = parseFloat(document.getElementById('weightKg').value);
if (!heightCm || !weightKg || heightCm <= 0 || weightKg <= 0) {
alert('请输入有效的身高和体重');
return;
}
const heightM = heightCm / 100;
bmi = weightKg / (heightM * heightM);
} else {
const heightFt = parseFloat(document.getElementById('heightFt').value) || 0;
const heightIn = parseFloat(document.getElementById('heightIn').value) || 0;
const weightLb = parseFloat(document.getElementById('weightLb').value);
const totalInches = heightFt * 12 + heightIn;
if (!totalInches || !weightLb || totalInches <= 0 || weightLb <= 0) {
alert('请输入有效的身高和体重');
return;
}
bmi = 703 * weightLb / (totalInches * totalInches);
}
bmi = Math.round(bmi * 10) / 10;
let category = '';
let tip = '';
let color = '';
if (bmi < 18.5) {
category = '偏瘦';
tip = '建议适当增加营养摄入,配合力量训练增肌。';
color = '#60a5fa';
} else if (bmi < 24) {
category = '正常';
tip = 'BMI 在正常范围内,继续保持健康的生活方式!';
color = '#22c55e';
} else if (bmi < 28) {
category = '偏胖';
tip = '建议适当控制饮食,增加有氧运动。';
color = '#f59e0b';
} else {
category = '肥胖';
tip = '建议咨询医生或营养师,制定科学的减重计划。';
color = '#ef4444';
}
document.getElementById('bmiValue').textContent = bmi;
document.getElementById('bmiValue').style.color = color;
document.getElementById('bmiCategory').textContent = category;
document.getElementById('bmiCategory').style.color = color;
document.getElementById('bmiTip').textContent = tip;
// 刻度位置:把 BMI 映射到 15~35 的区间
let percent = ((bmi - 15) / (35 - 15)) * 100;
percent = Math.max(0, Math.min(100, percent));
document.getElementById('scaleMarker').style.left = percent + '%';
document.getElementById('result').classList.add('show');
}
</script>
</body>
</html>

View File

@@ -5,6 +5,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PI_CLI_DIST="$SCRIPT_DIR/packages/coding-agent/dist/cli.js" PI_CLI_DIST="$SCRIPT_DIR/packages/coding-agent/dist/cli.js"
export SPROUTCLAW_CODING_AGENT_DIR="${SPROUTCLAW_CODING_AGENT_DIR:-$SCRIPT_DIR/.sproutclaw/agent}" export SPROUTCLAW_CODING_AGENT_DIR="${SPROUTCLAW_CODING_AGENT_DIR:-$SCRIPT_DIR/.sproutclaw/agent}"
# Align pi-mcp-adapter (and other third-party packages that only read PI_CODING_AGENT_DIR)
# with SproutClaw's agent dir, so MCP configs in .sproutclaw/agent/mcp.json are loaded.
export PI_CODING_AGENT_DIR="$SPROUTCLAW_CODING_AGENT_DIR"
NO_ENV=false NO_ENV=false
ARGS=() ARGS=()

View File

@@ -5155,6 +5155,24 @@ export const MODELS = {
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
}, },
"huggingface": { "huggingface": {
"MiniMaxAI/MiniMax-M2": {
id: "MiniMaxAI/MiniMax-M2",
name: "MiniMax-M2",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.3,
output: 1.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 204800,
maxTokens: 128000,
} satisfies Model<"openai-completions">,
"MiniMaxAI/MiniMax-M2.1": { "MiniMaxAI/MiniMax-M2.1": {
id: "MiniMaxAI/MiniMax-M2.1", id: "MiniMaxAI/MiniMax-M2.1",
name: "MiniMax-M2.1", name: "MiniMax-M2.1",
@@ -5209,6 +5227,42 @@ export const MODELS = {
contextWindow: 204800, contextWindow: 204800,
maxTokens: 131072, maxTokens: 131072,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"MiniMaxAI/MiniMax-M3": {
id: "MiniMaxAI/MiniMax-M3",
name: "MiniMax-M3",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.3,
output: 1.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 524288,
maxTokens: 128000,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3-235B-A22B": {
id: "Qwen/Qwen3-235B-A22B",
name: "Qwen3 235B-A22B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.2,
output: 0.8,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 40960,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3-235B-A22B-Thinking-2507": { "Qwen/Qwen3-235B-A22B-Thinking-2507": {
id: "Qwen/Qwen3-235B-A22B-Thinking-2507", id: "Qwen/Qwen3-235B-A22B-Thinking-2507",
name: "Qwen3-235B-A22B-Thinking-2507", name: "Qwen3-235B-A22B-Thinking-2507",
@@ -5227,6 +5281,42 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 131072, maxTokens: 131072,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"Qwen/Qwen3-32B": {
id: "Qwen/Qwen3-32B",
name: "Qwen3 32B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.29,
output: 0.59,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3-Coder-30B-A3B-Instruct": {
id: "Qwen/Qwen3-Coder-30B-A3B-Instruct",
name: "Qwen3-Coder 30B-A3B Instruct",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: false,
input: ["text"],
cost: {
input: 0.07,
output: 0.26,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 65536,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3-Coder-480B-A35B-Instruct": { "Qwen/Qwen3-Coder-480B-A35B-Instruct": {
id: "Qwen/Qwen3-Coder-480B-A35B-Instruct", id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
name: "Qwen3-Coder-480B-A35B-Instruct", name: "Qwen3-Coder-480B-A35B-Instruct",
@@ -5299,6 +5389,60 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 131072, maxTokens: 131072,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"Qwen/Qwen3.5-122B-A10B": {
id: "Qwen/Qwen3.5-122B-A10B",
name: "Qwen3.5 122B-A10B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.4,
output: 3.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 65536,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3.5-27B": {
id: "Qwen/Qwen3.5-27B",
name: "Qwen3.5 27B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.3,
output: 2.4,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 65536,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3.5-35B-A3B": {
id: "Qwen/Qwen3.5-35B-A3B",
name: "Qwen3.5 35B-A3B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.25,
output: 2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 65536,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3.5-397B-A17B": { "Qwen/Qwen3.5-397B-A17B": {
id: "Qwen/Qwen3.5-397B-A17B", id: "Qwen/Qwen3.5-397B-A17B",
name: "Qwen3.5-397B-A17B", name: "Qwen3.5-397B-A17B",
@@ -5317,6 +5461,42 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 32768, maxTokens: 32768,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"Qwen/Qwen3.5-9B": {
id: "Qwen/Qwen3.5-9B",
name: "Qwen3.5 9B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.17,
output: 0.25,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 65536,
} satisfies Model<"openai-completions">,
"Qwen/Qwen3.6-35B-A3B": {
id: "Qwen/Qwen3.6-35B-A3B",
name: "Qwen3.6 35B-A3B",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.15,
output: 0.95,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 65536,
} satisfies Model<"openai-completions">,
"XiaomiMiMo/MiMo-V2-Flash": { "XiaomiMiMo/MiMo-V2-Flash": {
id: "XiaomiMiMo/MiMo-V2-Flash", id: "XiaomiMiMo/MiMo-V2-Flash",
name: "MiMo-V2-Flash", name: "MiMo-V2-Flash",
@@ -5335,6 +5515,24 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 4096, maxTokens: 4096,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"deepseek-ai/DeepSeek-R1": {
id: "deepseek-ai/DeepSeek-R1",
name: "DeepSeek-R1",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.7,
output: 2.5,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 64000,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"deepseek-ai/DeepSeek-R1-0528": { "deepseek-ai/DeepSeek-R1-0528": {
id: "deepseek-ai/DeepSeek-R1-0528", id: "deepseek-ai/DeepSeek-R1-0528",
name: "DeepSeek-R1-0528", name: "DeepSeek-R1-0528",
@@ -5371,6 +5569,24 @@ export const MODELS = {
contextWindow: 163840, contextWindow: 163840,
maxTokens: 65536, maxTokens: 65536,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"deepseek-ai/DeepSeek-V4-Flash": {
id: "deepseek-ai/DeepSeek-V4-Flash",
name: "DeepSeek V4 Flash",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.14,
output: 0.28,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 1048576,
maxTokens: 384000,
} satisfies Model<"openai-completions">,
"deepseek-ai/DeepSeek-V4-Pro": { "deepseek-ai/DeepSeek-V4-Pro": {
id: "deepseek-ai/DeepSeek-V4-Pro", id: "deepseek-ai/DeepSeek-V4-Pro",
name: "DeepSeek V4 Pro", name: "DeepSeek V4 Pro",
@@ -5389,6 +5605,60 @@ export const MODELS = {
contextWindow: 1048576, contextWindow: 1048576,
maxTokens: 393216, maxTokens: 393216,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"google/gemma-4-26B-A4B-it": {
id: "google/gemma-4-26B-A4B-it",
name: "Gemma 4 26B A4B IT",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.13,
output: 0.4,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"google/gemma-4-31B-it": {
id: "google/gemma-4-31B-it",
name: "Gemma 4 31B IT",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.14,
output: 0.4,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"meta-llama/Llama-3.3-70B-Instruct": {
id: "meta-llama/Llama-3.3-70B-Instruct",
name: "Llama-3.3-70B-Instruct",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: false,
input: ["text"],
cost: {
input: 0.59,
output: 0.79,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"moonshotai/Kimi-K2-Instruct": { "moonshotai/Kimi-K2-Instruct": {
id: "moonshotai/Kimi-K2-Instruct", id: "moonshotai/Kimi-K2-Instruct",
name: "Kimi-K2-Instruct", name: "Kimi-K2-Instruct",
@@ -5479,6 +5749,114 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 262144, maxTokens: 262144,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"moonshotai/Kimi-K2.7-Code": {
id: "moonshotai/Kimi-K2.7-Code",
name: "Kimi K2.7 Code",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.95,
output: 4,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 262144,
} satisfies Model<"openai-completions">,
"stepfun-ai/Step-3.5-Flash": {
id: "stepfun-ai/Step-3.5-Flash",
name: "Step 3.5 Flash",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.1,
output: 0.3,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 256000,
} satisfies Model<"openai-completions">,
"zai-org/GLM-4.5": {
id: "zai-org/GLM-4.5",
name: "GLM-4.5",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.6,
output: 2.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 98304,
} satisfies Model<"openai-completions">,
"zai-org/GLM-4.5-Air": {
id: "zai-org/GLM-4.5-Air",
name: "GLM-4.5-Air",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.13,
output: 0.85,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 98304,
} satisfies Model<"openai-completions">,
"zai-org/GLM-4.5V": {
id: "zai-org/GLM-4.5V",
name: "GLM-4.5V",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.6,
output: 1.8,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 65536,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"zai-org/GLM-4.6": {
id: "zai-org/GLM-4.6",
name: "GLM-4.6",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 0.55,
output: 2.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 204800,
maxTokens: 131072,
} satisfies Model<"openai-completions">,
"zai-org/GLM-4.7": { "zai-org/GLM-4.7": {
id: "zai-org/GLM-4.7", id: "zai-org/GLM-4.7",
name: "GLM-4.7", name: "GLM-4.7",
@@ -5551,6 +5929,24 @@ export const MODELS = {
contextWindow: 202752, contextWindow: 202752,
maxTokens: 131072, maxTokens: 131072,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"zai-org/GLM-5.2": {
id: "zai-org/GLM-5.2",
name: "GLM-5.2",
api: "openai-completions",
provider: "huggingface",
baseUrl: "https://router.huggingface.co/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text"],
cost: {
input: 1.4,
output: 4.4,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 131072,
} satisfies Model<"openai-completions">,
}, },
"kimi-coding": { "kimi-coding": {
"k2p7": { "k2p7": {
@@ -8061,6 +8457,24 @@ export const MODELS = {
contextWindow: 204800, contextWindow: 204800,
maxTokens: 131072, maxTokens: 131072,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"glm-5.2": {
id: "glm-5.2",
name: "GLM-5.2",
api: "openai-completions",
provider: "opencode",
baseUrl: "https://opencode.ai/zen/v1",
compat: {"maxTokensField":"max_tokens"},
reasoning: true,
input: ["text"],
cost: {
input: 1.4,
output: 4.4,
cacheRead: 0.26,
cacheWrite: 0,
},
contextWindow: 1000000,
maxTokens: 131072,
} satisfies Model<"openai-completions">,
"gpt-5": { "gpt-5": {
id: "gpt-5", id: "gpt-5",
name: "GPT-5", name: "GPT-5",
@@ -8885,23 +9299,6 @@ export const MODELS = {
contextWindow: 200000, contextWindow: 200000,
maxTokens: 4096, maxTokens: 4096,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"anthropic/claude-3.5-haiku": {
id: "anthropic/claude-3.5-haiku",
name: "Anthropic: Claude 3.5 Haiku",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text", "image"],
cost: {
input: 0.8,
output: 4,
cacheRead: 0.08,
cacheWrite: 1,
},
contextWindow: 200000,
maxTokens: 8192,
} satisfies Model<"openai-completions">,
"anthropic/claude-fable-5": { "anthropic/claude-fable-5": {
id: "anthropic/claude-fable-5", id: "anthropic/claude-fable-5",
name: "Anthropic: Claude Fable 5", name: "Anthropic: Claude Fable 5",
@@ -9507,23 +9904,6 @@ export const MODELS = {
contextWindow: 1048576, contextWindow: 1048576,
maxTokens: 384000, maxTokens: 384000,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"essentialai/rnj-1-instruct": {
id: "essentialai/rnj-1-instruct",
name: "EssentialAI: Rnj 1 Instruct",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 0.15,
output: 0.15,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 32768,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"google/gemini-2.5-flash": { "google/gemini-2.5-flash": {
id: "google/gemini-2.5-flash", id: "google/gemini-2.5-flash",
name: "Google: Gemini 2.5 Flash", name: "Google: Gemini 2.5 Flash",
@@ -9657,7 +10037,7 @@ export const MODELS = {
cacheRead: 0.2, cacheRead: 0.2,
cacheWrite: 0.375, cacheWrite: 0.375,
}, },
contextWindow: 131072, contextWindow: 65536,
maxTokens: 32768, maxTokens: 32768,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"google/gemini-3.1-flash-lite": { "google/gemini-3.1-flash-lite": {
@@ -9845,7 +10225,7 @@ export const MODELS = {
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 262144,
maxTokens: 32768, maxTokens: 8192,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"ibm-granite/granite-4.1-8b": { "ibm-granite/granite-4.1-8b": {
id: "ibm-granite/granite-4.1-8b", id: "ibm-granite/granite-4.1-8b",
@@ -9947,8 +10327,8 @@ export const MODELS = {
cacheRead: 0.06, cacheRead: 0.06,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 256000,
maxTokens: 144000, maxTokens: 80000,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"liquid/lfm-2.5-1.2b-thinking:free": { "liquid/lfm-2.5-1.2b-thinking:free": {
id: "liquid/lfm-2.5-1.2b-thinking:free", id: "liquid/lfm-2.5-1.2b-thinking:free",
@@ -10146,13 +10526,13 @@ export const MODELS = {
reasoning: true, reasoning: true,
input: ["text"], input: ["text"],
cost: { cost: {
input: 0.25, input: 0.24,
output: 1, output: 0.96,
cacheRead: 0.05, cacheRead: 0,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 204800, contextWindow: 204800,
maxTokens: 131072, maxTokens: 196608,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"minimax/minimax-m3": { "minimax/minimax-m3": {
id: "minimax/minimax-m3", id: "minimax/minimax-m3",
@@ -10169,7 +10549,7 @@ export const MODELS = {
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 1048576, contextWindow: 1048576,
maxTokens: 4096, maxTokens: 512000,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"mistralai/codestral-2508": { "mistralai/codestral-2508": {
id: "mistralai/codestral-2508", id: "mistralai/codestral-2508",
@@ -10505,7 +10885,7 @@ export const MODELS = {
cost: { cost: {
input: 0.6, input: 0.6,
output: 2.5, output: 2.5,
cacheRead: 0.6, cacheRead: 0,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 262144,
@@ -10539,12 +10919,12 @@ export const MODELS = {
input: ["text", "image"], input: ["text", "image"],
cost: { cost: {
input: 0.66, input: 0.66,
output: 3.5, output: 3.41,
cacheRead: 0.33, cacheRead: 0.144,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 262144,
maxTokens: 262142, maxTokens: 262144,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"moonshotai/kimi-k2.7-code": { "moonshotai/kimi-k2.7-code": {
id: "moonshotai/kimi-k2.7-code", id: "moonshotai/kimi-k2.7-code",
@@ -10555,30 +10935,13 @@ export const MODELS = {
reasoning: true, reasoning: true,
input: ["text", "image"], input: ["text", "image"],
cost: { cost: {
input: 0.612, input: 0.74,
output: 3.069, output: 3.5,
cacheRead: 0.1296, cacheRead: 0.15,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 262144,
maxTokens: 262144, maxTokens: 16384,
} satisfies Model<"openai-completions">,
"nex-agi/nex-n2-pro:free": {
id: "nex-agi/nex-n2-pro:free",
name: "Nex AGI: Nex-N2-Pro (free)",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text", "image"],
cost: {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 262144,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"nvidia/llama-3.3-nemotron-super-49b-v1.5": { "nvidia/llama-3.3-nemotron-super-49b-v1.5": {
id: "nvidia/llama-3.3-nemotron-super-49b-v1.5", id: "nvidia/llama-3.3-nemotron-super-49b-v1.5",
@@ -10884,7 +11247,7 @@ export const MODELS = {
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 1047576, contextWindow: 1047576,
maxTokens: 4096, maxTokens: 32768,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"openai/gpt-4.1-nano": { "openai/gpt-4.1-nano": {
id: "openai/gpt-4.1-nano", id: "openai/gpt-4.1-nano",
@@ -10914,7 +11277,7 @@ export const MODELS = {
cost: { cost: {
input: 2.5, input: 2.5,
output: 10, output: 10,
cacheRead: 1.25, cacheRead: 0,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 128000, contextWindow: 128000,
@@ -11050,11 +11413,11 @@ export const MODELS = {
cost: { cost: {
input: 0.25, input: 0.25,
output: 2, output: 2,
cacheRead: 0.03, cacheRead: 0.025,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 400000, contextWindow: 400000,
maxTokens: 4096, maxTokens: 128000,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"openai/gpt-5-nano": { "openai/gpt-5-nano": {
id: "openai/gpt-5-nano", id: "openai/gpt-5-nano",
@@ -11118,11 +11481,11 @@ export const MODELS = {
cost: { cost: {
input: 1.25, input: 1.25,
output: 10, output: 10,
cacheRead: 0.125, cacheRead: 0.13,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 128000, contextWindow: 128000,
maxTokens: 16384, maxTokens: 32000,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"openai/gpt-5.1-codex": { "openai/gpt-5.1-codex": {
id: "openai/gpt-5.1-codex", id: "openai/gpt-5.1-codex",
@@ -11209,7 +11572,7 @@ export const MODELS = {
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 128000, contextWindow: 128000,
maxTokens: 32000, maxTokens: 16384,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"openai/gpt-5.2-codex": { "openai/gpt-5.2-codex": {
id: "openai/gpt-5.2-codex", id: "openai/gpt-5.2-codex",
@@ -11816,23 +12179,6 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 32768, maxTokens: 32768,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"prime-intellect/intellect-3": {
id: "prime-intellect/intellect-3",
name: "Prime Intellect: INTELLECT-3",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text"],
cost: {
input: 0.2,
output: 1.1,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 131072,
} satisfies Model<"openai-completions">,
"qwen/qwen-2.5-72b-instruct": { "qwen/qwen-2.5-72b-instruct": {
id: "qwen/qwen-2.5-72b-instruct", id: "qwen/qwen-2.5-72b-instruct",
name: "Qwen2.5 72B Instruct", name: "Qwen2.5 72B Instruct",
@@ -12422,11 +12768,11 @@ export const MODELS = {
cost: { cost: {
input: 0.14, input: 0.14,
output: 1, output: 1,
cacheRead: 0.05, cacheRead: 0,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 262144,
maxTokens: 81920, maxTokens: 262144,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"qwen/qwen3.5-397b-a17b": { "qwen/qwen3.5-397b-a17b": {
id: "qwen/qwen3.5-397b-a17b", id: "qwen/qwen3.5-397b-a17b",
@@ -12459,8 +12805,8 @@ export const MODELS = {
cacheRead: 0, cacheRead: 0,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 256000, contextWindow: 262144,
maxTokens: 32768, maxTokens: 262144,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"qwen/qwen3.5-flash-02-23": { "qwen/qwen3.5-flash-02-23": {
id: "qwen/qwen3.5-flash-02-23", id: "qwen/qwen3.5-flash-02-23",
@@ -12734,23 +13080,6 @@ export const MODELS = {
contextWindow: 262144, contextWindow: 262144,
maxTokens: 4096, maxTokens: 4096,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"thedrummer/rocinante-12b": {
id: "thedrummer/rocinante-12b",
name: "TheDrummer: Rocinante 12B",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 0.17,
output: 0.43,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 32768,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"thedrummer/unslopnemo-12b": { "thedrummer/unslopnemo-12b": {
id: "thedrummer/unslopnemo-12b", id: "thedrummer/unslopnemo-12b",
name: "TheDrummer: UnslopNemo 12B", name: "TheDrummer: UnslopNemo 12B",
@@ -12845,13 +13174,13 @@ export const MODELS = {
reasoning: true, reasoning: true,
input: ["text", "image"], input: ["text", "image"],
cost: { cost: {
input: 0.14, input: 0.105,
output: 0.28, output: 0.28,
cacheRead: 0.0028, cacheRead: 0,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 1048576, contextWindow: 1048576,
maxTokens: 131072, maxTokens: 4096,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"xiaomi/mimo-v2.5-pro": { "xiaomi/mimo-v2.5-pro": {
id: "xiaomi/mimo-v2.5-pro", id: "xiaomi/mimo-v2.5-pro",
@@ -13034,11 +13363,11 @@ export const MODELS = {
cost: { cost: {
input: 0.98, input: 0.98,
output: 3.08, output: 3.08,
cacheRead: 0.182, cacheRead: 0.49,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 202752, contextWindow: 202752,
maxTokens: 4096, maxTokens: 65535,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"z-ai/glm-5.2": { "z-ai/glm-5.2": {
id: "z-ai/glm-5.2", id: "z-ai/glm-5.2",
@@ -13050,12 +13379,29 @@ export const MODELS = {
thinkingLevelMap: {"xhigh":"xhigh"}, thinkingLevelMap: {"xhigh":"xhigh"},
input: ["text"], input: ["text"],
cost: { cost: {
input: 1.2, input: 0.95,
output: 4.1, output: 3,
cacheRead: 0.2, cacheRead: 0.18,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 1048576, contextWindow: 1048576,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"z-ai/glm-5v-turbo": {
id: "z-ai/glm-5v-turbo",
name: "Z.ai: GLM 5V Turbo",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text", "image"],
cost: {
input: 1.2,
output: 4,
cacheRead: 0.24,
cacheWrite: 0,
},
contextWindow: 202752,
maxTokens: 131072, maxTokens: 131072,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"~anthropic/claude-fable-latest": { "~anthropic/claude-fable-latest": {
@@ -13170,12 +13516,12 @@ export const MODELS = {
input: ["text", "image"], input: ["text", "image"],
cost: { cost: {
input: 0.66, input: 0.66,
output: 3.5, output: 3.41,
cacheRead: 0.33, cacheRead: 0.144,
cacheWrite: 0, cacheWrite: 0,
}, },
contextWindow: 262144, contextWindow: 262144,
maxTokens: 262142, maxTokens: 262144,
} satisfies Model<"openai-completions">, } satisfies Model<"openai-completions">,
"~openai/gpt-latest": { "~openai/gpt-latest": {
id: "~openai/gpt-latest", id: "~openai/gpt-latest",
@@ -15936,6 +16282,23 @@ export const MODELS = {
contextWindow: 200000, contextWindow: 200000,
maxTokens: 8000, maxTokens: 8000,
} satisfies Model<"anthropic-messages">, } satisfies Model<"anthropic-messages">,
"sakana/fugu-ultra": {
id: "sakana/fugu-ultra",
name: "Fugu Ultra",
api: "anthropic-messages",
provider: "vercel-ai-gateway",
baseUrl: "https://ai-gateway.vercel.sh",
reasoning: true,
input: ["text", "image"],
cost: {
input: 5,
output: 30,
cacheRead: 0.5,
cacheWrite: 0,
},
contextWindow: 1000000,
maxTokens: 1000000,
} satisfies Model<"anthropic-messages">,
"stepfun/step-3.5-flash": { "stepfun/step-3.5-flash": {
id: "stepfun/step-3.5-flash", id: "stepfun/step-3.5-flash",
name: "StepFun 3.5 Flash", name: "StepFun 3.5 Flash",
@@ -16429,6 +16792,23 @@ export const MODELS = {
contextWindow: 1000000, contextWindow: 1000000,
maxTokens: 128000, maxTokens: 128000,
} satisfies Model<"anthropic-messages">, } satisfies Model<"anthropic-messages">,
"zai/glm-5.2-fast": {
id: "zai/glm-5.2-fast",
name: "GLM 5.2 Fast",
api: "anthropic-messages",
provider: "vercel-ai-gateway",
baseUrl: "https://ai-gateway.vercel.sh",
reasoning: true,
input: ["text"],
cost: {
input: 3,
output: 10.25,
cacheRead: 0.5,
cacheWrite: 0,
},
contextWindow: 1000000,
maxTokens: 128000,
} satisfies Model<"anthropic-messages">,
"zai/glm-5v-turbo": { "zai/glm-5v-turbo": {
id: "zai/glm-5v-turbo", id: "zai/glm-5v-turbo",
name: "GLM 5V Turbo", name: "GLM 5V Turbo",