Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,10 @@ update_model_cost_map.py
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py
litellm/proxy/_experimental/out/guardrails/index.html
scripts/test_vertex_ai_search.py
.claude
*claude-flow
.hive-mind
.swarm
/memory
.mcp.json
prompt*.md
8 changes: 7 additions & 1 deletion litellm/llms/bedrock/chat/agentcore/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ def sign_request(
fake_stream: Optional[bool] = None,
) -> Tuple[dict, Optional[bytes]]:
# Check if api_key (bearer token) is provided for Cognito authentication
jwt_token = optional_params.get("api_key")
# Priority: api_key parameter first, then optional_params
print(f"[DEBUG sign_request] api_key parameter: {api_key[:50] if api_key else 'NONE'}...")
print(f"[DEBUG sign_request] optional_params.get('api_key'): {optional_params.get('api_key', 'NONE')[:50] if optional_params.get('api_key') else 'NONE'}...")

jwt_token = api_key or optional_params.get("api_key")
if jwt_token:
print(f"[DEBUG sign_request] βœ… USING JWT BEARER TOKEN (NOT AWS SigV4)")
verbose_logger.debug(
f"AgentCore: Using Bearer token authentication (Cognito/JWT) - token: {jwt_token[:50]}..."
)
Expand All @@ -127,6 +132,7 @@ def sign_request(
return headers, json.dumps(request_data).encode()

# Otherwise, use AWS SigV4 authentication
print("[DEBUG sign_request] ❌ NO JWT TOKEN - Falling back to AWS SigV4")
verbose_logger.debug("AgentCore: Using AWS SigV4 authentication (IAM)")
return self._sign_request(
service_name="bedrock-agentcore",
Expand Down
145 changes: 68 additions & 77 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ description = "Library to easily interface with LLM API providers"
authors = ["BerriAI"]
license = "MIT"
readme = "README.md"
packages = [
{ include = "litellm" },
{ include = "litellm/py.typed"},
]
packages = [{ include = "litellm" }, { include = "litellm/py.typed" }]

[tool.poetry.urls]
homepage = "https://litellm.ai"
Expand All @@ -32,83 +29,81 @@ jinja2 = "^3.1.2"
aiohttp = ">=3.10"
pydantic = "^2.5.0"
jsonschema = "^4.22.0"
numpydoc = {version = "*", optional = true} # used in utils.py

uvicorn = {version = "^0.29.0", optional = true}
uvloop = {version = "^0.21.0", optional = true, markers="sys_platform != 'win32'"}
gunicorn = {version = "^23.0.0", optional = true}
fastapi = {version = ">=0.120.1", optional = true}
backoff = {version = "*", optional = true}
pyyaml = {version = "^6.0.1", optional = true}
rq = {version = "*", optional = true}
orjson = {version = "^3.9.7", optional = true}
apscheduler = {version = "^3.10.4", optional = true}
numpydoc = { version = "*", optional = true } # used in utils.py

uvicorn = { version = "^0.29.0", optional = true }
uvloop = { version = "^0.21.0", optional = true, markers = "sys_platform != 'win32'" }
gunicorn = { version = "^23.0.0", optional = true }
fastapi = { version = ">=0.120.1", optional = true }
backoff = { version = "*", optional = true }
pyyaml = { version = "^6.0.1", optional = true }
rq = { version = "*", optional = true }
orjson = { version = "^3.9.7", optional = true }
apscheduler = { version = "^3.10.4", optional = true }
fastapi-sso = { version = "^0.16.0", optional = true }
PyJWT = { version = "^2.8.0", optional = true }
python-multipart = { version = "^0.0.18", optional = true}
cryptography = {version = "*", optional = true}
prisma = {version = "0.11.0", optional = true}
azure-identity = {version = "^1.15.0", optional = true}
azure-keyvault-secrets = {version = "^4.8.0", optional = true}
azure-storage-blob = {version="^12.25.1", optional=true}
google-cloud-kms = {version = "^2.21.3", optional = true}
google-cloud-iam = {version = "^2.19.1", optional = true}
resend = {version = ">=0.8.0", optional = true}
pynacl = {version = "^1.5.0", optional = true}
websockets = {version = "^13.1.0", optional = true}
boto3 = {version = "1.36.0", optional = true}
redisvl = {version = "^0.4.1", optional = true, markers = "python_version >= '3.9' and python_version < '3.14'"}
mcp = {version = "^1.10.0", optional = true, python = ">=3.10"}
litellm-proxy-extras = {version = "0.4.5", optional = true}
rich = {version = "13.7.1", optional = true}
litellm-enterprise = {version = "0.1.21", optional = true}
diskcache = {version = "^5.6.1", optional = true}
polars = {version = "^1.31.0", optional = true, python = ">=3.10"}
semantic-router = {version = ">=0.1.12", optional = true, python = ">=3.9,<3.14"}
mlflow = {version = ">3.1.4", optional = true, python = ">=3.10"}
soundfile = {version = "^0.12.1", optional = true}
python-multipart = { version = "^0.0.18", optional = true }
cryptography = { version = "*", optional = true }
prisma = { version = "0.11.0", optional = true }
azure-identity = { version = "^1.15.0", optional = true }
azure-keyvault-secrets = { version = "^4.8.0", optional = true }
azure-storage-blob = { version = "^12.25.1", optional = true }
google-cloud-kms = { version = "^2.21.3", optional = true }
google-cloud-iam = { version = "^2.19.1", optional = true }
resend = { version = ">=0.8.0", optional = true }
pynacl = { version = "^1.5.0", optional = true }
websockets = { version = "^13.1.0", optional = true }
boto3 = { version = "1.40.76", optional = true }
redisvl = { version = "^0.4.1", optional = true, markers = "python_version >= '3.9' and python_version < '3.14'" }
mcp = { version = "^1.10.0", optional = true, python = ">=3.10" }
litellm-proxy-extras = { version = "0.4.5", optional = true }
rich = { version = "13.7.1", optional = true }
litellm-enterprise = { version = "0.1.21", optional = true }
diskcache = { version = "^5.6.1", optional = true }
polars = { version = "^1.31.0", optional = true, python = ">=3.10" }
semantic-router = { version = ">=0.1.12", optional = true, python = ">=3.9,<3.14" }
mlflow = { version = ">3.1.4", optional = true, python = ">=3.10" }
soundfile = { version = "^0.12.1", optional = true }

[tool.poetry.extras]
proxy = [
"gunicorn",
"uvicorn",
"uvloop",
"fastapi",
"backoff",
"pyyaml",
"rq",
"orjson",
"apscheduler",
"fastapi-sso",
"PyJWT",
"python-multipart",
"cryptography",
"pynacl",
"websockets",
"boto3",
"azure-identity",
"azure-storage-blob",
"mcp",
"litellm-proxy-extras",
"litellm-enterprise",
"rich",
"polars",
"soundfile",
"gunicorn",
"uvicorn",
"uvloop",
"fastapi",
"backoff",
"pyyaml",
"rq",
"orjson",
"apscheduler",
"fastapi-sso",
"PyJWT",
"python-multipart",
"cryptography",
"pynacl",
"websockets",
"boto3",
"azure-identity",
"azure-storage-blob",
"mcp",
"litellm-proxy-extras",
"litellm-enterprise",
"rich",
"polars",
"soundfile",
]

extra_proxy = [
"prisma",
"azure-identity",
"azure-keyvault-secrets",
"google-cloud-kms",
"google-cloud-iam",
"resend",
"redisvl"
"prisma",
"azure-identity",
"azure-keyvault-secrets",
"google-cloud-kms",
"google-cloud-iam",
"resend",
"redisvl",
]

utils = [
"numpydoc",
]
utils = ["numpydoc"]

caching = ["diskcache"]

Expand Down Expand Up @@ -160,15 +155,11 @@ build-backend = "poetry.core.masonry.api"

[tool.commitizen]
version = "1.80.3"
version_files = [
"pyproject.toml:^version"
]
version_files = ["pyproject.toml:^version"]

[tool.mypy]
plugins = "pydantic.mypy"

[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = [
"asyncio: mark test as an asyncio test",
]
markers = ["asyncio: mark test as an asyncio test"]
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LITELLM PROXY DEPENDENCIES #
anyio==4.8.0 # openai + http req.
httpx==0.28.1
openai==1.99.5 # openai req.
openai==2.8.0 # openai req.
fastapi==0.120.1 # server dep
starlette==0.49.1 # starlette fastapi dep
backoff==2.2.1 # server dep
Expand All @@ -10,7 +10,7 @@ uvicorn==0.29.0 # server dep
gunicorn==23.0.0 # server dep
fastuuid==0.13.5 # for uuid4
uvloop==0.21.0 # uvicorn dep, gives us much better performance under load
boto3==1.36.0 # aws bedrock/sagemaker calls
boto3==1.40.53 # aws bedrock/sagemaker calls (has bedrock-agentcore-control, compatible with aioboto3)
redis==5.2.1 # redis caching
prisma==0.11.0 # for db
mangum==0.17.0 # for aws lambda functions
Expand Down Expand Up @@ -53,7 +53,7 @@ click==8.1.7 # for proxy cli
rich==13.7.1 # for litellm proxy cli
jinja2==3.1.6 # for prompt templates
aiohttp==3.12.14 # for network calls
aioboto3==13.4.0 # for async sagemaker calls
aioboto3==15.5.0 # for async sagemaker calls (updated to match boto3 1.40.73)
tenacity==8.5.0 # for retrying requests, when litellm.num_retries set
pydantic==2.10.2 # proxy + openai req.
jsonschema==4.22.0 # validating json schema
Expand Down
26 changes: 26 additions & 0 deletions taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"$schema" = "https://taplo.tamasfe.dev/schema/config.json"

[format]
# 4-space indentation to match your existing pyproject.toml
indent_string = " "

# Long enough to avoid wrapping Poetry dependency blocks
column_width = 120

# Keep keys exactly in the order you wrote them
reorder_keys = false

# Do NOT rewrite arrays (your style mixes inline + multiline arrays)
array_auto_expand = false
array_auto_collapse = false

# Keep existing style for inline tables (don’t collapse them)
compact_inline_tables = false
compact_arrays = false

# Ensure newline at EOF
trailing_newline = true

[format.keys]
# Do not align or normalize keys β€” keeps Homepage/homepage, Repository/repository as-is
align = false
Loading