Skip to content

Malformed XML/DSML tool-call output from Opencode Go models #50206

Description

@lirc572

Description

Many opencode-hosted models often emit XML/DSML-like chat content instead of valid tool-call payloads, causing tool execution to fail. E.g.:

<|DSML| parameter name="edit">
 <|DSML| parameter name="edits" string="false">[...]</|DSML| parameter>
 <|DSML| parameter name="path" string="true">/home/ubuntu/project/src/main.rs</|DSML| parameter>
</|DSML| invoke>

Expected: A valid structured tool call, or a clean rejection/fallback path.

Actual: The output is treated as plain text / malformed structured content, so the tool never runs correctly.

Impact:

  • Tool calls fail or are ignored
  • Automation breaks
  • Models produce “fake” tool attempts that don’t execute

Observed with: DeepSeek v4.1 flash and similar models (happened before but I can't remember the exact models). For DeepSeek v4.1 flash, I started observing this behavior today, and model speed is also a lot slower than a few days ago. Probably means I am now routed to models deployed by opencode instead of official DeepSeek API used when first launched.

Plugins

NA

OpenCode version

NA

Steps to reproduce

Having long session with DeepSeek v4.1.

Screenshot and/or share link

NA

Operating System

Windows 11

Terminal

Windows Terminal

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions