Skip to content

[Bug]: OpenAI chat completions response missing finish_reason #1821

Description

@lirc571

Prerequisites

  • I have searched existing issues and discussions to avoid duplicates
  • I am using the latest version (or have tested against main/nightly)

Description

When calling a model with OpenAI chat completions API, the response is missing {finish_reason: stop} even if it is set in upstream, causing client agents to enter an infinite loop.

Steps to reproduce

Call a model with chat completions API.

Expected behavior

finish_reason should be forwarded

Actual behavior

finish_reason is not forwarded

Affected area(s)

Transports (HTTP)

Version

v1.4.9

Environment

Linux

Relevant logs/output

Regression?

No response

Severity

Medium (some functionality impaired)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions