litellm/tests/test_litellm/proxy/_experimental/mcp_server
Krish Dholakia 12c4876891
Agents - assign tools (#22064)
* feat(proxy): add max_iterations limiter for agent session loops (#22058)

Adds a new proxy hook that enforces a per-session cap on the number of
LLM calls an agentic loop can make. Callers send a session_id with each
request, and the hook counts calls per session, returning 429 when the
configured max_iterations limit is exceeded.

- Uses Redis Lua script for atomic increment (multi-instance safe)
- Falls back to in-memory cache when Redis unavailable
- Follows parallel_request_limiter_v3 pattern
- Configurable via key metadata: {"max_iterations": 25}
- Session counters auto-expire via TTL (default 1hr)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add new code execution dataset

* feat(agent_endpoints/): allow giving agents keys

* fix: ui fixes

* feat: allow assigning mcp servers to agents

* fix: eliminate duplicate DB queries in MCP agent auth and N+1 in agent listing (#22110)

- Extract _get_agent_object_permission helper so _get_allowed_mcp_servers_for_agent
  and _get_agent_tool_permissions_for_server share a single DB fetch instead of
  each independently querying the same agent row (was 1+N queries per MCP request)
- Use include={"object_permission": True} on find_many in get_all_agents_from_db
  to eagerly load permissions in one query instead of N+1
- Use include={"object_permission": True} on create/update/find_unique in all
  agent CRUD operations, removing attach_object_permission_to_dict follow-up calls

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:44:30 -08:00
..
auth Agents - assign tools (#22064) 2026-02-25 11:44:30 -08:00
guardrail_translation fix(tests): Add missing mocks for MCP IP filtering and updated APIs (#20652) 2026-02-07 11:30:49 -08:00
test_discoverable_endpoints.py fix: Missing OAuth session state. Please retry 2026-02-24 14:22:38 +05:30
test_jwt_mcp_enforcement.py fix(tests): update MCP tests broken by user permissions commit (#21462) 2026-02-19 02:09:11 -03:00
test_jwt_mcp_simple.py [Bug] Ensure MCP permissions are enforced when using JWT Auth (#20383) 2026-02-03 19:13:13 -08:00
test_mcp_cost_calculator.py
test_mcp_custom_fields.py feat: add UI support for configuring meta URLs 2026-01-02 15:07:37 +09:00
test_mcp_debug.py fix(tests): resolve MCP test isolation failures in parallel execution 2026-02-18 14:08:48 -03:00
test_mcp_discovery.py feat: MCP server discovery UI (#21079) 2026-02-12 17:59:21 -08:00
test_mcp_metadata_preservation.py Feat/mcp preserve tool metadata calltoolresult (#17561) 2025-12-05 16:15:22 -08:00
test_mcp_server_manager.py Fix: skip health check for MCP integration with passthrough token authentication 2026-02-24 12:05:37 +05:30
test_mcp_server.py fix(tests): update MCP tests broken by user permissions commit (#21462) 2026-02-19 02:09:11 -03:00
test_mcp_stale_session.py Return 200 response for stale dlete requests from client 2026-02-12 19:21:14 +05:30
test_oauth2_token_cache.py [Feat] MCP Oauth2 Fixes - Add support for MCP M2M Oauth2 support (#20788) 2026-02-09 17:35:11 -08:00
test_openapi_to_mcp_generator.py Add test for base url extraction and migration 2026-02-20 13:47:44 +05:30
test_rest_endpoints.py MCP fixes 2026-02-11 18:07:24 -08:00
test_semantic_tool_filter.py Fix litellm/tests/test_litellm/proxy/_experimental/mcp_server/test_semantic_tool_filter.py tests 2026-02-03 15:01:10 +05:30
test_ui_session_utils.py fix: mcp deepcopy error 2025-12-16 07:02:07 +09:00