* fix(proxy_server.py): fixes for handling team only models via `/v2/model/info`
ensures team only models show up on the correct team on `Models + Endpoints`
* test: update tests
* fix(router.py): use more descriptive error message
* fix(proxy/_types.py): note `/team/member_update` is a self-managed route
route has it's own logic for rbac - enables team admins to update member permissions
Fixes issue where team admins on UI could not update member permissions
* fix(token_counter.py): move log line to being '.debug' instead of '.error'
Fixes https://github.com/BerriAI/litellm/issues/12269
* (#11794) use upsert for managed object table rather than create to avoid UniqueViolationError
* (#11794) use upsert for managed object table rather than create to avoid UniqueViolationError
* fix(bedrock): auto-generate session name when only aws_role_name is provided
Fixes#12583 - AWS role assumption not working correctly when aws_role_name
is provided without aws_session_name.
Previously, if only aws_role_name was provided in the config without
aws_session_name, the code would fall back to using environment credentials
instead of assuming the specified role. This was problematic in EKS/IRSA
environments where users want to assume a different role.
The fix:
- When aws_role_name is provided without aws_session_name, we now
auto-generate a session name with format 'litellm-session-{timestamp}'
- This ensures role assumption happens as expected
- Added comprehensive test coverage for this scenario
* style: format test file with black
---------
Co-authored-by: openhands <openhands@all-hands.dev>
The hardcoded hyphen (-) used as a tool name separator is now configurable via the MCP_TOOL_PREFIX_SEPARATOR environment variable.
- Replaced all hardcoded '-' instances with the MCP_TOOL_PREFIX_SEPARATOR constant.
- Updated error messages and docstrings to dynamically reference the new constant.
Tested and working fine.
Hope that helps!
* added the mcp_connect copy button to key_info_view
* user id copy button
* copy button on session view
* model id copy
* more copy buttons
* icon size
* fix(anthropic): fix streaming + response_format + tools bug
- Fix _handle_json_mode_chunk to only convert response_format tools to content
- Regular user tools now remain as proper tool_calls in streaming mode
- Add comprehensive test for the fix
- Resolves issue where all tools were incorrectly converted to content chunks
Before: All tools converted to content with different indices
After: Only response_format tool converted, regular tools remain as tool_calls
* fix(anthropic): improve streaming + response_format + tools handling
* fix: lint error (too many statements)
* fix(anthropic): correct finish_reason for streaming response_format tools
- Add ttl parameter to cache_control for Gemini models
- Support Google's TTL format (e.g., '3600s', '7200s')
- Implement robust TTL extraction and validation
- Extract TTL before system message transformation to handle all cases
- Add comprehensive test suite with 17 test cases in tests/test_litellm/
- Update documentation with TTL usage examples
- Maintain backward compatibility with existing cache_control usage
Fixes#9810
- Add support for envVars (simple key-value pairs) in migrations job
- Add support for extraEnvVars (complex environment variable configurations)
- Include comprehensive test coverage for both envVars and extraEnvVars
- Ensure backward compatibility with existing configurations
- Tests verify proper rendering of environment variables in container spec
* refactor(prisma_migration.py): refactor to support use_prisma_migrate for helm hook
* fix(prisma_migration.py): don't use subprocess
* fix(prisma_migration.py): fix cli commands
* fix(prisma_migration.py): still run prisma generate
* feat(route_checks.py): allow admin to disable proxy management endpoints on instance
useful for preventing multiple instances from doing admin actions
* docs(scaling_multiple_instances.md): add architecture doc on scaling multiple litellm instances
provide guidance on scaling proxy
* docs(scaling_multiple_instances.md): add doc on scaling across multiple regions for litellm
* fix(route_checks.py): allow disabling llm api endpoints on an instance
allows pure admin instance to exist
* refactor(enterprise/route_checks.py): refactor env var checks
* refactor: finish refactoring
* docs(control_plane_and_data_plane.md): refactor docs
* test: update tests
Added cache_read_input_token_cost (25% of regular input cost) to all 39 Gemini 2.x models
to properly support implicit context caching cost calculations. Previously, cached tokens
were being charged at full price instead of the discounted rate.
Fixes#11156
* [Feat] New LLM API Integration - Add Moonshot API (Kimi) (#12551)
* Add Moonshot AI provider support to LiteLLM
Co-authored-by: ishaan <ishaan@berri.ai>
* Refactor Moonshot provider params handling and transformation logic
Co-authored-by: ishaan <ishaan@berri.ai>
* fix constants
* add Moonshot AI
* fix get_supported_openai_params
* handle kimi temp
* add tool choice handling
* test moonshot unit tests
* fix kimi
* fix linting
* Add pricing information for Moonshot AI's kimi-k2 model (#12566)
* Add pricing information for Moonshot AI's kimi-k2 model
* Update model name to kimi-k2-0711-preview
- Changed model name from moonshot/kimi-k2 to moonshot/kimi-k2-0711-preview
- This reflects the specific model version as requested
* Update moonshot_models list to match model_context JSON
---------
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
* update docs
* docs moonshot
* fixes model cost map
* fix map_openai_params
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
* Get the basics of the integration working.
* Cleanup bytez integration.
* Update user agent for Bytez integration.
* Use the config class directly. Create the start of the docs.
* Finish up bytez documentation. Include a provider integration guide.
* Fix typing bug in custom_logger_utils. Add tests for bytez integration.
* Add token tracking for model usage for Bytez integration.
* Create a units test for the Bytez config.
* Make changes to Bytez transformation code per PR feedback.
* Cleanup coment in Bytez transformation test.
* Remove LRU usage for bytez integration.
* Consolidate Bytez tests into a single file. Conform to project structure for tests.
* Fix linting error with Bytez impl.
* Add Bytez to the list of providers in the docs.
* just use 1 param for mcp groups
* fix just use 1 param for access groups
* test_get_tools_from_mcp_servers
* docs access groups
* group MCPs
* test fix
* fix screenshots on docs
* TestMCPAccessGroupsE2E
* update img
* fix MCP connect
* fix chat ui
* fixes for types
* ui - fix back button on MCP
* mcp - show existing groups when creating new mcps
* fix design
* fix color scheme
* fix linting
* fixes for mapped tests
- Use getattr() with default value when accessing mcp_server.env
- Prevents AttributeError when Prisma doesn't include the field
- Fixes startup error: 'LiteLLM_MCPServerTable' object has no attribute 'env'
The issue occurs when Prisma fetches records and doesn't include
null/undefined fields in the returned object.