Skip to content

deepseek: Fix for max output tokens blocking completions#45236

Merged
benbrandt merged 1 commit intomainfrom
fix-deepseek-max-tokens
Dec 18, 2025
Merged

deepseek: Fix for max output tokens blocking completions#45236
benbrandt merged 1 commit intomainfrom
fix-deepseek-max-tokens

Conversation

@benbrandt
Copy link
Member

They count the requested max_output_tokens against the prompt total. Seems like a bug on their end as most other providers don't do this, but now we just default to None for the main models and let the API use its default behavior which works just fine.

Closes: #45134

Release Notes:

  • deepseek: Fix issue with Deepseek API that was causing the token limit to be reached sooner than necessary

They count the requested max_output_tokens against the prompt total. Seems like a bug on their end as most other providers don't do this, but now we just default to None for the main models and let the API use its default behavior which works just fine.

Closes: #45134
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 18, 2025
@benbrandt benbrandt enabled auto-merge (squash) December 18, 2025 12:39
@benbrandt benbrandt merged commit 0180f3e into main Dec 18, 2025
25 checks passed
@benbrandt benbrandt deleted the fix-deepseek-max-tokens branch December 18, 2025 12:47
@benbrandt
Copy link
Member Author

/cherry-pick preview

github-actions bot pushed a commit that referenced this pull request Dec 18, 2025
They count the requested max_output_tokens against the prompt total.
Seems like a bug on their end as most other providers don't do this, but
now we just default to None for the main models and let the API use its
default behavior which works just fine.

Closes: #45134

Release Notes:

- deepseek: Fix issue with Deepseek API that was causing the token limit
to be reached sooner than necessary
zed-zippy bot added a commit that referenced this pull request Dec 18, 2025
…erry-pick to preview) (#45250)

Cherry-pick of #45236 to preview

----
They count the requested max_output_tokens against the prompt total.
Seems like a bug on their end as most other providers don't do this, but
now we just default to None for the main models and let the API use its
default behavior which works just fine.

Closes: #45134

Release Notes:

- deepseek: Fix issue with Deepseek API that was causing the token limit
to be reached sooner than necessary

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
They count the requested max_output_tokens against the prompt total.
Seems like a bug on their end as most other providers don't do this, but
now we just default to None for the main models and let the API use its
default behavior which works just fine.

Closes: #45134

Release Notes:

- deepseek: Fix issue with Deepseek API that was causing the token limit
to be reached sooner than necessary
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…ies#45236)

They count the requested max_output_tokens against the prompt total.
Seems like a bug on their end as most other providers don't do this, but
now we just default to None for the main models and let the API use its
default behavior which works just fine.

Closes: zed-industries#45134

Release Notes:

- deepseek: Fix issue with Deepseek API that was causing the token limit
to be reached sooner than necessary
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…ies#45236)

They count the requested max_output_tokens against the prompt total.
Seems like a bug on their end as most other providers don't do this, but
now we just default to None for the main models and let the API use its
default behavior which works just fine.

Closes: zed-industries#45134

Release Notes:

- deepseek: Fix issue with Deepseek API that was causing the token limit
to be reached sooner than necessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeepSeek 3.2 wrong completions calculation length

1 participant