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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Handle search error state and cancel wasted API call on filter reset
Ryan Crabbefbddab6178e6
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 853ceb63c9d..59a234d09c8 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -9215,7 +9215,7 @@ def _add_team_models_to_all_models(for team_object in team_db_objects_typed:if (- len(team_object.models) == 0 # empty list = all model access+ not team_object.models # None or empty list = all model accessor SpecialModelNames.all_proxy_models.value in team_object.models):model_list = llm_router.get_model_list()diff --git a/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsx b/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsxindex a4dd05b46e7..9acff32d63c 100644--- a/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsx+++ b/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsx@@ -107,11 +107,21 @@ export function useLogFilterLogic({},});- if (currentTimestamp === lastSearchTimestamp.current && response.data) {- setBackendFilteredLogs(response);+ if (currentTimestamp === lastSearchTimestamp.current) {+ setBackendFilteredLogs({+ ...response,+ data: response.data ?? [],+ });}} catch (error) {console.error("Error searching users:", error);+ setBackendFilteredLogs({+ data: [],+ total: 0,+ page: 1,+ page_size: pageSize,+ total_pages: 0,+ });}},[accessToken, startTime, endTime, isCustomDate, pageSize, sortBy, sortOrder],@@ -267,6 +277,7 @@ export function useLogFilterLogic({// Only call debouncedSearch if filters have actually changedif (JSON.stringify(updatedFilters) !== JSON.stringify(prev)) {setCurrentPage(1);+ setBackendFilteredLogs(null);debouncedSearch(updatedFilters, 1);}@@ -281,8 +292,8 @@ export function useLogFilterLogic({// Clear backend filtered logs to ensure fresh rendersetBackendFilteredLogs(null);- // Reset selections- debouncedSearch(defaultFilters, 1);+ // Cancel any in-flight debounced search+ debouncedSearch.cancel();};return {