Token Plan 支援的部分模型(qwen3.7-plus 等)原生支援視覺理解,可直接處理圖片輸入。對於 glm-5.2、deepseek-v4-pro 等純文字模型,可通過添加本地 Skill 使其獲得視覺能力。
說明運行圖片理解 Skill 會消耗 Token Plan Credits,無其他收費項。
前提條件
- 已訂閱 Token Plan。
- 已在 AI 工具中完成接入配置,且能正常對話,詳情請參見接入用戶端/開發工具。
視覺支援情況
套餐內各模型是否支援視覺理解,請參見 Token Plan 個人版概覽 和 Token Plan 團隊版概覽 的支援模型表格。
方法 1:直接使用視覺模型(推薦)
qwen3.7-plus 等模型具備視覺理解能力。如果經常需要處理圖片,直接切換到這些模型是最簡單、推薦的做法。
工具 | 模型切換方式 |
|---|---|
Claude Code |
|
OpenCode |
|
Qwen Code |
|
更多編程工具中的模型切換方式請參考接入用戶端/開發工具。切換後可直接在對話中引用圖片路徑,或拖拽/粘貼圖片。
方法 2:通過 Skill 或 Agent 添加視覺能力
如需使用 glm-5.2、deepseek-v4-pro 等不支援視覺的模型處理圖片,可通過配置 Skill 或 Agent 實現。
Claude Code
-
添加 Skill
在專案目錄下的
.claude檔案夾中建立skills/image-analyzer目錄:
mkdir -p .claude/skills/image-analyzer
在該目錄下建立 SKILL.md 檔案,並寫入以下內容:
---
name: image-analyzer
description: 協助沒有視覺能力的模型進行映像理解。當需要分析映像內容、提取圖片中的資訊、文字、介面元素,或理解截圖、圖表、架構圖等任何視覺內容時,使用此技能,傳入圖片路徑即可獲得描述資訊。
model: qwen3.7-plus
---
qwen3.7-plus具有視覺理解能力,請直接使用qwen3.7-plus模型進行圖片理解。
建立完成後的目錄結構如下:
.claude/
└── skills/
└── image-analyzer/
└── SKILL.md
-
開始使用
-
在專案目錄下運行
claude啟動 Claude Code,並運行/model deepseek-v4-pro切換到deepseek-v4-pro模型。 -
下載alibabacloud.png到專案目錄下,並提問:
Load image-analyzer skill and describe the information displayed at the alibabacloud.png banner location.可收到如下回複:aliyun.png 為阿里雲官網首頁截圖,banner 地區標題為 Coding Plan 已支援 Qwen3.5,本文介紹阿里雲百鍊支援 Qwen3.5、Kimi-k2.5、GLM-4.7 等模型,新客首月僅 7.9 元,頁面提供立即訂閱和線上諮詢入口。
-
OpenCode
-
添加 Agent
在專案目錄下的
.opencode檔案夾中建立agents目錄:
mkdir -p .opencode/agents
在該目錄下建立image-analyzer.md檔案,並寫入以下內容:
說明model 欄位必須使用 OpenCode 設定檔中定義的 provider 和模型名稱。參考 OpenCode 文檔的配置樣本,應為bailian-token-plan/qwen3.7-plus。
---
description: Analyzes images using a vision-capable model. Use this agent when the user needs to understand image content, extract information from screenshots, diagrams, UI mockups, or any visual content. Invoke with @image-analyzer followed by the image path and your question.
mode: subagent
model: bailian-token-plan/qwen3.7-plus
tools:
write: false
edit: false
---
You have vision capabilities. Analyze the provided image and return a clear, structured description focused on what the user is asking about.
建立完成後的目錄結構如下:
.opencode/
└── agents/
└── image-analyzer.md
-
開始使用
- 在專案目錄下運行
opencode啟動 OpenCode,並切換到deepseek-v4-pro模型。 - 下載alibabacloud.png到專案目錄下,通過
@喚起image-analyzer並提問:@image-analyzer describe the information displayed at the alibabacloud.png banner location.可收到如下回複:
- 在專案目錄下運行
Banner位置包含:
左側:
- 漢堡菜單表徵圖
- 阿里雲橙色logo和"阿里雲"文字
- 導覽功能表:大模型、產品、解決方案、權益、定價、雲市場、夥伴、服務、瞭解阿里雲
右側:
- 搜尋方塊(顯示"大模型")
- 表徵圖:藍色圓圈、地球、耳機
- 連結:文檔、備案、控制台
Build · deepseek-v4-pro · 37.0s
常見問題
OpenCode + 視覺理解模型為什麼無法理解圖片?
原因:OpenCode 預設不啟用模型的視覺能力,需要在設定檔中顯式聲明 modalities 參數。
解決方案:在 OpenCode 設定檔的模型定義中添加 modalities 欄位,將 input 設為 ["text", "image"],如下所示:
將sk-sp-xxx替換為Token Plan API Key。
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"bailian-token-plan": {
"npm": "@ai-sdk/anthropic",
"name": "Model Studio Token Plan",
"options": {
"baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
"apiKey": "sk-sp-xxx"
},
"models": {
"qwen3.7-plus": {
"name": "Qwen3.6 Plus",
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 1024
}
}
},
"qwen3.8-flash": {
"name": "Qwen3.8 Flash",
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 1024
}
}
},
"qwen3.8-max": {
"name": "Kimi K2.5",
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 1024
}
}
}
}
}
}
}
OpenClaw + 視覺理解模型為什麼無法理解圖片?
原因:OpenClaw 需要通過設定檔中的 input 欄位來判斷模型是否支援視覺能力。
解決方案:
- 在
~/.openclaw/openclaw.json設定檔中,確保模型定義包含"input": ["text", "image"]欄位。
{
"models": {
"mode": "merge",
"providers": {
"bailian": {
"baseUrl": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "qwen3.7-plus",
"name": "qwen3.7-plus",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1000000,
"maxTokens": 65536
},
{
"id": "qwen3.8-flash",
"name": "qwen3.8-flash",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1000000,
"maxTokens": 65536
},
{
"id": "qwen3.8-max",
"name": "qwen3.8-max",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 262144,
"maxTokens": 32768
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen3.7-plus"
},
"models": {
"bailian/qwen3.7-plus": {},
"bailian/qwen3.8-flash": {},
"bailian/qwen3.8-max": {}
}
}
},
"gateway": {
"mode": "local"
}
}
- 修改配置後,需要清除 OpenClaw 的模型緩衝並重啟,否則舊的配置仍會生效。
rm ~/.openclaw/agents/main/agent/models.json
openclaw gateway restart