litellm/litellm
Yassin Kortam e309003c84 feat(auth_v2): back RBAC with Casbin
Replace the hand-rolled has_any_role set check with a Casbin-backed RbacEngine
(per design 03 §4). The engine wraps casbin.Enforcer over an embedded RBAC model
(request sub/obj/act, g role hierarchy, keyMatch2 on obj, regexMatch on act) and a
default in-code policy: platform_admin inherits org_admin/team_admin/platform_viewer,
org_admin inherits org_viewer, team_admin inherits team_member; grants platform_admin
/* .*, platform_admin /scim/v2/* .*, platform_viewer /* GET. Operators can replace the
whole policy with a CSV via AuthConfig.casbin_policy_path (FileAdapter); no DB adapter
yet.

require_roles now honors the hierarchy through the enforcer's grouping
(get_implicit_roles_for_user) instead of exact-match membership, so a platform_admin
passes a require_roles(ORG_ADMIN) gate; signature and 403 semantics are unchanged. New
require_permission(obj, act) dependency runs get_current_principal then RbacEngine.enforce
and 403s on deny. The engine is built in install_auth and injectable for tests via a new
rbac kwarg. Scope checks stay plain SecurityScopes (a token property, not policy).

Adds casbin to the proxy extra (pure python, no native deps).
2026-06-10 18:21:14 -07:00
..
a2a_protocol Fix : a2a bugs 030626 (#29566) 2026-06-03 11:14:15 -07:00
anthropic_interface feat(context_management): compact_20260112 polyfill for non-Anthropic providers (#28868) 2026-05-30 09:20:05 -07:00
assistants
auth_v2 feat(auth_v2): back RBAC with Casbin 2026-06-10 18:21:14 -07:00
batch_completion
batches fix(vertex-ai): fix zero cost/usage on completed Vertex AI batch jobs (#27912) 2026-05-15 04:47:02 -07:00
caching fix(caching): restore stored prompt_tokens on embedding cache hits instead of recomputing (#30046) 2026-06-10 15:49:20 +05:30
completion_extras fix(responses-bridge): map system-only chat request to system input item (#29817) 2026-06-06 16:11:54 -07:00
compression build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
containers style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
endpoints/speech/speech_to_completion_bridge
evals style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
experimental_mcp_client feat(mcp): per-server env vars with global + per-user scopes (#28917) 2026-06-05 20:15:11 -07:00
files build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
fine_tuning address greptile review feedback (greploop iteration 1) 2026-03-27 20:04:41 +05:30
google_genai build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
images Feat(dashscope): add image generation support for qwen-image-2.0 and qwen-image-2.0-pro (#25672) 2026-04-22 20:03:46 -07:00
integrations fix(callbacks): forward callback_settings to callback initializers and guard consumers against non-dict values (#30161) 2026-06-10 15:22:00 -07:00
interactions build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
litellm_core_utils feat(cli): per-agent lite claude / codex / opencode commands that wrap coding agents through the proxy (#29850) 2026-06-10 13:52:26 -07:00
llms [internal copy of #28007] Fix/gcp model garden streaming (#28363) 2026-06-10 12:31:00 -07:00
models feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
ocr chore: reject bare str at file-input sinks to prevent local-file read (#27762) 2026-05-12 16:40:07 -07:00
passthrough fix(proxy): Bedrock Knowledge Base pass-through: preserve SigV4 headers and signed request body (#27526) 2026-05-25 19:21:55 +05:30
proxy feat(proxy): add option to disable server-side prepared statements for DB lookups (#29984) 2026-06-10 16:06:32 -07:00
proxy_auth
rag style: black formatting 2026-04-25 14:47:54 -07:00
realtime_api Litellm oss staging (#29492) 2026-06-02 08:48:10 -07:00
repositories feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
rerank_api Fix review 2026-04-30 09:10:24 +05:30
responses Litellm oss staging 080626 (#29932) 2026-06-08 13:49:52 -07:00
router_strategy feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
router_utils Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
search Litellm oss staging 050626 (#29774) 2026-06-05 13:51:51 -07:00
secret_managers build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
skills chore(proxy): scope skills and container resources 2026-04-30 18:23:58 -07:00
types Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
vector_store_files build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
vector_stores feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
videos style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
__init__.py feat: standardize rate limit errors with category, rate_limit_type, model, and llm_provider fields (#27687) 2026-06-06 17:50:29 -07:00
_internal_context.py fix(proxy): harden request parameter handling 2026-04-16 01:38:12 +00:00
_lazy_imports.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
_lazy_imports_registry.py Litellm oss staging 050626 (#29774) 2026-06-05 13:51:51 -07:00
_logging.py fix(bedrock-mantle): use /anthropic/v1/messages path for Mantle endpo… (#27976) 2026-05-15 13:31:59 -07:00
_redis.py Litellm oss staging (#28161) 2026-05-18 16:27:44 -07:00
_redis_credential_provider.py feat: add ability to auth to azure with token (#27556) 2026-05-09 22:34:09 +00:00
_service_logger.py fix: missing span for guardrail passthrough (#29552) 2026-06-03 01:25:15 +00:00
_uuid.py build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
_version.py
anthropic_beta_headers_config.json Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
anthropic_beta_headers_manager.py Refactor: Filtering beta header after transformation 2026-03-16 10:47:15 +05:30
blog_posts.json docs(blog): add WebRTC blog post link 2026-03-13 17:54:33 +05:30
budget_manager.py docs(budget_manager): add docstring to BudgetManager.reset_cost (#27867) 2026-05-13 13:28:22 -07:00
constants.py Add Claude Fable 5 across Anthropic, Bedrock, Vertex AI, and Azure AI (#30064) 2026-06-10 08:50:15 +05:30
cost.json
cost_calculator.py [internal copy of #27491] fix(realtime): Fix Realtime Audio Token Cost Tracking (#29722) 2026-06-05 18:53:17 +05:30
exceptions.py feat: standardize rate limit errors with category, rate_limit_type, model, and llm_provider fields (#27687) 2026-06-06 17:50:29 -07:00
main.py Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
model_prices_and_context_window_backup.json Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
mypy.ini build(auth_v2): add Authlib and scim2-models for the auth_v2 module 2026-06-10 17:22:20 -07:00
policy_templates_backup.json feat(add-new-block_code_execution-guardrail): prevent agent from executing code (#22154) 2026-02-25 22:02:14 -08:00
provider_endpoints_support_backup.json Litellm oss staging 050626 (#29774) 2026-06-05 13:51:51 -07:00
py.typed
router.py fix(register_model): preserve built-in cache pricing when registering custom overrides under unmapped keys (#30044) 2026-06-10 12:11:03 -07:00
scheduler.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
setup_wizard.py Add Claude Fable 5 across Anthropic, Bedrock, Vertex AI, and Azure AI (#30064) 2026-06-10 08:50:15 +05:30
timeout.py docs: add class docstring to _LoopWrapper (#27870) 2026-05-13 13:54:00 -07:00
utils.py fix(register_model): preserve built-in cache pricing when registering custom overrides under unmapped keys (#30044) 2026-06-10 12:11:03 -07:00