Commit Graph

23789 Commits

Author SHA1 Message Date
Krrish Dholakia bfecab2cc5 docs(index.md): cleanup tag 2025-08-04 14:18:04 -07:00
Ishaan Jaff f3749709b8 Bug Fix - Responses API raises error with Gemini Tool Calls in input (#13260)
* add _transform_responses_api_function_call_to_chat_completion_message

* test_responses_api_with_tool_calls

* TestFunctionCallTransformation

* fixes for responses API testing google ai studio

* TestGoogleAIStudioResponsesAPITest

* test_responses_api_with_tool_calls

* test_responses_api_with_tool_calls

* test_basic_openai_responses_streaming_delete_endpoint
2025-08-04 12:01:33 -07:00
Ishaan Jaff dae72003a7 [Bug Fix] OpenAI / Azure Responses API - Add service_tier , safety_identifier supported params (#13258)
* test_aresponses_service_tier_and_safety_identifier

* add service_tier + safety_identifier

* fix get_supported_openai_params

* add safety_identifier + service_tier for responses()
2025-08-04 10:51:53 -07:00
Jugal D. Bhatt b318f55faa [UI] Add team deletion check for teams with keys (#12953)
* added check option

* Add underline

* make less verbosE
2025-08-04 08:42:06 -07:00
Jugal D. Bhatt 36229dc69f [LLM Translation] Fix Model Usage not having text tokens (#13234)
* fix + test

* remove test comments

* fix mypy

* fix mypy

* fix tests
2025-08-04 21:06:49 +05:30
Krrish Dholakia 98102e2804 docs(index.md): cleanup 2025-08-02 23:06:46 -07:00
Krrish Dholakia 2ee8513763 fix(key_management_endpoints.py): fix check 2025-08-02 23:03:57 -07:00
Krrish Dholakia 271fce9f39 build: update poetry 2025-08-02 23:01:46 -07:00
Jugal D. Bhatt 9aeca96c16 fix openshift (#13239) 2025-08-02 22:37:02 -07:00
Krish Dholakia 3119064e94 Prompt Management - add prompts on UI (#13240)
* fix(create_key_button.tsx): add prompts on UI

* feat(key_management_endpoints.py): support adding prompt to key via `/key/update`

* fix(key_info_view.tsx): show existing prompts on key in key_info_view.tsx

* fix(key_edit_view.tsx): UX - disable premium feature for non-premium users

prevent accidental clicking

* fix(create_key_button.tsx): disable premium features behind flag, prevent errors

* feat(prompts.tsx): add new ui component to view created prompts

enables viewing prompts created on config

* feat(prompt_info.tsx): add component for viewing the prompt information

* feat(prompt_endpoints.py): support converting dotprompt to json structure + accept json structure in promptmanager

allows prompt manager to work with api endpoints

* test(test_prompt_manager.py): add unit tests for json data input

* feat(dotprompt/__init__.py): add prompt data to dotpromptmanager

* fix(prompt_endpoints.py): working crud endpoints for prompt management

* feat(prompts/): support `prompt_file` for dotprompt

allows to precisely point to the prompt file a prompt should use

* feat(proxy/utils.py): resolve prompt id correctly

resolves user sent prompt id with internal prompt id

* feat(schema.prisma): initial pr with db schema for prompt management table

allows post endpoints to work with backend

* feat(prompt_endpoints.py): use db in patch_prompt endpoint

* feat(prompt_endpoints.py): use db for update_prompt endpoint

* feat(prompt_endpoints.py): use db on prompt delete endpoint

* build(schema.prisma): add prompt tale to schema.prisma in litellm-proxy-extras

* build(migration.sql): add new sql migration file

* fix(init_prompts.py): fix init

* feat(prompt_info_view.tsx): show the raw prompt template on ui

allows developer to know the prompt template they'll be calling

* feat(add_prompt_form.tsx): working ui add prompt flow

allows user to add prompts to litellm via ui

* build(ui/): styling fixes

* build(ui/): prompts.tsx

styling improvements

* fix(add_prompt_form.tsx): styling improvements

* build(prompts.tsx): styling improvements

* build(ui/): styling improvements

* build(ui/): fix ui error

* fix: fix ruff check

* docs: document new api params

* test: update tests
2025-08-02 22:33:37 -07:00
Krish Dholakia e47b30a76d Prompt Management - Add table + prompt info page to UI (#13232)
* fix(create_key_button.tsx): add prompts on UI

* feat(key_management_endpoints.py): support adding prompt to key via `/key/update`

* fix(key_info_view.tsx): show existing prompts on key in key_info_view.tsx

* fix(key_edit_view.tsx): UX - disable premium feature for non-premium users

prevent accidental clicking

* fix(create_key_button.tsx): disable premium features behind flag, prevent errors

* feat(prompts.tsx): add new ui component to view created prompts

enables viewing prompts created on config

* feat(prompt_info.tsx): add component for viewing the prompt information
2025-08-02 19:34:18 -07:00
Krish Dholakia b79f55eec0 UI - Add giving keys prompt access (#13233)
* fix(create_key_button.tsx): add prompts on UI

* feat(key_management_endpoints.py): support adding prompt to key via `/key/update`

* fix(key_info_view.tsx): show existing prompts on key in key_info_view.tsx

* fix(key_edit_view.tsx): UX - disable premium feature for non-premium users

prevent accidental clicking

* fix(create_key_button.tsx): disable premium features behind flag, prevent errors

* fix(key_management_endpoints.py): fix key update logic \

* fix: fix check

* docs: document new params
2025-08-02 19:33:17 -07:00
Ishaan Jaff 4c217c66f5 docs User Agent Activity Tracking 2025-08-02 17:26:40 -07:00
Ishaan Jaff 2ee4e84406 docs fix 2025-08-02 16:47:44 -07:00
Ishaan Jaff 06856b4d37 docs fix 2025-08-02 15:47:09 -07:00
Ishaan Jaff 0f9f5f7a6c docs fix 2025-08-02 15:44:59 -07:00
Ishaan Jaff 69a360429c agent 4.png 2025-08-02 15:34:14 -07:00
Ishaan Jaff e32169dc37 docs cost tracking coding 2025-08-02 15:29:44 -07:00
Ishaan Jaff 340b64a46a docs - Track Usage for Coding Tools 2025-08-02 15:18:04 -07:00
Ishaan Jaff 9b029c35be docs RC 2025-08-02 15:06:12 -07:00
Ishaan Jaff 8d6b333909 docs computer use 2025-08-02 15:00:48 -07:00
Ishaan Jaff e306fb6eee [docs release notes] (#13237)
* docs release notes

* docs release notes

* docs rnotes

* docs api version

* fixes docs

* docs rn
2025-08-02 14:15:10 -07:00
Ishaan Jaff 5dfc88473f fixes MCP gateway docs 2025-08-02 13:30:51 -07:00
Ishaan Jaff 6929767be2 docs release notes 2025-08-02 12:56:00 -07:00
Ishaan Jaff ccbc81af8d ruff fix v1.74.15-nightly 1.74.15.rc.1 2025-08-02 12:43:01 -07:00
Ishaan Jaff c378e20573 bump: version 1.74.14 → 1.74.15 2025-08-02 12:38:00 -07:00
Ishaan Jaff c663befc27 ui new build 2025-08-02 12:37:45 -07:00
Ishaan Jaff 39cb56566f doc fix - missing "prompts" in /key endpoint swagger 2025-08-02 12:34:30 -07:00
Ishaan Jaff b279ba8a91 fixes - ui login with SSO 2025-08-02 12:28:46 -07:00
Ishaan Jaff 2dd9361cd9 Revert "Revert "Fix SSO Logout | Create Unified Login Page with SSO and Username/Password Options (#12703)""
This reverts commit 5fe37b6f72060add859a22ddda0665cd1635f98f.
2025-08-02 12:25:22 -07:00
Ishaan Jaff af9031ba41 Revert "Fix SSO Logout | Create Unified Login Page with SSO and Username/Password Options (#12703)"
This reverts commit a752d7acc9.
2025-08-02 12:25:22 -07:00
Ishaan Jaff b297dffba5 [UI QA Fixes] Stable release (#13231)
* qa - user agent view

* fixes for usage time selector
2025-08-02 12:22:23 -07:00
Ishaan Jaff cd9c388a3f truncateUserAgent 2025-08-02 11:54:54 -07:00
Krish Dholakia 363c30320f Prompt Management (2/2) - New /prompt/list endpoint + key-based access to prompt templates (#13218)
* feat: initial commit with prompt management support on pre-call hooks

allows prompt templates to work before assigning specific models

* feat: initial logic for independent prompt management settings

* feat(proxy_server.py): working logic for loading in the prompt templates from config yaml

allows creating an independent 'prompts' section in the config yaml

* feat(prompt_registry.py): working e2e custom prompt templates with guardrails and models

* refactor(prompts/): move folder inside proxy folder

easier management for prompt endpoints

* feat(prompt_endpoints.py): working `/prompt/list` endpoint

returns all available prompts on proxy

* feat(key_management_endpoints.py): support storing 'prompts' in key metadata

allows giving keys access to specific prompts

* feat(prompt_endpoints.py): enable key-based access to /prompts/list

ensures key can only see prompts it has access to

* fix(init_prompts.py): fix linting error

* fix: fix ruff check

* fix(proxy/_types.py): add 'prompts' to newteamrequest

* fix(litellm_logging.py): update logged message with scrubbed value
2025-08-02 10:36:38 -07:00
Krrish Dholakia 4cb42f81b6 fix(proxy_setting_endpoints.py): don't block startup if team doesn't exist in default team member budget 2025-08-02 10:34:37 -07:00
Krish Dholakia 342fd2d8b6 Revert "fix: role chaining and session name with webauthentication for aws be…" (#13230)
This reverts commit 0ac093b59e.
2025-08-02 10:11:58 -07:00
Ishaan Jaff 831eeaf3ab [QA Fixes for MCP] - Ensure MCPs load + don't run a health check everytime we load MCPs on UI (#13228)
* qa - mcps should load even if they don't have required fields

* fix loading MCPs
2025-08-02 09:48:05 -07:00
Krish Dholakia a107a4bdba Prompt Management - abstract prompt templates away from model list (enables permission management on prompt templates) (#13219)
* feat: initial commit with prompt management support on pre-call hooks

allows prompt templates to work before assigning specific models

* feat: initial logic for independent prompt management settings

* feat(proxy_server.py): working logic for loading in the prompt templates from config yaml

allows creating an independent 'prompts' section in the config yaml

* feat(prompt_registry.py): working e2e custom prompt templates with guardrails and models

* refactor(prompts/): move folder inside proxy folder

easier management for prompt endpoints

* fix: fix linting error

* fix: fix check
2025-08-02 09:39:45 -07:00
Alexander Yastrebov 825923e7be litellm/proxy: preserve model order of /v1/models and /model_group/info (#13178)
Closes #12644

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
2025-08-02 08:57:38 -07:00
Cole McIntosh c427531c9c Fix missing extra_headers support for vLLM/openai_like embeddings (#13198)
- Add extra_headers handling to hosted_vllm/openai_like embedding providers
- Matches existing pattern used in OpenAI embeddings section
- Fixes issue where custom headers were dropped for vLLM embedding requests

Fixes #13088
2025-08-02 08:56:06 -07:00
Richard Tweed 0ac093b59e fix: role chaining and session name with webauthentication for aws bedrock (#13205)
* fix(bedrock): prevent duplicate role assumption in EKS/IRSA environments

Fixes issue where AWS role assumption would fail in EKS/IRSA environments
when trying to assume the same role that's already being used.

The problem occurred when:
1. EKS/IRSA automatically assumes a role (e.g., LitellmRole)
2. LiteLLM tries to assume the same role again, causing AccessDenied errors
3. Different models with different roles would fail due to incorrect role context

Changes:
- Added check in _auth_with_aws_role() to detect if already using target role
- Skip role assumption if current identity matches target role
- Return current credentials instead of attempting duplicate assumption
- Added comprehensive test coverage for the fix

This ensures proper role chaining works in EKS/IRSA environments where:
- Service Account can assume Role A
- Role A can assume Role B for different models/accounts

Resolves the AccessDenied errors reported in bedrock usage scenarios.

* fix(bedrock): simplify role assumption for EKS/IRSA environments

Fixes AWS Bedrock role assumption in EKS/IRSA environments by properly
handling ambient credentials when no explicit credentials are provided.

The issue occurred because commit 197e7efa8f
introduced changes that broke role assumption in EKS/IRSA environments.

Changes:
- Simplified _auth_with_aws_role() to use ambient credentials when no
  explicit AWS credentials are provided (aws_access_key_id and
  aws_secret_access_key are both None)
- This allows web identity tokens in EKS/IRSA to work automatically
  through boto3's credential chain
- Maintains backward compatibility for explicit credential scenarios

Added comprehensive test coverage:
- test_eks_irsa_ambient_credentials_used: Verifies ambient credentials work
- test_explicit_credentials_used_when_provided: Ensures explicit creds still work
- test_partial_credentials_still_use_ambient: Edge case handling
- test_cross_account_role_assumption: Multi-account scenarios
- test_role_assumption_with_custom_session_name: Custom session names
- test_role_assumption_ttl_calculation: TTL calculation verification
- test_role_assumption_error_handling: Error propagation
- test_multiple_role_assumptions_in_sequence: Sequential role assumptions

This fix ensures that in EKS/IRSA environments:
1. Service accounts can assume their initial role via web identity
2. That role can then assume other roles across accounts as configured
3. Different models can use different roles without conflicts

* fix(bedrock): add automatic IRSA detection for EKS environments

- Detect AWS_WEB_IDENTITY_TOKEN_FILE and AWS_ROLE_ARN environment variables
- Automatically use web identity token flow when IRSA is detected
- Read web identity token from file and pass to existing auth method
- Add test coverage for IRSA environment detection
- Fixes authentication errors in EKS with IRSA when no explicit credentials provided

* fix(bedrock): skip role assumption when IRSA role matches requested role

- Detect when AWS_ROLE_ARN environment variable matches the requested role
- Skip unnecessary role assumption when already running as the target role
- Use existing env vars authentication method for IRSA credentials
- Add test coverage for same-role IRSA scenario
- Fixes 'not authorized to perform: sts:AssumeRole' errors when trying to assume the same role

* fix(bedrock): use boto3's native IRSA support for cross-account role assumption

- Replace custom web identity token handling with boto3's built-in IRSA support
- boto3 automatically reads AWS_WEB_IDENTITY_TOKEN_FILE and assumes initial role
- Then use standard assume_role for cross-account access
- Update test to mock boto3 STS client instead of internal methods
- Fixes 'OIDC token could not be retrieved from secret manager' error

* fix(bedrock): improve IRSA error handling and add debug logging

- Add debug logging to show current identity and role assumption attempts
- Provide clearer error messages for trust policy issues
- Fix region handling in IRSA flow
- Re-raise exceptions instead of silently falling through
- This helps diagnose cross-account role assumption permission issues

* fix(bedrock): manually assume IRSA role with correct session name for cross-account scenarios

- When doing cross-account role assumption, manually assume the IRSA role first with the desired session name
- This ensures the session name in the assumed role ARN matches what's expected in trust policies
- For same-account scenarios, continue using boto3's automatic IRSA support
- Updated tests to handle the new flow
- This fixes the issue where cross-account trust policies require specific session names

* fix: Fix linting issues in base_aws_llm.py

- Fix f-string without placeholders (F541)
- Refactor _auth_with_aws_role to reduce statements count (PLR0915)
  - Extract _handle_irsa_cross_account helper method
  - Extract _handle_irsa_same_account helper method
  - Extract _extract_credentials_and_ttl helper method

---------

Co-authored-by: openhands <openhands@all-hands.dev>
2025-08-02 08:55:35 -07:00
Sameer Kankute 1e33dc50a0 add Perplexity citation annotations support (#13225) 2025-08-02 08:47:35 -07:00
tanjiro eb173f9155 Add advanced date picker to all the tabs on the usage page (#13221)
* advancedatepicker for tag usage and team usage

* reduce white space in date picker

* selected time range option is visible

* dont wait for apply button to select relative time options
2025-08-02 07:54:49 -07:00
Ishaan Jaff 44900e781a testing fixes - vertex ai deprecated claude 3 sonnet models v1.74.14-nightly 2025-08-01 21:23:52 -07:00
Jugal D. Bhatt 900c7f45c0 [MCP Gateway] Litellm mcp pre and during guardrails (#13188)
* add guardrail support

* add guardrail support

* guardrails for MCP

* added changes

* add mcp guardrails

* added test

* add ui

* fix guardrail form

* working with cursor

* remvoe print

* fix mcp servertests

* fix mypy and remove console logs

* fix mypy and remove console logs

* fix mypy tests
2025-08-01 20:02:25 -07:00
Jugal D. Bhatt c125ae453b suppress httpx logging (#13217) 2025-08-01 20:02:08 -07:00
Jugal D. Bhatt a4c11600a9 [LLM] fix model reload on model update (#13216)
* fix model reload on model update

* remove the flag
2025-08-01 18:08:02 -07:00
Jugal D. Bhatt 3867813277 [Proxy]fix key mgmt (#13148)
* fix key mgmt

* Add unit test
2025-08-01 17:17:15 -07:00
Jugal D. Bhatt 7cf3b4682a [Separate Health App] Update Helm Deployment.yaml (#13162)
* add helm deployment fix

* clean deployment
2025-08-01 16:50:23 -07:00
Ishaan Jaff 9d6098e8cc fix vertex deprecated old model 2025-08-01 16:46:16 -07:00