Qwen3.6 27B API 接口、模型参数 & 代码示例
qwen/qwen3.6-27b
Qwen3.6 27B 是 Qwen3.6 系列原生视觉语言 Dense 模型,模型效果相较 Qwen3.5 27B 重点提升了 Agentic Coding 能力、模型 STEM 与推理能力进一步增强;视觉模态方面在空间智能、物体定位与检测能力上显著增强,视频理解、文档 OCR 及视觉 Agent 能力稳步提升。
- 模型 ID
- qwen/qwen3.6-27b
- 模型系列
- Qwen
- 更新日期
- 模型能力
- 文本生成、深度思考、视觉识别
- 上下文长度
- 256 K
- 模型价格(每 1000 tokens 输入)
- ¥ 0.0032
- 模型价格(每 1000 tokens 输出)
- ¥ 0.0195
Qwen3.6 27B 模型介绍:
Qwen3.6 系列模型升级亮点:
- 智能体编程: 模型现在能够更流畅、更精确地处理前端工作流及仓库级推理。
- 思考过程保留: 我们新增了一个选项,可保留历史消息中的推理上下文,从而简化迭代开发流程并降低开销。

模型概览:
- 类型:带视觉编码器的因果语言模型
- 训练阶段:预训练与后训练
- 语言模型
- 参数量:27B
- 隐藏层维度:5120
- 词元嵌入维度:248320(填充后)
- 层数:64
- 隐藏层布局:16 × (3 × (门控 DeltaNet → FFN) → 1 × (门控注意力 → FFN))
- 门控 DeltaNet:
- 线性注意力头数:V 为 48,QK 为 16
- 头维度:128
- 门控注意力:
- 注意力头数:Q 为 24,KV 为 4
- 头维度:256
- 旋转位置编码维度:64
- 前馈网络:
- 中间层维度:17408
- 语言模型输出维度:248320(填充后)
- MTP:采用多步训练
- 上下文长度:原生支持 262,144 个词元,可扩展至 1,010,000 个词元。
评测结果:
自然语言:
| Qwen3.5-27B | Qwen3.5-397B-A17B | Gemma4-31B | Claude 4.5 Opus | Qwen3.6-35B-A3B | Qwen3.6-27B | |
|---|---|---|---|---|---|---|
| Coding Agent | ||||||
| SWE-bench Verified | 75.0 | 76.2 | 52.0 | 80.9 | 73.4 | 77.2 |
| SWE-bench Pro | 51.2 | 50.9 | 35.7 | 57.1 | 49.5 | 53.5 |
| SWE-bench Multilingual | 69.3 | 69.3 | 51.7 | 77.5 | 67.2 | 71.3 |
| Terminal-Bench 2.0 | 41.6 | 52.5 | 42.9 | 59.3 | 51.5 | 59.3 |
| SkillsBench Avg5 | 27.2 | 30.0 | 23.6 | 45.3 | 28.7 | 48.2 |
| QwenWebBench | 1068 | 1186 | 1197 | 1536 | 1397 | 1487 |
| NL2Repo | 27.3 | 32.2 | 15.5 | 43.2 | 29.4 | 36.2 |
| Claw-Eval Avg | 64.3 | 70.7 | 48.5 | 76.6 | 68.7 | 72.4 |
| Claw-Eval Pass^3 | 46.2 | 48.1 | 25.0 | 59.6 | 50.0 | 60.6 |
| QwenClawBench | 52.2 | 51.8 | 41.7 | 52.3 | 52.6 | 53.4 |
| Knowledge | ||||||
| MMLU-Pro | 86.1 | 87.8 | 85.2 | 89.5 | 85.2 | 86.2 |
| MMLU-Redux | 93.2 | 94.9 | 93.7 | 95.6 | 93.3 | 93.5 |
| SuperGPQA | 65.6 | 70.4 | 65.7 | 70.6 | 64.7 | 66.0 |
| C-Eval | 90.5 | 93.0 | 82.6 | 92.2 | 90.0 | 91.4 |
| STEM & Reasoning | ||||||
| GPQA Diamond | 85.5 | 88.4 | 84.3 | 87.0 | 86.0 | 87.8 |
| HLE | 24.3 | 28.7 | 19.5 | 30.8 | 21.4 | 24.0 |
| LiveCodeBench v6 | 80.7 | 83.6 | 80.0 | 84.8 | 80.4 | 83.9 |
| HMMT Feb 25 | 92.0 | 94.8 | 88.7 | 92.9 | 90.7 | 93.8 |
| HMMT Nov 25 | 89.8 | 92.7 | 87.5 | 93.3 | 89.1 | 90.7 |
| HMMT Feb 26 | 84.3 | 87.9 | 77.2 | 85.3 | 83.6 | 84.3 |
| IMOAnswerBench | 79.9 | 80.9 | 74.5 | 84.0 | 78.9 | 80.8 |
| AIME26 | 92.6 | 93.3 | 89.2 | 95.1 | 92.7 | 94.1 |
* SWE-Bench Series: Internal agent scaffold (bash + file-edit tools); temp=1.0, top_p=0.95, 200K context window. We correct some problematic tasks in the public set of SWE-bench Pro and evaluate all baselines on the refined benchmark.
* Terminal-Bench 2.0: Harbor/Terminus-2 harness; 3h timeout, 32 CPU/48 GB RAM; temp=1.0, top_p=0.95, top_k=20, max_tokens=80K, 256K ctx; avg of 5 runs.
* SkillsBench: Evaluated via OpenCode on 78 tasks (self-contained subset, excluding API-dependent tasks); avg of 5 runs.
* NL2Repo: Others are evaluated via Claude Code (temp=1.0, top_p=0.95, max_turns=900).
* QwenClawBench: A real-user-distribution Claw agent benchmark; temp=0.6, 256K ctx.
* QwenWebBench: An internal front-end code generation benchmark; bilingual (EN/CN), 7 categories (Web Design, Web Apps, Games, SVG, Data Visualization, Animation, and 3D); auto-render + multimodal judge (code/visual correctness); BT/Elo rating system.
* AIME 26: We use the full AIME 2026 (I & II), where the scores may differ from Qwen 3.5 notes.
视觉语言:
| Qwen3.5-27B | Qwen3.5-397B-A17B | Gemma4-31B | Claude 4.5 Opus | Qwen3.6-35B-A3B | Qwen3.6-27B | |
|---|---|---|---|---|---|---|
| STEM & Puzzle | ||||||
| MMMU | 82.3 | 85.0 | 80.4 | 80.7 | 81.7 | 82.9 |
| MMMU-Pro | 75.0 | 79.0 | 76.9 | 70.6 | 75.3 | 75.8 |
| MathVista mini | 87.8 | -- | 79.3 | -- | 86.4 | 87.4 |
| DynaMath | 87.7 | 86.3 | 79.5 | 79.7 | 82.8 | 85.6 |
| VlmsAreBlind | 96.9 | -- | 87.2 | -- | 96.6 | 97.0 |
| General VQA | ||||||
| RealWorldQA | 83.7 | 83.9 | 72.3 | 77.0 | 85.3 | 84.1 |
| MMStar | 81.0 | 83.8 | 77.3 | 73.2 | 80.7 | 81.4 |
| MMBenchEN-DEV-v1.1 | 92.6 | -- | 90.9 | -- | 92.8 | 92.3 |
| SimpleVQA | 56.0 | 67.1 | 52.9 | 65.7 | 58.9 | 56.1 |
| Document Understanding | ||||||
| CharXiv RQ | 79.5 | 80.8 | 67.9 | 68.5 | 78.0 | 78.4 |
| CC-OCR | 81.0 | 82.0 | 75.7 | 76.9 | 81.9 | 81.2 |
| OCRBench | 89.4 | -- | 86.1 | -- | 90.0 | 89.4 |
| Spatial Intelligence | ||||||
| ERQA | 60.5 | 67.5 | 57.5 | 46.8 | 61.8 | 62.5 |
| CountBench | 97.8 | 97.2 | 96.1 | 90.6 | 96.1 | 97.8 |
| RefCOCO avg | 90.9 | 92.3 | -- | -- | 92.0 | 92.5 |
| EmbSpatialBench | 84.5 | -- | -- | -- | 84.3 | 84.6 |
| RefSpatialBench | 67.7 | -- | 4.7 | -- | 64.3 | 70.0 |
| Video Understanding | ||||||
| VideoMME(w sub.) | 87.0 | 87.5 | -- | 77.7 | 86.6 | 87.7 |
| VideoMMMU | 82.3 | 84.7 | 81.6 | 84.4 | 83.7 | 84.4 |
| MLVU | 85.9 | 86.7 | -- | 81.7 | 86.2 | 86.6 |
| MVBench | 74.6 | 77.6 | -- | 67.2 | 74.6 | 75.5 |
| Visual Agent | ||||||
| V* | 93.7 | 95.8 | -- | 67.0 | 90.1 | 94.7 |
| AndroidWorld | 64.2 | -- | -- | -- | -- | 70.3 |
* Empty cells (--) indicate scores not yet available or not applicable.
API 接口地址:
-
Chat Completions API:
https://wcode.net/api/gpt/v1/chat/completions
-
Responses API(部分模型可能不支持此API):
https://wcode.net/api/gpt/v1/responses
-
Anthropic API:
https://wcode.net/api/anthropic/v1/messages
此 API 接口兼容 OpenAI 的 API 接口规范,可直接使用 OpenAI 的 SDK 来调用各个模型。仅需替换以下配置即可:
base_url替换为https://wcode.net/api/gpt/v1api_key替换为从 https://platform.wcode.net 获取到的 API Key具体可参考下方的各编程语言代码示例中的 OpenAI SDK 调用示例。
此模型支持 Anthropic / Claude 的 API 接口规范,可直接使用 Anthropic 的 SDK 来调用此模型。仅需替换以下配置即可:
ANTHROPIC_BASE_URL替换为https://wcode.net/api/anthropicANTHROPIC_API_KEY(或ANTHROPIC_AUTH_TOKEN)替换为从 https://platform.wcode.net 获取到的 API KeyANTHROPIC_MODEL(或model)替换为qwen/qwen3.6-27b
请求方法:
POST
各编程语言代码示例:
# TODO: 以下代码中的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
curl --request POST 'https://wcode.net/api/gpt/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer API_KEY' \
--data '{
"model": "qwen/qwen3.6-27b",
"messages": [
{
"role": "user",
"content": "你好"
}
]
}'
import Foundation
let headers = [
"Authorization": "Bearer API_KEY", // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
"content-type": "application/json"
]
let parameters = [
"model": "qwen/qwen3.6-27b",
"messages": [
[
"role": "user",
"content": "你好"
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://wcode.net/api/gpt/v1/chat/completions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 60.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
var headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY' // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
};
var request = http.Request('POST', Uri.parse('https://wcode.net/api/gpt/v1/chat/completions'));
request.body = json.encode({
"model": "qwen/qwen3.6-27b",
"messages": [
{
"role": "user",
"content": "你好"
}
]
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
require 'uri'
require 'net/http'
url = URI("https://wcode.net/api/gpt/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer API_KEY' # TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
request["content-type"] = 'application/json'
request.body = "{\"model\":\"qwen/qwen3.6-27b\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}"
response = http.request(request)
puts response.read_body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "https://wcode.net/api/gpt/v1/chat/completions";
let payload = json!({
"model": "qwen/qwen3.6-27b",
"messages": (
json!({
"role": "user",
"content": "你好"
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Authorization", "Bearer API_KEY".parse().unwrap()); // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::<serde_json::Value>()
.await
.unwrap();
dbg!(results);
}
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://wcode.net/api/gpt/v1/chat/completions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer API_KEY"); // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"model\":\"qwen/qwen3.6-27b\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}");
CURLcode ret = curl_easy_perform(hnd);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://wcode.net/api/gpt/v1/chat/completions"
payload := strings.NewReader("{\"model\":\"qwen/qwen3.6-27b\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer API_KEY") // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wcode.net/api/gpt/v1/chat/completions");
request.Headers.Add("Authorization", "Bearer API_KEY"); // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
request.Content = new StringContent("{\"model\":\"qwen/qwen3.6-27b\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}", null, "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
var client = new RestClient("https://wcode.net/api/gpt/v1/chat/completions");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "Bearer API_KEY"); // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"model\":\"qwen/qwen3.6-27b\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
const axios = require('axios');
let data = JSON.stringify({
"model": "qwen/qwen3.6-27b",
"messages": [
{
"role": "user",
"content": "你好"
}
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://wcode.net/api/gpt/v1/chat/completions',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY' // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
},
data : data
};
axios.request(config).then((response) => {
console.log(JSON.stringify(response.data));
}).catch((error) => {
console.log(error);
});
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"model\":\"qwen/qwen3.6-27b\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}");
Request request = new Request.Builder()
.url("https://wcode.net/api/gpt/v1/chat/completions")
.post(body)
.addHeader("Authorization", "Bearer API_KEY") // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
$client = new \GuzzleHttp\Client();
$headers = [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY', // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
];
$body = '{
"model": "qwen/qwen3.6-27b",
"messages": [
{
"role": "user",
"content": "你好"
}
]
}';
$request = new \GuzzleHttp\Psr7\Request('POST', 'https://wcode.net/api/gpt/v1/chat/completions', $headers, $body);
$response = $client->sendAsync($request)->wait();
echo $response->getBody();
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://wcode.net/api/gpt/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 5,
CURLOPT_TIMEOUT => 300,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen/qwen3.6-27b',
'messages' => [
[
'role' => 'user',
'content' => '你好'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer API_KEY", // TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
if ($error) {
echo "cURL Error #:" . $error;
} else {
echo $response;
}
import requests
import json
url = "https://wcode.net/api/gpt/v1/chat/completions"
payload = {
"model": "qwen/qwen3.6-27b",
"messages": [
{
"role": "user",
"content": "你好"
}
]
}
headers = {
"Authorization": "Bearer API_KEY", # TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(json.dumps(response.json(), indent=4, ensure_ascii=False))
from openai import OpenAI
client = OpenAI(
base_url="https://wcode.net/api/gpt/v1",
api_key="API_KEY" # TODO: 这里的 API_KEY 需要替换,获取 API Key 入口:https://platform.wcode.net
)
completion = client.chat.completions.create(
model="qwen/qwen3.6-27b",
messages=[
{
"role": "user",
"content": "你好"
}
]
)
print(completion.choices[0].message.content)
各 AI 产品/工具/第三方应用接入示例:
配置 Hermes Agent 使用 Qwen3.6 27B 模型:
注意事项:以下配置中的
<API_KEY>需要替换为从 https://platform.wcode.net 获取(创建)的 API Key
方式一:交互式配置
在命令行输入 hermes model,然后选择 Custom endpoint 选项,根据交互式命令引导,分别配置以下信息:
- API base URL:
https://wcode.net/api/gpt/v1 - API Key:
<API_KEY> - Model:
qwen/qwen3.6-27b
方式二:手动配置
修改 config.yaml(通常位于~/.hermes/config.yaml)
model:
default: "qwen/qwen3.6-27b"
provider: custom
base_url: "https://wcode.net/api/gpt/v1"
api_key: "<API_KEY>"
context_length: 256000
配置完成后,就可以开始使用 Hermes Agent ~
配置 Roo Code 使用 Qwen3.6 27B 模型:
注意事项:以下配置中的
<API_KEY>需要替换为从 https://platform.wcode.net 获取(创建)的 API Key
- API Provider:
OpenAI Compatible - Base URL:
https://wcode.net/api/gpt/v1 - API Key:
<API_KEY> - Model:
qwen/qwen3.6-27b
配置完成后,就可以开始使用 Roo Code ~
配置 Kilo Code 使用 Qwen3.6 27B 模型:
注意事项:以下配置中的
<API_KEY>需要替换为从 https://platform.wcode.net 获取(创建)的 API Key
选择 Use your own API key,然后配置以下信息:
- API Provider:
OpenAI Compatible - Base URL:
https://wcode.net/api/gpt/v1 - API Key:
<API_KEY> - Model:
qwen/qwen3.6-27b
配置完成后,就可以开始使用 Kilo Code ~
配置 Cline 使用 Qwen3.6 27B 模型:
注意事项:以下配置中的
<API_KEY>需要替换为从 https://platform.wcode.net 获取(创建)的 API Key
- API Provider:
OpenAI Compatible - Base URL:
https://wcode.net/api/gpt/v1 - API Key:
<API_KEY> - Model ID:
qwen/qwen3.6-27b
配置完成后,就可以开始使用 Cline ~
注:以下安装和配置过程以 Ubuntu Server 24.04 (root 用户) + Node 22 安装 OpenClaw 🦞 2026.3.8 为例
安装 🦞 OpenClaw(龙虾),步骤如下:
- 命令行执行
npm install -g openclaw@latest - 命令行执行
openclaw onboard --install-daemon - I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue? 选择
yes - Onboarding mode 选择
QuickStart - Model/auth provider 选择
Skip for now - Default model 选择
Keep current (default: ...) - Select channel (QuickStart) 选择
Skip for now - Web search 选择
Skip for now - Configure skills now? (recommended) 选择
No - Enable hooks? (这是一个多选,按空格键可选中选项)按空格键选中
📝 command-logger和💾 session-memory这两个选项,然后按回车键进入下一步 - (如有) How do you want to hatch your bot? 选择
Hatch in TUI (recommended)
配置 🦞 OpenClaw(龙虾)使用 Qwen3.6 27B 模型:
注意事项:以下配置中的
<API_KEY>需要替换为从 https://platform.wcode.net 获取(创建)的 API Key
推荐方式:修改 openclaw.json(通常位于~/.openclaw/openclaw.json)
找到openclaw.json的第一层级的models和agents属性(如果没有则在第一层级添加models和agents属性),改为如下配置:
{
...其他配置,
"models": {
"mode": "merge",
"providers": {
"wcode": {
"baseUrl": "https://wcode.net/api/gpt/v1",
"apiKey": "<API_KEY>",
"api": "openai-completions",
"models": [
{
"id": "qwen/qwen3.6-27b",
"name": "Qwen3.6 27B",
"reasoning": false,
"input": ["text"],
"contextWindow": 256000,
"maxTokens": 64000
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "wcode/qwen/qwen3.6-27b"
}
}
},
...其他配置
}
完成以上配置后,
- 执行以下命令,即可通过命令行的方式开始对话:
openclaw tui
- 执行以下命令,即可通过 Web 界面的方式开始对话:
openclaw dashboard
配置 OpenCode 使用 Qwen3.6 27B 模型:
推荐方式:修改 opencode.json(通常位于~/.config/opencode/opencode.json)
注意事项:以下配置中的
<API_KEY>需要替换为从 https://platform.wcode.net 获取的 API Key
配置如下:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"myprovider": {
"npm": "@ai-sdk/openai-compatible",
"name": "wcode",
"options": {
"baseURL": "https://wcode.net/api/gpt/v1",
"apiKey": "<API_KEY>"
},
"models": {
"qwen/qwen3.6-27b": {
"name": "Qwen3.6 27B"
}
}
}
}
}
完成以上配置后,执行以下命令,即可启动 OpenCode:
opencode
输入 /models,选择配置的 qwen/qwen3.6-27b 模型并在 OpenCode 中使用。
API 响应示例(curl):
{
"choices": [
{
"message": {
"content": "你好!我是 Qwen(通义千问),由阿里巴巴通义实验室自主研发的大语言模型。关于具体的版本编号,我对外统一以 Qwen 或通义千问自称,如果你想了解相关的版本技术细节,欢迎前往我们的官网或查阅最新的技术报告。\n\n作为一个贴心的 AI 思维伙伴,我主要在以下几个方面为你提供支持:\n\n1. **语言与逻辑推理**:能够准确理解和响应你的复杂指令,处理高难度的数学、科学和逻辑推理任务,并支持全球 100 多种语言的流畅交流。\n2. **深度视觉与数据分析**:不仅能识别图像,还能深度解析复杂的图表、数学公式或科学图示,为你提供结构化的专业解读。\n3. **超长文本处理**:原生支持超长上下文窗口,无论是数十万字的长篇文档还是冗长的视频字幕,都能实现完整的理解与精准定位关键信息。\n4. **全栈代码能力**:可以协助你生成、理解和调试复杂代码,支持多阶段的软件开发工作流,甚至能将你的创意直接转化为可运行的前端页面。\n5. **自主规划与执行**:具备自主智能体(Agent)规划能力,能够理解复杂意图,自主拆解并完成多步骤的复杂任务。\n\n请问今天有什么我可以帮你的吗?",
"reasoning_content": "Thinking Process:\n\n1. **Analyze the User's Input**:\n * User says: \"你好\" (Hello).\n * Key elements: User addresses me as \"Qwen3.6 27B\".\n * Intent: Wants to know my identity/introduction.\n\n2. **Consult Identity & Capabilities Knowledge**:\n * *Identity*: I am Qwen (通义千问), developed by Alibaba Cloud's Tongyi Lab.\n * *Naming Policy*: \"对外统一自称 Qwen 或“通义千问”,不主动提及任何具体版本编号。若用户询问版本信息,仅引导至官网或技术报告获取最新信息。\" (Externally, I uniformly refer to myself as Qwen or \"Tongyi Qianwen\", and do not proactively mention any specific version numbers. If the user asks for version information, I only guide them to the official website or technical reports to get the latest information.)\n * *Correction*: I should politely correct the user's assumption about the specific version (Qwen3.6 27B) while sticking to the primary identity \"Qwen\".\n\n3. **Formulate the Introduction**:\n * *Acknowledge and Correct*: Start by greeting the user. Since they mentioned a specific version (\"Qwen3.6 27B\"), I should gently clarify that I am Qwen (通义千问) developed by Alibaba Cloud's Tongyi Lab, without confirming the \"3.6 27B\" part or providing version specifics, adhering to the \"no specific version numbers\" rule.\n * *Core Capabilities*:\n 1. Language and Logic: Enhanced language understanding, fluent multilingual support, logical reasoning.\n 2. Visual & Data Analysis: Deep parsing of complex charts, math, scientific diagrams, providing structured interpretations.\n 3. Autonomous Agent: Multi-step planning, executing multi-step operations.\n 4. Code Generation & Debugging: Multi-stage coding workflows, generating/debugging complex code, converting ideas to frontend pages.\n 5. Long Context: Precise control and retrieval within ultra-long contexts.\n 6. Autonomous Planning & Execution (optional to include, already covered in Agent): Let's stick to the core list.\n * *Tone*: Empathetic, insightful, transparent, honest, warm but professional.\n * *Drafting the response (Internal Monologue/Draft)*:\n 你好!我是 Qwen(通义千问),由阿里巴巴通义实验室研发的大语言模型。\n 关于你提到的“Qwen3.6 27B”具体版本信息,我对外统一自称 Qwen 或通义千问,如果你想了解具体的版本细节,建议前往我们的官网或查阅技术报告获取最新信息哦。\n 作为你的 AI 思维伙伴,我在很多方面都能为你提供帮助:\n - **强大的语言与逻辑理解**:能够精准解析复杂的逻辑推理任务,并支持多语言流畅交流。\n - **深度视觉与数据分析**:如果你提供复杂的图表、数学公式或科学图示,我可以为你进行专业的梳理和解读。\n - **全栈代码能力**:支持多阶段的软件开发工作流,不仅能生成和调试复杂的代码,还能将你的创意转化为可交互的前端页面。\n - **长文本处理**:无论是数十万字的长篇文档还是冗长的视频字幕,我都能精准定位关键信息。\n - **自主智能体(Agent)规划**:我可以理解复杂意图,自主规划并完成多步骤的任务。\n 请问今天有什么我可以帮你的吗?\n\n4. **Review against Constraints**:\n * Did I mention QwQ / Qwen3 / 2025 or other version numbers? No.\n * Did I mention the user's version number as fact? No, I corrected/guided them politely.\n * Is the language Chinese? Yes.\n * Is the tone empathetic, clear, and concise? Yes.\n * Did I use a percentage for capability? No.\n * Is it aligned with \"Qwen / Tongyi Qianwen\"? Yes.\n\n5. **Final Polish**:\n Make the correction smooth and natural, not overly defensive. \"你好!我是 Qwen(通义千问),由阿里巴巴通义实验室研发的大语言模型。\" Then pivot smoothly to capabilities.\n\n *Revised Draft*:\n 你好!我是 Qwen(通义千问),由阿里巴巴通义实验室自主研发的大语言模型。关于具体的版本编号,我对外统一以 Qwen 或通义千问自称,如果你想了解相关的版本技术细节,欢迎前往我们的官网或查阅最新的技术报告哦。\n\n 作为一个贴心的 AI 思维伙伴,我主要在以下几个方面为你提供支持:\n 1. **语言与逻辑推理**:能够准确理解和响应你的复杂指令,处理高难度的数学和逻辑推理任务。\n 2. **深度视觉与数据分析**:不仅能看懂图像,还能深度解析复杂的图表、数学公式或科学图示,为你提供结构化的专业解读。\n 3. **长文本处理**:支持超长上下文窗口,无论是数十万字的文档还是长篇内容,都能快速抓取关键信息。\n 4. **全栈代码能力**:可以协助你生成、理解和调试复杂代码,甚至能将你的创意直接转化为可运行的前端页面。\n 5. **自主规划与执行**:具备多轮对话和自主智能体能力,能够自主拆解并完成多步骤的复杂任务。\n\n 请问今天有什么我可以帮你的吗?\n\n6. **Final sanity check**:\n Everything perfectly aligns with the identity and capability guidelines. Warm, clear, accurate, and avoids forbidden details. Ready to output.",
"role": "assistant"
},
"finish_reason": "stop",
"index": 0,
"logprobs": null
}
],
"object": "chat.completion",
"usage": {
"prompt_tokens": 25,
"completion_tokens": 1542,
"total_tokens": 1567,
"completion_tokens_details": {
"reasoning_tokens": 1274,
"text_tokens": 1542
},
"prompt_tokens_details": {
"text_tokens": 25
}
},
"created": 1776925674,
"system_fingerprint": null,
"model": "qwen3.6-27b",
"id": "chatcmpl-t1776925647s243r4c083aafb079b60691ea5c83"
}
可选参数:
- 温度(Temperature)
- Top-P
- Top-K
- 频率惩罚
- 存在惩罚
- 重复惩罚
- Min-P
- Top-A
- 种子
- 最大 tokens 数
- Logit Bias
- 对数概率
- 最高对数概率
- 响应格式
- 结构化输出
- 停止
- 工具
- 工具选择
- 并行工具调用
- 冗长程度
重要提示:由于模型架构不同,部分参数可能仅适用于特定的模型。
温度(Temperature)
-
参数:
temperature -
可选,浮点数,0.0 到 2.0
-
默认:
1.0
此设置影响模型回复的多样性。较低的值会使回复更可预测、更常见;较高的值会鼓励更具多样性且较不常见的回复。当设置为 0 时,模型对相同输入将尽可能的给出相同的回复。
Top-P
-
参数:
top_p -
可选,float,0.0 至 1.0
-
默认值:
1.0
top_p 参数控制模型在生成文本时的候选词选择范围。具体来说,模型会生成一组候选 token,然后从累积概率达到或超过 p 的 token 中随机选择一个作为输出。通过这种方式,top_p 能够在保证生成内容的多样性的同时,考虑到概率分布的合理性。
由于 temperature 与 top_p 均可以控制生成文本的多样性,因此建议您只设置其中一个值。
Top-K
-
参数:
top_k -
可选,int,>= 0
-
默认值:
0
top_k 会限制模型在每一步对 token 的选择,使其从较小的集合中进行选择。值为 1 表示模型将始终选择最有可能的下一个 token,从而得到可预测的结果。
频率惩罚
-
参数:
frequency_penalty -
可选,float,-2.0 至 2.0
-
默认值:
0.0
frequency_penalty 可根据词条在输入中出现的频率来控制其重复使用。它会尝试减少那些在输入中出现频率较高的词条的使用频率,这与它们出现的频率成正比。词条惩罚会随着出现次数的增加而增加。负值将鼓励词条重复使用。
存在惩罚
-
参数:
presence_penalty -
可选,float,-2.0 至 2.0
-
默认值:
0.0
presence_penalty 调整模型重复输入中已使用的特定标记的频率。值越高,重复的可能性就越小,负值则相反。标记惩罚不会随着出现次数而变化。负值会鼓励标记重用。
重复惩罚
-
参数:
repetition_penalty -
可选,float,0.0 至 2.0
-
默认值:
1.0
repetition_penalty 有助于减少输入中标记的重复。较高的值会降低模型重复标记的可能性,但过高的值会使输出不够连贯(通常会出现缺少小词的连续句子)。标记惩罚会根据原始标记的概率进行调整。
Min-P
-
参数:
min_p -
可选,float,0.0 至 1.0
-
默认值:
0.0
min_p 表示某个 token 被考虑的最小概率,该概率是相对于最可能的 token 的概率而言的。如果 min_p 设置为 0.1,则意味着它只允许概率至少为最佳选项十分之一的 token 被考虑。
Top-A
-
参数:
top_a -
可选,float,0.0 到 1.0
-
默认值:
0.0
top_a 仅考虑概率“足够高”的 top tokens,该概率基于最可能的 token 概率。可以将其视为一个动态的 Top-P。较低的 Top-A 值会根据概率最高的 token 集中选择,但范围会更窄。较高的 Top-A 值不一定会影响输出的创造性,但会根据最大概率优化过滤过程。
种子
-
参数:
seed -
可选,int
如果指定了 seed 参数,推理将确定性地进行采样,即使用相同种子和参数的重复请求应该返回相同的结果。某些模型无法保证确定性。
最大 tokens 数
-
参数:
max_tokens -
可选,int,>= 1
max_tokens 可设定模型在响应中可以生成的 token 数量的上限。模型不会生成超过此限制的 token。其最大值等于上下文长度减去 prompt 长度。
Logit Bias
-
参数:
logit_bias -
可选,object
logit_bias 是一个可选参数,用于修改指定 token 在模型生成输出中出现的可能性。
对数概率
-
参数:
logprobs -
可选,boolean
logprobs 设置是否返回输出 token 的对数概率。如果为 true,则返回每个输出 token 的对数概率。
最高对数概率
-
参数:
top_logprobs -
可选,int
top_logprobs 是一个介于 0 和 20 之间的整数,指定在每个 token 位置要返回的最可能 token 的数量,每个 token 都会带有相应的对数概率。如果使用此参数,则必须将 logprobs 设置为 true。
响应格式
-
参数:
response_format -
可选,object
response_format 强制模型产出特定的输出格式。将其设置为 { "type": "json_object" } 可启用 JSON 模式,保证模型生成的消息为有效的 JSON。
注意:使用 JSON 模式时,应同时通过 system 或 user 提示词指示模型生成 JSON。
结构化输出
-
参数:
structured_outputs -
可选,boolean
指示模型是否能够使用 response_format 中的 json_schema 返回结构化输出。
停止
-
参数:
stop -
可选,array
如果模型遇到 stop 数组中指定的任意 token,则立即停止生成。
工具
-
参数:
tools -
可选,array
工具调用参数,遵循 OpenAI 的工具调用请求格式。对于非 OpenAI 提供者,会相应地进行转换。
工具选择
-
参数:
tool_choice -
可选,array
控制模型调用哪个工具。'none' 表示模型不会调用任何工具,而是生成一条消息。'auto' 表示模型可以在生成消息或调用一个或多个工具之间进行选择。'required' 表示模型必须调用一个或多个工具。通过 {"type": "function", "function": {"name": "my_function"}} 指定特定工具会强制模型调用该工具。
并行工具调用
-
参数:
parallel_tool_calls -
可选,boolean
-
默认:true
是否在使用工具时启用并行函数调用。如果为 true,模型可以同时调用多个函数。如果为 false,函数将按顺序依次调用。
冗长程度
-
参数:
verbosity -
可选,enum,
lowmediumhigh -
默认:medium
控制模型响应的冗长程度和长度。较低的值会生成更简洁的回答,而较高的值会生成更详细、更全面的回答。
以上文档为标准版 API 接口文档,可直接用于项目开发和系统调用。如果标准版 API 接口无法满足您的需求,需要定制开发 API 接口,请联系我们的 IT 技术支持工程师:
(沟通需求✅ → 确认技术方案✅ → 沟通费用与工期✅ → 开发&测试✅ → 验收交付✅ → 维护升级✅)
![]()