Skip to content

fix: deepseek-v4-pro 不支持 tool_choice#204

Closed
StageDog wants to merge 1 commit into
betafrom
fix/tool_choice
Closed

fix: deepseek-v4-pro 不支持 tool_choice#204
StageDog wants to merge 1 commit into
betafrom
fix/tool_choice

Conversation

@StageDog
Copy link
Copy Markdown
Collaborator

@StageDog StageDog commented May 4, 2026

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🔍 PR Test Report

🧪 Test Results

❌ Some tests failed

Type Passed Failed Total
Test Suites 13 3 16
Tests 327 0 327

📊 Coverage Report

Metric Coverage Details
Lines 54.2% 850/1568
Statements 53.9% 870/1614
Functions 51.78% 87/168
Branches 59.22% 504/851

Coverage Thresholds

  • ✅ Lines: 54.2% (Passed, threshold: 50%)
  • ✅ Statements: 53.9% (Passed, threshold: 50%)
  • ✅ Functions: 51.78% (Passed, threshold: 50%)
  • ✅ Branches: 59.22% (Passed, threshold: 50%)

Generated at 2026-05-04T15:14:59.318Z

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f568ce4759

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +350 to +351
const model = _.get(generate_data, 'model', '') as string;
if (generate_data.tools !== undefined && _.size(generate_data.tools) > 0 && !model.includes('deepseek')) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Detect DeepSeek model from custom_api config

This guard only inspects generate_data.model, but extra-model requests in custom source mode set the model at generate_data.custom_api.model (see src/function/update/invoke_extra_model.ts). In that common path, model resolves to '', so the condition still sets tool_choice = 'required' and the DeepSeek compatibility fix does not apply, which can keep failing requests for DeepSeek v4-pro behind custom/OpenAI-compatible endpoints.

Useful? React with 👍 / 👎.

@StageDog
Copy link
Copy Markdown
Collaborator Author

StageDog commented May 4, 2026

唐了,酒馆后端的问题,这里删掉没用

@StageDog StageDog closed this May 4, 2026
@StageDog StageDog deleted the fix/tool_choice branch May 4, 2026 15:33
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