Tools and template file in opencode

#10
by Milor123 - opened

Hello, I would like to know what the recommended template file is for using Jinja-style with tools like OpenCode. I am trying several, and some work partially and then break; for example, I have some online search MCPs that break easily. Is there a specific one I should choose?

I am supposed to be using the options you recommended; I like how the model works and thinks, and I perceive it as a stable model, but the issue is that the tools perform very poorly for me, almost always ending in an error and causing the conversation to close.

What should I do? I use llama.cpp

Qwen3.5-9B-DeepSeek-V4-Flash + normal (fork atomic) .\llama-server.exe -m "C:\Users\User\.vllm\Qwen3.5-9B-DeepSeek-V4-Flash\Qwen3.5-9B-DeepSeek-V4-Flash-Q4_K_M.gguf" --host 127.0.0.1 --port 10000 -ngl 99 -c 256000 -b 8192 -ub 2048 --no-mmap --direct-io --temp 1.0 -np 1 -fa on --top-k 20 --repeat-penalty 1.05 --top-p 0.95 --min-p 0 --api-key xxx --cont-batching --metrics -ctv turbo3 -ctk turbo3 --jinja -tb 19 -t 19 --poll 100 --cpu-strict 1 --n-cpu-moe 6 --chat-template-file "C:\Users\User\.vllm\Qwen3.5-9B-DeepSeek-V4-Flash\v19_chat_template.jinja" --no-warmup --cache-reuse 512 --cache-ram -1 --dry-multiplier 0.8 --dry-base 1.75 --dry-allowed-length 2 --checkpoint-every-n-tokens 65536

I also tested it without my arguments--dry-multiplier 0.8 --dry-base 1.75 --dry-allowed-length 2

but it doesn't work, I get an error like this:
"Failed to parse input at pos 313: <tool_call>\n<function=webfetch>\n<parameter=format>\nmarkdown\n</parameter>\n<parameter=url>\nhttps://www.pcgamer.com/bloodstained-ritual-the-night-review/\n</parameter>\n</function>\n</tool_call>"

Hello, thank you for your support and for using our model! After testing with other Qwen models, we have identified that this issue is likely related to the chat template configuration. We are currently working on a fix and will update all related models as soon as possible. Thank you for your patience and for providing this feedback.

Hello, thank you for your support and for using our model! After testing with other Qwen models, we have identified that this issue is likely related to the chat template configuration. We are currently working on a fix and will update all related models as soon as possible. Thank you for your patience and for providing this feedback.

Hello again, I'm afraid it was my mistake; yesterday I discovered that an MCP was causing it. When I disabled the problematic MCP, my llama.cpp went back to normal. Your model is fine, it was my fault.
If I find anything strange, I will let you know. Thank you very much.

Milor123 changed discussion status to closed

Sign up or log in to comment