litellm/.github
moe-berri b4b4f58a76 fix(auto_router): non-database callers, master-key logging, and worker budget bypass
Three fixes from this review round, plus a CI shard registration and a comment-density pass.

A caller admitted through JWT or a custom auth path has no DB-backed key hash
(UserAPIKeyAuth.api_key is None or some other non-sk- value), which crashed the capability
token mint instead of leaving the tool_use untouched. _mint_caller_capability_token now
returns None for that case, and _endpoints_for_request treats it the same as an unreachable
base URL.

A resolved master-key caller carried the real master key as its own api_key, which
_worker_text later placed in the outbound request's metadata["user_api_key"] -- reachable by
any raw-metadata logging callback. Now substitutes LITELLM_PROXY_MASTER_KEY_ALIAS there,
matching what normal master-key auth already does for exactly this reason.

The worker call went straight to llm_router.acompletion, skipping every registered rate-limit
and budget callback (they run as async_pre_call_hook, which only proxy_logging_obj.pre_call_hook
walks). A caller already over budget or rate-limited could keep spending through this endpoint
indefinitely. _worker_text now calls pre_call_hook first and lets a block propagate.

Registers tests/test_litellm/proxy/shunt_endpoints in test-unit.yml's proxy-endpoints shard;
CI's shard-coverage assertion failed without it since the directory held tests but named no
owning shard.

Trims several docstrings/module comments in the shunt modules down to the non-obvious "why"
they were justified by, cutting repetition and one stale field name a rename had left behind.
2026-09-07 16:44:15 -07:00
..
actions fix(ci): pin setup-uv to v10.0.1 (#39111) 2026-09-03 20:44:24 -07:00
codeql [Infra] Improve CodeQL scanning coverage and schedule 2026-03-27 12:04:09 -07:00
e2e-stack fix(e2e-changed): keep the gate off suites the stack cannot run 2026-09-05 21:03:50 -07:00
ISSUE_TEMPLATE chore: say real $ instead of $$$ in the feature request attempt rules 2026-08-11 10:40:57 -07:00
observatory Add observatory test workflow for RC/stable releases 2026-03-01 15:30:09 -03:00
screenshots fix(team_endpoints): auto-add SSO team members to org on move (proxy admin only) (#26377) 2026-04-24 08:36:25 -07:00
scripts test(build): keep wheel checks outside package 2026-09-02 12:16:25 -07:00
workflows fix(auto_router): non-database callers, master-key logging, and worker budget bypass 2026-09-07 16:44:15 -07:00
ci-coverage-allowlist.yml feat(proxy): per-worker admission control that rejects excess requests with 503 (#39352) 2026-09-03 18:19:04 -07:00
CODEOWNERS chore(codeowners): unown ui container plumbing entirely 2026-08-24 12:04:17 -07:00
dependabot.yaml chore: fixes 2026-04-05 01:30:57 -07:00
deploy-on-aws.png feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
deploy-on-gcp.png feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
deploy-to-aws.png Add files via upload 2023-10-25 16:33:53 -07:00
FUNDING.yml Update FUNDING.yml 2023-09-22 09:51:35 -07:00
mutmut-coverage.rc fix(ci): let the mutation workflow find covered lines so it generates mutants 2026-08-25 23:16:40 -07:00
pull_request_template.md docs(pr-template): group caveats under severity subheadings and promote Final Attestation 2026-08-25 12:52:54 -07:00
template.yaml (chore) cleanup 2024-02-09 09:28:13 -08:00