Skip to content

Why is stream default to true? #151

@maple3142

Description

@maple3142

// OpenAI API compatibility: stream defaults to true unless explicitly set to false
const stream = body.stream !== false;

said stream defaults to true if not provided, but openai's official docs said it defaults to false.

And the current behavior also breaks the following code using openai sdk:

import openai

client = openai.OpenAI()
resp = client.chat.completions.create(
    model="gemini-2.5-flash",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=1024,
)
print(resp.choices[0].message.content)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions