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

feat: support configuring api_key and api_base via environment variables #9484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

freshman829
Copy link

What does this PR do?

  • Adds support for configuring litellm.api_key and litellm.api_base via environment variables LITELLM_API_KEY and LITELLM_API_BASE.

Why is this useful?

  • Helps teams running LiteLLM in containerized or CI/CD environments
  • Improves developer experience by enabling .env or runtime environment injection

What's included:

  • Code change in __init__.py
  • README.md section added under Usage

Happy to iterate on feedback!

Copy link

vercel bot commented Mar 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 23, 2025 6:44pm

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

@krrishdholakia
Copy link
Contributor

krrishdholakia commented Mar 25, 2025

Thanks for your work @freshman829. Can you explain the problem a bit more?

You can already set the env var for any provider specific credential

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants