Skip to content

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]

chore(cost): drop the section header comment above custom_model_info

mateo-berri251bc07e97de
diff --git a/.git-check.out b/.git-check.out
new file mode 100644
index 00000000000..73092f18281
--- /dev/null
+++ b/.git-check.out
@@ -0,0 +1,58 @@
+uv sync --inexact --frozen --extra proxy --group proxy-dev --group e2e-dev
+Audited 232 packages in 79ms
+uv run --no-sync python scripts/prisma_generate_if_needed.py
+Environment variables loaded from .env
+Prisma schema loaded from litellm/proxy/schema.prisma
+Warning: The binaryTargets option is not officially supported by Prisma Client Python.
+
+✔ Generated Prisma Client Python (v0.11.0) to ./.venv/lib/python3.12/site-packages/prisma in 287ms
+
+cd ui/litellm-dashboard && ../../scripts/with_dashboard_node.sh npm install --no-audit --no-fund
+
+changed 1 package in 550ms
+bootstrap: .env left untouched
+bootstrap: done
+./scripts/pre_commit_lint.sh
+check: logging full output to /Users/mateo/Development/litellm/.git/worktrees/wt40516/pre_commit_lint.log
+check: nothing staged; scoping to the working tree's diff against the merge base with origin/litellm_internal_staging:
+ .git-check.out
+ litellm/cost_calculator.py
+ litellm/ocr/main.py
+ tests/test_litellm/ocr/test_main.py
+ tests/test_litellm/test_cost_calculator.py
+check: linting Python (make lint)
+uv sync --inexact --frozen --group proxy-dev --group e2e-dev
+Audited 205 packages in 51ms
+uv run --no-sync python scripts/prisma_generate_if_needed.py
+Prisma client already generated for litellm/proxy/schema.prisma (prisma 0.11.0); skipping prisma generate
+cd litellm && uv run --no-sync ruff check . && cd ..
+uv run --no-sync python scripts/ruff_strict_gate.py --base "origin/litellm_internal_staging"
+uv run --no-sync python scripts/type_discipline_gate.py --base "origin/litellm_internal_staging"
+uv run --no-sync python scripts/test_quality_gate.py --base "origin/litellm_internal_staging"
+uv run --no-sync python scripts/type_check_gate.py --base "origin/litellm_internal_staging"
+uv run --no-sync basedpyright tests/e2e
+cd litellm && uv run --no-sync python ../tests/documentation_tests/test_circular_imports.py && cd ..
+No LiteLLM type hints found.
+provisioning .venv-typecheck (first run installs packages and generates the Prisma client; re-runs are near-instant no-ops)
+2 files already formatted
+All checks passed!
+uv run --no-sync ruff check --config ruff-tests.toml tests
+warning: Invalid `# noqa` directive on tests/test_litellm/proxy/common_utils/test_user_api_key_cache.py:44: expected a comma-separated list of codes (e.g., `# noqa: F401, F841`).
+All checks passed!
+[from litellm import *] OK! no issues!
+OK: every strict rule is within its codebase ceiling (base origin/litellm_internal_staging)
+0 errors, 0 warnings, 0 notes
+OK: every TQ rule is within its test-suite ceiling (base origin/litellm_internal_staging)
+OK: every LIT rule is within its codebase ceiling (base origin/litellm_internal_staging)
+base counts fetched from CI artifact basedpyright-counts-64ab15e608f7cb59
+OK: every rule is within its basedpyright limit or no higher than base (138494 errors total)
+check: ruff format --check (scoped litellm files)
+2 files already formatted
+check: summary
+ ran: Python lint (make lint)
+ skipped: tests/e2e checks (basedpyright + raw HTTP client ban) (no tests/e2e Python files in scope)
+ ran: test-tree lint (ruff-tests.toml + test-quality budget)
+ skipped: dashboard lint (prettier + eslint + lint budgets) (no dashboard files in scope)
+ skipped: dashboard API-type sync (npm run gen:api) (no litellm/proxy, litellm/types, or generator files in scope)
+check: PASS
+check: full log: /Users/mateo/Development/litellm/.git/worktrees/wt40516/pre_commit_lint.log
diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py
index 93d9609df9e..22bdb016dc1 100644
--- a/litellm/cost_calculator.py
+++ b/litellm/cost_calculator.py
@@ -354,7 +354,6 @@ def cost_per_token(
response: Any | None = None,
### REQUEST MODEL ###
request_model: str | None = None, # original request model for router detection
- ### DEPLOYMENT-SPECIFIC PRICING ###
custom_model_info: OCRPricing | None = None,
) -> tuple[float, float]:
"""