The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs on contributing
Ishaan Jaffc1a3cb82a9eb
diff --git a/README.md b/README.mdindex 014df0ccdd4..ab83f1927b0 100644--- a/README.md+++ b/README.md@@ -340,71 +340,7 @@ curl 'http://0.0.0.0:4000/key/generate' \## Contributing-To contribute: Clone the repo locally -> Make a change -> Submit a PR with the change.--Here's how to modify the repo locally:--Step 1: Clone the repo--```-git clone https://github.com/BerriAI/litellm.git-```--Step 2: Install dependencies:--```-pip install -r requirements.txt-```--Step 3: Test your change:--a. Add a pytest test within `tests/litellm/`--This folder follows the same directory structure as `litellm/`.--If a corresponding test file does not exist, create one.--b. Run the test--```-cd tests/litellm # pwd: Documents/litellm/litellm/tests/litellm-pytest /path/to/test_file.py-```--Step 4: Submit a PR with your changes! 🚀--- push your fork to your GitHub repo-- submit a PR from there--### Building LiteLLM Docker Image--Follow these instructions if you want to build / run the LiteLLM Docker Image yourself.--Step 1: Clone the repo--```-git clone https://github.com/BerriAI/litellm.git-```--Step 2: Build the Docker Image--Build using Dockerfile.non_root-```-docker build -f docker/Dockerfile.non_root -t litellm_test_image .-```--Step 3: Run the Docker Image--Make sure config.yaml is present in the root directory. This is your litellm proxy config file.-```-docker run \- -v $(pwd)/proxy_config.yaml:/app/config.yaml \- -e DATABASE_URL="postgresql://xxxxxxxx" \- -e LITELLM_MASTER_KEY="sk-1234" \- -p 4000:4000 \- litellm_test_image \- --config /app/config.yaml --detailed_debug-```+Interested in contributing? Contributions to LiteLLM Python SDK, Proxy Server, and contributing LLM integrations are both accepted and highly encouraged! See our Contribution Guide for more details# EnterpriseFor companies that need better security, user management and professional supportdiff --git a/docs/my-website/docs/extras/contributing_code.md b/docs/my-website/docs/extras/contributing_code.mdnew file mode 100644index 00000000000..395a882478f--- /dev/null+++ b/docs/my-website/docs/extras/contributing_code.md@@ -0,0 +1,110 @@+# Contributing Code++Here are the core requirements for any PR submitted to LiteLLM++- Follow the [fork and pull request workflow](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project)+- Fill out the relevant issue(s) your PR solves+- Add testing, **Adding atleast 1 test is a hard requirement**+- Ensure your PR passes the following tests+ - Unit Tests+ - Formatting / Linting Tests+- Keep scope as isolated as possible. As a general rule, your changes should address 1 specific problem at a time+++++## Quick start++## 1. Setup your local dev environment+++Here's how to modify the repo locally:++Step 1: Clone the repo++```shell+git clone https://github.com/BerriAI/litellm.git+```++Step 2: Install dependencies:++```shell+pip install -r requirements.txt+```++That's it, your local dev environment is ready!++## 2. Adding Testing to your PR++- Add your test to the [`tests/litellm/` directory](https://github.com/BerriAI/litellm/tree/main/tests/litellm)++- This directory 1:1 maps the the `litellm/` directory, and can only contain mocked tests.+- Do not add real llm api calls to this directory.++### 2.1 File Naming Convention for `tests/litellm/`++The `tests/litellm/` directory follows the same directory structure as `litellm/`.++- `litellm/proxy/test_caching_routes.py` maps to `litellm/proxy/caching_routes.py`+- `test_{filename}.py` maps to `litellm/{filename}.py`+++++### Checklist for PRs++++Step 3: Test your change:++a. Add a pytest test within `tests/litellm/`++This folder follows the same directory structure as `litellm/`.++If a corresponding test file does not exist, create one.++b. Run the test++```shell+cd tests/litellm # pwd: Documents/litellm/litellm/tests/litellm+pytest /path/to/test_file.py+```++Step 4: Submit a PR with your changes! 🚀++- push your fork to your GitHub repo+- submit a PR from there+++## Advanced+### Building LiteLLM Docker Image++Some people might want to build the LiteLLM docker image themselves. Follow these instructions if you want to build / run the LiteLLM Docker Image yourself.++Step 1: Clone the repo++```shell+git clone https://github.com/BerriAI/litellm.git+```++Step 2: Build the Docker Image++Build using Dockerfile.non_root++```shell+docker build -f docker/Dockerfile.non_root -t litellm_test_image .+```++Step 3: Run the Docker Image++Make sure config.yaml is present in the root directory. This is your litellm proxy config file.++```shell+docker run \+ -v $(pwd)/proxy_config.yaml:/app/config.yaml \+ -e DATABASE_URL="postgresql://xxxxxxxx" \+ -e LITELLM_MASTER_KEY="sk-1234" \+ -p 4000:4000 \+ litellm_test_image \+ --config /app/config.yaml --detailed_debug+```diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.jsindex 85b94182d7d..cf4f14b202a 100644--- a/docs/my-website/sidebars.js+++ b/docs/my-website/sidebars.js@@ -437,6 +437,7 @@ const sidebars = {type: "category",label: "Contributing",items: [+ "extras/contributing_code",{type: "category",label: "Adding Providers",diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex b61ddd45620..b2a08544f92 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -6057,42 +6057,42 @@"mode": "chat","supports_tool_choice": true},- "jamba-large-1.6": {+ "jamba-1.5-mini": {"max_tokens": 256000,"max_input_tokens": 256000,"max_output_tokens": 256000,- "input_cost_per_token": 0.000002,- "output_cost_per_token": 0.000008,+ "input_cost_per_token": 0.0000002,+ "output_cost_per_token": 0.0000004,"litellm_provider": "ai21","mode": "chat","supports_tool_choice": true},- "jamba-mini-1.6": {+ "jamba-1.5-large": {"max_tokens": 256000,"max_input_tokens": 256000,"max_output_tokens": 256000,- "input_cost_per_token": 0.0000002,- "output_cost_per_token": 0.0000004,+ "input_cost_per_token": 0.000002,+ "output_cost_per_token": 0.000008,"litellm_provider": "ai21","mode": "chat","supports_tool_choice": true},- "jamba-1.5-mini": {+ "jamba-large-1.6": {"max_tokens": 256000,"max_input_tokens": 256000,"max_output_tokens": 256000,- "input_cost_per_token": 0.0000002,- "output_cost_per_token": 0.0000004,+ "input_cost_per_token": 0.000002,+ "output_cost_per_token": 0.000008,"litellm_provider": "ai21","mode": "chat","supports_tool_choice": true},- "jamba-1.5-large": {+ "jamba-mini-1.6": {"max_tokens": 256000,"max_input_tokens": 256000,"max_output_tokens": 256000,- "input_cost_per_token": 0.000002,- "output_cost_per_token": 0.000008,+ "input_cost_per_token": 0.0000002,+ "output_cost_per_token": 0.0000004,"litellm_provider": "ai21","mode": "chat","supports_tool_choice": true