Skip to content

support official DeepSeek Responses - #1769

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

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

Conversation

@Rat0323

@Rat0323 Rat0323 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • switch the built-in DeepSeek preset from Chat Completions to DeepSeek's official Responses API
  • preserve both deepseek-v4-flash and deepseek-v4-pro; upstream remains the source of truth for availability
  • generate the model metadata required by Codex for the official DeepSeek Responses models
  • disable Code Mode only for Responses profiles whose effective endpoint is deepseek.com or a subdomain
  • preserve Unified Exec, Chat Completions, third-party relay behavior, and the existing relay profile lifecycle
  • retain the independent .gitattributes EOL normalization fix used by upstream asset checks

Scope

The provider presets are convenience templates that populate profile fields; Codex++ does not persist a preset identity.

This compatibility therefore applies at the profile level. It is enabled when:

  1. protocol = responses
  2. the effective endpoint host is deepseek.com or one of its subdomains

A profile created manually with the official DeepSeek Responses endpoint receives the same compatibility handling. Changing the preset URL to a third-party relay leaves that relay's existing behavior unchanged.

This PR does not infer provider capabilities from model names and does not add a generic DeepSeek compatibility mode. Third-party relays may expose DeepSeek, GLM, Doubao, GPT, or mixed catalogs with different tool behavior.

Root cause

Codex Code Mode publishes a Responses custom tool named exec. DeepSeek's official Responses endpoint rejects it with Unsupported custom tool: 'exec'.

For official DeepSeek Responses profiles, Codex++ writes the effective live configuration with:

[features]
code_mode_only = false

[features.code_mode]
enabled = false

Unified Exec is a separate path that publishes the function tools exec_command and write_stdin, so it remains unchanged.

Chat Completions also remains available through Codex++'s existing protocol proxy. It does not use this Responses-specific workaround.

The existing active-profile save flow is preserved. Its backend config write now applies the same official-endpoint compatibility transform, so saving an active official DeepSeek Responses profile cannot bypass the adapter.

Validation

  • npm run check
  • npm test (37 passed)
  • cargo fmt --all -- --check
  • cargo test -p codex-plus-manager --lib --locked -- --test-threads=1 (43 passed)
  • cargo test -p codex-plus-core --lib --locked -- --test-threads=1 (208 passed)
  • cargo test -p codex-plus-core --test relay_config --test relay_switch --test model_suffix --locked -- --test-threads=1 (132 passed)
  • git diff --check

Regression coverage includes manually created official DeepSeek Responses profiles, official-login profiles mixed with an API key, third-party Responses profiles, and official DeepSeek Chat Completions profiles.

@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
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