Description
DeepSeek models can produce malformed tool-call arguments in some cases, for example optional placeholders (null, "", {}, []), arrays encoded as strings, decorated paths, or partial paired parameters.
This is related to DeepSeek tool-call formatting, but narrower than #24566. That issue is about raw DSML/XML-style tool calls not being parsed by a provider. This issue is about prompt-level mitigation for argument JSON shape when OpenCode is already using normal tool calls.
OpenCode already has provider-specific prompt sections for some models. A small DeepSeek-specific prompt section can make the expected tool-call JSON shape explicit without changing behavior for other providers.
Plugins
None
OpenCode version
Current dev branch
Steps to reproduce
- Use a DeepSeek model with tools enabled.
- Ask it to call tools with array, object, path, or optional parameters.
- Observe that some calls may use invalid argument shapes, such as arrays as strings, decorated paths, placeholder optional values, or only one side of a paired parameter.
Screenshot and/or share link
No screenshot. This is a tool-call argument formatting issue.
Operating System
Ubuntu 24.04
Terminal
Not terminal-specific
Description
DeepSeek models can produce malformed tool-call arguments in some cases, for example optional placeholders (
null,"",{},[]), arrays encoded as strings, decorated paths, or partial paired parameters.This is related to DeepSeek tool-call formatting, but narrower than #24566. That issue is about raw DSML/XML-style tool calls not being parsed by a provider. This issue is about prompt-level mitigation for argument JSON shape when OpenCode is already using normal tool calls.
OpenCode already has provider-specific prompt sections for some models. A small DeepSeek-specific prompt section can make the expected tool-call JSON shape explicit without changing behavior for other providers.
Plugins
None
OpenCode version
Current dev branch
Steps to reproduce
Screenshot and/or share link
No screenshot. This is a tool-call argument formatting issue.
Operating System
Ubuntu 24.04
Terminal
Not terminal-specific