Skip to content

[Bug] DeepSeek V4.1 Ark Responses tool calls leak as DSML via Codex Switch 1.5.26 #26

Description

@xiaoatongxue

Summary

Codex Switch 1.5.26 does not preserve structured tool calls for a custom openaiResponses provider using Volcengine Ark DeepSeek V4.1. DSML tool-call markup is returned as assistant text, and later requests fail with Messages with role 'tool' must be a response to a preceding message with 'tool_calls'.

Environment

  • Codex Switch 1.5.26, Windows
  • Codex proxy: http://127.0.0.1:15722/v1/responses
  • Provider: deepseek V4.1
  • apiFormat: openaiResponses
  • Base URL: https://ark.cn-beijing.volces.com/api/v3
  • Ark endpoint: ep-20260917113440-bdxh9

Expected

response.output[].type == "function_call" should become a structured Codex tool-call event, preserving call_id, name, and arguments. DSML must not be emitted as normal assistant text, and function_call_output must reference the matching call_id.

Actual

The assistant message contains literal DeepSeek DSML tool-call markup instead of executing the tool. Proxy logs show an orphan role: tool message on the next request.

Control test

Calling the same Ark endpoint/model directly with a minimal tool-call probe returned standard reasoning,function_call events and no DSML text. This indicates the upstream model/endpoint supports structured tool calls and the failure is in the Codex Switch proxy conversion/association path.

Request

Please fix the Responses-to-Codex tool-call conversion so structured calls and their call_id associations are preserved. API keys, account tokens, and private paths have been omitted.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions