<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[新手想問Qwen3.8-27B搭配opencode的問題]]></title><description><![CDATA[<p dir="auto">最近跟風買了塊7900XTX<br />
之前有試著抄作業在Win10上用llama.cpp跑了Qwen3.6 27b的Q4量化版本<br />
這幾天Qwen3.8發布了 想著要在本地跑一套Qwen3.8-27B-abliterated-UD-Q5_K_XL+opencode來幫我分析一套用Foxpro寫的古老系統源碼<br />
卻在環境架設好以後就碰了灰(執行參數抄了AGI大佬的作業<a href="https://lcz.me/post/13658">https://lcz.me/post/13658</a>)<br />
在opencode下了指令以後 llama.cpp有收到要求並執行<br />
但執行完畢後opencode並沒有任何輸出<br />
用Gemini反覆測試了以後得到的結論是:<br />
opencode不接受Qwen3.8給出的回覆格式<br />
節錄關鍵部分如下:</p>
<pre><code>導致崩潰的回覆內容 (content)：
問題出在這裡。模型生成了一段 XML 格式的工具呼叫指令：

XML


&lt;function=multi_tool&gt;
&lt;parameter=tools&gt;
[{"type": "function", "function": {"name": "exec", "arguments": {"command": "find ..."}}}]
&lt;/parameter&gt;
&lt;/function&gt;
為什麼 OpenCode 會當機空白？
OpenCode 是嚴格基於 OpenAI 官方標準打造的代理軟體。它預期收到的工具呼叫（Tool Call）必須是隱藏在 API 參數中的純 JSON 陣列，而不是像這樣直接把 XML 標籤寫在對話內容（content）裡面。
因為這是一顆「解除審查（abliterated）與特化微調（UD）」的非官方模型，它的底層被訓練成習慣使用這種自訂的 XML 標籤來呼叫工具。當 OpenCode 收到這串 XML 時，它的解析器直接卡死，不知道該不該把這段文字顯示在畫面上，於是就變成了「無言結局」。
</code></pre>
<p dir="auto">想問這個問題有方法可解嗎?</p>
]]></description><link>https://lcz.me/topic/1337</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 22:17:01 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1337.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Aug 2026 10:47:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Sun, 06 Sep 2026 01:09:21 GMT]]></title><description><![CDATA[<p dir="auto">用VS Code搭配Zoo code(Woo code社群維護版)分功能大項分析以後重寫<br />
導入資料庫格式讓Zoo 照著修正<br />
產生出來的成品...零可用性<br />
對這個結果也不意外就是</p>
<p dir="auto">本來就是因為程式碼冗長才想藉助AI花時間去拼湊<br />
果然給的提示不夠完整的話AI自己過度腦補 就會產生出完全不可用的東西<br />
實際上要可用個人的想法應該是要讓Zoo針對每個子程式檔案分析後歸納出該程式做了什麽 用了那些資料 改了那些欄位 並摘要成檔案 再依照歸納出的摘要重寫<br />
但程式碼檔案總共有1500多個 礙於24G的限制上下文只開了128K<br />
我想依照目前的環境要完成這項任務應該是不容易<br />
我再想想有沒有更好的方法吧</p>
]]></description><link>https://lcz.me/post/16087</link><guid isPermaLink="true">https://lcz.me/post/16087</guid><dc:creator><![CDATA[TomAThub]]></dc:creator><pubDate>Sun, 06 Sep 2026 01:09:21 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Thu, 03 Sep 2026 13:27:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kai-sui" aria-label="Profile: kai-sui">@<bdi>kai-sui</bdi></a> foxpro，我想到了大学时代。</p>
]]></description><link>https://lcz.me/post/15699</link><guid isPermaLink="true">https://lcz.me/post/15699</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Thu, 03 Sep 2026 13:27:11 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Thu, 03 Sep 2026 07:26:58 GMT]]></title><description><![CDATA[<p dir="auto">ccSwitch配合codex点话注意需要模型那边开启responses，我也遇到这个问题，要修改启动参数</p>
]]></description><link>https://lcz.me/post/15632</link><guid isPermaLink="true">https://lcz.me/post/15632</guid><dc:creator><![CDATA[坤坤]]></dc:creator><pubDate>Thu, 03 Sep 2026 07:26:58 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Thu, 03 Sep 2026 03:59:36 GMT]]></title><description><![CDATA[<p dir="auto">我20年前手搓过一套foxpro的超市收款系统，带服务器端的，哈哈</p>
]]></description><link>https://lcz.me/post/15593</link><guid isPermaLink="true">https://lcz.me/post/15593</guid><dc:creator><![CDATA[kai sui]]></dc:creator><pubDate>Thu, 03 Sep 2026 03:59:36 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Sat, 29 Aug 2026 08:23:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> <a href="https://lcz.me/topic/1401/%E5%9C%A8%E8%BE%A6%E5%85%AC%E5%AE%A4%E6%9E%B6%E4%B8%80%E5%A5%97%E8%83%BD%E5%85%B1%E7%94%A8%E7%9A%84%E6%9C%AC%E5%9C%B0-ai-%E7%92%B0%E5%A2%83-qwen-3.8-pi-agent-%E8%88%87-kai-scheduler">https://lcz.me/topic/1401/在辦公室架一套能共用的本地-ai-環境-qwen-3.8-pi-agent-與-kai-scheduler</a><br />
供參考</p>
]]></description><link>https://lcz.me/post/14748</link><guid isPermaLink="true">https://lcz.me/post/14748</guid><dc:creator><![CDATA[CS6]]></dc:creator><pubDate>Sat, 29 Aug 2026 08:23:31 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Sat, 29 Aug 2026 02:26:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cs6" aria-label="Profile: CS6">@<bdi>CS6</bdi></a> 这么多人推荐，有空我也玩玩</p>
]]></description><link>https://lcz.me/post/14691</link><guid isPermaLink="true">https://lcz.me/post/14691</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sat, 29 Aug 2026 02:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Fri, 28 Aug 2026 17:30:44 GMT]]></title><description><![CDATA[<p dir="auto">推薦搭配 <a href="https://pi.dev/" rel="nofollow ugc">https://pi.dev/</a> Qwen3.8-27B 體驗下來比較好</p>
]]></description><link>https://lcz.me/post/14650</link><guid isPermaLink="true">https://lcz.me/post/14650</guid><dc:creator><![CDATA[CS6]]></dc:creator><pubDate>Fri, 28 Aug 2026 17:30:44 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Fri, 28 Aug 2026 15:50:39 GMT]]></title><description><![CDATA[<p dir="auto">既然版本比较新，无需设置--chat-template-file，会自动提取，去掉     --jinja ^<br />
--chat-template-file chat_template.jinja ^<br />
--reasoning-format deepseek ^  这三个参数试试， 尤其最后一个。</p>
]]></description><link>https://lcz.me/post/14640</link><guid isPermaLink="true">https://lcz.me/post/14640</guid><dc:creator><![CDATA[JamesPhlao]]></dc:creator><pubDate>Fri, 28 Aug 2026 15:50:39 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Fri, 28 Aug 2026 14:48:14 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jamesphlao" aria-label="Profile: JamesPhlao">@<bdi>JamesPhlao</bdi></a> <a href="/post/14629">说</a>:</p>
<p dir="auto">你的llama-server是什么版本？ 我一直用opencode + 最新的 llama-server  搭配3.6 3.8的27B来干活，没有出现你说的问题。<br />
注意配置文件opencode.json中，设置你的模型 provider -&gt; llama.cpp -&gt; models 配置qwen3.8 模型时加上<br />
"limit": {<br />
"context": 204800,  &lt;==这里用你的llama-server的上下文长度，不然干长时间任务可能超出<br />
"output": 65535<br />
},<br />
至于其它的设置按照qwen3.8的说明来配置就行。qwen3.8的能力很强的，花点时间用起来值得的。<br />
3.8对比3.6 给我最大的惊喜是，开发完之后，会按照需求进行详细测试。全栈应用上开发完成之后，会自动的调用浏览器进行端到端的测试，有兴趣的坛友可以给opencode提供playwright-cli技能。</p>
</blockquote>
<p dir="auto">b10630的版本<br />
我配置是一台主電腦跑7900XTX(Win10)開llama.cpp 另一台小電腦用WSL開opencode網路連線連接到主電腦使用<br />
確定opencode有連上llama.cpp 主電腦上的log有顯示收到task<br />
上下文開了128K 但是連送個test的提示詞都是空白回應 應該不是因為上下文爆了</p>
]]></description><link>https://lcz.me/post/14634</link><guid isPermaLink="true">https://lcz.me/post/14634</guid><dc:creator><![CDATA[TomAThub]]></dc:creator><pubDate>Fri, 28 Aug 2026 14:48:14 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Fri, 28 Aug 2026 14:28:15 GMT]]></title><description><![CDATA[<p dir="auto">直接用pi.dev</p>
]]></description><link>https://lcz.me/post/14632</link><guid isPermaLink="true">https://lcz.me/post/14632</guid><dc:creator><![CDATA[AGI]]></dc:creator><pubDate>Fri, 28 Aug 2026 14:28:15 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Fri, 28 Aug 2026 13:52:25 GMT]]></title><description><![CDATA[<p dir="auto">你的llama-server是什么版本？ 我一直用opencode + 最新的 llama-server  搭配3.6 3.8的27B来干活，没有出现你说的问题。<br />
注意配置文件opencode.json中，设置你的模型 provider -&gt; llama.cpp -&gt; models 配置qwen3.8 模型时加上<br />
"limit": {<br />
"context": 204800,  &lt;==这里用你的llama-server的上下文长度，不然干长时间任务可能超出<br />
"output": 65535<br />
},<br />
至于其它的设置按照qwen3.8的说明来配置就行。qwen3.8的能力很强的，花点时间用起来值得的。<br />
3.8对比3.6 给我最大的惊喜是，开发完之后，会按照需求进行详细测试。全栈应用上开发完成之后，会自动的调用浏览器进行端到端的测试，有兴趣的坛友可以给opencode提供playwright-cli技能。</p>
]]></description><link>https://lcz.me/post/14629</link><guid isPermaLink="true">https://lcz.me/post/14629</guid><dc:creator><![CDATA[JamesPhlao]]></dc:creator><pubDate>Fri, 28 Aug 2026 13:52:25 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Thu, 27 Aug 2026 14:28:53 GMT]]></title><description><![CDATA[<p dir="auto">code X 开源了。或用DSH。<br />
个人推荐 DSH。未来发展潜力更大。</p>
]]></description><link>https://lcz.me/post/14398</link><guid isPermaLink="true">https://lcz.me/post/14398</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Thu, 27 Aug 2026 14:28:53 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Thu, 27 Aug 2026 13:53:42 GMT]]></title><description><![CDATA[<p dir="auto">目前採用的Gemini的建議改用了VS Code+Zoo Code插件 已成功運行並初步分析了系統<br />
可見本地模型端的運作是沒有問題的 問題還是出在了opencode能接受的語法格式問題</p>
]]></description><link>https://lcz.me/post/14384</link><guid isPermaLink="true">https://lcz.me/post/14384</guid><dc:creator><![CDATA[TomAThub]]></dc:creator><pubDate>Thu, 27 Aug 2026 13:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Thu, 27 Aug 2026 07:24:01 GMT]]></title><description><![CDATA[<p dir="auto">感謝以上的回覆<br />
我有試著套入了<a href="https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates%E7%9A%84%E4%BF%AE%E6%AD%A3" rel="nofollow ugc">https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates的修正</a><br />
把啟動參數修改成了:</p>
<pre><code>    -m "Huihui-Qwen3.8-27B-abliterated-UD-Q5_K_XL.gguf" ^
    --jinja ^
    --chat-template-file chat_template.jinja ^
    --reasoning-format deepseek ^
    --mmproj "Qwen3.8_mmproj-model-bf16.gguf" ^
    --ctx-size 131072 ^
    --parallel 1 ^
    --device Vulkan0 ^
    --gpu-layers all ^
    --flash-attn on ^
    --threads 16 ^
    --batch-size 2048 ^
    --ubatch-size 512 ^
    --cache-type-k q8_0 ^
    --cache-type-v q8_0 ^
    --fit off ^
    --load-mode none ^
    --warmup ^
    --temperature 0.6 ^
    --top-p 0.95 ^
    --top-k 20 ^
    --min-p 0 ^
    --presence-penalty 0 ^
    --repeat-penalty 1 ^
    --reasoning on ^
    --reasoning-effort medium ^
    --reasoning-preserve ^
    --image-min-tokens 1024 ^
    --cache-ram 32768 ^
    --host 0.0.0.0 ^
    --port 8080 ^
    --metrics ^
    --perf ^
    --log-timestamps
</code></pre>
<p dir="auto">使用之前測試的方法測試 模型回復的格式的確得到了改善<br />
但似乎還是沒有符合opencode的嚴格要求<br />
仍然得到一片空白的輸出<br />
<img src="https://upload.lcz.me/uploads/f7e1f235-87b9-4884-befd-07f3f3ba6e81.png" alt="opencode.png" class=" img-fluid img-markdown" /><br />
看lllama.cpp的log應該是正常結束了回復並沒有出錯:</p>
<pre><code>[34m4.23.564.397[0m [32mI [0mslot get_availabl: id  0 | task -1 | selected slot by LCP similarity, f_sim_best = 0.997 (&gt; 0.100 thold), f_keep = 0.992
[34m4.23.564.893[0m [32mI [0mslot launch_slot_: id  0 | task 194 | processing task, is_child = 0
[34m4.25.700.324[0m [32mI [0mslot print_timing: id  0 | task 194 | prompt eval time =     258.47 ms /    22 tokens (   11.75 ms per token,    85.12 tokens per second)
[34m4.25.700.328[0m [32mI [0mslot print_timing: id  0 | task 194 |        eval time =    1876.94 ms /    47 tokens (   40.80 ms per token,    24.51 tokens per second)
[34m4.25.700.329[0m [32mI [0mslot print_timing: id  0 | task 194 |       total time =    2135.41 ms /    69 tokens
[34m4.25.700.330[0m [32mI [0mslot print_timing: id  0 | task 194 |    graphs reused =        223
[34m4.25.700.582[0m [32mI [0mslot      release: id  0 | task 194 | stop processing: n_tokens = 7624, truncated = 0
</code></pre>
<p dir="auto">詢問Gemini得到的回覆如下:</p>
<pre><code>這份只有 47 個 Token 的生成紀錄，就是破案的最終鐵證！

我們來看看這段關鍵日誌：

eval time = 1876.94 ms / 47 tokens

47 個 Token 是什麼概念？
這恰好就是一段標準 JSON 工具呼叫的長度（例如：{"name": "exec", "arguments": {"command": "ls"}}）。

這證明了我們剛剛掛載的 chat_template.jinja 大獲全勝，它成功把這隻桀驁不馴的模型，約束成了只會吐出標準指令的乖小孩。

🛑 那為什麼 OpenCode 還是死當？（OpenCode 的原罪）
模型已經盡力了，這次完全是 OpenCode 前端程式的問題。

這牽涉到 OpenAI API 底層極度嚴苛的格式要求：
在標準的 OpenAI 協定中，工具呼叫不能寫在對話內容（content）裡面，必須放在一個特殊的隱藏欄位叫做 tool_calls。
但是，llama-server 在處理這種非官方模型的 Jinja 模板時，通常只能把轉譯好的 JSON 塞在 content 裡面傳遞。

OpenCode 的程式碼寫得非常死板，它一收到 API 回傳，發現 tool_calls 欄位是空的（即使 content 裡面有著完美的 JSON 指令），它就會判定「模型沒有動作」，接著默默地把畫面清空，連報錯都不給您。
</code></pre>
<p dir="auto">看來還得試著調整看看</p>
<p dir="auto">另外 由於還在新手階段  所以想用手動搭配詢問Gemini的方式了解一下造成的原因及解決方式 用Gemini純粹是因為我有買Plus方案</p>
]]></description><link>https://lcz.me/post/14291</link><guid isPermaLink="true">https://lcz.me/post/14291</guid><dc:creator><![CDATA[TomAThub]]></dc:creator><pubDate>Thu, 27 Aug 2026 07:24:01 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Wed, 26 Aug 2026 21:25:13 GMT]]></title><description><![CDATA[<p dir="auto">把上面的回复发给你的Agent，你玩本地，一定要先接入一个在线模型，比如DeepSeek V4 Flash，驱动一个Codex或者hermes或者Deepseek harness，让它帮你配置。</p>
]]></description><link>https://lcz.me/post/14198</link><guid isPermaLink="true">https://lcz.me/post/14198</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 26 Aug 2026 21:25:13 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Wed, 26 Aug 2026 12:26:53 GMT]]></title><description><![CDATA[<p dir="auto">这个是工具调用格式的问题，qwen系列模型一般要加   --reasoning-parser qwen3 <br />
--tool-call-parser qwen3_coder \</p>
]]></description><link>https://lcz.me/post/14132</link><guid isPermaLink="true">https://lcz.me/post/14132</guid><dc:creator><![CDATA[Arroyo Cheung]]></dc:creator><pubDate>Wed, 26 Aug 2026 12:26:53 GMT</pubDate></item><item><title><![CDATA[Reply to 新手想問Qwen3.8-27B搭配opencode的問題 on Wed, 26 Aug 2026 12:01:48 GMT]]></title><description><![CDATA[<p dir="auto">搜一下qwen fix 或者看我发的贴子</p>
]]></description><link>https://lcz.me/post/14129</link><guid isPermaLink="true">https://lcz.me/post/14129</guid><dc:creator><![CDATA[用户名违规]]></dc:creator><pubDate>Wed, 26 Aug 2026 12:01:48 GMT</pubDate></item></channel></rss>