litellm
litellm copied to clipboard
feature: Allow config litellm.api_key and litellm.api_base by environment variables
Title
Allow config api_key & api_base by environment variable
Relevant issues
Feature #9075
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
- [ ] I have Added testing in the
tests/litellm/directory, Adding at least 1 test is a hard requirement - see details - [x] I have added a screenshot of my new test passing locally
- [x] My PR passes all unit tests on (
make test-unit)[https://docs.litellm.ai/docs/extras/contributing_code] - [x] My PR's scope is as isolated as possible, it only solves 1 specific problem
Type
🆕 New Feature
Changes
- Added support to read api_base & api_key form env variables. It will overwrite if these variable are specifically provided in code.
- Added Module notes so user can see it in function description.
- Unit test case result:
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 13, 2025 6:21pm |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.