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

(litellm proxy perf) - pass num_workers cli arg to uvicorn when num_workers is specified #7681

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions litellm/proxy/proxy_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def is_port_in_use(port):
@click.option(
"--num_workers",
default=1,
help="Number of gunicorn workers to spin up",
help="Number of uvicorn / gunicorn workers to spin up. By default, 1 uvicorn is used.",
envvar="NUM_WORKERS",
)
@click.option("--api_base", default=None, help="API base URL.")
Expand Down Expand Up @@ -653,7 +653,7 @@ def _make_openai_completion():
from litellm.proxy.proxy_server import app # noqa

uvicorn_args = {
"app": app,
"app": "litellm.proxy.proxy_server:app",
"host": host,
"port": port,
}
Expand All @@ -674,6 +674,7 @@ def _make_openai_completion():
uvicorn.run(
**uvicorn_args,
loop="uvloop",
workers=num_workers,
)
elif run_gunicorn is True:
# Gunicorn Application Class
Expand Down
Loading