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

[Bug]: Fix docker image for multiple deployment Router #696

Closed
krrishdholakia opened this issue Oct 25, 2023 · 4 comments
Closed

[Bug]: Fix docker image for multiple deployment Router #696

krrishdholakia opened this issue Oct 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@krrishdholakia
Copy link
Contributor

What happened?

Our openai-proxy docker image no longer supports multiple model deployments. This is what we're currently directing users too - https://docs.litellm.ai/docs/routing#handle-multiple-azure-deployments-via-openai-proxy-server.

Relevant log output

No response

Twitter / LinkedIn details

No response

@krrishdholakia krrishdholakia added the bug Something isn't working label Oct 25, 2023
@krrishdholakia
Copy link
Contributor Author

Support for routing between multiple deployments added to the openai-proxy endpoint:
Screenshot 2023-10-25 at 11 20 11 AM

Screenshot 2023-10-25 at 11 20 17 AM

also added support for accepting the model list either via a config.yaml -

def load_router_config(router: Optional[litellm.Router]):

or from the model_list param in the request body:

if "model_list" in data:

Remaining Work:

  • need to update dockerfile to accept the config.yaml as a build param (and not raise an error if it's not passed in)

@krrishdholakia
Copy link
Contributor Author

krrishdholakia commented Oct 25, 2023

cc: @alabrashJr @mc-marcocheng

@krrishdholakia
Copy link
Contributor Author

krrishdholakia commented Oct 25, 2023

This is live now.

How to deploy router

  1. Clone repo
 git clone https://github.com/BerriAI/litellm
  1. Create + Modify router_config.yaml (save your azure/openai/etc. deployment info)
cp ./router_config_template.yaml ./router_config.yaml
  1. Build + Run docker image
docker build -t litellm-proxy . --build-arg CONFIG_FILE=./router_config.yaml 
docker run --name litellm-proxy -e PORT=8000 -p 8000:8000 litellm-proxy

Test

curl 'http://0.0.0.0:8000/router/completions' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-3.5-turbo",
    "messages": [{"role": "user", "content": "Hey"}]
}'

@krrishdholakia
Copy link
Contributor Author

docs updated as well.

@alabrashJr can you let me know if this solves your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant