mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-25 23:04:27 +00:00
deepseek: Fix for max output tokens blocking completions (#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: #45134 Release Notes: - deepseek: Fix issue with Deepseek API that was causing the token limit to be reached sooner than necessary
This commit is contained in:
parent
5488a19221
commit
0180f3e72a
1 changed files with 3 additions and 2 deletions
|
|
@ -103,8 +103,9 @@ impl Model {
|
|||
|
||||
pub fn max_output_tokens(&self) -> Option<u64> {
|
||||
match self {
|
||||
Self::Chat => Some(8_192),
|
||||
Self::Reasoner => Some(64_000),
|
||||
// Their API treats this max against the context window, which means we hit the limit a lot
|
||||
// Using the default value of None in the API instead
|
||||
Self::Chat | Self::Reasoner => None,
|
||||
Self::Custom {
|
||||
max_output_tokens, ..
|
||||
} => *max_output_tokens,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue