Skip to content

v0.8.65: DeepSeek Anthropic-compatible endpoint wire-protocol spike #2963

Description

@Hmbown

Goal

Spike DeepSeek V4 through DeepSeek's Anthropic-compatible endpoint and compare it with the existing OpenAI Chat Completions path for correctness, token accounting, tool behavior, and web-search/server-tool availability.

This issue is now a focused wire-protocol conformance spike under #3084. It is not a prompt-mode switch and it should not change provider/model routing by inspecting user prompts.

Current Evidence

  • Existing CodeWhale provider paths historically leaned on Chat Completions-style request handling.
  • DeepSeek's official docs have described an Anthropic-compatible endpoint at https://api.deepseek.com/anthropic.
  • DeepSeek V4 docs have described V4-Pro and V4-Flash availability through both OpenAI Chat Completions and Anthropic-compatible interfaces.
  • Anthropic's official API includes server tools such as web search, but that does not prove DeepSeek's Anthropic-compatible endpoint supports the same server tools.

References from the original spike:

Architecture Contract

Endpoint wire protocol is selected by the resolved route, not by prompt content.

The spike should exercise:

  • provider descriptor endpoint selection;
  • selected-route wire protocol request encoding;
  • response/stream decoding;
  • tool-call and tool-result mapping;
  • reasoning/thinking field mapping;
  • stop reason and usage telemetry mapping;
  • route explanations and conformance reporting.

Do not conflate Anthropic Claude API capabilities with DeepSeek's Anthropic-compatible endpoint. A compatible request shape does not guarantee identical server tools or telemetry.

Scope

  1. Add an opt-in route/endpoint mode for DeepSeek V4 using the Anthropic-compatible wire protocol.
  2. Map CodeWhale messages, system prompt, tool definitions, tool results, stop reasons, streaming deltas, thinking/reasoning fields, and usage fields.
  3. Smoke test the same small tasks over Chat Completions and Anthropic-compatible endpoints.
  4. Explicitly test whether Anthropic-style server tools such as web search are accepted, ignored, rejected, or behave differently through DeepSeek's endpoint.
  5. Compare correctness, latency, token usage, cache/reasoning telemetry, and tool reliability.
  6. Document the result before changing defaults.

Non-Goals

  • Do not make the Anthropic-compatible endpoint the default route until smoke tests show it is at least comparable.
  • Do not remove Chat Completions support in this issue.
  • Do not promise web search support unless DeepSeek's endpoint proves it supports server tools in live testing.
  • Do not add model-family or provider-string branches outside the descriptor/route/protocol layer.

Acceptance Criteria

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestmodel-labModel Lab open-model discovery, evaluation, routing, and export workflowsv0.8.65Targeting v0.8.65

    Projects

    Status
    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions