Skip to content

support official DeepSeek Responses endpoints - #1769

Open
Rat0323 wants to merge 13 commits into
BigPizzaV3:mainfrom
Rat0323:agent/deepseek-responses-compatibility
Open

support official DeepSeek Responses endpoints#1769
Rat0323 wants to merge 13 commits into
BigPizzaV3:mainfrom
Rat0323:agent/deepseek-responses-compatibility

Conversation

@Rat0323

@Rat0323 Rat0323 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Problem

Codex++ cannot currently use Codex Code Mode with DeepSeek's official Responses API. Code Mode publishes a custom exec tool, while the official DeepSeek endpoint rejects that tool with Unsupported custom tool: 'exec'.

This affects both the built-in DeepSeek preset and manually configured suppliers that point to the same official Responses endpoint. Treating the preset as the compatibility boundary would leave equivalent custom configurations broken.

Design

Add provider capability handling at the configuration boundary. The DeepSeek adapter is selected when the active provider resolves to:

wire_api = "responses"
base_url = "https://api.deepseek.com/"

Endpoint detection uses the effective host (deepseek.com or a subdomain), not the preset ID, provider name, or model name. Values in the configuration being saved take precedence over stale profile fields.

For matching configurations, Codex++ disables Code Mode while preserving Unified Exec:

[features]
code_mode_only = false

[features.code_mode]
enabled = false

Unified Exec remains available through the supported exec_command and write_stdin function tools. Existing feature tables, including inline tables, retain unrelated settings.

Endpoint-based detection keeps the workaround scoped to the capability that requires it:

  • third-party relays retain their own Responses tool behavior instead of inheriting restrictions from the model name
  • Chat Completions continues through the existing protocol-proxy path and does not publish the failing Responses custom tool
  • other Responses providers retain their existing capability handling

Model catalog

Add bundled metadata for the official DeepSeek Responses models:

  • expose deepseek-v4-flash in the default preset
  • retain deepseek-v4-pro metadata with supported_in_api = false
  • use a 1,048,576-token context window with a 95% effective context window
  • set tool_mode = null and supports_search_tool = false
  • preserve explicit user-provided model_catalog_json values

Applying a matching supplier profile generates this metadata for supported deepseek-v4-* entries. Direct config-file saves apply the compatibility transform without generating a catalog when profile and model-list context is unavailable.

CI prerequisite

Include the line-ending normalization from #1735. The upstream asset checks otherwise depend on checkout line endings and can fail before validating this change.

Validation

  • cargo test -p codex-plus-core --test relay_config --locked -- --test-threads=1 (114 passed)
  • cargo test -p codex-plus-core --test model_suffix --locked -- --test-threads=1 (15 passed)
  • cargo test -p codex-plus-core --lib --locked -- --test-threads=1 (208 passed)
  • npm test in apps/codex-plus-manager (37 passed)
  • cargo fmt --all -- --check
  • git diff --check

References

@Rat0323
Rat0323 marked this pull request as ready for review August 4, 2026 05:01
@Rat0323 Rat0323 changed the title fix DeepSeek Responses tool compatibility support configurable DeepSeek Responses compatibility Aug 7, 2026
@Rat0323 Rat0323 changed the title support configurable DeepSeek Responses compatibility support official DeepSeek Responses Aug 7, 2026
@Rat0323 Rat0323 changed the title support official DeepSeek Responses support official DeepSeek Responses endpoints Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant