merge
This commit is contained in:
@@ -317,8 +317,7 @@ impl super::Provider for OpenAIProvider {
|
||||
|
||||
// Standard OpenAI cleanup
|
||||
if let Some(obj) = body.as_object_mut() {
|
||||
obj.remove("stream_options");
|
||||
|
||||
// stream_options.include_usage is supported by OpenAI for token usage in streaming
|
||||
// Transition: Newer OpenAI models (o1, o3, gpt-5) require max_completion_tokens
|
||||
if request.model.starts_with("o1-") || request.model.starts_with("o3-") || request.model.contains("gpt-5") {
|
||||
if let Some(max_tokens) = obj.remove("max_tokens") {
|
||||
|
||||
Reference in New Issue
Block a user