Skip to content

[Compatibility] Camel DeepSeek V4 Flash misses structured tool call on the first tool round #1730

Description

@idguyst

Client or integration

Codex App

Provider or upstream service

Camel Stream (stream.camelai.com), model deepseek-v4-flash

Endpoint or capability

Custom-provider /v1/responses model routing and first-tool-round tool-selection behavior.

The provider-wide adapter remains openai-chat, while only deepseek-v4-flash is routed through openai-responses.

Remaining problem

This issue now tracks only whether Camel deepseek-v4-flash emits code-mode-style text/markup instead of a structured tool call on the first tool round when tool_choice: "auto" is used.

The second problem from the original report, loss of the unified exec custom-to-function input description, was fixed in #1763 and merged into dev. The exec JavaScript input contract is therefore no longer part of this issue's implementation scope.

Expected behavior

  • On the first tool round for stream.camelai.com + deepseek-v4-flash, the model should produce a structured tool call when it chooses to use a tool declared in the request.
  • Requests using an explicit tool_choice must preserve their current semantics.
  • Continuation turns containing tool results must preserve their current semantics.
  • Other hosts, models, and providers must remain unaffected.

Evidence required before implementation

The following evidence is required against current dev:

  1. A redacted raw upstream response from the first tool round showing the actual text/markup shape returned instead of a structured tool call.
  2. Confirmation that tool_choice: "auto" was used with the same request/tool catalog.
  3. The result of a control request using an explicit tool choice.
  4. Control evidence showing that a continuation turn after tool output still behaves normally.

Without this evidence, we should not add a host/model hardcode that forces first-round tool_choice: "required" only for stream.camelai.com + deepseek-v4-flash. There is no public upstream contract for that behavior, so a provider-specific policy change requires reproducible current evidence.

Minimal redacted reproduction

{
  "adapter": "openai-chat",
  "baseUrl": "https://stream.camelai.com/v1",
  "defaultModel": "deepseek-v4-flash",
  "modelAdapters": {
    "deepseek-v4-flash": "openai-responses"
  },
  "responsesPath": null
}
  1. On current dev, send a first request that includes tools.
  2. Record the upstream request's tool_choice and tool catalog.
  3. Capture the raw upstream response in redacted form.
  4. Run an explicit-tool-choice control under the same conditions.
  5. Run a continuation control that includes tool output.

Already fixed / out of scope

  • Unified exec custom-to-function JavaScript input guidance: fixed by fix(responses): preserve unified exec input contract #1763 and merged into dev.
  • Do not reimplement the bare-shell exec input problem in this issue.
  • General custom-tool conversion changes are out of scope unless new evidence shows a separate regression.

Related

Checks

  • I searched existing provider and compatibility issues.
  • The request and response must be redacted.
  • Current-dev raw first-response evidence for the remaining Camel-specific behavior is still required.

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

    bugSomething isn't workingneeds-infoWaiting on reporter for a concrete spec or reproductionproviderProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reportstoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions