Optimize Alibaba Bailian provider for accurate token statistics and official model configurations. Fixes token usage mapping (prompt_tokens → input_tokens) and updates 8 models to 2026 specs.
Pro scans all 10 files and shows the line behind each finding
Scanned 9/29/2026
npx -y skills add Arry8/openclaw-edge --skill bailian-maxperf --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Bailian Maxperf?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/arry8-bailian-maxperf)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: bailian-maxperf
description: "Optimize Alibaba Bailian provider for accurate token statistics and official model configurations. Fixes token usage mapping (prompt_tokens → input_tokens) and updates 8 models to 2026 specs."
metadata: { "openclaw": { "emoji": "🚀", "requires": { "bins": ["sed", "python3"] } } }
---
# Bailian MaxPerf - 百炼满血优化技能
## 技能目标
让阿里百炼 (Alibaba Bailian) 在 OpenClaw 中发挥**100% 性能**,包括:
- ✅ Token Usage 准确统计
- ✅ 模型窗口大小精确配置
- ✅ 配置自动验证
## 问题清单
### 1. Token Usage 统计失效 ❌
**现象**: `/status` 显示 `Context: 0/128k` 或 `?/1.0m`
**原因**: 百炼返回 `prompt_tokens`/`completion_tokens`,OpenClaw 读取 `input_tokens`/`output_tokens`
**解决**: 添加字段映射 + `supportsUsageInStreaming: true`
### 2. 模型窗口配置不准确 ⚠️
**现象**: Context 窗口与实际不符
**原因**: 部分模型配置值过时
**解决**: 根据阿里官方文档更新
## 执行方法
```bash
cd ~/.openclaw/workspace/skills/bailian-maxperf
./scripts/maxperf.sh
openclaw gateway restart
```
## 优化效果
### 修复前
```
❌ Token 统计:unknown
❌ Context 窗口:0/128k (?%)
```
### 修复后
```
✅ Token 统计:172k/262k (66%)
✅ Context 窗口:精确匹配官方
```
## 验证方法
```bash
# 1. 配置校验
openclaw status
# 2. 调用百炼模型
/chat 使用 qwen3.5-plus 测试
# 3. 查看 token 统计
openclaw status
```
## 注意事项
⚠️ **升级后需重新执行**: `npm install -g openclaw@...` 会覆盖运行时补丁
## 相关文件
- `SKILL.md` - 本文档
- `README.md` - 详细说明
- `scripts/maxperf.sh` - 自动化脚本
- `configs/bailian-models-official.json` - 官方模型配置参考
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!