Skip to content

Conversation

@welcoMattic
Copy link
Member

Q A
Bug fix? no
New feature? yes
Docs? no
Issues
License MIT

This PR adds support for LiteLLM as Bridge

For now, it is a very simple support (only chat), see it as ready-to-evolve bridge.

I've added a litellm service in Docker Compose file of examples to easily test it without having to install LiteLLM locally on your host.

@chr-hertel
Copy link
Member

Hey, thanks for that, that's actually an interesting one - the feature of litellm is to be a generic bridge to whatever based on the original OpenAI contract - right?
AFAIK it adds a lot of features like costs, telemetry, fallback on top - but it's basically as generic as it could get.

So i think we should work on the design shift here more - in case you're up for that.

For example the contract got centralized already - and as long as the bridge uses that original openai compliant contract, no additional normalizers need to be registered with the platform. i think the same should apply for some kind generic endpoint handling (model client + result converter)

so i think it would be great that we could use generic services (like litellm, openrouter, replicate) that conform to that first openai contract from payload and endpoint handling point of view without even installing a bridge.

WDYT?

(if that's off-scope for your current context, we can go ahead with this, merge it for now and potentially remove it later in favor of a generalized/centralized solution)

@OskarStark OskarStark changed the title [Paltform] Add LiteLLM Bridge [Paltform][LiteLLM] Add Bridge Nov 14, 2025
- model_name: mistral-small-latest
litellm_params:
model: mistral/mistral-small-latest
api_key: "os.environ/MISTRAL_API_KEY"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 🫢 🐒

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we append the os.environ/ part internally if its not provided?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It refers to the .env file that must contains MISTRAL_API_KEY

volumes:
- ./litellm/config.yaml:/app/config.yaml
env_file:
- .env
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env.local can be added here to read your own keys if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants