Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test: update stale MCP call_tool and usage card assertions, add timeout headroom to request-log index boot test (#45523)

devin-ai-integration[bot]5c6ea040b0c2
diff --git a/tests/e2e/ui/tests/usage/usageActivityTabs.spec.ts b/tests/e2e/ui/tests/usage/usageActivityTabs.spec.ts
index 2ee5ae3e392..522025e22f3 100644
--- a/tests/e2e/ui/tests/usage/usageActivityTabs.spec.ts
+++ b/tests/e2e/ui/tests/usage/usageActivityTabs.spec.ts
@@ -20,9 +20,13 @@ import {
* traffic, so each assertion is scoped to a key this test minted and to the requests it sent.
*/
+const escapeRegExp = (value: string): string => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+
/** Each breakdown renders one expandable card per entity, named "<entity> $x.xx N requests". */
const entityCard = (page: PlaywrightPage, tab: string, name: string): Locator =>
- page.getByRole("tabpanel", { name: tab }).getByRole("button", { name: new RegExp(`^${name}\\s`) });
+ page
+ .getByRole("tabpanel", { name: tab })
+ .getByRole("button", { name: new RegExp(`(?:^|\\s)${escapeRegExp(name)}\\s`) });
async function openUsageTab(page: PlaywrightPage, tab: string): Promise<Locator> {
await navigateToPage(page, Page.NewUsage);
diff --git a/tests/integration/database/test_request_log_indexes_at_boot.py b/tests/integration/database/test_request_log_indexes_at_boot.py
index fe35ec2f1f9..e72477de901 100644
--- a/tests/integration/database/test_request_log_indexes_at_boot.py
+++ b/tests/integration/database/test_request_log_indexes_at_boot.py
@@ -17,6 +17,8 @@ from integration._support.process import LEGACY_MIGRATE_DEPLOY, MIGRATE_DEPLOY,
from psycopg import sql
from psycopg.rows import class_row
+pytestmark: Final = pytest.mark.timeout(240)
+
REPO_ROOT: Final = Path(__file__).resolve().parents[3]
PRISMA_DIR: Final = REPO_ROOT / "litellm-proxy-extras" / "litellm_proxy_extras"
PARTITION_SCRIPT: Final = REPO_ROOT / "db_scripts" / "partition_spend_logs.sql"
diff --git a/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py b/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py
index 1a592aa1c9a..a270ea16a39 100644
--- a/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py
+++ b/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py
@@ -314,7 +314,12 @@ class TestMCPClientUnitTests:
assert result == mock_result
mock_session_instance.initialize.assert_called_once()
mock_session_instance.call_tool.assert_called_once_with(
- name="test_tool", arguments={"arg1": "value1"}, progress_callback=ANY, allow_input_required=False
+ name="test_tool",
+ arguments={"arg1": "value1"},
+ input_responses=None,
+ request_state=None,
+ progress_callback=ANY,
+ allow_input_required=True,
)