fix: deepseek streaming 400 error (remove stream_options.include_usage)
Some checks failed
CI / Check (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Formatting (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Release Build (push) Has been cancelled

This commit is contained in:
2026-03-03 15:13:30 -05:00
parent 3116084238
commit beb511291f

View File

@@ -113,7 +113,8 @@ impl super::Provider for DeepSeekProvider {
) -> Result<BoxStream<'static, Result<ProviderStreamChunk, AppError>>, AppError> { ) -> Result<BoxStream<'static, Result<ProviderStreamChunk, AppError>>, AppError> {
// DeepSeek doesn't support images in streaming, use text-only // DeepSeek doesn't support images in streaming, use text-only
let messages_json = helpers::messages_to_openai_json_text_only(&request.messages).await?; let messages_json = helpers::messages_to_openai_json_text_only(&request.messages).await?;
let body = helpers::build_openai_body(&request, messages_json, true); let mut body = helpers::build_openai_body(&request, messages_json, true);
body.as_object_mut().expect("body is object").remove("stream_options");
let es = reqwest_eventsource::EventSource::new( let es = reqwest_eventsource::EventSource::new(
self.client self.client