Skip to content

[Feature]: customLLM return only object for GenericStreamingChunk #27389

Description

@dragonTalon

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

We have a self-hosted, closed-source model in our company, and we would like to integrate it into LiteLLM through customLLM.

However, we found that the custom streaming interface only supports returning GenericStreamingChunk. The fields in GenericStreamingChunk are quite limited, and using provider_specific_fields would break the original interface compatibility.

What we would like to do is to actively convert our model's streaming response into the common OpenAI-compatible format.

From my understanding, this should be a very common use case. I noticed that acompletion seems to support this behavior, but astreaming does not.

Could you please consider supporting OpenAI-compatible streaming responses in customLLM, or provide a recommended way to achieve this?

Thanks!

Image

Motivation, pitch

custom llm add litellm

What part of LiteLLM is this about?

No response

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions