Skip to content

[Bug]: Default encoding_format list in model parameters triggers vLLM failure #28239

Description

@ndjones

Check for existing issues

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

What happened?

Including encoding_format as a list within model parameters leads to a vLLM failure on model calls that don't explicitly set a specific encoding_format, as by default LiteLLM passes the whole list to vLLM as a string.

 "encoding_format": [
    "float",
    "base64",
    "ubyte",
    "int8"
  ]

The model Test Connection behaves in this default way, and displays this error

Error testing connection: litellm.BadRequestError: Hosted_vllmException - {"error":{"message":"3 validation errors:\n {'type'...

Using the Swagger API you can reproduce this error by not setting encoding_format or otherwise setting it.

Steps to Reproduce

  1. Set encoding_format to a list on an embedding model
  2. Make a call to the embeddings endpoint without specifying an encoding_format
  3. Make a call to the embeddings endpoint with specifying an encoding format

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.83.14

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions