web / desktop client: model tooltip shows "No reasoning" for models that expose reasoning variants
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- developer-experience, frontend
Hướng nghiên cứu
Issue xác định adapter model chuyển từ V2 sang legacy, ánh xạ các phản hồi của /api/model và hard-code capabilities.reasoning; tên tệp nguồn chính xác không được nêu. Hãy tìm adapter đó và so sánh cách ánh xạ reasoning với cách ánh xạ variants cũng như phần kiểm tra TUI được mô tả ở đây. Suy ra capability của tooltip từ các variants, sau đó xác minh rằng menu thả xuống model báo hỗ trợ reasoning cho một model có variants.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Summary
In the web / desktop client, the model list tooltip always shows Reasoning: "No reasoning" (zh: 不支持推理) for every model, even when the model actually supports reasoning and the server returns reasoning variants.
The web client's V2 → legacy model adapter hard-codes capabilities.reasoning = false while building its model objects from /api/model, so anything that reads capabilities.reasoning (the model tooltip) can never report reasoning support. Since reasoning is now expressed as generated variants, the client should derive support from variants.length.
Environment
- opencode version: 2.0.31 (
opencode --version) - OS: Linux 0e46af3aca03 5.19.17-z4pro-generic x86_64 (server runs in a Docker container; client is the OpenCode web/desktop UI on the LAN)
- Terminal: Unavailable (browser / desktop client; server process
TERM=xterm-256color) - Shell: Unavailable (
$SHELLnot set in the container) - Install/channel: release / latest,
/usr/local/bin/opencode, started asopencode serve --hostname 0.0.0.0 --port 4096; the managedopencode serve --serviceis also 2.0.31 - Active plugins: auto-discovered local plugin
~/.config/opencode/plugins/searxng; nopluginsentries inopencode.json - Config used for repro (secrets and internal hostnames redacted):
{
"providers": {
"acme": {
"name": "Local Flash Server",
"package": "@opencode/ai/providers/openai-compatible",
"settings": { "baseURL": "https://llm.internal.example/v1", "apiKey": "<redacted>" },
"models": {
"qwen-flash": {
"name": "Qwen Flash",
"settings": { "reasoningEffort": "xhigh" },
"capabilities": {
"reasoning": { "supported": true, "effort": ["low", "medium", "xhigh", "none"] },
"tools": true,
"input": ["text", "image"],
"output": ["text"]
},
"limit": { "context": 262144, "input": 229376, "output": 32768 }
}
}
}
}
}
Reproduction
- Declare reasoning controls on a model via
capabilities.reasoning(config above), then restart the server or run/reload. - Verify the server side:
GET /api/modelreturns the generated variants for that model. - Open the web UI (served by the same server on
:4096), or the desktop app pointed at that server, and open the model dropdown. - Look at the reasoning line of the model tooltip.
Expected Behavior
Tooltip shows "Allows reasoning" (支持推理) and the model's reasoning variants (#low / #medium / #xhigh / #none) are offered, since the model does stream reasoning.
Actual Behavior
Tooltip shows "No reasoning" (不支持推理). The model is fully functional: the same session produces reasoning parts and tokens.reasoning > 0, and the server exposes the variants. The TUI is unaffected because it computes support as model.variants.length > 0.
Consistent, 100% reproducible.
Additional Context
Server response for the model (redacted, note capabilities has no reasoning field and variants are present):
{
"id": "qwen-flash",
"modelID": "qwen-flash",
"providerID": "acme",
"settings": { "reasoningEffort": "xhigh" },
"capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
"variants": [
{ "id": "low", "settings": { "reasoningEffort": "low" } },
{ "id": "medium", "settings": { "reasoningEffort": "medium" } },
{ "id": "xhigh", "settings": { "reasoningEffort": "xhigh" } },
{ "id": "none", "settings": { "reasoningEffort": "none" } }
]
}
Evidence that reasoning really streams for that model in the same session:
GET /api/session/<session>/message
- 38 parts with "type":"reasoning"
- assistant usage: "tokens":{"input":575,"output":116,"reasoning":147,"cache":{"read":74098,"write":0}}
Client-side cause, from the web bundle served at /_assets/runtime-*.js (minified, formatting added):
t.models[e.id] = {
id: e.id,
providerID: e.providerID,
api: { id: e.modelID, url: "", npm: e.package ?? t.id },
name: e.name,
family: e.family,
capabilities: {
temperature: false,
reasoning: false, // <-- hard-coded, ignores e.variants
attachment: e.capabilities.input.some((x) => x !== "text"),
toolcall: e.capabilities.tools,
input: { ... },
output: { ... },
},
// variants are mapped correctly right next to it:
variants: Object.fromEntries(e.variants.map((v) => [v.id, v.settings ?? {}])),
};
And the i18n keys that render the tooltip line:
"model.tooltip.reasoning": "Reasoning" / 推理
"model.tooltip.reasoning.allowed": "Allows reasoning" / 支持推理
"model.tooltip.reasoning.none": "No reasoning" / 不支持推理
Notes:
- The V2
Model.Capabilitiesschema only hastools,input,output,temperature; after the "generate reasoning variants from reasoning options" change, reasoning capability is expressed exclusively throughvariants. Any client (or V1-shape adapter) that readscapabilities.reasoningwill therefore always readfalse. - Suggested fix: derive the flag in the adapter (or wherever the tooltip reads it) from
model.variants.length > 0, the same way the TUI already does, or expose an explicit reasoning flag in the API model payload. - Workaround / non-blocker: variants are honoured regardless of the tooltip, e.g.
opencode run --model acme/qwen-flash#low "hi"; the defaultsettings.reasoningEffortfrom config is applied as well.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 215k
- Fork
- 28.9k
- Merge trung bình
- 6 giờ 8 phút
- Pull request đã merge (30 ngày)
- 411
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
pending close triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#57939 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#57911 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending close triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#57907 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
anomalyco/opencode#57855 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
opencode api truncates large output when stdout is a pipe (un-awaited write before process.exit)Đang mởpending close triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#57816 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Automattic/data-liberation-agent#953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
README に GitHub の組織のバッジを足すĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
funmary-app/funmary#399 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:curator enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
CassioDalla/Scrinalia#150 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: needs-triage v1-bug-bash
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
a2ui-project/a2ui#3533 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend enhancement priority:P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
geolens-io/geolens#3310 ·
Maintainer thường phản hồi trong vòng 1 ngày