Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support models with non-standard finish_reason #2229

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

jvstme
Copy link
Collaborator

@jvstme jvstme commented Jan 27, 2025

Some model launchers (TGI, sglang) may return
non-standard finish_reason values, such as
"eos_token" or "". This commit removes the
strict parsing of finish_reason so that the
OpenAI-compatible endpoint does not fail for these model launchers.

Fixes #2228

Some model launchers (TGI, sglang) may return
non-standard `finish_reason` values, such as
`"eos_token"` or `""`. This commit removes the
strict parsing of `finish_reason` so that the
OpenAI-compatible endpoint does not fail for these
model launchers.
@jvstme jvstme merged commit 3918689 into master Jan 27, 2025
24 checks passed
@jvstme jvstme deleted the issue_2228_sglang branch January 27, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The OpenAI-compatible endpoint does not work with sglang
1 participant