From 3999e65a979a4f247eed8300a71594457cfe18eb Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 09:24:35 -0700 Subject: [PATCH 01/32] docs update --- docs/my-website/release_notes/v1.74.15-stable/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/my-website/release_notes/v1.74.15-stable/index.md b/docs/my-website/release_notes/v1.74.15-stable/index.md index 4fbb76bdbc..dd748f18ff 100644 --- a/docs/my-website/release_notes/v1.74.15-stable/index.md +++ b/docs/my-website/release_notes/v1.74.15-stable/index.md @@ -1,5 +1,5 @@ --- -title: "[Pre-Release] v1.74.15-stable" +title: "v1.74.15-stable" slug: "v1-74-15" date: 2025-08-02T10:00:00 authors: @@ -28,14 +28,14 @@ import TabItem from '@theme/TabItem'; docker run \ -e STORE_MODEL_IN_DB=True \ -p 4000:4000 \ -ghcr.io/berriai/litellm:1.74.15.rc.1 +ghcr.io/berriai/litellm:v1.74.15-stable ``` ``` showLineNumbers title="pip install litellm" -pip install litellm==1.74.15.post1 +pip install litellm==1.74.15.post2 ``` From 94c33200a447973f63213cf81cd0c5889190652c Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 09:39:16 -0700 Subject: [PATCH 02/32] docs - native prompt mgmt (#13463) --- .../docs/proxy/native_litellm_prompt.md | 158 ++++++++++++++++++ .../docs/proxy/prompt_management.md | 1 + docs/my-website/sidebars.js | 1 + 3 files changed, 160 insertions(+) create mode 100644 docs/my-website/docs/proxy/native_litellm_prompt.md diff --git a/docs/my-website/docs/proxy/native_litellm_prompt.md b/docs/my-website/docs/proxy/native_litellm_prompt.md new file mode 100644 index 0000000000..0dbdf438d5 --- /dev/null +++ b/docs/my-website/docs/proxy/native_litellm_prompt.md @@ -0,0 +1,158 @@ +# LiteLLM Prompt Management (GitOps) + +Store prompts as `.prompt` files in your repository and use them directly with LiteLLM. No external services required. + +### Quick Start + + + + + +**1. Create a .prompt file** + +Create `prompts/hello.prompt`: + +```yaml +--- +model: gpt-4 +temperature: 0.7 +--- +System: You are a helpful assistant. + +User: {{user_message}} +``` + +**2. Use with LiteLLM** + +```python +import litellm + +# Set the global prompt directory +litellm.global_prompt_directory = "prompts/" + +response = litellm.completion( + model="dotprompt/gpt-4", + prompt_id="hello", + prompt_variables={"user_message": "What is the capital of France?"} +) +``` + + + + +**1. Create a .prompt file** + +Create `prompts/hello.prompt`: + +```yaml +--- +model: gpt-4 +temperature: 0.7 +--- +System: You are a helpful assistant. + +User: {{user_message}} +``` + +**2. Setup config.yaml** + +```yaml +model_list: + - model_name: my-dotprompt-model + litellm_params: + model: dotprompt/gpt-4 + prompt_id: "hello" + api_key: os.environ/OPENAI_API_KEY + +litellm_settings: + global_prompt_directory: "./prompts" +``` + +**3. Start the proxy** + +```bash +litellm --config config.yaml --detailed_debug +``` + +**4. Test it!** + +```bash +curl -L -X POST 'http://0.0.0.0:4000/v1/chat/completions' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer sk-1234' \ +-d '{ + "model": "my-dotprompt-model", + "messages": [{"role": "user", "content": "IGNORED"}], + "prompt_variables": { + "user_message": "What is the capital of France?" + } +}' +``` + + + + +### .prompt File Format + +`.prompt` files use YAML frontmatter for metadata and support Jinja2 templating: + +```yaml +--- +model: gpt-4 # Model to use +temperature: 0.7 # Optional parameters +max_tokens: 1000 +input: + schema: + user_message: string # Input validation (optional) +--- +System: You are a helpful {{role}} assistant. + +User: {{user_message}} +``` + +### Advanced Features + +**Multi-role conversations:** + +```yaml +--- +model: gpt-4 +temperature: 0.3 +--- +System: You are a helpful coding assistant. + +User: {{user_question}} +``` + +**Dynamic model selection:** + +```yaml +--- +model: "{{preferred_model}}" # Model can be a variable +temperature: 0.7 +--- +System: You are a helpful assistant specialized in {{domain}}. + +User: {{user_message}} +``` + +### API Reference + +For dotprompt integration, use these parameters: + +``` +model: dotprompt/ # required (e.g., dotprompt/gpt-4) +prompt_id: str # required - the .prompt filename without extension +prompt_variables: Optional[dict] # optional - variables for template rendering +``` + +**Example API call:** + +```python +response = litellm.completion( + model="dotprompt/gpt-4", + prompt_id="hello", + prompt_variables={"user_message": "Hello world"}, + messages=[{"role": "user", "content": "This will be ignored"}] +) +``` diff --git a/docs/my-website/docs/proxy/prompt_management.md b/docs/my-website/docs/proxy/prompt_management.md index fc35fc5ef3..5a52c8c6c0 100644 --- a/docs/my-website/docs/proxy/prompt_management.md +++ b/docs/my-website/docs/proxy/prompt_management.md @@ -8,6 +8,7 @@ Run experiments or change the specific model (e.g. from gpt-4o to gpt4o-mini fin | Supported Integrations | Link | |------------------------|------| +| Native LiteLLM GitOps (.prompt files) | [Get Started](native_litellm_prompt) | | Langfuse | [Get Started](https://langfuse.com/docs/prompts/get-started) | | Humanloop | [Get Started](../observability/humanloop) | diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index bffa8a91b6..14dc2a6252 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -65,6 +65,7 @@ const sidebars = { label: "[Beta] Prompt Management", items: [ "proxy/prompt_management", + "proxy/native_litellm_prompt", "proxy/custom_prompt_management" ].sort() }, From ee40db7b31b5934d63f30dcae29319292c881056 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 09:46:31 -0700 Subject: [PATCH 03/32] docs native litellm prompts --- docs/my-website/docs/proxy/native_litellm_prompt.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/proxy/native_litellm_prompt.md b/docs/my-website/docs/proxy/native_litellm_prompt.md index 0dbdf438d5..1e1df999db 100644 --- a/docs/my-website/docs/proxy/native_litellm_prompt.md +++ b/docs/my-website/docs/proxy/native_litellm_prompt.md @@ -1,8 +1,12 @@ +import Image from '@theme/IdealImage'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # LiteLLM Prompt Management (GitOps) Store prompts as `.prompt` files in your repository and use them directly with LiteLLM. No external services required. -### Quick Start +## Quick Start From 825ea65b96817d0cf8bac3114792eb8a06b5c8fa Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 11:20:34 -0700 Subject: [PATCH 04/32] [Bug Fix] Responses API - Responses API failed if input containing ResponseReasoningItem (#13465) * add test_responses_api_multi_turn_with_reasoning_and_structured_output * fix transform_responses_api_request --- .../llms/openai/responses/transformation.py | 26 ++++- .../base_responses_api.py | 94 +++++++++++++++++++ .../test_openai_responses_api.py | 4 + 3 files changed, 123 insertions(+), 1 deletion(-) diff --git a/litellm/llms/openai/responses/transformation.py b/litellm/llms/openai/responses/transformation.py index 12814286f6..501941fdc5 100644 --- a/litellm/llms/openai/responses/transformation.py +++ b/litellm/llms/openai/responses/transformation.py @@ -1,6 +1,7 @@ from typing import TYPE_CHECKING, Any, Dict, Optional, Union, cast import httpx +from pydantic import BaseModel import litellm from litellm._logging import verbose_logger @@ -75,12 +76,35 @@ class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig): headers: dict, ) -> Dict: """No transform applied since inputs are in OpenAI spec already""" - return dict( + + input = self._validate_input_param(input) + final_request_params = dict( ResponsesAPIRequestParams( model=model, input=input, **response_api_optional_request_params ) ) + return final_request_params + + def _validate_input_param(self, input: Union[str, ResponseInputParam]) -> Union[str, ResponseInputParam]: + """ + Ensure all input fields if pydantic are converted to dict + + OpenAI API Fails when we try to JSON dumps specific input pydantic fields. + This function ensures all input fields are converted to dict. + """ + if isinstance(input, list): + validated_input = [] + for item in input: + # if it's pydantic, convert to dict + if isinstance(item, BaseModel): + validated_input.append(item.model_dump(exclude_none=True)) + else: + validated_input.append(item) + return validated_input + # Input is expected to be either str or List, no single BaseModel expected + return input + def transform_response_api_response( self, model: str, diff --git a/tests/llm_responses_api_testing/base_responses_api.py b/tests/llm_responses_api_testing/base_responses_api.py index a4ee9a8835..bf15e44879 100644 --- a/tests/llm_responses_api_testing/base_responses_api.py +++ b/tests/llm_responses_api_testing/base_responses_api.py @@ -112,6 +112,10 @@ class BaseResponsesAPITest(ABC): """Must return the base completion call args""" pass + def get_base_completion_reasoning_call_args(self) -> dict: + """Must return the base completion reasoning call args""" + return None + @pytest.mark.parametrize("sync_mode", [True, False]) @pytest.mark.asyncio @@ -440,3 +444,93 @@ class BaseResponsesAPITest(ABC): assert response is not None assert "output" in response assert len(response["output"]) > 0 + + @pytest.mark.asyncio + async def test_responses_api_multi_turn_with_reasoning_and_structured_output(self): + """ + Test multi-turn conversation with reasoning, structured output, and tool calls. + + This test validates: + - First call: Model uses reasoning to process a question and makes a tool call + - Tool call handling: Function call output is properly processed + - Second call: Model produces structured output incorporating tool results + - Structured output: Response conforms to defined Pydantic model schema + """ + from pydantic import BaseModel + + litellm._turn_on_debug() + litellm.set_verbose = True + base_completion_call_args = self.get_base_completion_reasoning_call_args() + if base_completion_call_args is None: + pytest.skip("Skipping test due to no base completion reasoning call args") + + # Define tools for the conversation + tools = [{"type": "function", "name": "get_today"}] + + # Define structured output schema + class Output(BaseModel): + today: str + number_of_r: str + + # Initial conversation input + input_messages = [ + { + "role": "user", + "content": "How many r in strrawberrry? While you're thinking, you should call tool get_today. Then you output the today and number of r", + } + ] + + + # First call - should trigger reasoning and tool call + response = await litellm.aresponses( + input=input_messages, + tools=tools, + reasoning={"effort": "low", "summary": "detailed"}, + text_format=Output, + **base_completion_call_args + ) + + print("First call output:") + print(json.dumps(response.output, indent=4, default=str)) + + # Validate first response structure + validate_responses_api_response(response, final_chunk=True) + assert response.output is not None + assert len(response.output) > 0 + + # Extend input with first response output + input_messages.extend(response.output) + + # Process any tool calls and add function outputs + function_outputs = [] + for item in response.output: + if hasattr(item, 'type') and item.type in ["function_call", "custom_tool_call"]: + if hasattr(item, 'name') and item.name == "get_today": + function_outputs.append({ + "type": "function_call_output", + "call_id": item.call_id, + "output": "2025-01-15" + }) + + # Add function outputs to conversation + input_messages.extend(function_outputs) + + print("Second call input:") + print(json.dumps(input_messages, indent=4, default=str)) + + # Second call - should produce structured output + final_response = await litellm.aresponses( + input=input_messages, + tools=tools, + reasoning={"effort": "low", "summary": "detailed"}, + text_format=Output, + **base_completion_call_args + ) + + print("Second call output:") + print(json.dumps(final_response.output, indent=4, default=str)) + + # Validate final response structure + validate_responses_api_response(final_response, final_chunk=True) + assert final_response.output is not None + assert len(final_response.output) > 0 diff --git a/tests/llm_responses_api_testing/test_openai_responses_api.py b/tests/llm_responses_api_testing/test_openai_responses_api.py index 5cd515be23..427f779cb0 100644 --- a/tests/llm_responses_api_testing/test_openai_responses_api.py +++ b/tests/llm_responses_api_testing/test_openai_responses_api.py @@ -30,6 +30,10 @@ class TestOpenAIResponsesAPITest(BaseResponsesAPITest): return { "model": "openai/gpt-4o", } + def get_base_completion_reasoning_call_args(self): + return { + "model": "openai/gpt-5-mini", + } class TestCustomLogger(CustomLogger): From eb4bd26f2490c943b6b291545c4e76e80a69816b Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 12:52:23 -0700 Subject: [PATCH 05/32] [Bug Fix] - Get Routes (#13466) * fixes get_routes_for_mounted_app * fix - use _safe_get_endpoint_name * fix code QA check * test_get_routes_for_mounted_app_with_static_files * test fixes --- .circleci/config.yml | 1 + .github/workflows/test-litellm.yml | 1 + litellm/proxy/common_utils/get_routes.py | 25 +++- .../proxy/common_utils/test_get_routes.py | 54 ++++++++ .../proxy/test_fastapi_offline_routes.py | 125 ++++++++++++++++++ 5 files changed, 203 insertions(+), 3 deletions(-) create mode 100644 tests/test_litellm/proxy/test_fastapi_offline_routes.py diff --git a/.circleci/config.yml b/.circleci/config.yml index bf1d33c618..a89fedc751 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -957,6 +957,7 @@ jobs: pip install "responses==0.25.7" pip install "pytest-xdist==3.6.1" pip install "semantic_router==0.1.10" + pip install "fastapi-offline==1.7.3" - setup_litellm_enterprise_pip # Run pytest and generate JUnit XML report - run: diff --git a/.github/workflows/test-litellm.yml b/.github/workflows/test-litellm.yml index 2f6e81c8ce..4ec3dcbb4c 100644 --- a/.github/workflows/test-litellm.yml +++ b/.github/workflows/test-litellm.yml @@ -31,6 +31,7 @@ jobs: poetry run pip install "pytest-retry==1.6.3" poetry run pip install pytest-xdist poetry run pip install "google-genai==1.22.0" + poetry run pip install "fastapi-offline==1.7.3" - name: Setup litellm-enterprise as local package run: | cd enterprise diff --git a/litellm/proxy/common_utils/get_routes.py b/litellm/proxy/common_utils/get_routes.py index 19465675c1..bf3773037e 100644 --- a/litellm/proxy/common_utils/get_routes.py +++ b/litellm/proxy/common_utils/get_routes.py @@ -2,10 +2,12 @@ Utility class for getting routes from a FastAPI app. """ -from typing import Any, Dict, List +from typing import Any, Dict, List, Optional from starlette.routing import BaseRoute +from litellm._logging import verbose_logger + class GetRoutes: @staticmethod @@ -53,8 +55,25 @@ class GetRoutes: "path": full_path, "methods": getattr(sub_route, "methods", ["GET", "POST"]), "name": getattr(sub_route, "name", None), - "endpoint": endpoint_func.__name__ if callable(endpoint_func) else None, + "endpoint": GetRoutes._safe_get_endpoint_name(endpoint_func), "mounted_app": True, } routes.append(route_info) - return routes \ No newline at end of file + return routes + + + @staticmethod + def _safe_get_endpoint_name(endpoint_function: Any) -> Optional[str]: + """ + Safely get the name of the endpoint function. + """ + try: + if hasattr(endpoint_function, '__name__'): + return getattr(endpoint_function, '__name__') + elif hasattr(endpoint_function, '__class__') and hasattr(endpoint_function.__class__, '__name__'): + return getattr(endpoint_function.__class__, '__name__') + else: + return None + except Exception: + verbose_logger.exception(f"Error getting endpoint name for route: {endpoint_function}") + return None \ No newline at end of file diff --git a/tests/test_litellm/proxy/common_utils/test_get_routes.py b/tests/test_litellm/proxy/common_utils/test_get_routes.py index 48eadffe2e..210e044e75 100644 --- a/tests/test_litellm/proxy/common_utils/test_get_routes.py +++ b/tests/test_litellm/proxy/common_utils/test_get_routes.py @@ -166,3 +166,57 @@ class TestGetRoutes: assert mount_route["endpoint"] == "handle_streamable_http_mcp" assert mount_route["mounted_app"] is True + def test_get_routes_for_mounted_app_with_static_files(self): + """ + Test getting routes for mounted app with StaticFiles object (reproduces AttributeError bug). + + This test reproduces the exact stacktrace scenario: + AttributeError: 'StaticFiles' object has no attribute '__name__'. Did you mean: '__ne__'? + + The original bug occurred when the code tried to access endpoint_func.__name__ + directly on a StaticFiles object. The fix uses _safe_get_endpoint_name() which + gracefully handles objects without __name__ by falling back to class name. + """ + # Mock the main mount route (e.g., /ui) + mock_mount_route = Mock() + mock_mount_route.path = "/ui" + + # Mock sub-app with routes + mock_sub_app = Mock() + mock_sub_app.routes = [] + + # Create a mock StaticFiles route (this is the problematic case) + mock_static_route = Mock(spec=['path', 'name', 'endpoint', 'app']) + mock_static_route.path = "" + mock_static_route.name = "ui" + mock_static_route.endpoint = None + + # Mock StaticFiles object - this is the key part that caused the AttributeError + # Real StaticFiles objects don't have __name__ attribute + # Create a mock that simulates StaticFiles behavior (no __name__ attribute) + class StaticFiles: + """Mock class that simulates real StaticFiles without __name__ attribute""" + pass + + mock_static_files = StaticFiles() + # Verify no __name__ attribute exists on the instance (reproduces bug condition) + assert not hasattr(mock_static_files, '__name__') + + mock_static_route.app = mock_static_files + + mock_sub_app.routes.append(mock_static_route) + mock_mount_route.app = mock_sub_app + + # This should NOT raise AttributeError thanks to _safe_get_endpoint_name + # In the old code, this would fail with: 'StaticFiles' object has no attribute '__name__' + result = GetRoutes.get_routes_for_mounted_app(mock_mount_route) + + # Should handle StaticFiles gracefully without throwing AttributeError + assert len(result) == 1 + assert result[0]["path"] == "/ui" + assert result[0]["methods"] == ["GET", "POST"] # Default methods + assert result[0]["name"] == "ui" + # Should fall back to class name since instance doesn't have __name__ attribute + assert result[0]["endpoint"] == "StaticFiles" # Falls back to class name + assert result[0]["mounted_app"] is True + diff --git a/tests/test_litellm/proxy/test_fastapi_offline_routes.py b/tests/test_litellm/proxy/test_fastapi_offline_routes.py new file mode 100644 index 0000000000..71d26ad3dd --- /dev/null +++ b/tests/test_litellm/proxy/test_fastapi_offline_routes.py @@ -0,0 +1,125 @@ +""" +Unit test for testing /routes endpoint with FastAPIOffline app initialization. + +This test verifies that the /routes endpoint works correctly when the proxy +server is initialized using FastAPIOffline instead of regular FastAPI. +""" + +import os +import sys + +sys.path.insert( + 0, os.path.abspath("../../..") +) # Adds the parent directory to the system path + +import pytest +from fastapi.testclient import TestClient +from fastapi_offline import FastAPIOffline + + +class TestFastAPIOfflineRoutes: + """Test that /routes endpoint works with FastAPIOffline app initialization.""" + + def test_routes_endpoint_with_fastapi_offline(self): + """ + Test that /routes endpoint responds correctly when using FastAPIOffline. + + This test verifies that when the proxy server app is initialized using + FastAPIOffline instead of regular FastAPI, the /routes endpoint still + functions properly without throwing the StaticFiles AttributeError. + """ + from litellm.proxy.proxy_server import router + + # Initialize app using FastAPIOffline instead of regular FastAPI + app = FastAPIOffline() + + # Add a simple root endpoint to verify app is working + @app.get("/") + async def root(): + return {"message": "Hello World"} + + # Include the litellm proxy router which contains the /routes endpoint + app.include_router(router) + + # Create test client + client = TestClient(app) + + # Test the root endpoint first to ensure app is working + response = client.get("/") + assert response.status_code == 200 + assert response.json() == {"message": "Hello World"} + + # Test the /routes endpoint - this should not fail even with FastAPIOffline + # The important part is that it doesn't fail with the StaticFiles AttributeError + response = client.get("/routes") + + # Print response for debugging + print(f"Response status: {response.status_code}") + print(f"Response content: {response.text}") + + # The key test: we should NOT get a 500 (Internal Server Error) + # which would indicate the StaticFiles AttributeError bug + assert response.status_code != 500, f"Got 500 error: {response.text}" + + # We accept either 200 (success) or 401 (auth required) - both are valid + assert response.status_code in [200, 401], f"Unexpected status: {response.status_code}" + + if response.status_code == 200: + # If successful, verify it has the expected structure + response_json = response.json() + assert "routes" in response_json + assert isinstance(response_json["routes"], list) + print("✓ /routes endpoint returns valid routes data with FastAPIOffline") + else: + # If auth fails, ensure it's a proper JSON error response + response_json = response.json() + assert "detail" in response_json + print("✓ /routes endpoint handles auth properly with FastAPIOffline") + + # If we get here without any AttributeError exceptions, the fix is working + print("✓ /routes endpoint handles FastAPIOffline initialization correctly") + + def test_routes_endpoint_with_auth_token_fastapi_offline(self): + """ + Test /routes endpoint with auth token using FastAPIOffline. + + This test provides a mock auth token to actually test the routes response. + """ + from unittest.mock import patch + + from litellm.proxy.proxy_server import router + + # Initialize app using FastAPIOffline + app = FastAPIOffline() + + @app.get("/") + async def root(): + return {"message": "Hello World"} + + app.include_router(router) + client = TestClient(app) + + # Mock the authentication to bypass the auth requirement + with patch('litellm.proxy.auth.user_api_key_auth.user_api_key_auth') as mock_auth: + # Configure mock to return a successful auth response + mock_auth.return_value = {"user_id": "test_user", "api_key": "test_key"} + + # Test with Authorization header + headers = {"Authorization": "Bearer sk-test-token"} + response = client.get("/routes", headers=headers) + + # If authentication is properly mocked, we should get a 200 response + # If not, we might get 401, but we should NOT get 500 (AttributeError) + assert response.status_code in [200, 401], f"Unexpected status code: {response.status_code}" + + if response.status_code == 200: + # If we get a successful response, verify it has the expected structure + response_json = response.json() + assert "routes" in response_json + assert isinstance(response_json["routes"], list) + print("✓ /routes endpoint returns valid response with FastAPIOffline") + else: + # Even if auth fails, ensure it's a proper JSON error response + response_json = response.json() + assert "detail" in response_json + print("✓ /routes endpoint handles auth properly with FastAPIOffline") \ No newline at end of file From 6184e898b722d484e25621330d9a5d9ff5294800 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 12:59:09 -0700 Subject: [PATCH 06/32] Generate unique IDs for litellm_call_id and function_id using UUID (#13468) Co-authored-by: Cursor Agent Co-authored-by: ishaan --- litellm/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index b18914a6cc..124652fcb5 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -5514,9 +5514,9 @@ async def ahealth_check( messages=[], stream=False, call_type="acompletion", - litellm_call_id="1234", + litellm_call_id=str(uuid.uuid4()), start_time=datetime.datetime.now(), - function_id="1234", + function_id=str(uuid.uuid4()), log_raw_request_response=True, ) model_params["litellm_logging_obj"] = litellm_logging_obj From 10a1fe21c59fbfec788ce53bdaee2edb806894f6 Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Sat, 9 Aug 2025 13:52:45 -0700 Subject: [PATCH 07/32] [LLM Translation] Litellm azure o series drop params (#13353) * added route check * fix ruff * Added support for dropping o_series params * Added ruff fix * fix tests --- litellm/__init__.py | 1 + litellm/llms/azure/common_utils.py | 5 + .../responses/o_series_transformation.py | 93 +++++++++ litellm/utils.py | 6 +- .../response/test_azure_transformation.py | 195 +++++++++++++++--- tests/test_litellm/proxy/test_proxy_server.py | 4 +- 6 files changed, 267 insertions(+), 37 deletions(-) create mode 100644 litellm/llms/azure/responses/o_series_transformation.py diff --git a/litellm/__init__.py b/litellm/__init__.py index f7e1fb8f24..bb53fd3a4d 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -1134,6 +1134,7 @@ from .llms.azure_ai.chat.transformation import AzureAIStudioConfig from .llms.mistral.chat.transformation import MistralConfig from .llms.openai.responses.transformation import OpenAIResponsesAPIConfig from .llms.azure.responses.transformation import AzureOpenAIResponsesAPIConfig +from .llms.azure.responses.o_series_transformation import AzureOpenAIOSeriesResponsesAPIConfig from .llms.openai.chat.o_series_transformation import ( OpenAIOSeriesConfig as OpenAIO1Config, # maintain backwards compatibility OpenAIOSeriesConfig, diff --git a/litellm/llms/azure/common_utils.py b/litellm/llms/azure/common_utils.py index 0ed4627908..94abd2f814 100644 --- a/litellm/llms/azure/common_utils.py +++ b/litellm/llms/azure/common_utils.py @@ -662,6 +662,11 @@ class BaseAzureLLM(BaseOpenAILLM): headers: dict, litellm_params: Optional[GenericLiteLLMParams] ) -> dict: litellm_params = litellm_params or GenericLiteLLMParams() + + # If api-key is already in headers, preserve it + if "api-key" in headers: + return headers + api_key = ( litellm_params.api_key or litellm.api_key diff --git a/litellm/llms/azure/responses/o_series_transformation.py b/litellm/llms/azure/responses/o_series_transformation.py new file mode 100644 index 0000000000..a0b2ef1630 --- /dev/null +++ b/litellm/llms/azure/responses/o_series_transformation.py @@ -0,0 +1,93 @@ +""" +Support for Azure OpenAI O-series models (o1, o3, etc.) in Responses API + +https://platform.openai.com/docs/guides/reasoning + +Translations handled by LiteLLM: +- temperature => drop param (if user opts in to dropping param) +- Other parameters follow base Azure OpenAI Responses API behavior +""" + +from typing import TYPE_CHECKING, Any, Dict + +from litellm._logging import verbose_logger +from litellm.types.llms.openai import ResponsesAPIOptionalRequestParams +from litellm.utils import supports_reasoning + +from .transformation import AzureOpenAIResponsesAPIConfig + +if TYPE_CHECKING: + from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj + + LiteLLMLoggingObj = _LiteLLMLoggingObj +else: + LiteLLMLoggingObj = Any + + +class AzureOpenAIOSeriesResponsesAPIConfig(AzureOpenAIResponsesAPIConfig): + """ + Configuration for Azure OpenAI O-series models in Responses API. + + O-series models (o1, o3, etc.) do not support the temperature parameter + in the responses API, so we need to drop it when drop_params is enabled. + """ + + def get_supported_openai_params(self, model: str) -> list: + """ + Get supported parameters for Azure OpenAI O-series Responses API. + + O-series models don't support temperature parameter in responses API. + """ + # Get the base Azure supported params + base_supported_params = super().get_supported_openai_params(model) + + # O-series models don't support temperature parameter in responses API + o_series_unsupported_params = ["temperature"] + + # Filter out unsupported parameters for O-series models + o_series_supported_params = [ + param for param in base_supported_params + if param not in o_series_unsupported_params + ] + + return o_series_supported_params + + def map_openai_params( + self, + response_api_optional_params: ResponsesAPIOptionalRequestParams, + model: str, + drop_params: bool, + ) -> Dict: + """ + Map OpenAI parameters for Azure OpenAI O-series Responses API. + + Drops temperature parameter if drop_params is True since O-series models + don't support temperature in the responses API. + """ + mapped_params = dict(response_api_optional_params) + + # If drop_params is enabled, remove temperature parameter for O-series models + if drop_params and "temperature" in mapped_params: + verbose_logger.debug( + f"Dropping unsupported parameter 'temperature' for Azure OpenAI O-series responses API model {model}" + ) + mapped_params.pop("temperature", None) + + return mapped_params + + def is_o_series_model(self, model: str) -> bool: + """ + Check if the model is an O-series model. + + Args: + model: The model name to check + + Returns: + True if it's an O-series model, False otherwise + """ + # Check if model name contains o_series or if it's a known O-series model + if "o_series" in model.lower(): + return True + + # Check if the model supports reasoning (which is O-series specific) + return supports_reasoning(model) \ No newline at end of file diff --git a/litellm/utils.py b/litellm/utils.py index 64d5f04a97..667625b68b 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -7074,7 +7074,11 @@ class ProviderConfigManager: if litellm.LlmProviders.OPENAI == provider: return litellm.OpenAIResponsesAPIConfig() elif litellm.LlmProviders.AZURE == provider: - return litellm.AzureOpenAIResponsesAPIConfig() + # Check if it's an O-series model + if model and ("o_series" in model.lower() or supports_reasoning(model)): + return litellm.AzureOpenAIOSeriesResponsesAPIConfig() + else: + return litellm.AzureOpenAIResponsesAPIConfig() return None @staticmethod diff --git a/tests/test_litellm/llms/azure/response/test_azure_transformation.py b/tests/test_litellm/llms/azure/response/test_azure_transformation.py index de416bcf43..51edf91b70 100644 --- a/tests/test_litellm/llms/azure/response/test_azure_transformation.py +++ b/tests/test_litellm/llms/azure/response/test_azure_transformation.py @@ -9,7 +9,9 @@ sys.path.insert( ) # Adds the parent directory to the system path from litellm.llms.azure.responses.transformation import AzureOpenAIResponsesAPIConfig +from litellm.llms.azure.responses.o_series_transformation import AzureOpenAIOSeriesResponsesAPIConfig from litellm.types.router import GenericLiteLLMParams +from litellm.types.llms.openai import ResponsesAPIOptionalRequestParams @pytest.mark.serial @@ -54,47 +56,172 @@ def test_validate_environment_azure_key_within_litellm(): assert result == expected @pytest.mark.serial -def test_validate_environment_azure_openai_api_key_within_secret_str(): +def test_validate_environment_azure_key_within_headers(): azure_openai_responses_apiconfig = AzureOpenAIResponsesAPIConfig() + headers = {"api-key": "test-api-key-from-headers"} + litellm_params = GenericLiteLLMParams() - with patch("litellm.api_key", None), \ - patch("litellm.azure_key", None), \ - patch("litellm.llms.azure.common_utils.get_secret_str") as mock_get_secret_str: - # Configure the mock to return "test-api-key" when called with "AZURE_OPENAI_API_KEY" - mock_get_secret_str.side_effect = ( - lambda key: "test-api-key" if key == "AZURE_OPENAI_API_KEY" else None - ) + result = azure_openai_responses_apiconfig.validate_environment( + headers=headers, model="", litellm_params=litellm_params + ) - litellm_params = GenericLiteLLMParams() - result = azure_openai_responses_apiconfig.validate_environment( - headers={}, model="", litellm_params=litellm_params - ) - expected = {"api-key": "test-api-key"} + expected = {"api-key": "test-api-key-from-headers"} + + assert result == expected - assert result == expected @pytest.mark.serial -def test_validate_environment_azure_api_key_within_secret_str(): +def test_get_complete_url(): + """ + Test the get_complete_url function + """ azure_openai_responses_apiconfig = AzureOpenAIResponsesAPIConfig() + api_base = "https://litellm8397336933.openai.azure.com" + litellm_params = {"api_version": "2024-05-01-preview"} - with patch("litellm.api_key", None), \ - patch("litellm.azure_key", None), \ - patch("litellm.llms.azure.common_utils.get_secret_str") as mock_get_secret_str: - # Configure the mock to return None for "AZURE_OPENAI_API_KEY" and "test-api-key" for "AZURE_API_KEY" - def mock_side_effect(key): - if key == "AZURE_OPENAI_API_KEY": - return None - elif key == "AZURE_API_KEY": - return "test-api-key" - else: - return None - - mock_get_secret_str.side_effect = mock_side_effect + result = azure_openai_responses_apiconfig.get_complete_url( + api_base=api_base, litellm_params=litellm_params + ) - litellm_params = GenericLiteLLMParams() - result = azure_openai_responses_apiconfig.validate_environment( - headers={}, model="", litellm_params=litellm_params - ) - expected = {"api-key": "test-api-key"} + expected = "https://litellm8397336933.openai.azure.com/openai/responses?api-version=2024-05-01-preview" - assert result == expected + assert result == expected + + +@pytest.mark.serial +def test_azure_o_series_responses_api_supported_params(): + """Test that Azure OpenAI O-series responses API excludes temperature from supported parameters.""" + config = AzureOpenAIOSeriesResponsesAPIConfig() + supported_params = config.get_supported_openai_params("o_series/gpt-o1") + + # Temperature should not be in supported params for O-series models + assert "temperature" not in supported_params + + # Other parameters should still be supported + assert "input" in supported_params + assert "max_output_tokens" in supported_params + assert "stream" in supported_params + assert "top_p" in supported_params + + +@pytest.mark.serial +def test_azure_o_series_responses_api_drop_temperature_param(): + """Test that temperature parameter is dropped when drop_params is True for O-series models.""" + config = AzureOpenAIOSeriesResponsesAPIConfig() + + # Create request params with temperature + request_params = ResponsesAPIOptionalRequestParams( + temperature=0.7, + max_output_tokens=1000, + stream=False, + top_p=0.9 + ) + + # Test with drop_params=True + mapped_params_with_drop = config.map_openai_params( + response_api_optional_params=request_params, + model="o_series/gpt-o1", + drop_params=True + ) + + # Temperature should be dropped + assert "temperature" not in mapped_params_with_drop + # Other params should remain + assert mapped_params_with_drop["max_output_tokens"] == 1000 + assert mapped_params_with_drop["top_p"] == 0.9 + + # Test with drop_params=False + mapped_params_without_drop = config.map_openai_params( + response_api_optional_params=request_params, + model="o_series/gpt-o1", + drop_params=False + ) + + # Temperature should still be present when drop_params=False + assert mapped_params_without_drop["temperature"] == 0.7 + assert mapped_params_without_drop["max_output_tokens"] == 1000 + assert mapped_params_without_drop["top_p"] == 0.9 + + +@pytest.mark.serial +def test_azure_o_series_responses_api_drop_params_no_temperature(): + """Test that map_openai_params works correctly when temperature is not present for O-series models.""" + config = AzureOpenAIOSeriesResponsesAPIConfig() + + # Create request params without temperature + request_params = ResponsesAPIOptionalRequestParams( + max_output_tokens=1000, + stream=False, + top_p=0.9 + ) + + # Should work fine even with drop_params=True + mapped_params = config.map_openai_params( + response_api_optional_params=request_params, + model="o_series/gpt-o1", + drop_params=True + ) + + assert "temperature" not in mapped_params + assert mapped_params["max_output_tokens"] == 1000 + assert mapped_params["top_p"] == 0.9 + + +@pytest.mark.serial +def test_azure_regular_responses_api_supports_temperature(): + """Test that regular Azure OpenAI responses API (non-O-series) supports temperature parameter.""" + config = AzureOpenAIResponsesAPIConfig() + supported_params = config.get_supported_openai_params("gpt-4o") + + # Regular Azure models should support temperature + assert "temperature" in supported_params + + # Other parameters should still be supported + assert "input" in supported_params + assert "max_output_tokens" in supported_params + assert "stream" in supported_params + assert "top_p" in supported_params + + +@pytest.mark.serial +def test_o_series_model_detection(): + """Test that the O-series configuration correctly identifies O-series models.""" + config = AzureOpenAIOSeriesResponsesAPIConfig() + + # Test explicit o_series naming + assert config.is_o_series_model("o_series/gpt-o1") == True + assert config.is_o_series_model("azure/o_series/gpt-o3") == True + + # Test regular models + assert config.is_o_series_model("gpt-4o") == False + assert config.is_o_series_model("gpt-3.5-turbo") == False + + +@pytest.mark.serial +def test_provider_config_manager_o_series_selection(): + """Test that ProviderConfigManager returns the correct config for O-series vs regular models.""" + from litellm.utils import ProviderConfigManager + import litellm + + # Test O-series model selection + o_series_config = ProviderConfigManager.get_provider_responses_api_config( + provider=litellm.LlmProviders.AZURE, + model="o_series/gpt-o1" + ) + assert isinstance(o_series_config, AzureOpenAIOSeriesResponsesAPIConfig) + + # Test regular model selection + regular_config = ProviderConfigManager.get_provider_responses_api_config( + provider=litellm.LlmProviders.AZURE, + model="gpt-4o" + ) + assert isinstance(regular_config, AzureOpenAIResponsesAPIConfig) + assert not isinstance(regular_config, AzureOpenAIOSeriesResponsesAPIConfig) + + # Test with no model specified (should default to regular) + default_config = ProviderConfigManager.get_provider_responses_api_config( + provider=litellm.LlmProviders.AZURE, + model=None + ) + assert isinstance(default_config, AzureOpenAIResponsesAPIConfig) + assert not isinstance(default_config, AzureOpenAIOSeriesResponsesAPIConfig) diff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/test_litellm/proxy/test_proxy_server.py index 3e2e8fba2e..5ddd59b616 100644 --- a/tests/test_litellm/proxy/test_proxy_server.py +++ b/tests/test_litellm/proxy/test_proxy_server.py @@ -1117,9 +1117,9 @@ async def test_chat_completion_result_no_nested_none_values(): ) mock_model_response.choices = [mock_choice] - mock_model_response.usage = litellm.Usage( + setattr(mock_model_response, "usage", litellm.Usage( prompt_tokens=10, completion_tokens=5, total_tokens=15 - ) + )) # Verify the mock has None values before serialization raw_dict = mock_model_response.model_dump() From 1270df08a4e0ad05f4109d50422c71b2041a0517 Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Sat, 9 Aug 2025 13:52:56 -0700 Subject: [PATCH 08/32] [Proxy + UI] Litellm add reload model api and button (#13464) * added mcp guardrails doc in mcp.md * add button to reload models * Added button changes * remove the model_reload --- litellm/proxy/proxy_server.py | 61 ++++++- tests/test_litellm/proxy/test_proxy_server.py | 164 ++++++++++++++++++ .../src/components/model_dashboard.tsx | 26 +++ .../src/components/networking.tsx | 21 +++ .../src/components/price_data_reload.tsx | 121 +++++++++++++ 5 files changed, 392 insertions(+), 1 deletion(-) create mode 100644 ui/litellm-dashboard/src/components/price_data_reload.tsx diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 76df4bbd1e..ef9ef3cb33 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -8858,7 +8858,16 @@ async def config_yaml_endpoint(config_info: ConfigYAML): include_in_schema=False, dependencies=[Depends(user_api_key_auth)], ) -async def get_litellm_model_cost_map(): +async def get_litellm_model_cost_map( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + # Check if user is admin + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=403, + detail=f"Access denied. Admin role required. Current role: {user_api_key_dict.user_role}", + ) + try: _model_cost_map = litellm.model_cost return _model_cost_map @@ -8869,6 +8878,56 @@ async def get_litellm_model_cost_map(): ) +@router.post( + "/reload/model_cost_map", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def reload_model_cost_map( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + ADMIN ONLY / MASTER KEY Only Endpoint + + Manually reload the model cost map from the remote source. + This will fetch fresh pricing data from the model_prices_and_context_window.json file. + """ + # Check if user is admin + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=403, + detail=f"Access denied. Admin role required. Current role: {user_api_key_dict.user_role}", + ) + + try: + from litellm.litellm_core_utils.get_model_cost_map import get_model_cost_map + + # Get the current URL from litellm configuration + model_cost_map_url = litellm.model_cost_map_url + + # Reload the model cost map + new_model_cost_map = get_model_cost_map(url=model_cost_map_url) + + # Update the global model_cost variable + litellm.model_cost = new_model_cost_map + + verbose_proxy_logger.info("Model cost map reloaded successfully") + + return { + "message": "Model cost map reloaded successfully", + "status": "success", + "timestamp": datetime.utcnow().isoformat(), + "models_count": len(new_model_cost_map) if new_model_cost_map else 0 + } + except Exception as e: + verbose_proxy_logger.exception(f"Failed to reload model cost map: {str(e)}") + raise HTTPException( + status_code=500, + detail=f"Failed to reload model cost map: {str(e)}" + ) + + @router.get("/", dependencies=[Depends(user_api_key_auth)]) async def home(request: Request): return "LiteLLM: RUNNING" diff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/test_litellm/proxy/test_proxy_server.py index 5ddd59b616..feb3f154f3 100644 --- a/tests/test_litellm/proxy/test_proxy_server.py +++ b/tests/test_litellm/proxy/test_proxy_server.py @@ -21,6 +21,7 @@ sys.path.insert( import litellm from litellm.proxy.proxy_server import app, initialize +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth example_embedding_result = { "object": "list", @@ -1190,3 +1191,166 @@ async def test_chat_completion_result_no_nested_none_values(): assert ( field not in message ), f"Field '{field}' should be excluded when it's None" + + +# ============================================================================ +# Price Data Reload Tests +# ============================================================================ + +class TestPriceDataReloadAPI: + """Test cases for price data reload API endpoints""" + + @pytest.fixture + def client_with_auth(self): + """Create a test client with authentication""" + from litellm.proxy.proxy_server import cleanup_router_config_variables + from litellm.proxy._types import LitellmUserRoles + + cleanup_router_config_variables() + filepath = os.path.dirname(os.path.abspath(__file__)) + config_fp = f"{filepath}/test_configs/test_config_no_auth.yaml" + asyncio.run(initialize(config=config_fp, debug=True)) + + # Mock admin user authentication + mock_auth = MagicMock() + mock_auth.user_role = LitellmUserRoles.PROXY_ADMIN + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + return TestClient(app) + + def test_reload_model_cost_map_admin_access(self, client_with_auth): + """Test that admin users can access the reload endpoint""" + with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: + mock_get_map.return_value = {"gpt-3.5-turbo": {"input_cost_per_token": 0.001}} + + response = client_with_auth.post("/reload/model_cost_map") + + assert response.status_code == 200 + data = response.json() + assert data["status"] == "success" + assert "message" in data + assert "timestamp" in data + assert "models_count" in data + + def test_reload_model_cost_map_non_admin_access(self, client_with_auth): + """Test that non-admin users cannot access the reload endpoint""" + # Mock non-admin user + mock_auth = MagicMock() + mock_auth.user_role = "user" # Non-admin role + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + response = client_with_auth.post("/reload/model_cost_map") + + assert response.status_code == 403 + data = response.json() + assert "Access denied" in data["detail"] + assert "Admin role required" in data["detail"] + + def test_get_model_cost_map_admin_access(self, client_with_auth): + """Test that admin users can access the get model cost map endpoint""" + with patch('litellm.model_cost', {"gpt-3.5-turbo": {"input_cost_per_token": 0.001}}): + response = client_with_auth.get("/get/litellm_model_cost_map") + + assert response.status_code == 200 + data = response.json() + assert "gpt-3.5-turbo" in data + + def test_get_model_cost_map_non_admin_access(self, client_with_auth): + """Test that non-admin users cannot access the get model cost map endpoint""" + # Mock non-admin user + mock_auth = MagicMock() + mock_auth.user_role = "user" # Non-admin role + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + response = client_with_auth.get("/get/litellm_model_cost_map") + + assert response.status_code == 403 + data = response.json() + assert "Access denied" in data["detail"] + assert "Admin role required" in data["detail"] + + def test_reload_model_cost_map_error_handling(self, client_with_auth): + """Test error handling in the reload endpoint""" + with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: + mock_get_map.side_effect = Exception("Network error") + + response = client_with_auth.post("/reload/model_cost_map") + + assert response.status_code == 500 + data = response.json() + assert "Failed to reload model cost map" in data["detail"] + + +class TestPriceDataReloadIntegration: + """Integration tests for the complete price data reload feature""" + + @pytest.fixture + def client_with_auth(self): + """Create a test client with authentication""" + from litellm.proxy.proxy_server import cleanup_router_config_variables + from litellm.proxy._types import LitellmUserRoles + + cleanup_router_config_variables() + filepath = os.path.dirname(os.path.abspath(__file__)) + config_fp = f"{filepath}/test_configs/test_config_no_auth.yaml" + asyncio.run(initialize(config=config_fp, debug=True)) + + # Mock admin user authentication + mock_auth = MagicMock() + mock_auth.user_role = LitellmUserRoles.PROXY_ADMIN + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + return TestClient(app) + + def test_complete_reload_flow(self, client_with_auth): + """Test the complete reload flow from API to model cost update""" + # Mock the model cost map + mock_cost_map = { + "gpt-3.5-turbo": { + "input_cost_per_token": 0.001, + "output_cost_per_token": 0.002 + }, + "gpt-4": { + "input_cost_per_token": 0.03, + "output_cost_per_token": 0.06 + } + } + + with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: + mock_get_map.return_value = mock_cost_map + + # Test reload endpoint + response = client_with_auth.post("/reload/model_cost_map") + assert response.status_code == 200 + + # Test get endpoint + response = client_with_auth.get("/get/litellm_model_cost_map") + assert response.status_code == 200 + + def test_config_file_parsing(self): + """Test parsing of config file with reload settings""" + config_content = """ +general_settings: + master_key: sk-1234 + model_cost_map_reload_interval: 21600 + +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo + - model_name: gpt-4 + litellm_params: + model: gpt-4 +""" + + # Parse the config + config = yaml.safe_load(config_content) + + # Verify the reload setting is present + assert "general_settings" in config + assert "model_cost_map_reload_interval" in config["general_settings"] + assert config["general_settings"]["model_cost_map_reload_interval"] == 21600 + + # Verify models are present + assert "model_list" in config + assert len(config["model_list"]) == 2 diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsx index c66ec76844..a4c11560fa 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx @@ -71,6 +71,7 @@ import AddModelTab from "./add_model/add_model_tab"; import { ModelDataTable } from "./model_dashboard/table"; import { columns } from "./model_dashboard/columns"; +import PriceDataReload from "./price_data_reload"; import HealthCheckComponent from "./model_dashboard/HealthCheckComponent"; import PassThroughSettings from "./pass_through_settings"; import ModelGroupAliasSettings from "./model_group_alias_settings"; @@ -1044,6 +1045,31 @@ const ModelDashboard: React.FC = ({
+ {/* Price Data Reload Section */} +
+
+

Model Management

+

+ Manage your models and pricing data +

+
+ {all_admin_roles.includes(userRole) && ( + { + // Refresh the model map after successful reload + const fetchModelMap = async () => { + const data = await modelCostMap(accessToken); + setModelMap(data); + }; + fetchModelMap(); + }} + buttonText="Reload Price Data" + size="small" + type="primary" + /> + )} +
{selectedModelId ? ( { throw error; } }; + +export const reloadModelCostMap = async (accessToken: string) => { + try { + const url = proxyBaseUrl + ? `${proxyBaseUrl}/reload/model_cost_map` + : `/reload/model_cost_map`; + const response = await fetch(url, { + method: "POST", + headers: { + [globalLitellmHeaderName]: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, + }); + const jsonData = await response.json(); + console.log(`Model cost map reload response: ${jsonData}`); + return jsonData; + } catch (error) { + console.error("Failed to reload model cost map:", error); + throw error; + } +}; export const modelCreateCall = async ( accessToken: string, formValues: Model diff --git a/ui/litellm-dashboard/src/components/price_data_reload.tsx b/ui/litellm-dashboard/src/components/price_data_reload.tsx new file mode 100644 index 0000000000..e31fa7d37a --- /dev/null +++ b/ui/litellm-dashboard/src/components/price_data_reload.tsx @@ -0,0 +1,121 @@ +import React, { useState } from "react"; +import { Button, message, Popconfirm, Tooltip } from "antd"; +import { reloadModelCostMap } from "./networking"; + +interface PriceDataReloadProps { + accessToken: string; + onReloadSuccess?: () => void; + buttonText?: string; + showIcon?: boolean; + size?: "small" | "middle" | "large"; + type?: "primary" | "default" | "dashed" | "link" | "text"; + className?: string; +} + +const PriceDataReload: React.FC = ({ + accessToken, + onReloadSuccess, + buttonText = "Reload Price Data", + showIcon = true, + size = "middle", + type = "primary", + className = "", +}) => { + const [isLoading, setIsLoading] = useState(false); + + const handleReload = async () => { + if (!accessToken) { + message.error("No access token available"); + return; + } + + setIsLoading(true); + try { + const response = await reloadModelCostMap(accessToken); + + if (response.status === "success") { + message.success( + `Price data reloaded successfully! ${response.models_count || 0} models updated.` + ); + onReloadSuccess?.(); + } else { + message.error("Failed to reload price data"); + } + } catch (error) { + console.error("Error reloading price data:", error); + message.error("Failed to reload price data. Please try again."); + } finally { + setIsLoading(false); + } + }; + + return ( + { + e.currentTarget.style.backgroundColor = "#4f46e5"; + e.currentTarget.style.borderColor = "#4f46e5"; + }, + onMouseLeave: (e) => { + e.currentTarget.style.backgroundColor = "#6366f1"; + e.currentTarget.style.borderColor = "#6366f1"; + }, + }} + > + + + + + ); +}; + +export default PriceDataReload; \ No newline at end of file From 60306d34a0a635a61675eef19b4207e9748807b3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 15:35:45 -0700 Subject: [PATCH 09/32] [Bug Fix] Allow using Swagger for /chat/completions (#13469) * fix get_openapi_schema * fixes for ProxyChatCompletionRequest * TestSwaggerChatCompletions * fix working request body * fix - add "messages" * fix messages * TestSwaggerChatCompletions * test_messages_field_has_example * ruff check fix --- litellm/proxy/_types.py | 52 ++- .../proxy/common_utils/custom_openapi_spec.py | 92 +++++- litellm/proxy/proxy_server.py | 8 + .../proxy/test_swagger_chat_completions.py | 310 ++++++++++++++++++ 4 files changed, 447 insertions(+), 15 deletions(-) create mode 100644 tests/test_litellm/proxy/test_swagger_chat_completions.py diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 85e96e22cb..6a7006ea8d 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -16,11 +16,7 @@ from pydantic import ( from typing_extensions import Required, TypedDict from litellm.types.integrations.slack_alerting import AlertType -from litellm.types.llms.openai import ( - AllMessageValues, - ChatCompletionRequest, - OpenAIFileObject, -) +from litellm.types.llms.openai import AllMessageValues, OpenAIFileObject from litellm.types.mcp import ( MCPAuthType, MCPSpecVersion, @@ -576,13 +572,47 @@ class LiteLLMPromptInjectionParams(LiteLLMPydanticObjectBase): ######### Request Class Definition ###### -class ProxyChatCompletionRequest(ChatCompletionRequest): +class ProxyChatCompletionRequest(LiteLLMPydanticObjectBase): + """ + Pydantic model for chat completion requests that includes both OpenAI standard fields + and LiteLLM-specific parameters. This replaces the previous TypedDict version. + """ + # Required fields (from ChatCompletionRequest) + model: str + messages: List[AllMessageValues] + + # Standard OpenAI completion parameters (all optional) + frequency_penalty: Optional[float] = None + logit_bias: Optional[Dict[str, float]] = None + logprobs: Optional[bool] = None + top_logprobs: Optional[int] = None + max_tokens: Optional[int] = None + n: Optional[int] = None + presence_penalty: Optional[float] = None + response_format: Optional[Dict[str, Any]] = None + seed: Optional[int] = None + service_tier: Optional[str] = None + stop: Optional[Union[str, List[str]]] = None + stream_options: Optional[Dict[str, Any]] = None + temperature: Optional[float] = None + top_p: Optional[float] = None + tools: Optional[List[Dict[str, Any]]] = None + tool_choice: Optional[Union[str, Dict[str, Any]]] = None + parallel_tool_calls: Optional[bool] = None + function_call: Optional[Union[str, Dict[str, Any]]] = None + functions: Optional[List[Dict[str, Any]]] = None + user: Optional[str] = None + stream: Optional[bool] = None + + # LiteLLM-specific metadata param (from original ChatCompletionRequest) + metadata: Optional[Dict[str, Any]] = None + # Optional LiteLLM params - guardrails: Optional[List[str]] - caching: Optional[bool] - num_retries: Optional[int] - context_window_fallback_dict: Optional[Dict[str, str]] - fallbacks: Optional[List[str]] + guardrails: Optional[List[str]] = None + caching: Optional[bool] = None + num_retries: Optional[int] = None + context_window_fallback_dict: Optional[Dict[str, str]] = None + fallbacks: Optional[List[str]] = None class ModelInfoDelete(LiteLLMPydanticObjectBase): diff --git a/litellm/proxy/common_utils/custom_openapi_spec.py b/litellm/proxy/common_utils/custom_openapi_spec.py index f2960bac29..5bd8534a9a 100644 --- a/litellm/proxy/common_utils/custom_openapi_spec.py +++ b/litellm/proxy/common_utils/custom_openapi_spec.py @@ -72,7 +72,8 @@ class CustomOpenAPISpec: @staticmethod def add_request_body_to_paths(openapi_schema: Dict[str, Any], paths: List[str], schema_ref: str) -> None: """ - Add request body schema reference to specified paths. + Add request body with expanded form fields for better Swagger UI display. + This keeps the request body but expands it to show individual fields in the UI. Args: openapi_schema: The OpenAPI schema dict to modify @@ -81,16 +82,99 @@ class CustomOpenAPISpec: """ for path in paths: if path in openapi_schema.get("paths", {}) and "post" in openapi_schema["paths"][path]: + # Get the actual schema to extract ALL field definitions + schema_name = schema_ref.split("/")[-1] # Extract "ProxyChatCompletionRequest" from the ref + actual_schema = openapi_schema.get("components", {}).get("schemas", {}).get(schema_name, {}) + schema_properties = actual_schema.get("properties", {}) + required_fields = actual_schema.get("required", []) + + # Create an expanded inline schema instead of just a $ref + # This makes Swagger UI show all individual fields in the request body editor + expanded_schema = { + "type": "object", + "required": required_fields, + "properties": {} + } + + # Add all properties with their full definitions + for field_name, field_def in schema_properties.items(): + expanded_field = CustomOpenAPISpec._expand_field_definition(field_def) + + # Add a simple example for the messages field + if field_name == "messages": + expanded_field["example"] = [ + {"role": "user", "content": "Hello, how are you?"} + ] + + expanded_schema["properties"][field_name] = expanded_field + + # Include $defs from the original schema to support complex types like AllMessageValues + # This ensures that message types and other complex union types work properly + if "$defs" in actual_schema: + expanded_schema["$defs"] = actual_schema["$defs"] + + # Set the request body with the expanded schema openapi_schema["paths"][path]["post"]["requestBody"] = { "required": True, "content": { "application/json": { - "schema": { - "$ref": schema_ref - } + "schema": expanded_schema } } } + + # Keep any existing parameters (like path parameters) but remove conflicting query params + if "parameters" in openapi_schema["paths"][path]["post"]: + existing_params = openapi_schema["paths"][path]["post"]["parameters"] + # Only keep path parameters, remove query params that conflict with request body + filtered_params = [ + param for param in existing_params + if param.get("in") == "path" + ] + openapi_schema["paths"][path]["post"]["parameters"] = filtered_params + + @staticmethod + def _extract_field_schema(field_def: Dict[str, Any]) -> Dict[str, Any]: + """ + Extract a simple schema from a Pydantic field definition for parameter display. + + Args: + field_def: Pydantic field definition + + Returns: + Simplified schema for OpenAPI parameter + """ + # Handle simple types + if "type" in field_def: + return {"type": field_def["type"]} + + # Handle anyOf (Optional fields in Pydantic v2) + if "anyOf" in field_def: + any_of = field_def["anyOf"] + # Find the non-null type + for option in any_of: + if option.get("type") != "null": + return option + # Fallback to string if all else fails + return {"type": "string"} + + # Default fallback + return {"type": "string"} + + @staticmethod + def _expand_field_definition(field_def: Dict[str, Any]) -> Dict[str, Any]: + """ + Expand a Pydantic field definition for inline use in OpenAPI schema. + This creates a full field definition that Swagger UI can render as individual form fields. + + Args: + field_def: Pydantic field definition + + Returns: + Expanded field definition for OpenAPI schema + """ + # Return the field definition as-is since Pydantic already provides proper schemas + return field_def.copy() @staticmethod def add_request_schema( diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index ef9ef3cb33..f29ab7c588 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -731,6 +731,11 @@ def get_openapi_schema(): } } + # Add LLM API request schema bodies for documentation + from litellm.proxy.common_utils.custom_openapi_spec import CustomOpenAPISpec + + openapi_schema = CustomOpenAPISpec.add_llm_api_request_schema_body(openapi_schema) + app.openapi_schema = openapi_schema return app.openapi_schema @@ -759,6 +764,9 @@ def custom_openapi(): if os.getenv("DOCS_FILTERED", "False") == "True" and premium_user: app.openapi = custom_openapi # type: ignore +else: + # For regular users, use get_openapi_schema to include LLM API schemas + app.openapi = get_openapi_schema # type: ignore class UserAPIKeyCacheTTLEnum(enum.Enum): diff --git a/tests/test_litellm/proxy/test_swagger_chat_completions.py b/tests/test_litellm/proxy/test_swagger_chat_completions.py new file mode 100644 index 0000000000..b973eab621 --- /dev/null +++ b/tests/test_litellm/proxy/test_swagger_chat_completions.py @@ -0,0 +1,310 @@ +""" +Unit test to validate that /chat/completions has the expected schema in Swagger after add_llm_api_request_schema_body runs. + +This test ensures that the ProxyChatCompletionRequest Pydantic model is properly added to the OpenAPI schema +for the /chat/completions endpoint, showing all expected fields in the Swagger documentation. +""" + +from unittest.mock import Mock, patch + +import pytest +from fastapi.testclient import TestClient + +from litellm.proxy.common_utils.custom_openapi_spec import CustomOpenAPISpec +from litellm.proxy.proxy_server import app + + +class TestSwaggerChatCompletions: + """Test suite for validating /chat/completions schema in Swagger documentation.""" + + @pytest.fixture + def client(self): + """FastAPI test client for the proxy server.""" + return TestClient(app) + + def test_openapi_schema_includes_chat_completions_request_body(self, client): + """ + Test that the OpenAPI schema includes ProxyChatCompletionRequest schema + for /chat/completions endpoints after add_llm_api_request_schema_body runs. + """ + # Clear any cached schema to ensure we get the latest version + from litellm.proxy.proxy_server import app + app.openapi_schema = None + + # Get the OpenAPI schema from the running app + response = client.get("/openapi.json") + assert response.status_code == 200 + + openapi_schema = response.json() + + # Verify the schema has the expected structure + assert "openapi" in openapi_schema + assert "paths" in openapi_schema + assert "components" in openapi_schema + assert "schemas" in openapi_schema["components"] + + # Check that ProxyChatCompletionRequest schema is in components + assert "ProxyChatCompletionRequest" in openapi_schema["components"]["schemas"] + + # Get the ProxyChatCompletionRequest schema + chat_completion_schema = openapi_schema["components"]["schemas"]["ProxyChatCompletionRequest"] + + # Verify it has the expected properties structure + assert "properties" in chat_completion_schema + properties = chat_completion_schema["properties"] + + # Check for core OpenAI chat completion fields + expected_core_fields = [ + "model", + "messages", + "temperature", + "top_p", + "max_tokens", + "stream", + "stop", + "presence_penalty", + "frequency_penalty", + "logit_bias", + "user", + "response_format", + "seed", + "tools", + "tool_choice", + "logprobs", + "top_logprobs" + ] + + for field in expected_core_fields: + assert field in properties, f"Expected field '{field}' not found in ProxyChatCompletionRequest schema" + + # Check for LiteLLM-specific fields added by ProxyChatCompletionRequest + expected_litellm_fields = [ + "guardrails", + "caching", + "num_retries", + "context_window_fallback_dict", + "fallbacks" + ] + + for field in expected_litellm_fields: + assert field in properties, f"Expected LiteLLM field '{field}' not found in ProxyChatCompletionRequest schema" + + # Verify model and messages are required fields + if "required" in chat_completion_schema: + required_fields = chat_completion_schema["required"] + assert "model" in required_fields, "Field 'model' should be required" + assert "messages" in required_fields, "Field 'messages' should be required" + + def test_chat_completions_endpoints_have_expanded_request_body(self, client): + """ + Test that /chat/completions endpoint has an expanded request body schema + with all individual fields visible (not just a $ref). + """ + # Clear any cached schema to ensure we get the latest version + from litellm.proxy.proxy_server import app + app.openapi_schema = None + + # Get the OpenAPI schema + response = client.get("/openapi.json") + assert response.status_code == 200 + + openapi_schema = response.json() + paths = openapi_schema["paths"] + + # Check main chat completion path + path_to_check = "/chat/completions" + assert path_to_check in paths, f"Path {path_to_check} not found in OpenAPI schema" + assert "post" in paths[path_to_check], f"POST method not found for path {path_to_check}" + + post_spec = paths[path_to_check]["post"] + + # Should have request body with expanded schema (not just $ref) + assert "requestBody" in post_spec, f"Path {path_to_check} should have requestBody" + request_body = post_spec["requestBody"] + + # Check request body structure + assert "content" in request_body + assert "application/json" in request_body["content"] + json_content = request_body["content"]["application/json"] + assert "schema" in json_content + + schema_def = json_content["schema"] + + # Should be an expanded object schema, not a $ref + assert schema_def.get("type") == "object", "Schema should be an expanded object type" + assert "properties" in schema_def, "Schema should have expanded properties" + assert "$ref" not in schema_def, "Schema should not be a reference (should be expanded inline)" + + # Should have all Pydantic fields as individual properties + properties = schema_def["properties"] + assert len(properties) >= 25, f"Expected at least 25 properties, got {len(properties)}" + + # Should have core OpenAI fields + core_fields = ["model", "messages", "temperature", "max_tokens", "stream"] + for field in core_fields: + assert field in properties, f"Core field '{field}' should be in expanded properties" + + # Should have LiteLLM-specific fields + litellm_fields = ["guardrails", "caching", "fallbacks", "num_retries"] + for field in litellm_fields: + assert field in properties, f"LiteLLM field '{field}' should be in expanded properties" + + # Check required fields + required_fields = schema_def.get("required", []) + assert "model" in required_fields, "Model should be marked as required" + assert "messages" in required_fields, "Messages should be marked as required" + + # Should have minimal parameters (only path parameters) + parameters = post_spec.get("parameters", []) + # All parameters should be path parameters, no query parameters + for param in parameters: + assert param.get("in") == "path", f"Only path parameters expected, found {param.get('in')} parameter: {param.get('name')}" + + @patch('litellm.proxy.common_utils.custom_openapi_spec.CustomOpenAPISpec.add_chat_completion_request_schema') + def test_add_llm_api_request_schema_body_calls_chat_completion_method(self, mock_add_chat): + """ + Test that add_llm_api_request_schema_body calls add_chat_completion_request_schema. + """ + # Create a mock schema + mock_schema = { + "openapi": "3.0.0", + "info": {"title": "Test API", "version": "1.0.0"}, + "paths": {} + } + + # Configure the mock to return the schema + mock_add_chat.return_value = mock_schema + + # Call the main method + result = CustomOpenAPISpec.add_llm_api_request_schema_body(mock_schema) + + # Verify the chat completion method was called + mock_add_chat.assert_called_once_with(mock_schema) + assert result == mock_schema + + def test_custom_openapi_spec_chat_completion_paths_constant(self): + """ + Test that the CHAT_COMPLETION_PATHS constant includes all expected endpoints. + """ + expected_paths = [ + "/v1/chat/completions", + "/chat/completions", + "/engines/{model}/chat/completions", + "/openai/deployments/{model}/chat/completions" + ] + + assert hasattr(CustomOpenAPISpec, 'CHAT_COMPLETION_PATHS') + actual_paths = CustomOpenAPISpec.CHAT_COMPLETION_PATHS + + for expected_path in expected_paths: + assert expected_path in actual_paths, f"Expected path '{expected_path}' not found in CHAT_COMPLETION_PATHS" + + def test_proxy_chat_completion_request_pydantic_model_works(self): + """ + Test that ProxyChatCompletionRequest properly generates schemas + and includes the expected LiteLLM-specific fields. + """ + from litellm.proxy._types import ProxyChatCompletionRequest + + # Check that we can get the schema + try: + # Try Pydantic v2 method first + schema = ProxyChatCompletionRequest.model_json_schema() + except AttributeError: + try: + # Fallback to Pydantic v1 method + schema = ProxyChatCompletionRequest.schema() + except AttributeError: + pytest.fail("Could not get schema from ProxyChatCompletionRequest using either Pydantic v1 or v2 methods") + + # Verify schema has properties + assert "properties" in schema + properties = schema["properties"] + + # Check for core required fields + assert "model" in properties, "Field 'model' should be in schema" + assert "messages" in properties, "Field 'messages' should be in schema" + + # Check for LiteLLM-specific fields + litellm_fields = ["guardrails", "caching", "num_retries", "context_window_fallback_dict", "fallbacks"] + for field in litellm_fields: + assert field in properties, f"LiteLLM field '{field}' should be in ProxyChatCompletionRequest schema" + + def test_messages_field_has_example(self, client): + """ + Test that the messages field in the expanded request body includes a helpful example. + """ + # Clear any cached schema to ensure we get the latest version + from litellm.proxy.proxy_server import app + app.openapi_schema = None + + # Get the OpenAPI schema + response = client.get("/openapi.json") + assert response.status_code == 200 + + openapi_schema = response.json() + + # Navigate to the chat completions request body schema + chat_completions_post = openapi_schema["paths"]["/chat/completions"]["post"] + request_body = chat_completions_post["requestBody"] + schema_def = request_body["content"]["application/json"]["schema"] + + # Check that messages field has an example + messages_field = schema_def["properties"]["messages"] + assert "example" in messages_field, "Messages field should have an example" + + # Verify the example structure + example = messages_field["example"] + assert isinstance(example, list), "Messages example should be a list" + assert len(example) >= 1, "Messages example should have at least 1 message" + + # Check that example messages have proper structure + for message in example: + assert "role" in message, "Each example message should have a role" + assert "content" in message, "Each example message should have content" + assert message["role"] in ["user", "assistant", "system"], f"Invalid role: {message['role']}" + assert isinstance(message["content"], str), "Message content should be a string" + + def test_request_body_accepts_actual_chat_request(self, client): + """ + Test that the expanded request body schema accepts a real chat completion request. + This ensures our schema modifications don't break actual API functionality. + """ + # Test data that should be valid according to our expanded schema + test_request = { + "model": "gpt-4o", + "messages": [ + {"role": "user", "content": "Hello, how are you?"}, + {"role": "assistant", "content": "I'm doing well, thank you!"} + ], + "temperature": 0.7, + "max_tokens": 100, + "guardrails": ["no-harmful-content"], + "caching": True + } + + # This should validate against our schema without errors + # Note: We're not actually calling the endpoint (which would require API keys) + # but testing that the request structure is accepted by the schema + + # Get the OpenAPI schema to verify our test data matches + response = client.get("/openapi.json") + assert response.status_code == 200 + + openapi_schema = response.json() + chat_completions_post = openapi_schema["paths"]["/chat/completions"]["post"] + + # Should have expanded request body (not just $ref) + assert "requestBody" in chat_completions_post + request_body = chat_completions_post["requestBody"] + schema_def = request_body["content"]["application/json"]["schema"] + + # Verify our test request has fields that exist in the schema + properties = schema_def["properties"] + for field_name in test_request.keys(): + assert field_name in properties, f"Field '{field_name}' should be in expanded schema properties" + + # Verify required fields are present in test request + required_fields = schema_def.get("required", []) + for required_field in required_fields: + assert required_field in test_request, f"Required field '{required_field}' should be in test request" \ No newline at end of file From 1c8761111fdbb5ee11cb09593dbae8fff11f1407 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Sat, 9 Aug 2025 16:09:51 -0700 Subject: [PATCH 10/32] Router - reduce p99 latency w/ redis enabled by 50% + OTEL - track pre_call hook latency (#13362) * feat(proxy/utils.py): track pre-call hooks in OTEL some pre call hooks can cause latency in high traffic - make sure this is tracked * fix(router.py): move redis call on deployment_callback_on_success to pipeline operation reduces p99 latency by half when redis is enabled * fix(parallel_request_limiter_v3.py): only run check if any item has rate limits set Prevents unnecessary latency added by rate limit checks * test: add unit tests * Latency Improvements: only track tpm/rpm usage when set on deployment+ LLM Caching - use an in-memory cache to reduce redis calls + OTEL - track time spent on LLM caching (#13472) * fix(router.py): only track usage for deployments with tpm/rpm set ensures additional latency avoided for non-tpm/rpm models * fix(caching_handler.py): log time spent on request get cache to OTEL enables easy debugging of call latency * fix(caching_handler.py): use dual cache object for in-memory caching + trace redis call within caching handler * fix(caching_handler.py): working in-memory cache for redis calls ensures dual cache works when redis cache setup for llm calls makes calls quicker by only checking redis when in-memory cache missed for llm api call * test: remove redundant test * test: add unit tests --- litellm/caching/caching.py | 74 ++++--- litellm/caching/caching_handler.py | 72 ++++-- litellm/caching/redis_cache.py | 103 ++++++--- litellm/proxy/_experimental/mcp_server/db.py | 22 +- litellm/proxy/_new_secret_config.yaml | 25 ++- .../hooks/parallel_request_limiter_v3.py | 85 ++++--- litellm/proxy/proxy_server.py | 18 +- litellm/proxy/utils.py | 93 +++++--- litellm/router.py | 62 +++++- .../test_amazing_vertex_completion.py | 6 +- tests/local_testing/test_router_utils.py | 40 ++-- .../hooks/test_parallel_request_limiter_v3.py | 207 ++++++++++++++++++ 12 files changed, 627 insertions(+), 180 deletions(-) diff --git a/litellm/caching/caching.py b/litellm/caching/caching.py index 1455e011bc..175eaa112a 100644 --- a/litellm/caching/caching.py +++ b/litellm/caching/caching.py @@ -28,13 +28,13 @@ from .azure_blob_cache import AzureBlobCache from .base_cache import BaseCache from .disk_cache import DiskCache from .dual_cache import DualCache # noqa +from .gcs_cache import GCSCache from .in_memory_cache import InMemoryCache from .qdrant_semantic_cache import QdrantSemanticCache from .redis_cache import RedisCache from .redis_cluster_cache import RedisClusterCache from .redis_semantic_cache import RedisSemanticCache from .s3_cache import S3Cache -from .gcs_cache import GCSCache def print_verbose(print_statement): @@ -177,7 +177,7 @@ class Cache: cluster_kwargs["gcp_service_account"] = gcp_service_account if gcp_ssl_ca_certs is not None: cluster_kwargs["gcp_ssl_ca_certs"] = gcp_ssl_ca_certs - + self.cache: BaseCache = RedisClusterCache(**cluster_kwargs) else: self.cache = RedisCache( @@ -481,7 +481,7 @@ class Cache: return cached_response return cached_result - def get_cache(self, **kwargs): + def get_cache(self, dynamic_cache_object: Optional[BaseCache] = None, **kwargs): """ Retrieves the cached result for the given arguments. @@ -507,8 +507,12 @@ class Cache: or cache_control_args.get("s-max-age") or float("inf") ) - cached_result = self.cache.get_cache(cache_key, messages=messages) - cached_result = self.cache.get_cache(cache_key, messages=messages) + if dynamic_cache_object is not None: + cached_result = dynamic_cache_object.get_cache( + cache_key, messages=messages + ) + else: + cached_result = self.cache.get_cache(cache_key, messages=messages) return self._get_cache_logic( cached_result=cached_result, max_age=max_age ) @@ -516,7 +520,9 @@ class Cache: print_verbose(f"An exception occurred: {traceback.format_exc()}") return None - async def async_get_cache(self, **kwargs): + async def async_get_cache( + self, dynamic_cache_object: Optional[BaseCache] = None, **kwargs + ): """ Async get cache implementation. @@ -537,7 +543,14 @@ class Cache: max_age = cache_control_args.get( "s-max-age", cache_control_args.get("s-maxage", float("inf")) ) - cached_result = await self.cache.async_get_cache(cache_key, **kwargs) + if dynamic_cache_object is not None: + cached_result = await dynamic_cache_object.async_get_cache( + cache_key, **kwargs + ) + else: + cached_result = await self.cache.async_get_cache( + cache_key, **kwargs + ) return self._get_cache_logic( cached_result=cached_result, max_age=max_age ) @@ -596,7 +609,9 @@ class Cache: except Exception as e: verbose_logger.exception(f"LiteLLM Cache: Excepton add_cache: {str(e)}") - async def async_add_cache(self, result, **kwargs): + async def async_add_cache( + self, result, dynamic_cache_object: Optional[BaseCache], **kwargs + ): """ Async implementation of add_cache """ @@ -610,12 +625,18 @@ class Cache: cache_key, cached_data, kwargs = self._add_cache_logic( result=result, **kwargs ) - - await self.cache.async_set_cache(cache_key, cached_data, **kwargs) + if dynamic_cache_object is not None: + await dynamic_cache_object.async_set_cache( + cache_key, cached_data, **kwargs + ) + else: + await self.cache.async_set_cache(cache_key, cached_data, **kwargs) except Exception as e: verbose_logger.exception(f"LiteLLM Cache: Excepton add_cache: {str(e)}") - def _convert_to_cached_embedding(self, embedding_response: Any, model: Optional[str]) -> CachedEmbedding: + def _convert_to_cached_embedding( + self, embedding_response: Any, model: Optional[str] + ) -> CachedEmbedding: """ Convert any embedding response into the standardized CachedEmbedding TypedDict format. """ @@ -627,7 +648,7 @@ class Cache: "object": embedding_response.get("object"), "model": model, } - elif hasattr(embedding_response, 'model_dump'): + elif hasattr(embedding_response, "model_dump"): data = embedding_response.model_dump() return { "embedding": data.get("embedding"), @@ -646,7 +667,6 @@ class Cache: except KeyError as e: raise ValueError(f"Missing expected key in embedding response: {e}") - def add_embedding_response_to_cache( self, result: EmbeddingResponse, @@ -657,18 +677,22 @@ class Cache: preset_cache_key = self.get_cache_key(**{**kwargs, "input": input}) kwargs["cache_key"] = preset_cache_key embedding_response = result.data[idx_in_result_data] - + # Always convert to properly typed CachedEmbedding model_name = result.model - embedding_dict: CachedEmbedding = self._convert_to_cached_embedding(embedding_response, model_name) - + embedding_dict: CachedEmbedding = self._convert_to_cached_embedding( + embedding_response, model_name + ) + cache_key, cached_data, kwargs = self._add_cache_logic( result=embedding_dict, **kwargs, ) return cache_key, cached_data, kwargs - async def async_add_cache_pipeline(self, result, **kwargs): + async def async_add_cache_pipeline( + self, result, dynamic_cache_object: Optional[BaseCache], **kwargs + ): """ Async implementation of add_cache for Embedding calls @@ -697,14 +721,14 @@ class Cache: ) cache_list.append((cache_key, cached_data)) - await self.cache.async_set_cache_pipeline(cache_list=cache_list, **kwargs) - # if async_set_cache_pipeline: - # await async_set_cache_pipeline(cache_list=cache_list, **kwargs) - # else: - # tasks = [] - # for val in cache_list: - # tasks.append(self.cache.async_set_cache(val[0], val[1], **kwargs)) - # await asyncio.gather(*tasks) + if dynamic_cache_object is not None: + await dynamic_cache_object.async_set_cache_pipeline( + cache_list=cache_list, **kwargs + ) + else: + await self.cache.async_set_cache_pipeline( + cache_list=cache_list, **kwargs + ) except Exception as e: verbose_logger.exception(f"LiteLLM Cache: Excepton add_cache: {str(e)}") diff --git a/litellm/caching/caching_handler.py b/litellm/caching/caching_handler.py index dcc59b2071..f41b745bb1 100644 --- a/litellm/caching/caching_handler.py +++ b/litellm/caching/caching_handler.py @@ -1,5 +1,5 @@ """ -This contains LLMCachingHandler +This contains LLMCachingHandler This exposes two methods: - async_get_cache @@ -18,6 +18,7 @@ import asyncio import datetime import inspect import threading +from functools import lru_cache, wraps from typing import ( TYPE_CHECKING, Any, @@ -35,11 +36,13 @@ from pydantic import BaseModel import litellm from litellm._logging import print_verbose, verbose_logger +from litellm._service_logger import ServiceLogging +from litellm.caching import InMemoryCache from litellm.caching.caching import S3Cache -from litellm.types.caching import CachedEmbedding from litellm.litellm_core_utils.logging_utils import ( _assemble_complete_response_from_streaming_chunks, ) +from litellm.types.caching import CachedEmbedding from litellm.types.rerank import RerankResponse from litellm.types.utils import ( CallTypes, @@ -68,7 +71,12 @@ class CachingHandlerResponse(BaseModel): cached_result: Optional[Any] = None final_embedding_cached_response: Optional[EmbeddingResponse] = None - embedding_all_elements_cache_hit: bool = False # this is set to True when all elements in the list have a cache hit in the embedding cache, if true return the final_embedding_cached_response no need to make an API call + embedding_all_elements_cache_hit: bool = ( + False # this is set to True when all elements in the list have a cache hit in the embedding cache, if true return the final_embedding_cached_response no need to make an API call + ) + + +in_memory_cache_obj = InMemoryCache() class LLMCachingHandler: @@ -78,11 +86,20 @@ class LLMCachingHandler: request_kwargs: Dict[str, Any], start_time: datetime.datetime, ): + from litellm.caching import DualCache, RedisCache + self.async_streaming_chunks: List[ModelResponse] = [] self.sync_streaming_chunks: List[ModelResponse] = [] self.request_kwargs = request_kwargs self.original_function = original_function self.start_time = start_time + if litellm.cache is not None and isinstance(litellm.cache.cache, RedisCache): + self.dual_cache: Optional[DualCache] = DualCache( + redis_cache=litellm.cache.cache, + in_memory_cache=in_memory_cache_obj, + ) + else: + self.dual_cache = None pass async def _async_get_cache( @@ -115,10 +132,16 @@ class LLMCachingHandler: Raises: None """ + from litellm.litellm_core_utils.core_helpers import ( + _get_parent_otel_span_from_kwargs, + ) from litellm.utils import CustomStreamWrapper + kwargs = kwargs.copy() args = args or () + parent_otel_span = _get_parent_otel_span_from_kwargs(kwargs) + kwargs["parent_otel_span"] = parent_otel_span final_embedding_cached_response: Optional[EmbeddingResponse] = None embedding_all_elements_cache_hit: bool = False cached_result: Optional[Any] = None @@ -306,13 +329,15 @@ class LLMCachingHandler: else: raise ValueError("input must be a string or a list") - def _extract_model_from_cached_results(self, non_null_list: List[Tuple[int, CachedEmbedding]]) -> Optional[str]: + def _extract_model_from_cached_results( + self, non_null_list: List[Tuple[int, CachedEmbedding]] + ) -> Optional[str]: """ Helper method to extract the model name from cached results. - + Args: non_null_list: List of (idx, cr) tuples where cr is the cached result dict - + Returns: Optional[str]: The model name if found, None otherwise """ @@ -558,7 +583,12 @@ class LLMCachingHandler: preset_cache_key = litellm.cache.get_cache_key( **{**new_kwargs, "input": i} ) - tasks.append(litellm.cache.async_get_cache(cache_key=preset_cache_key)) + tasks.append( + litellm.cache.async_get_cache( + cache_key=preset_cache_key, + dynamic_cache_object=self.dual_cache, + ) + ) cached_result = await asyncio.gather(*tasks) ## check if cached result is None ## if cached_result is not None and isinstance(cached_result, list): @@ -567,9 +597,14 @@ class LLMCachingHandler: cached_result = None else: if litellm.cache._supports_async() is True: - cached_result = await litellm.cache.async_get_cache(**new_kwargs) + ## check if dual cache is supported ## + cached_result = await litellm.cache.async_get_cache( + dynamic_cache_object=self.dual_cache, **new_kwargs + ) else: # for s3 caching. [NOT RECOMMENDED IN PROD - this will slow down responses since boto3 is sync] - cached_result = litellm.cache.get_cache(**new_kwargs) + cached_result = litellm.cache.get_cache( + dynamic_cache_object=self.dual_cache, **new_kwargs + ) return cached_result def _convert_cached_result_to_model_response( @@ -735,6 +770,9 @@ class LLMCachingHandler: Raises: None """ + from litellm.litellm_core_utils.core_helpers import ( + _get_parent_otel_span_from_kwargs, + ) if litellm.cache is None: return @@ -746,6 +784,8 @@ class LLMCachingHandler: args, ) ) + parent_otel_span = _get_parent_otel_span_from_kwargs(new_kwargs) + new_kwargs["parent_otel_span"] = parent_otel_span # [OPTIONAL] ADD TO CACHE if self._should_store_result_in_cache( original_function=original_function, kwargs=new_kwargs @@ -764,7 +804,9 @@ class LLMCachingHandler: ) # s3 doesn't support bulk writing. Exclude. ): asyncio.create_task( - litellm.cache.async_add_cache_pipeline(result, **new_kwargs) + litellm.cache.async_add_cache_pipeline( + result, dynamic_cache_object=self.dual_cache, **new_kwargs + ) ) elif isinstance(litellm.cache.cache, S3Cache): threading.Thread( @@ -775,7 +817,9 @@ class LLMCachingHandler: else: asyncio.create_task( litellm.cache.async_add_cache( - result.model_dump_json(), **new_kwargs + result.model_dump_json(), + dynamic_cache_object=self.dual_cache, + **new_kwargs, ) ) else: @@ -933,9 +977,9 @@ class LLMCachingHandler: } if litellm.cache is not None: - litellm_params[ - "preset_cache_key" - ] = litellm.cache._get_preset_cache_key_from_kwargs(**kwargs) + litellm_params["preset_cache_key"] = ( + litellm.cache._get_preset_cache_key_from_kwargs(**kwargs) + ) else: litellm_params["preset_cache_key"] = None diff --git a/litellm/caching/redis_cache.py b/litellm/caching/redis_cache.py index b8091187bf..47bc0222ed 100644 --- a/litellm/caching/redis_cache.py +++ b/litellm/caching/redis_cache.py @@ -43,6 +43,45 @@ else: Span = Any +def _get_call_stack_info(num_frames: int = 2) -> str: + """ + Get the function names from the previous 1-2 functions in the call stack. + + Args: + num_frames: Number of previous frames to include (default: 2) + + Returns: + A string with format "current_function <- caller_function [<- grandparent_function]" + """ + try: + current_frame = inspect.currentframe() + if current_frame is None: + return "unknown" + + # Skip this function and the immediate caller (which sets call_type) + f_back = current_frame.f_back + if f_back is None: + return "unknown" + frame = f_back.f_back + if frame is None: + return "unknown" + function_names = [] + + for _ in range(num_frames): + if frame is None: + break + func_name = frame.f_code.co_name + function_names.append(func_name) + frame = frame.f_back + + if not function_names: + return "unknown" + + return " <- ".join(function_names) + except Exception: + return "unknown" + + class RedisCache(BaseCache): # if users don't provider one, use the default litellm cache @@ -181,7 +220,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="set_cache", + call_type=f"set_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -205,7 +244,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="increment_cache", + call_type=f"increment_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -219,7 +258,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="increment_cache_ttl", + call_type=f"increment_cache_ttl <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -232,7 +271,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="increment_cache_expire", + call_type=f"increment_cache_expire <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -271,7 +310,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_scan_iter", + call_type=f"async_scan_iter <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -287,7 +326,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_scan_iter", + call_type=f"async_scan_iter <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -341,7 +380,7 @@ class RedisCache(BaseCache): start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), - call_type="async_set_cache", + call_type=f"async_set_cache <- {_get_call_stack_info()}", ) ) verbose_logger.error( @@ -374,7 +413,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_set_cache", + call_type=f"async_set_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -390,7 +429,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_set_cache", + call_type=f"async_set_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -463,7 +502,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_set_cache_pipeline", + call_type=f"async_set_cache_pipeline <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -479,7 +518,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_set_cache_pipeline", + call_type=f"async_set_cache_pipeline <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -528,7 +567,7 @@ class RedisCache(BaseCache): start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), - call_type="async_set_cache_sadd", + call_type=f"async_set_cache_sadd <- {_get_call_stack_info()}", ) ) # NON blocking - notify users Redis is throwing an exception @@ -554,7 +593,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_set_cache_sadd", + call_type=f"async_set_cache_sadd <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -568,7 +607,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_set_cache_sadd", + call_type=f"async_set_cache_sadd <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -620,7 +659,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_increment", + call_type=f"async_increment <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -636,7 +675,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_increment", + call_type=f"async_increment <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -683,7 +722,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="get_cache", + call_type=f"get_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -745,7 +784,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="batch_get_cache", + call_type=f"batch_get_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -790,7 +829,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_get_cache", + call_type=f"async_get_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -806,7 +845,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_get_cache", + call_type=f"async_get_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -851,7 +890,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_batch_get_cache", + call_type=f"async_batch_get_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -879,7 +918,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_batch_get_cache", + call_type=f"async_batch_get_cache <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=parent_otel_span, @@ -903,7 +942,7 @@ class RedisCache(BaseCache): self.service_logger_obj.service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="sync_ping", + call_type=f"sync_ping <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, ) @@ -917,7 +956,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="sync_ping", + call_type=f"sync_ping <- {_get_call_stack_info()}", ) verbose_logger.error( f"LiteLLM Redis Cache PING: - Got exception from REDIS : {str(e)}" @@ -938,7 +977,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_ping", + call_type=f"async_ping <- {_get_call_stack_info()}", ) ) return response @@ -952,7 +991,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_ping", + call_type=f"async_ping <- {_get_call_stack_info()}", ) ) verbose_logger.error( @@ -1051,7 +1090,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_increment_pipeline", + call_type=f"async_increment_pipeline <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -1067,7 +1106,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_increment_pipeline", + call_type=f"async_increment_pipeline <- {_get_call_stack_info()}", start_time=start_time, end_time=end_time, parent_otel_span=_get_parent_otel_span_from_kwargs(kwargs), @@ -1131,7 +1170,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_rpush", + call_type=f"async_rpush <- {_get_call_stack_info()}", ) ) return response @@ -1145,7 +1184,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_rpush", + call_type=f"async_rpush <- {_get_call_stack_info()}", ) ) verbose_logger.error( @@ -1202,7 +1241,7 @@ class RedisCache(BaseCache): self.service_logger_obj.async_service_success_hook( service=ServiceTypes.REDIS, duration=_duration, - call_type="async_lpop", + call_type=f"async_lpop <- {_get_call_stack_info()}", ) ) @@ -1230,7 +1269,7 @@ class RedisCache(BaseCache): service=ServiceTypes.REDIS, duration=_duration, error=e, - call_type="async_lpop", + call_type=f"async_lpop <- {_get_call_stack_info()}", ) ) verbose_logger.error( diff --git a/litellm/proxy/_experimental/mcp_server/db.py b/litellm/proxy/_experimental/mcp_server/db.py index 3d90c99eee..d5d9f97890 100644 --- a/litellm/proxy/_experimental/mcp_server/db.py +++ b/litellm/proxy/_experimental/mcp_server/db.py @@ -1,6 +1,7 @@ import uuid from typing import Any, Dict, Iterable, List, Optional, Set, Union +from litellm._logging import verbose_proxy_logger from litellm.proxy._types import ( LiteLLM_MCPServerTable, LiteLLM_ObjectPermissionTable, @@ -53,11 +54,20 @@ async def get_all_mcp_servers( """ Returns all of the mcp servers from the db """ - mcp_servers = await prisma_client.db.litellm_mcpservertable.find_many() + try: + mcp_servers = await prisma_client.db.litellm_mcpservertable.find_many() - return [ - LiteLLM_MCPServerTable(**mcp_server.model_dump()) for mcp_server in mcp_servers - ] + return [ + LiteLLM_MCPServerTable(**mcp_server.model_dump()) + for mcp_server in mcp_servers + ] + except Exception as e: + verbose_proxy_logger.debug( + "litellm.proxy._experimental.mcp_server.db.py::get_all_mcp_servers - {}".format( + str(e) + ) + ) + return [] async def get_mcp_server( @@ -91,9 +101,7 @@ async def get_mcp_servers( ) final_mcp_servers: List[LiteLLM_MCPServerTable] = [] for _mcp_server in _mcp_servers: - final_mcp_servers.append( - LiteLLM_MCPServerTable(**_mcp_server.model_dump()) - ) + final_mcp_servers.append(LiteLLM_MCPServerTable(**_mcp_server.model_dump())) return final_mcp_servers diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index b587913a08..cb41dfbd75 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -1,5 +1,24 @@ +general_settings: + store_model_in_db: true + database_connection_pool_limit: 20 + store_prompts_in_spend_logs: true + maximum_spend_logs_retention_period: "14d" + model_list: - - model_name: openai-test + - model_name: fake-openai-endpoint litellm_params: - model: gpt-3.5-turbo - api_key: os.environ/OPENAI_API_KEY \ No newline at end of file + model: openai/my-fake-model + api_key: my-fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + - model_name: bedrock-thinking-us.anthropic.claude-3-7-sonnet-20250219-v1:0 + litellm_params: + model: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 + thinking: {"type": "enabled", "budget_tokens": 1024} + max_tokens: 1080 + merge_reasoning_content_in_choices: true + +litellm_settings: + return_response_headers: true + store_audit_logs: true + callbacks: ["prometheus", "resend_email", "otel"] + cache: true \ No newline at end of file diff --git a/litellm/proxy/hooks/parallel_request_limiter_v3.py b/litellm/proxy/hooks/parallel_request_limiter_v3.py index b5fd819eb2..dde0542c7d 100644 --- a/litellm/proxy/hooks/parallel_request_limiter_v3.py +++ b/litellm/proxy/hooks/parallel_request_limiter_v3.py @@ -1,8 +1,9 @@ """ -This is a rate limiter implementation based on a similar one by Envoy proxy. +This is a rate limiter implementation based on a similar one by Envoy proxy. This is currently in development and not yet ready for production. """ + import os from datetime import datetime from typing import ( @@ -309,13 +310,15 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): continue key_metadata[window_key] = { - "requests_limit": int(requests_limit) - if requests_limit is not None - else None, + "requests_limit": ( + int(requests_limit) if requests_limit is not None else None + ), "tokens_limit": int(tokens_limit) if tokens_limit is not None else None, - "max_parallel_requests_limit": int(max_parallel_requests_limit) - if max_parallel_requests_limit is not None - else None, + "max_parallel_requests_limit": ( + int(max_parallel_requests_limit) + if max_parallel_requests_limit is not None + else None + ), "window_size": int(window_size), "descriptor_key": descriptor_key, } @@ -394,7 +397,11 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): descriptors = [] # API Key rate limits - if user_api_key_dict.api_key: + if user_api_key_dict.api_key and ( + user_api_key_dict.rpm_limit is not None + or user_api_key_dict.tpm_limit is not None + or user_api_key_dict.max_parallel_requests is not None + ): descriptors.append( RateLimitDescriptor( key="api_key", @@ -409,7 +416,10 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): ) # User rate limits - if user_api_key_dict.user_id: + if user_api_key_dict.user_id and ( + user_api_key_dict.user_rpm_limit is not None + or user_api_key_dict.user_tpm_limit is not None + ): descriptors.append( RateLimitDescriptor( key="user", @@ -423,7 +433,10 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): ) # Team rate limits - if user_api_key_dict.team_id: + if user_api_key_dict.team_id and ( + user_api_key_dict.team_rpm_limit is not None + or user_api_key_dict.team_tpm_limit is not None + ): descriptors.append( RateLimitDescriptor( key="team", @@ -437,7 +450,10 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): ) # End user rate limits - if user_api_key_dict.end_user_id: + if user_api_key_dict.end_user_id and ( + user_api_key_dict.end_user_rpm_limit is not None + or user_api_key_dict.end_user_tpm_limit is not None + ): descriptors.append( RateLimitDescriptor( key="end_user", @@ -483,28 +499,29 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): ) ) - # Check rate limits - response = await self.should_rate_limit( - descriptors=descriptors, - parent_otel_span=user_api_key_dict.parent_otel_span, - ) + # Only check rate limits if we have descriptors with actual limits + if descriptors: + response = await self.should_rate_limit( + descriptors=descriptors, + parent_otel_span=user_api_key_dict.parent_otel_span, + ) - if response["overall_code"] == "OVER_LIMIT": - # Find which descriptor hit the limit - for i, status in enumerate(response["statuses"]): - if status["code"] == "OVER_LIMIT": - descriptor = descriptors[i] - raise HTTPException( - status_code=429, - detail=f"Rate limit exceeded for {descriptor['key']}: {descriptor['value']}. Remaining: {status['limit_remaining']}", - headers={ - "retry-after": str(self.window_size) - }, # Retry after 1 minute - ) + if response["overall_code"] == "OVER_LIMIT": + # Find which descriptor hit the limit + for i, status in enumerate(response["statuses"]): + if status["code"] == "OVER_LIMIT": + descriptor = descriptors[i] + raise HTTPException( + status_code=429, + detail=f"Rate limit exceeded for {descriptor['key']}: {descriptor['value']}. Remaining: {status['limit_remaining']}", + headers={ + "retry-after": str(self.window_size) + }, # Retry after 1 minute + ) - else: - # add descriptors to request headers - data["litellm_proxy_rate_limit_response"] = response + else: + # add descriptors to request headers + data["litellm_proxy_rate_limit_response"] = response def _create_pipeline_operations( self, @@ -690,9 +707,9 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): from litellm.types.caching import RedisPipelineIncrementOperation try: - litellm_parent_otel_span: Union[ - Span, None - ] = _get_parent_otel_span_from_kwargs(kwargs) + litellm_parent_otel_span: Union[Span, None] = ( + _get_parent_otel_span_from_kwargs(kwargs) + ) user_api_key = kwargs["litellm_params"]["metadata"].get("user_api_key") pipeline_operations: List[RedisPipelineIncrementOperation] = [] diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index f29ab7c588..6b33e92c48 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -2720,7 +2720,10 @@ class ProxyConfig: alert_types=general_settings["alert_types"], llm_router=llm_router ) - if _general_settings is not None and "alert_to_webhook_url" in _general_settings: + if ( + _general_settings is not None + and "alert_to_webhook_url" in _general_settings + ): general_settings["alert_to_webhook_url"] = _general_settings[ "alert_to_webhook_url" ] @@ -2940,9 +2943,16 @@ class ProxyConfig: async def _init_prompts_in_db(self, prisma_client: PrismaClient): from litellm.proxy.prompts.prompt_registry import IN_MEMORY_PROMPT_REGISTRY - prompts_in_db = await prisma_client.db.litellm_prompttable.find_many() - for prompt in prompts_in_db: - IN_MEMORY_PROMPT_REGISTRY.initialize_prompt(prompt=prompt) + try: + prompts_in_db = await prisma_client.db.litellm_prompttable.find_many() + for prompt in prompts_in_db: + IN_MEMORY_PROMPT_REGISTRY.initialize_prompt(prompt=prompt) + except Exception as e: + verbose_proxy_logger.debug( + "litellm.proxy.proxy_server.py::ProxyConfig:_init_prompts_in_db - {}".format( + str(e) + ) + ) async def _init_guardrails_in_db(self, prisma_client: PrismaClient): from litellm.proxy.guardrails.guardrail_registry import ( diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 0e6b242bdb..f3affa707a 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -22,7 +22,7 @@ from typing import ( overload, ) -from litellm.constants import MAX_TEAM_LIST_LIMIT, DEFAULT_MODEL_CREATED_AT_TIME +from litellm.constants import DEFAULT_MODEL_CREATED_AT_TIME, MAX_TEAM_LIST_LIMIT from litellm.proxy._types import ( DB_CONNECTION_ERROR_TYPES, CommonProxyErrors, @@ -448,7 +448,6 @@ class ProxyLogging: litellm_parent_otel_span=None, ) - def _convert_user_api_key_auth_to_dict(self, user_api_key_auth_obj): """ Helper function to convert UserAPIKeyAuth object to dictionary. @@ -728,15 +727,19 @@ class ProxyLogging: } return result - def _create_mcp_request_object_from_kwargs(self, kwargs: dict) -> "MCPPreCallRequestObject": + def _create_mcp_request_object_from_kwargs( + self, kwargs: dict + ) -> "MCPPreCallRequestObject": """ Helper function to create MCPPreCallRequestObject from kwargs for standard pre_call_hook. """ from litellm.types.llms.base import HiddenParams from litellm.types.mcp import MCPPreCallRequestObject - user_api_key_auth_dict = self._convert_user_api_key_auth_to_dict(kwargs.get("user_api_key_auth")) - + user_api_key_auth_dict = self._convert_user_api_key_auth_to_dict( + kwargs.get("user_api_key_auth") + ) + return MCPPreCallRequestObject( tool_name=kwargs.get("name", ""), arguments=kwargs.get("arguments", {}), @@ -745,22 +748,23 @@ class ProxyLogging: hidden_params=HiddenParams(), ) - def _convert_mcp_hook_response_to_kwargs(self, response_data: Optional[dict], original_kwargs: dict) -> dict: + def _convert_mcp_hook_response_to_kwargs( + self, response_data: Optional[dict], original_kwargs: dict + ) -> dict: """ Helper function to convert pre_call_hook response back to kwargs for MCP usage. """ if not response_data: return original_kwargs - + # Apply any argument modifications from the hook response modified_kwargs = original_kwargs.copy() - + # If the response contains modified arguments, apply them if response_data.get("modified_arguments"): modified_kwargs["arguments"] = response_data["modified_arguments"] - - return modified_kwargs + return modified_kwargs async def process_pre_call_hook_response(self, response, data, call_type): if isinstance(response, Exception): @@ -894,6 +898,7 @@ class ProxyLogging: try: for callback in litellm.callbacks: + start_time = time.time() _callback = None if isinstance(callback, str): _callback = litellm.litellm_core_utils.litellm_logging.get_custom_logger_compatible_class( @@ -903,15 +908,13 @@ class ProxyLogging: _callback = callback # type: ignore if _callback is not None and isinstance(_callback, CustomGuardrail): from litellm.types.guardrails import GuardrailEventHooks - + event_type = GuardrailEventHooks.pre_call if call_type == "mcp_call": event_type = GuardrailEventHooks.pre_mcp_call - + if ( - _callback.should_run_guardrail( - data=data, event_type=event_type - ) + _callback.should_run_guardrail(data=data, event_type=event_type) is not True ): continue @@ -936,7 +939,7 @@ class ProxyLogging: ): if call_type == "mcp_call" and user_api_key_dict is None: continue - + response = await _callback.async_pre_call_hook( user_api_key_dict=user_api_key_dict, cache=self.call_details["user_api_key_cache"], @@ -948,6 +951,19 @@ class ProxyLogging: response=response, data=data, call_type=call_type ) + end_time = time.time() + duration = end_time - start_time + if ( + hasattr(self, "service_logging_obj") and duration > 0.01 + ): # only if duration is non-negligible - don't spam the logs + await self.service_logging_obj.async_service_success_hook( + service=ServiceTypes.PROXY_PRE_CALL, + duration=duration, + call_type=f"{_callback.__class__.__name__}", + parent_otel_span=user_api_key_dict.parent_otel_span, + start_time=start_time, + end_time=end_time, + ) return data except Exception as e: raise e @@ -999,7 +1015,9 @@ class ProxyLogging: continue # Convert user_api_key_dict to proper format for async_moderation_hook if call_type == "mcp_call": - user_api_key_auth_dict = self._convert_user_api_key_auth_to_dict(user_api_key_dict) + user_api_key_auth_dict = ( + self._convert_user_api_key_auth_to_dict(user_api_key_dict) + ) else: user_api_key_auth_dict = user_api_key_dict @@ -3668,9 +3686,10 @@ def construct_database_url_from_env_vars() -> Optional[str]: database_url = f"postgresql://{database_username_enc}@{database_host}/{database_name_enc}" return database_url - + return None + async def count_tokens_with_anthropic_api( model_to_use: str, messages: Optional[List[Dict[str, Any]]], @@ -3691,9 +3710,10 @@ async def count_tokens_with_anthropic_api( return None try: - import anthropic import os + import anthropic + # Get Anthropic API key from deployment config anthropic_api_key = None if deployment is not None: @@ -3712,7 +3732,7 @@ async def count_tokens_with_anthropic_api( response = client.beta.messages.count_tokens( model=model_to_use, messages=messages, # type: ignore - betas=["token-counting-2024-11-01"] + betas=["token-counting-2024-11-01"], ) total_tokens = response.input_tokens tokenizer_used = "anthropic_api" @@ -3723,11 +3743,16 @@ async def count_tokens_with_anthropic_api( } except ImportError: - verbose_proxy_logger.warning("Anthropic library not available, falling back to LiteLLM tokenizer") + verbose_proxy_logger.warning( + "Anthropic library not available, falling back to LiteLLM tokenizer" + ) except Exception as e: - verbose_proxy_logger.warning(f"Error calling Anthropic API: {e}, falling back to LiteLLM tokenizer") + verbose_proxy_logger.warning( + f"Error calling Anthropic API: {e}, falling back to LiteLLM tokenizer" + ) return None + async def get_available_models_for_user( user_api_key_dict: "UserAPIKeyAuth", llm_router: Optional["Router"], @@ -3743,7 +3768,7 @@ async def get_available_models_for_user( ) -> List[str]: """ Get the list of models available to a user based on their API key and team permissions. - + Args: user_api_key_dict: User API key authentication object llm_router: LiteLLM router instance @@ -3755,18 +3780,18 @@ async def get_available_models_for_user( include_model_access_groups: Whether to include model access groups only_model_access_groups: Whether to only return model access groups return_wildcard_routes: Whether to return wildcard routes - + Returns: List of model names available to the user """ + from litellm.proxy.auth.auth_checks import get_team_object from litellm.proxy.auth.model_checks import ( + get_complete_model_list, get_key_models, get_team_models, - get_complete_model_list, ) - from litellm.proxy.auth.auth_checks import get_team_object from litellm.proxy.management_endpoints.team_endpoints import validate_membership - + # Get proxy model list and access groups if llm_router is None: proxy_model_list = [] @@ -3831,19 +3856,19 @@ def create_model_info_response( ) -> dict: """ Create a standardized model info response. - + Args: model_id: The model ID provider: The model provider include_metadata: Whether to include metadata fallback_type: Type of fallbacks to include llm_router: LiteLLM router instance - + Returns: Dictionary containing model information """ from litellm.proxy.auth.model_checks import get_all_fallbacks - + model_info = { "id": model_id, "object": "model", @@ -3886,16 +3911,18 @@ def validate_model_access( ) -> None: """ Validate that a model is accessible to the user. - + Args: model_id: The model ID to validate available_models: List of models available to the user - + Raises: HTTPException: If the model is not accessible """ if model_id not in available_models: raise HTTPException( status_code=404, - detail="The model `{}` does not exist or is not accessible".format(model_id) + detail="The model `{}` does not exist or is not accessible".format( + model_id + ), ) diff --git a/litellm/router.py b/litellm/router.py index 3be88596b1..dbd5b4c6b2 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -4308,6 +4308,8 @@ class Router: """ Track remaining tpm/rpm quota for model in model_list """ + from litellm.types.caching import RedisPipelineIncrementOperation + try: standard_logging_object: Optional[StandardLoggingPayload] = kwargs.get( "standard_logging_object", None @@ -4327,6 +4329,39 @@ class Router: elif isinstance(id, int): id = str(id) + ## get deployment info + deployment_info = self.get_deployment(model_id=id) + + if deployment_info is None: + return + else: + deployment_model_info = self.get_router_model_info( + deployment=deployment_info.model_dump(), + received_model_name=model_group, + ) + # get tpm/rpm from deployment info + tpm = deployment_info.get("tpm", None) + rpm = deployment_info.get("rpm", None) + + ## check tpm/rpm in litellm_params + tpm_litellm_params = deployment_info.litellm_params.tpm + rpm_litellm_params = deployment_info.litellm_params.rpm + + ## check tpm/rpm in model_info + tpm_model_info = deployment_model_info.get("tpm", None) + rpm_model_info = deployment_model_info.get("rpm", None) + + ## if all are none, return - no need to track current tpm/rpm usage for models with no tpm/rpm set + if ( + tpm is None + and rpm is None + and tpm_litellm_params is None + and rpm_litellm_params is None + and tpm_model_info is None + and rpm_model_info is None + ): + return + parent_otel_span = _get_parent_otel_span_from_kwargs(kwargs) total_tokens: float = standard_logging_object.get("total_tokens", 0) @@ -4346,23 +4381,32 @@ class Router: # ------------ # update cache + pipeline_operations: List[RedisPipelineIncrementOperation] = [] + ## TPM - await self.cache.async_increment_cache( - key=tpm_key, - value=total_tokens, - parent_otel_span=parent_otel_span, - ttl=RoutingArgs.ttl.value, + pipeline_operations.append( + RedisPipelineIncrementOperation( + key=tpm_key, + increment_value=total_tokens, + ttl=RoutingArgs.ttl.value, + ) ) ## RPM rpm_key = RouterCacheEnum.RPM.value.format( id=id, current_minute=current_minute, model=deployment_name ) - await self.cache.async_increment_cache( - key=rpm_key, - value=1, + pipeline_operations.append( + RedisPipelineIncrementOperation( + key=rpm_key, + increment_value=1, + ttl=RoutingArgs.ttl.value, + ) + ) + + await self.cache.async_increment_cache_pipeline( + increment_list=pipeline_operations, parent_otel_span=parent_otel_span, - ttl=RoutingArgs.ttl.value, ) increment_deployment_successes_for_current_minute( diff --git a/tests/local_testing/test_amazing_vertex_completion.py b/tests/local_testing/test_amazing_vertex_completion.py index 398a57e340..23502a1434 100644 --- a/tests/local_testing/test_amazing_vertex_completion.py +++ b/tests/local_testing/test_amazing_vertex_completion.py @@ -167,7 +167,6 @@ async def test_get_response(): pytest.fail(f"An error occurred - {str(e)}") - @pytest.mark.skip( reason="Local test. Vertex AI Quota is low. Leads to rate limit errors on ci/cd." ) @@ -547,7 +546,6 @@ def test_completion_function_plus_pdf(load_pdf): except Exception as e: pytest.fail("Got={}".format(str(e))) - def encode_image(image_path): import base64 @@ -765,9 +763,7 @@ def test_gemini_pro_grounding(value_in_dict): # @pytest.mark.skip(reason="exhausted vertex quota. need to refactor to mock the call") -@pytest.mark.parametrize( - "model", ["vertex_ai_beta/gemini-1.5-pro"] -) # "vertex_ai", +@pytest.mark.parametrize("model", ["vertex_ai_beta/gemini-1.5-pro"]) # "vertex_ai", @pytest.mark.parametrize("sync_mode", [True]) # "vertex_ai", @pytest.mark.asyncio @pytest.mark.flaky(retries=3, delay=1) diff --git a/tests/local_testing/test_router_utils.py b/tests/local_testing/test_router_utils.py index f3b0238be5..e5ead7a701 100644 --- a/tests/local_testing/test_router_utils.py +++ b/tests/local_testing/test_router_utils.py @@ -240,7 +240,7 @@ async def test_call_router_callbacks_on_success(): ) with patch.object( - router.cache, "async_increment_cache", new=AsyncMock() + router.cache, "async_increment_cache_pipeline", new=AsyncMock() ) as mock_callback: await router.acompletion( model="gemini/gemini-1.5-flash", @@ -248,18 +248,22 @@ async def test_call_router_callbacks_on_success(): mock_response="Hello, I'm good.", ) await asyncio.sleep(1) - assert mock_callback.call_count == 2 + assert mock_callback.call_count == 1 - assert ( - mock_callback.call_args_list[0] - .kwargs["key"] - .startswith("global_router:1:gemini/gemini-1.5-flash:tpm") - ) - assert ( - mock_callback.call_args_list[1] - .kwargs["key"] - .startswith("global_router:1:gemini/gemini-1.5-flash:rpm") - ) + increment_list = mock_callback.call_args_list[0].kwargs["increment_list"] + assert len(increment_list) == 2 + + for increment in increment_list: + if "tpm" in increment["key"]: + assert increment["key"].startswith( + "global_router:1:gemini/gemini-1.5-flash:tpm" + ) + assert increment["increment_value"] == 30 + elif "rpm" in increment["key"]: + assert increment["key"].startswith( + "global_router:1:gemini/gemini-1.5-flash:rpm" + ) + assert increment["increment_value"] == 1 @pytest.mark.asyncio @@ -456,7 +460,15 @@ def test_router_get_deployment_credentials(): def test_router_get_deployment_model_info(): router = Router( - model_list=[{"model_name": "gemini/*", "litellm_params": {"model": "gemini/*"}, "model_info": {"id": "1"}}] + model_list=[ + { + "model_name": "gemini/*", + "litellm_params": {"model": "gemini/*"}, + "model_info": {"id": "1"}, + } + ] + ) + model_info = router.get_deployment_model_info( + model_id="1", model_name="gemini/gemini-1.5-flash" ) - model_info = router.get_deployment_model_info(model_id="1", model_name="gemini/gemini-1.5-flash") assert model_info is not None diff --git a/tests/test_litellm/proxy/hooks/test_parallel_request_limiter_v3.py b/tests/test_litellm/proxy/hooks/test_parallel_request_limiter_v3.py index 2ae1fea59d..f76bc225e5 100644 --- a/tests/test_litellm/proxy/hooks/test_parallel_request_limiter_v3.py +++ b/tests/test_litellm/proxy/hooks/test_parallel_request_limiter_v3.py @@ -1,6 +1,7 @@ """ Unit Tests for the max parallel request limiter v3 for the proxy """ + import asyncio import os import sys @@ -515,3 +516,209 @@ async def test_async_log_failure_event_v3(): assert op["key"] == f"{{api_key:{_api_key}}}:max_parallel_requests" assert op["increment_value"] == -1 assert op["ttl"] == 60 # default window size + + +@pytest.mark.asyncio +async def test_should_rate_limit_only_called_when_limits_exist_v3(): + """ + Test that should_rate_limit is only called when actual rate limits are configured. + This verifies the optimization that avoids unnecessary rate limit checks. + """ + _api_key = "sk-12345" + _api_key = hash_token(_api_key) + local_cache = DualCache() + parallel_request_handler = _PROXY_MaxParallelRequestsHandler( + internal_usage_cache=InternalUsageCache(local_cache) + ) + + # Mock should_rate_limit to track if it's called + should_rate_limit_called = False + + async def mock_should_rate_limit(*args, **kwargs): + nonlocal should_rate_limit_called + should_rate_limit_called = True + return {"overall_code": "OK", "statuses": []} + + parallel_request_handler.should_rate_limit = mock_should_rate_limit + + # Test 1: No rate limits configured - should_rate_limit should NOT be called + should_rate_limit_called = False + user_api_key_dict_no_limits = UserAPIKeyAuth( + api_key=_api_key, + user_id="test_user", + team_id="test_team", + end_user_id="test_end_user", + # No rpm_limit, tpm_limit, max_parallel_requests, etc. + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_no_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, + call_type="", + ) + + assert ( + not should_rate_limit_called + ), "should_rate_limit should not be called when no rate limits are configured" + + # Test 2: API key rate limits configured - should_rate_limit SHOULD be called + should_rate_limit_called = False + user_api_key_dict_with_api_limits = UserAPIKeyAuth( + api_key=_api_key, + rpm_limit=100, # Rate limit configured + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_api_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, + call_type="", + ) + + assert ( + should_rate_limit_called + ), "should_rate_limit should be called when API key rate limits are configured" + + # Test 3: User rate limits configured - should_rate_limit SHOULD be called + should_rate_limit_called = False + user_api_key_dict_with_user_limits = UserAPIKeyAuth( + api_key=_api_key, + user_id="test_user", + user_tpm_limit=1000, # User rate limit configured + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_user_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, + call_type="", + ) + + assert ( + should_rate_limit_called + ), "should_rate_limit should be called when user rate limits are configured" + + # Test 4: Team rate limits configured - should_rate_limit SHOULD be called + should_rate_limit_called = False + user_api_key_dict_with_team_limits = UserAPIKeyAuth( + api_key=_api_key, + team_id="test_team", + team_rpm_limit=500, # Team rate limit configured + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_team_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, + call_type="", + ) + + assert ( + should_rate_limit_called + ), "should_rate_limit should be called when team rate limits are configured" + + # Test 5: End user rate limits configured - should_rate_limit SHOULD be called + should_rate_limit_called = False + user_api_key_dict_with_end_user_limits = UserAPIKeyAuth( + api_key=_api_key, + end_user_id="test_end_user", + end_user_rpm_limit=200, # End user rate limit configured + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_end_user_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, + call_type="", + ) + + assert ( + should_rate_limit_called + ), "should_rate_limit should be called when end user rate limits are configured" + + # Test 6: Max parallel requests configured - should_rate_limit SHOULD be called + should_rate_limit_called = False + user_api_key_dict_with_parallel_limits = UserAPIKeyAuth( + api_key=_api_key, + max_parallel_requests=5, # Max parallel requests configured + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_parallel_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, + call_type="", + ) + + assert ( + should_rate_limit_called + ), "should_rate_limit should be called when max parallel requests are configured" + + +@pytest.mark.asyncio +async def test_model_specific_rate_limits_only_called_when_configured_v3(): + """ + Test that model-specific rate limits only trigger should_rate_limit when actually configured for the requested model. + """ + from litellm.proxy.auth.auth_utils import ( + get_key_model_rpm_limit, + get_key_model_tpm_limit, + ) + + _api_key = "sk-12345" + _api_key = hash_token(_api_key) + local_cache = DualCache() + parallel_request_handler = _PROXY_MaxParallelRequestsHandler( + internal_usage_cache=InternalUsageCache(local_cache) + ) + + # Mock should_rate_limit to track if it's called + should_rate_limit_called = False + + async def mock_should_rate_limit(*args, **kwargs): + nonlocal should_rate_limit_called + should_rate_limit_called = True + return {"overall_code": "OK", "statuses": []} + + parallel_request_handler.should_rate_limit = mock_should_rate_limit + + # Test 1: Model-specific rate limits configured but for different model - should NOT be called + should_rate_limit_called = False + user_api_key_dict_with_model_limits = UserAPIKeyAuth( + api_key=_api_key, + metadata={ + "model_tpm_limit": {"gpt-4": 1000} + }, # Rate limit for gpt-4, not gpt-3.5-turbo + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_model_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, # Requesting different model + call_type="", + ) + + assert ( + not should_rate_limit_called + ), "should_rate_limit should not be called when model-specific limits don't match requested model" + + # Test 2: Model-specific rate limits configured for requested model - SHOULD be called + should_rate_limit_called = False + user_api_key_dict_with_matching_model_limits = UserAPIKeyAuth( + api_key=_api_key, + metadata={ + "model_tpm_limit": {"gpt-3.5-turbo": 1000} + }, # Rate limit for requested model + ) + + await parallel_request_handler.async_pre_call_hook( + user_api_key_dict=user_api_key_dict_with_matching_model_limits, + cache=local_cache, + data={"model": "gpt-3.5-turbo"}, # Requesting same model + call_type="", + ) + + assert ( + should_rate_limit_called + ), "should_rate_limit should be called when model-specific limits match requested model" From 67833590d695a630c2f70ca84ce59c6515367dc3 Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Sat, 9 Aug 2025 16:12:13 -0700 Subject: [PATCH 11/32] [Proxy changes] Litellm add model price reload schedule for multi-pod (#13470) * added mcp guardrails doc in mcp.md * add button to reload models * Added button changes * added button for scheduling reload * add multi pod support to reloading the model price json * fix ruff --- litellm/proxy/proxy_server.py | 350 +++++++++++++++- tests/test_litellm/proxy/test_proxy_server.py | 312 +++++++++++++- ui/litellm-dashboard/package-lock.json | 120 ++++++ .../src/components/model_dashboard.tsx | 48 ++- .../src/components/networking.tsx | 72 ++++ .../src/components/price_data_reload.tsx | 385 ++++++++++++++---- 6 files changed, 1171 insertions(+), 116 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 6b33e92c48..df6f734b98 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -11,6 +11,7 @@ import time import traceback import uuid import warnings +from litellm.litellm_core_utils.safe_json_dumps import safe_dumps from datetime import datetime, timedelta from typing import ( TYPE_CHECKING, @@ -981,6 +982,11 @@ proxy_logging_obj = ProxyLogging( async_result = None celery_app_conn = None celery_fn = None # Redis Queue for handling requests + +# Global variables for model cost map reload scheduling +scheduler = None +last_model_cost_map_reload = None + ### DB WRITER ### db_writer_client: Optional[AsyncHTTPHandler] = None ### logger ### @@ -2939,6 +2945,91 @@ class ProxyConfig: await self._init_mcp_servers_in_db() await self._init_pass_through_endpoints_in_db() await self._init_prompts_in_db(prisma_client=prisma_client) + await self._check_and_reload_model_cost_map(prisma_client=prisma_client) + + async def _check_and_reload_model_cost_map(self, prisma_client: PrismaClient): + """ + Check if model cost map needs to be reloaded based on database configuration. + This function runs every 10 seconds as part of _init_non_llm_objects_in_db. + """ + try: + # Get model cost map reload configuration from database + config_record = await prisma_client.db.litellm_config.find_unique( + where={"param_name": "model_cost_map_reload_config"} + ) + + if config_record is None or config_record.param_value is None: + return # No configuration found, skip reload + + config = config_record.param_value + interval_hours = config.get("interval_hours") + force_reload = config.get("force_reload", False) + + if interval_hours is None and force_reload is False: + return # No interval configured, skip reload + + current_time = datetime.utcnow() + + # Check if we need to reload based on interval or force reload + should_reload = False + + if force_reload: + should_reload = True + verbose_proxy_logger.info("Model cost map reload triggered by force reload flag") + elif interval_hours is not None: + # Use pod's in-memory last reload time + global last_model_cost_map_reload + if last_model_cost_map_reload is not None: + try: + last_reload_time = datetime.fromisoformat(last_model_cost_map_reload) + time_since_last_reload = current_time - last_reload_time + hours_since_last_reload = time_since_last_reload.total_seconds() / 3600 + + if hours_since_last_reload >= interval_hours: + should_reload = True + verbose_proxy_logger.info(f"Model cost map reload triggered by interval. Hours since last reload: {hours_since_last_reload:.2f}, Interval: {interval_hours}") + except Exception as e: + verbose_proxy_logger.warning(f"Error parsing last reload time: {e}") + # If we can't parse the last reload time, reload anyway + should_reload = True + else: + # No last reload time recorded, reload now + should_reload = True + verbose_proxy_logger.info("Model cost map reload triggered - no previous reload time recorded") + + if should_reload: + # Perform the reload + from litellm.litellm_core_utils.get_model_cost_map import get_model_cost_map + model_cost_map_url = litellm.model_cost_map_url + new_model_cost_map = get_model_cost_map(url=model_cost_map_url) + litellm.model_cost = new_model_cost_map + + # Update pod's in-memory last reload time + last_model_cost_map_reload = current_time.isoformat() + + # Clear force reload flag in database + await prisma_client.db.litellm_config.upsert( + where={"param_name": "model_cost_map_reload_config"}, + data={ + "create": { + "param_name": "model_cost_map_reload_config", + "param_value": safe_dumps({ + "interval_hours": interval_hours, + "force_reload": False + }) + }, + "update": { + "param_value": safe_dumps({ + "force_reload": False + }) + } + } + ) + + verbose_proxy_logger.info(f"Model cost map reloaded successfully. Models count: {len(new_model_cost_map) if new_model_cost_map else 0}") + + except Exception as e: + verbose_proxy_logger.exception(f"Error in _check_and_reload_model_cost_map: {str(e)}") async def _init_prompts_in_db(self, prisma_client: PrismaClient): from litellm.proxy.prompts.prompt_registry import IN_MEMORY_PROMPT_REGISTRY @@ -3537,6 +3628,7 @@ class ProxyStartupEvent: args=[prisma_client, db_writer_client, proxy_logging_obj], ) + ### ADD NEW MODELS ### store_model_in_db = ( get_secret_bool("STORE_MODEL_IN_DB", store_model_in_db) or store_model_in_db @@ -8919,24 +9011,51 @@ async def reload_model_cost_map( ) try: + global prisma_client + if prisma_client is None: + raise HTTPException( + status_code=500, + detail="Database connection not available" + ) + + # Immediately reload the model cost map in the current pod from litellm.litellm_core_utils.get_model_cost_map import get_model_cost_map - - # Get the current URL from litellm configuration model_cost_map_url = litellm.model_cost_map_url - - # Reload the model cost map new_model_cost_map = get_model_cost_map(url=model_cost_map_url) - - # Update the global model_cost variable litellm.model_cost = new_model_cost_map - verbose_proxy_logger.info("Model cost map reloaded successfully") + # Update pod's in-memory last reload time + global last_model_cost_map_reload + current_time = datetime.utcnow() + last_model_cost_map_reload = current_time.isoformat() + + # Set force reload flag in database for other pods + await prisma_client.db.litellm_config.upsert( + where={"param_name": "model_cost_map_reload_config"}, + data={ + "create": { + "param_name": "model_cost_map_reload_config", + "param_value": safe_dumps({ + "interval_hours": None, + "force_reload": True + }) + }, + "update": { + "param_value": safe_dumps({ + "force_reload": True + }) + } + } + ) + + models_count = len(new_model_cost_map) if new_model_cost_map else 0 + verbose_proxy_logger.info(f"Model cost map reloaded successfully in current pod. Models count: {models_count}") return { - "message": "Model cost map reloaded successfully", + "message": f"Price data reloaded successfully! {models_count} models updated.", "status": "success", - "timestamp": datetime.utcnow().isoformat(), - "models_count": len(new_model_cost_map) if new_model_cost_map else 0 + "models_count": models_count, + "timestamp": current_time.isoformat() } except Exception as e: verbose_proxy_logger.exception(f"Failed to reload model cost map: {str(e)}") @@ -8946,6 +9065,217 @@ async def reload_model_cost_map( ) +@router.post( + "/schedule/model_cost_map_reload", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def schedule_model_cost_map_reload( + hours: int, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + ADMIN ONLY / MASTER KEY Only Endpoint + + Schedule periodic reload of the model cost map. + This will create a background job that reloads the model cost map every specified hours. + """ + # Check if user is admin + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=403, + detail=f"Access denied. Admin role required. Current role: {user_api_key_dict.user_role}", + ) + + if hours <= 0: + raise HTTPException( + status_code=400, + detail="Hours must be greater than 0" + ) + + try: + global prisma_client + if prisma_client is None: + raise HTTPException( + status_code=500, + detail="Database connection not available" + ) + + # Update database with new reload configuration + await prisma_client.db.litellm_config.upsert( + where={"param_name": "model_cost_map_reload_config"}, + data={ + "create": { + "param_name": "model_cost_map_reload_config", + "param_value": safe_dumps({ + "interval_hours": hours, + "force_reload": False + }) + }, + "update": { + "param_value": safe_dumps({ + "interval_hours": hours, + "force_reload": False + }) + } + } + ) + + verbose_proxy_logger.info(f"Model cost map reload scheduled for every {hours} hours") + + return { + "message": f"Model cost map reload scheduled for every {hours} hours", + "status": "success", + "interval_hours": hours, + "timestamp": datetime.utcnow().isoformat() + } + except Exception as e: + verbose_proxy_logger.exception(f"Failed to schedule model cost map reload: {str(e)}") + raise HTTPException( + status_code=500, + detail=f"Failed to schedule model cost map reload: {str(e)}" + ) + + +@router.delete( + "/schedule/model_cost_map_reload", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def cancel_model_cost_map_reload( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + ADMIN ONLY / MASTER KEY Only Endpoint + + Cancel the scheduled periodic reload of the model cost map. + """ + # Check if user is admin + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=403, + detail=f"Access denied. Admin role required. Current role: {user_api_key_dict.user_role}", + ) + + try: + global prisma_client + if prisma_client is None: + raise HTTPException( + status_code=500, + detail="Database connection not available" + ) + + # Remove reload configuration from database + await prisma_client.db.litellm_config.delete( + where={"param_name": "model_cost_map_reload_config"} + ) + + verbose_proxy_logger.info("Model cost map reload schedule cancelled") + + return { + "message": "Model cost map reload schedule cancelled", + "status": "success", + "timestamp": datetime.utcnow().isoformat() + } + except Exception as e: + verbose_proxy_logger.exception(f"Failed to cancel model cost map reload: {str(e)}") + raise HTTPException( + status_code=500, + detail=f"Failed to cancel model cost map reload: {str(e)}" + ) + + +@router.get( + "/schedule/model_cost_map_reload/status", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def get_model_cost_map_reload_status( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + ADMIN ONLY / MASTER KEY Only Endpoint + + Get the status of the scheduled model cost map reload job. + """ + # Check if user is admin + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=403, + detail=f"Access denied. Admin role required. Current role: {user_api_key_dict.user_role}", + ) + + try: + global prisma_client, last_model_cost_map_reload + + verbose_proxy_logger.info(f"Checking model cost map reload status. Last reload: {last_model_cost_map_reload}") + + if prisma_client is None: + verbose_proxy_logger.info("No database connection, returning not scheduled") + return { + "scheduled": False, + "interval_hours": None, + "last_run": None, + "next_run": None + } + + # Get reload configuration from database + config_record = await prisma_client.db.litellm_config.find_unique( + where={"param_name": "model_cost_map_reload_config"} + ) + + if config_record is None or config_record.param_value is None: + verbose_proxy_logger.info("No model cost map reload configuration found") + return { + "scheduled": False, + "interval_hours": None, + "last_run": None, + "next_run": None + } + + config = config_record.param_value + interval_hours = config.get("interval_hours") + + if interval_hours is None: + verbose_proxy_logger.info("No interval configured, returning not scheduled") + return { + "scheduled": False, + "interval_hours": None, + "last_run": None, + "next_run": None + } + + current_time = datetime.utcnow() + next_run = None + + # Use pod's in-memory last reload time + if last_model_cost_map_reload is not None: + try: + last_reload_time = datetime.fromisoformat(last_model_cost_map_reload) + time_since_last_reload = current_time - last_reload_time + hours_since_last_reload = time_since_last_reload.total_seconds() / 3600 + + if hours_since_last_reload < interval_hours: + next_run = (last_reload_time + timedelta(hours=interval_hours)).isoformat() + except Exception as e: + verbose_proxy_logger.warning(f"Error parsing last reload time: {e}") + + return { + "scheduled": True, + "interval_hours": interval_hours, + "last_run": last_model_cost_map_reload, + "next_run": next_run + } + except Exception as e: + verbose_proxy_logger.exception(f"Failed to get model cost map reload status: {str(e)}") + raise HTTPException( + status_code=500, + detail=f"Failed to get model cost map reload status: {str(e)}" + ) + @router.get("/", dependencies=[Depends(user_api_key_auth)]) async def home(request: Request): return "LiteLLM: RUNNING" diff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/test_litellm/proxy/test_proxy_server.py index feb3f154f3..c774602e5c 100644 --- a/tests/test_litellm/proxy/test_proxy_server.py +++ b/tests/test_litellm/proxy/test_proxy_server.py @@ -5,6 +5,7 @@ import os import socket import subprocess import sys +from datetime import datetime from unittest import mock from unittest.mock import AsyncMock, MagicMock, mock_open, patch @@ -1222,15 +1223,21 @@ class TestPriceDataReloadAPI: """Test that admin users can access the reload endpoint""" with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: mock_get_map.return_value = {"gpt-3.5-turbo": {"input_cost_per_token": 0.001}} - - response = client_with_auth.post("/reload/model_cost_map") - - assert response.status_code == 200 - data = response.json() - assert data["status"] == "success" - assert "message" in data - assert "timestamp" in data - assert "models_count" in data + # Mock the database connection + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + response = client_with_auth.post("/reload/model_cost_map") + + assert response.status_code == 200 + data = response.json() + assert data["status"] == "success" + assert "message" in data + assert "timestamp" in data + assert "models_count" in data + # The new implementation immediately reloads and returns the count + assert "Price data reloaded successfully! 1 models updated." in data["message"] + assert data["models_count"] == 1 def test_reload_model_cost_map_non_admin_access(self, client_with_auth): """Test that non-admin users cannot access the reload endpoint""" @@ -1274,11 +1281,155 @@ class TestPriceDataReloadAPI: with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: mock_get_map.side_effect = Exception("Network error") - response = client_with_auth.post("/reload/model_cost_map") - - assert response.status_code == 500 + # Mock the database connection + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + response = client_with_auth.post("/reload/model_cost_map") + + assert response.status_code == 500 # The new implementation immediately reloads and fails on error + data = response.json() + assert "Failed to reload model cost map" in data["detail"] + + def test_schedule_model_cost_map_reload_admin_access(self, client_with_auth): + """Test that admin users can schedule periodic reload""" + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + # Mock database upsert + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + response = client_with_auth.post("/schedule/model_cost_map_reload?hours=6") + + assert response.status_code == 200 data = response.json() - assert "Failed to reload model cost map" in data["detail"] + assert data["status"] == "success" + assert data["interval_hours"] == 6 + assert "message" in data + assert "timestamp" in data + + def test_schedule_model_cost_map_reload_non_admin_access(self, client_with_auth): + """Test that non-admin users cannot schedule periodic reload""" + # Mock non-admin user + mock_auth = MagicMock() + mock_auth.user_role = "user" # Non-admin role + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + response = client_with_auth.post("/schedule/model_cost_map_reload?hours=6") + + assert response.status_code == 403 + data = response.json() + assert "Access denied" in data["detail"] + assert "Admin role required" in data["detail"] + + def test_schedule_model_cost_map_reload_invalid_hours(self, client_with_auth): + """Test that invalid hours parameter is rejected""" + response = client_with_auth.post("/schedule/model_cost_map_reload?hours=0") + + assert response.status_code == 400 + data = response.json() + assert "Hours must be greater than 0" in data["detail"] + + def test_cancel_model_cost_map_reload_admin_access(self, client_with_auth): + """Test that admin users can cancel periodic reload""" + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + # Mock database delete + mock_prisma.db.litellm_config.delete = AsyncMock(return_value=None) + + response = client_with_auth.delete("/schedule/model_cost_map_reload") + + assert response.status_code == 200 + data = response.json() + assert data["status"] == "success" + assert "message" in data + assert "timestamp" in data + + def test_cancel_model_cost_map_reload_non_admin_access(self, client_with_auth): + """Test that non-admin users cannot cancel periodic reload""" + # Mock non-admin user + mock_auth = MagicMock() + mock_auth.user_role = "user" # Non-admin role + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + response = client_with_auth.delete("/schedule/model_cost_map_reload") + + assert response.status_code == 403 + data = response.json() + assert "Access denied" in data["detail"] + assert "Admin role required" in data["detail"] + + def test_get_model_cost_map_reload_status_admin_access(self, client_with_auth): + """Test that admin users can get reload status""" + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + # Mock database config record + mock_config = MagicMock() + mock_config.param_value = { + "interval_hours": 6, + "force_reload": False + } + mock_prisma.db.litellm_config.find_unique = AsyncMock(return_value=mock_config) + + # Mock the last reload time and current time + with patch('litellm.proxy.proxy_server.last_model_cost_map_reload', "2024-01-01T06:00:00"): + with patch('litellm.proxy.proxy_server.datetime') as mock_datetime: + # Mock current time to be 1 hour after last reload + mock_datetime.utcnow.return_value = datetime(2024, 1, 1, 7, 0, 0) + mock_datetime.fromisoformat = datetime.fromisoformat + + response = client_with_auth.get("/schedule/model_cost_map_reload/status") + + assert response.status_code == 200 + data = response.json() + assert data["scheduled"] == True + assert data["interval_hours"] == 6 + assert data["last_run"] == "2024-01-01T06:00:00" + assert data["next_run"] == "2024-01-01T12:00:00" + + def test_get_model_cost_map_reload_status_non_admin_access(self, client_with_auth): + """Test that non-admin users cannot get reload status""" + # Mock non-admin user + mock_auth = MagicMock() + mock_auth.user_role = "user" # Non-admin role + app.dependency_overrides[user_api_key_auth] = lambda: mock_auth + + response = client_with_auth.get("/schedule/model_cost_map_reload/status") + + assert response.status_code == 403 + data = response.json() + assert "Access denied" in data["detail"] + assert "Admin role required" in data["detail"] + + def test_get_model_cost_map_reload_status_no_config(self, client_with_auth): + """Test that status returns not scheduled when no config exists""" + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + mock_prisma.db.litellm_config.find_unique = AsyncMock(return_value=None) + + response = client_with_auth.get("/schedule/model_cost_map_reload/status") + + assert response.status_code == 200 + data = response.json() + assert data["scheduled"] == False + assert data["interval_hours"] == None + assert data["last_run"] == None + assert data["next_run"] == None + + def test_get_model_cost_map_reload_status_no_interval(self, client_with_auth): + """Test that status returns not scheduled when no interval is configured""" + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + # Mock config with no interval + mock_config = MagicMock() + mock_config.param_value = { + "interval_hours": None, + "force_reload": False + } + mock_prisma.db.litellm_config.find_unique = AsyncMock(return_value=mock_config) + + response = client_with_auth.get("/schedule/model_cost_map_reload/status") + + assert response.status_code == 200 + data = response.json() + assert data["scheduled"] == False + assert data["interval_hours"] == None + assert data["last_run"] == None + assert data["next_run"] == None class TestPriceDataReloadIntegration: @@ -1319,13 +1470,70 @@ class TestPriceDataReloadIntegration: with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: mock_get_map.return_value = mock_cost_map - # Test reload endpoint - response = client_with_auth.post("/reload/model_cost_map") - assert response.status_code == 200 + # Mock the database connection + with patch('litellm.proxy.proxy_server.prisma_client') as mock_prisma: + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + # Test reload endpoint + response = client_with_auth.post("/reload/model_cost_map") + assert response.status_code == 200 + + # Test get endpoint + response = client_with_auth.get("/get/litellm_model_cost_map") + assert response.status_code == 200 + + def test_distributed_reload_check_function(self): + """Test the _check_and_reload_model_cost_map function""" + from litellm.proxy.proxy_server import ProxyConfig + + proxy_config = ProxyConfig() + + # Mock prisma client + mock_prisma = MagicMock() + + # Test case 1: No config in database + mock_prisma.db.litellm_config.find_unique = AsyncMock(return_value=None) + + # Should return early without reloading + asyncio.run(proxy_config._check_and_reload_model_cost_map(mock_prisma)) + + # Test case 2: Config with interval but not time to reload + mock_config = MagicMock() + mock_config.param_value = { + "interval_hours": 6, + "force_reload": False + } + mock_prisma.db.litellm_config.find_unique = AsyncMock(return_value=mock_config) + + # Mock current time and last reload time + with patch('litellm.proxy.proxy_server.last_model_cost_map_reload', "2024-01-01T06:00:00"): + with patch('litellm.proxy.proxy_server.datetime') as mock_datetime: + mock_datetime.utcnow.return_value = datetime(2024, 1, 1, 7, 0, 0) # 1 hour later + + # Should not reload (only 1 hour passed, need 6) + asyncio.run(proxy_config._check_and_reload_model_cost_map(mock_prisma)) + + # Test case 3: Config with force reload + mock_config.param_value = { + "interval_hours": 6, + "force_reload": True + } + mock_prisma.db.litellm_config.find_unique = AsyncMock(return_value=mock_config) + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + with patch('litellm.litellm_core_utils.get_model_cost_map.get_model_cost_map') as mock_get_map: + mock_get_map.return_value = {"gpt-3.5-turbo": {"input_cost_per_token": 0.001}} - # Test get endpoint - response = client_with_auth.get("/get/litellm_model_cost_map") - assert response.status_code == 200 + # Should reload due to force flag + asyncio.run(proxy_config._check_and_reload_model_cost_map(mock_prisma)) + + # Verify force_reload was reset to False + mock_prisma.db.litellm_config.upsert.assert_called() + call_args = mock_prisma.db.litellm_config.upsert.call_args + # The param_value is now a JSON string, so we need to parse it + param_value_json = call_args[1]['data']['update']['param_value'] + param_value_dict = json.loads(param_value_json) + assert param_value_dict['force_reload'] == False def test_config_file_parsing(self): """Test parsing of config file with reload settings""" @@ -1354,3 +1562,69 @@ model_list: # Verify models are present assert "model_list" in config assert len(config["model_list"]) == 2 + def test_database_config_storage(self): + """Test that configuration is properly stored in database""" + # Mock prisma client + mock_prisma = MagicMock() + + # Test the database upsert call that would be made by the schedule endpoint + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + # Simulate the database call that the schedule endpoint would make + asyncio.run(mock_prisma.db.litellm_config.upsert( + where={"param_name": "model_cost_map_reload_config"}, + data={ + "create": { + "param_name": "model_cost_map_reload_config", + "param_value": { + "interval_hours": 6, + "force_reload": False + } + }, + "update": { + "param_value": { + "interval_hours": 6, + "force_reload": False + } + } + } + )) + + # Verify database upsert was called with correct data + mock_prisma.db.litellm_config.upsert.assert_called_once() + call_args = mock_prisma.db.litellm_config.upsert.call_args + assert call_args[1]['where']['param_name'] == "model_cost_map_reload_config" + assert call_args[1]['data']['create']['param_value']['interval_hours'] == 6 + assert call_args[1]['data']['create']['param_value']['force_reload'] == False + + def test_manual_reload_force_flag(self): + """Test that manual reload sets force flag correctly""" + # Mock prisma client + mock_prisma = MagicMock() + + # Test the database upsert call that would be made by the manual reload endpoint + mock_prisma.db.litellm_config.upsert = AsyncMock(return_value=None) + + # Simulate the database call that the manual reload endpoint would make + asyncio.run(mock_prisma.db.litellm_config.upsert( + where={"param_name": "model_cost_map_reload_config"}, + data={ + "create": { + "param_name": "model_cost_map_reload_config", + "param_value": { + "interval_hours": None, + "force_reload": True + } + }, + "update": { + "param_value": { + "force_reload": True + } + } + } + )) + + # Verify force_reload flag was set + mock_prisma.db.litellm_config.upsert.assert_called_once() + call_args = mock_prisma.db.litellm_config.upsert.call_args + assert call_args[1]['data']['update']['param_value']['force_reload'] == True diff --git a/ui/litellm-dashboard/package-lock.json b/ui/litellm-dashboard/package-lock.json index db4a360bab..a80d65485e 100644 --- a/ui/litellm-dashboard/package-lock.json +++ b/ui/litellm-dashboard/package-lock.json @@ -20484,6 +20484,126 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.30.tgz", + "integrity": "sha512-TyO7Wz1IKE2kGv8dwQ0bmPL3s44EKVencOqwIY69myoS3rdpO1NPg5xPM5ymKu7nfX4oYJrpMxv8G9iqLsnL4A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.30.tgz", + "integrity": "sha512-I5lg1fgPJ7I5dk6mr3qCH1hJYKJu1FsfKSiTKoYwcuUf53HWTrEkwmMI0t5ojFKeA6Vu+SfT2zVy5NS0QLXV4Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.30.tgz", + "integrity": "sha512-8GkNA+sLclQyxgzCDs2/2GSwBc92QLMrmYAmoP2xehe5MUKBLB2cgo34Yu242L1siSkwQkiV4YLdCnjwc/Micw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.30.tgz", + "integrity": "sha512-8Ly7okjssLuBoe8qaRCcjGtcMsv79hwzn/63wNeIkzJVFVX06h5S737XNr7DZwlsbTBDOyI6qbL2BJB5n6TV/w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.30.tgz", + "integrity": "sha512-dBmV1lLNeX4mR7uI7KNVHsGQU+OgTG5RGFPi3tBJpsKPvOPtg9poyav/BYWrB3GPQL4dW5YGGgalwZ79WukbKQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.30.tgz", + "integrity": "sha512-6MMHi2Qc1Gkq+4YLXAgbYslE1f9zMGBikKMdmQRHXjkGPot1JY3n5/Qrbg40Uvbi8//wYnydPnyvNhI1DMUW1g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.30.tgz", + "integrity": "sha512-pVZMnFok5qEX4RT59mK2hEVtJX+XFfak+/rjHpyFh7juiT52r177bfFKhnlafm0UOSldhXjj32b+LZIOdswGTg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "14.2.30", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.30.tgz", + "integrity": "sha512-4KCo8hMZXMjpTzs3HOqOGYYwAXymXIy7PEPAXNEcEOyKqkjiDlECumrWziy+JEF0Oi4ILHGxzgQ3YiMGG2t/Lg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } } } } diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsx index a4c11560fa..cd4fd66e58 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx @@ -1045,30 +1045,14 @@ const ModelDashboard: React.FC = ({
- {/* Price Data Reload Section */} + {/* Model Management Header */}

Model Management

- Manage your models and pricing data + Manage your models and configurations

- {all_admin_roles.includes(userRole) && ( - { - // Refresh the model map after successful reload - const fetchModelMap = async () => { - const data = await modelCostMap(accessToken); - setModelMap(data); - }; - fetchModelMap(); - }} - buttonText="Reload Price Data" - size="small" - type="primary" - /> - )}
{selectedModelId ? ( = ({ {all_admin_roles.includes(userRole) && ( Model Group Alias )} + {all_admin_roles.includes(userRole) && ( + Price Data Reload + )}
@@ -1905,6 +1892,31 @@ const ModelDashboard: React.FC = ({ onAliasUpdate={setModelGroupAlias} /> + +
+
+ Price Data Management + + Manage model pricing data and configure automatic reload schedules + +
+ { + // Refresh the model map after successful reload + const fetchModelMap = async () => { + const data = await modelCostMap(accessToken); + setModelMap(data); + }; + fetchModelMap(); + }} + buttonText="Reload Price Data" + size="middle" + type="primary" + className="w-full" + /> +
+
)} diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index 8097f9c497..12a3faa8ad 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -278,6 +278,78 @@ export const reloadModelCostMap = async (accessToken: string) => { throw error; } }; + +export const scheduleModelCostMapReload = async (accessToken: string, hours: number) => { + try { + const url = proxyBaseUrl + ? `${proxyBaseUrl}/schedule/model_cost_map_reload?hours=${hours}` + : `/schedule/model_cost_map_reload?hours=${hours}`; + const response = await fetch(url, { + method: "POST", + headers: { + [globalLitellmHeaderName]: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, + }); + const jsonData = await response.json(); + console.log(`Schedule model cost map reload response: ${jsonData}`); + return jsonData; + } catch (error) { + console.error("Failed to schedule model cost map reload:", error); + throw error; + } +}; + +export const cancelModelCostMapReload = async (accessToken: string) => { + try { + const url = proxyBaseUrl + ? `${proxyBaseUrl}/schedule/model_cost_map_reload` + : `/schedule/model_cost_map_reload`; + const response = await fetch(url, { + method: "DELETE", + headers: { + [globalLitellmHeaderName]: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, + }); + const jsonData = await response.json(); + console.log(`Cancel model cost map reload response: ${jsonData}`); + return jsonData; + } catch (error) { + console.error("Failed to cancel model cost map reload:", error); + throw error; + } +}; + +export const getModelCostMapReloadStatus = async (accessToken: string) => { + try { + const url = proxyBaseUrl + ? `${proxyBaseUrl}/schedule/model_cost_map_reload/status` + : `/schedule/model_cost_map_reload/status`; + console.log("Fetching status from URL:", url); + const response = await fetch(url, { + method: "GET", + headers: { + [globalLitellmHeaderName]: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, + }); + + if (!response.ok) { + console.error(`Status request failed with status: ${response.status}`); + const errorText = await response.text(); + console.error("Error response:", errorText); + throw new Error(`HTTP ${response.status}: ${errorText}`); + } + + const jsonData = await response.json(); + console.log(`Model cost map reload status:`, jsonData); + return jsonData; + } catch (error) { + console.error("Failed to get model cost map reload status:", error); + throw error; + } +}; export const modelCreateCall = async ( accessToken: string, formValues: Model diff --git a/ui/litellm-dashboard/src/components/price_data_reload.tsx b/ui/litellm-dashboard/src/components/price_data_reload.tsx index e31fa7d37a..05d3a2e102 100644 --- a/ui/litellm-dashboard/src/components/price_data_reload.tsx +++ b/ui/litellm-dashboard/src/components/price_data_reload.tsx @@ -1,6 +1,17 @@ -import React, { useState } from "react"; -import { Button, message, Popconfirm, Tooltip } from "antd"; -import { reloadModelCostMap } from "./networking"; +import React, { useState, useEffect } from "react"; +import { Button, Popconfirm, message, Modal, InputNumber, Space, Typography, Tag, Card } from "antd"; +import { ReloadOutlined, ClockCircleOutlined, StopOutlined } from "@ant-design/icons"; +import { reloadModelCostMap, scheduleModelCostMapReload, cancelModelCostMapReload, getModelCostMapReloadStatus } from "./networking"; + +const { Text } = Typography; + +interface ReloadStatus { + scheduled: boolean; + interval_hours: number | null; + last_run: string | null; + next_run: string | null; +} + interface PriceDataReloadProps { accessToken: string; @@ -22,22 +33,65 @@ const PriceDataReload: React.FC = ({ className = "", }) => { const [isLoading, setIsLoading] = useState(false); + const [isScheduling, setIsScheduling] = useState(false); + const [isCancelling, setIsCancelling] = useState(false); + const [showScheduleModal, setShowScheduleModal] = useState(false); + const [hours, setHours] = useState(6); + const [reloadStatus, setReloadStatus] = useState(null); + const [loadingStatus, setLoadingStatus] = useState(false); - const handleReload = async () => { + // Fetch status on component mount and periodically + useEffect(() => { + fetchReloadStatus(); + + // Refresh status every 30 seconds to keep it up to date + const interval = setInterval(() => { + fetchReloadStatus(); + }, 30000); + + return () => clearInterval(interval); + }, [accessToken]); + + const fetchReloadStatus = async () => { + if (!accessToken) return; + + setLoadingStatus(true); + try { + console.log("Fetching reload status..."); + const status = await getModelCostMapReloadStatus(accessToken); + console.log("Received status:", status); + setReloadStatus(status); + } catch (error) { + console.error("Failed to fetch reload status:", error); + // Set a default status to prevent UI issues + setReloadStatus({ + scheduled: false, + interval_hours: null, + last_run: null, + next_run: null + }); + } finally { + setLoadingStatus(false); + } + }; + + const handleHardRefresh = async () => { if (!accessToken) { message.error("No access token available"); return; } - + setIsLoading(true); try { const response = await reloadModelCostMap(accessToken); - + if (response.status === "success") { message.success( `Price data reloaded successfully! ${response.models_count || 0} models updated.` ); onReloadSuccess?.(); + // Refresh status after successful reload + await fetchReloadStatus(); } else { message.error("Failed to reload price data"); } @@ -48,73 +102,266 @@ const PriceDataReload: React.FC = ({ setIsLoading(false); } }; + const handleScheduleReload = async () => { + if (!accessToken) { + message.error("No access token available"); + return; + } + + if (hours <= 0) { + message.error("Hours must be greater than 0"); + return; + } + + setIsScheduling(true); + try { + const response = await scheduleModelCostMapReload(accessToken, hours); + + if (response.status === "success") { + message.success(`Periodic reload scheduled for every ${hours} hours`); + setShowScheduleModal(false); + await fetchReloadStatus(); + } else { + message.error("Failed to schedule periodic reload"); + } + } catch (error) { + console.error("Error scheduling reload:", error); + message.error("Failed to schedule periodic reload. Please try again."); + } finally { + setIsScheduling(false); + } + }; + + const handleCancelReload = async () => { + if (!accessToken) { + message.error("No access token available"); + return; + } + + setIsCancelling(true); + try { + const response = await cancelModelCostMapReload(accessToken); + + if (response.status === "success") { + message.success("Periodic reload cancelled successfully"); + await fetchReloadStatus(); + } else { + message.error("Failed to cancel periodic reload"); + } + } catch (error) { + console.error("Error cancelling reload:", error); + message.error("Failed to cancel periodic reload. Please try again."); + } finally { + setIsCancelling(false); + } + }; + + const formatDateTime = (dateTimeString: string | null) => { + if (!dateTimeString) return "Never"; + try { + return new Date(dateTimeString).toLocaleString(); + } catch { + return dateTimeString; + } + }; + + const getStatusText = () => { + if (!reloadStatus?.scheduled) return 'Not scheduled'; + if (!reloadStatus.last_run) return 'Ready'; + return 'Active'; + }; + + const getStatusColor = () => { + if (!reloadStatus?.scheduled) return 'default'; + if (!reloadStatus.last_run) return 'processing'; + return 'success'; + }; return ( - { - e.currentTarget.style.backgroundColor = "#4f46e5"; - e.currentTarget.style.borderColor = "#4f46e5"; - }, - onMouseLeave: (e) => { - e.currentTarget.style.backgroundColor = "#6366f1"; - e.currentTarget.style.borderColor = "#6366f1"; - }, - }} - > - - - - + + + + {/* Periodic Reload Controls */} + {!reloadStatus?.scheduled ? ( + + ) : ( + + )} + + + {/* Status Card */} + {reloadStatus && ( + + + {reloadStatus.scheduled ? ( +
+ }> + Scheduled every {reloadStatus.interval_hours} hours + +
+ ) : ( + No periodic reload scheduled + )} + +
+ Last run: + {formatDateTime(reloadStatus.last_run)} +
+ + {reloadStatus.scheduled && ( + <> + {reloadStatus.next_run && ( +
+ Next run: + {formatDateTime(reloadStatus.next_run)} +
+ )} +
+ Status: + {getStatusText()} +
+ + )} +
+
+ )} + + {/* Schedule Modal */} + setShowScheduleModal(false)} + confirmLoading={isScheduling} + okText="Schedule" + cancelText="Cancel" + okButtonProps={{ + style: { + backgroundColor: "#6366f1", + borderColor: "#6366f1", + color: "white", + }, + }} + > +
+ Set up automatic reload of price data every: +
+
+ setHours(value || 6)} + addonAfter="hours" + style={{ width: '100%' }} + /> +
+
+ + This will automatically fetch the latest pricing data from the remote source every {hours} hours. + +
+
+
); }; From 95fbe59c46adfa7fc5356d94b0d0f4377e0a515a Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Sat, 9 Aug 2025 16:13:56 -0700 Subject: [PATCH 12/32] Add local storage auth (#13473) --- .../components/mcp_tools/mcp_auth_storage.ts | 111 +++++++++++++++++ .../src/components/mcp_tools/mcp_tools.tsx | 115 ++++++++++++++---- .../src/components/navbar.tsx | 2 + .../src/components/user_dashboard.tsx | 3 + 4 files changed, 210 insertions(+), 21 deletions(-) create mode 100644 ui/litellm-dashboard/src/components/mcp_tools/mcp_auth_storage.ts diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_auth_storage.ts b/ui/litellm-dashboard/src/components/mcp_tools/mcp_auth_storage.ts new file mode 100644 index 0000000000..751f25ea62 --- /dev/null +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_auth_storage.ts @@ -0,0 +1,111 @@ +// Utility functions for managing MCP server authentication tokens in localStorage + +const MCP_AUTH_STORAGE_KEY = 'litellm_mcp_auth_tokens'; + +export interface MCPAuthToken { + serverId: string; + serverAlias?: string; + authValue: string; + authType: string; + timestamp: number; +} + +export interface MCPAuthStorage { + [serverId: string]: MCPAuthToken; +} + +/** + * Get all stored MCP authentication tokens + */ +export const getMCPAuthTokens = (): MCPAuthStorage => { + try { + const stored = localStorage.getItem(MCP_AUTH_STORAGE_KEY); + return stored ? JSON.parse(stored) : {}; + } catch (error) { + console.error('Error reading MCP auth tokens from localStorage:', error); + return {}; + } +}; + +/** + * Get authentication token for a specific MCP server + */ +export const getMCPAuthToken = (serverId: string, serverAlias?: string): string | null => { + try { + const tokens = getMCPAuthTokens(); + const token = tokens[serverId]; + + // If token exists, check if serverAlias matches (both can be undefined) + if (token && token.serverAlias === serverAlias) { + return token.authValue; + } + + // If no serverAlias was provided and token exists without serverAlias, return it + if (token && !serverAlias && !token.serverAlias) { + return token.authValue; + } + + return null; + } catch (error) { + console.error('Error getting MCP auth token:', error); + return null; + } +}; + +/** + * Store authentication token for an MCP server + */ +export const setMCPAuthToken = ( + serverId: string, + authValue: string, + authType: string, + serverAlias?: string +): void => { + try { + const tokens = getMCPAuthTokens(); + + tokens[serverId] = { + serverId, + serverAlias, + authValue, + authType, + timestamp: Date.now(), + }; + + localStorage.setItem(MCP_AUTH_STORAGE_KEY, JSON.stringify(tokens)); + } catch (error) { + console.error('Error storing MCP auth token:', error); + } +}; + +/** + * Remove authentication token for an MCP server + */ +export const removeMCPAuthToken = (serverId: string): void => { + try { + const tokens = getMCPAuthTokens(); + delete tokens[serverId]; + localStorage.setItem(MCP_AUTH_STORAGE_KEY, JSON.stringify(tokens)); + } catch (error) { + console.error('Error removing MCP auth token:', error); + } +}; + +/** + * Clear all MCP authentication tokens (useful for logout) + */ +export const clearMCPAuthTokens = (): void => { + try { + localStorage.removeItem(MCP_AUTH_STORAGE_KEY); + } catch (error) { + console.error('Error clearing MCP auth tokens:', error); + } +}; + +/** + * Check if a token exists for a server + */ +export const hasMCPAuthToken = (serverId: string, serverAlias?: string): boolean => { + const token = getMCPAuthToken(serverId, serverAlias); + return token !== null; +}; \ No newline at end of file diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx index 7031679af9..b2ba26875f 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { useQuery, useMutation } from "@tanstack/react-query"; import { ToolTestPanel } from "./ToolTestPanel"; import { @@ -8,8 +8,14 @@ import { mcpServerHasAuth, } from "./types"; import { listMCPTools, callMCPTool } from "../networking"; +import { + getMCPAuthToken, + setMCPAuthToken, + removeMCPAuthToken, + hasMCPAuthToken +} from "./mcp_auth_storage"; -import { Modal, Input, Form } from "antd"; +import { Modal, Input, Form, message } from "antd"; import { Button, Card, Title, Text } from "@tremor/react"; import { RobotOutlined, ApiOutlined, KeyOutlined, SafetyOutlined, ToolOutlined } from "@ant-design/icons"; @@ -92,10 +98,12 @@ export const AuthModal = ({ const AuthSection = ({ authType, onAuthSubmit, + onClearAuth, hasAuth }: { authType: string | null | undefined; onAuthSubmit: (value: string) => void; + onClearAuth: () => void; hasAuth: boolean; }) => { const [modalVisible, setModalVisible] = useState(false); @@ -109,23 +117,39 @@ const AuthSection = ({ const handleModalCancel = () => setModalVisible(false); + const handleClearAuth = () => { + onClearAuth(); + }; + return (
Authentication {hasAuth ? '✓' : ''} - +
+ {hasAuth && ( + + )} + +
- {hasAuth ? 'Authentication configured' : 'Some tools may require authentication'} + {hasAuth ? 'Authentication configured and saved locally' : 'Some tools may require authentication'} (null); const [toolError, setToolError] = useState(null); + // Load stored auth token on component mount + useEffect(() => { + if (mcpServerHasAuth(auth_type)) { + const storedAuthValue = getMCPAuthToken(serverId, serverAlias || undefined); + if (storedAuthValue) { + setMcpAuthValue(storedAuthValue); + } + } + }, [serverId, serverAlias, auth_type]); + + // Function to handle auth submission with localStorage persistence + const handleAuthSubmit = (authValue: string) => { + setMcpAuthValue(authValue); + if (authValue && mcpServerHasAuth(auth_type)) { + setMCPAuthToken(serverId, authValue, auth_type || 'none', serverAlias || undefined); + message.success('Authentication token saved locally'); + } + }; + + // Function to clear auth token + const handleClearAuth = () => { + setMcpAuthValue(""); + removeMCPAuthToken(serverId); + message.info('Authentication token cleared'); + }; + // Query to fetch MCP tools const { data: mcpToolsResponse, isLoading: isLoadingTools, error: mcpToolsError } = useQuery({ queryKey: ["mcpTools", serverId, mcpAuthValue, serverAlias], @@ -195,7 +245,7 @@ const MCPToolsViewer = ({ MCP Tools
- {/* Tool Selection */} + {/* Tool Selection - Show tools first */}
Available Tools @@ -295,17 +345,40 @@ const MCPToolsViewer = ({ )}
- {/* Authentication Section */} + {/* Authentication Section - Below tools list */} {mcpServerHasAuth(auth_type) && (
- - Authentication - - setMcpAuthValue(value)} - hasAuth={hasAuth} - /> + {!hasAuth ? ( + /* Prominent display when auth required but not provided */ +
+
+ + Authentication Required +
+ + This MCP server requires authentication. You must add your credentials below to access the tools. + + +
+ ) : ( + /* Subtle display when already authenticated */ + <> + + Authentication + + + + )}
)}
diff --git a/ui/litellm-dashboard/src/components/navbar.tsx b/ui/litellm-dashboard/src/components/navbar.tsx index 0b5a277b9c..d6a797cc73 100644 --- a/ui/litellm-dashboard/src/components/navbar.tsx +++ b/ui/litellm-dashboard/src/components/navbar.tsx @@ -16,6 +16,7 @@ import { import { clearTokenCookies } from "@/utils/cookieUtils" import { fetchProxySettings } from "@/utils/proxyUtils" import { useTheme } from "@/contexts/ThemeContext" +import { clearMCPAuthTokens } from "./mcp_tools/mcp_auth_storage" interface NavbarProps { userID: string | null; @@ -65,6 +66,7 @@ const Navbar: React.FC = ({ const handleLogout = () => { clearTokenCookies(); + clearMCPAuthTokens(); // Clear MCP auth tokens on logout window.location.href = logoutUrl; }; diff --git a/ui/litellm-dashboard/src/components/user_dashboard.tsx b/ui/litellm-dashboard/src/components/user_dashboard.tsx index cb929b0e2c..e1b9b2cd81 100644 --- a/ui/litellm-dashboard/src/components/user_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/user_dashboard.tsx @@ -24,6 +24,7 @@ import { Team } from "./key_team_helpers/key_list" import { jwtDecode } from "jwt-decode" import { Typography } from "antd" import { clearTokenCookies } from "@/utils/cookieUtils" +import { clearMCPAuthTokens } from "./mcp_tools/mcp_auth_storage" export interface ProxySettings { PROXY_BASE_URL: string | null @@ -109,6 +110,8 @@ const UserDashboard: React.FC = ({ window.addEventListener("beforeunload", function () { // Clear session storage sessionStorage.clear() + // Note: MCP auth tokens are persistent and should not be cleared on page refresh + // They are only cleared on logout }) } From f60a9cf908b30b75189d32f3fed7d30005df068a Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 9 Aug 2025 16:14:51 -0700 Subject: [PATCH 13/32] [Bug]: Fix JWTs access not working with model groups (#13474) * fix can_team_access_model * test_find_team_with_model_access_model_group --- litellm/proxy/auth/handle_jwt.py | 3 +- .../proxy/auth/test_handle_jwt.py | 68 ++++++++++++++++--- 2 files changed, 62 insertions(+), 9 deletions(-) diff --git a/litellm/proxy/auth/handle_jwt.py b/litellm/proxy/auth/handle_jwt.py index 60529f1e2f..b8b5683351 100644 --- a/litellm/proxy/auth/handle_jwt.py +++ b/litellm/proxy/auth/handle_jwt.py @@ -763,6 +763,7 @@ class JWTAuthManager: proxy_logging_obj: ProxyLogging, ) -> Tuple[Optional[str], Optional[LiteLLM_TeamTable]]: """Find first team with access to the requested model""" + from litellm.proxy.proxy_server import llm_router if not team_ids: if jwt_handler.litellm_jwtauth.enforce_team_based_model_access: @@ -789,7 +790,7 @@ class JWTAuthManager: or can_team_access_model( model=requested_model, team_object=team_object, - llm_router=None, + llm_router=llm_router, team_model_aliases=None, ) ): diff --git a/tests/test_litellm/proxy/auth/test_handle_jwt.py b/tests/test_litellm/proxy/auth/test_handle_jwt.py index 5627b9aaf9..17efbdcf4b 100644 --- a/tests/test_litellm/proxy/auth/test_handle_jwt.py +++ b/tests/test_litellm/proxy/auth/test_handle_jwt.py @@ -459,9 +459,9 @@ async def test_nested_jwt_field_access(): 2. Backward compatibility is maintained for flat field names 3. Missing nested paths return appropriate defaults """ - from litellm.proxy.auth.handle_jwt import JWTHandler from litellm.proxy._types import LiteLLM_JWTAuth - + from litellm.proxy.auth.handle_jwt import JWTHandler + # Create JWT handler jwt_handler = JWTHandler() @@ -536,7 +536,7 @@ async def test_nested_jwt_field_access(): assert jwt_handler.get_org_id(flat_token, None) == "org456" # Test 5: object_id_jwt_field with nested access (requires role_mappings) - from litellm.proxy._types import RoleMapping, LitellmUserRoles + from litellm.proxy._types import LitellmUserRoles, RoleMapping jwt_handler.litellm_jwtauth = LiteLLM_JWTAuth( object_id_jwt_field="profile.object_id", role_mappings=[RoleMapping(role="admin", internal_role=LitellmUserRoles.INTERNAL_USER)] @@ -588,9 +588,9 @@ async def test_nested_jwt_field_missing_paths(): 2. Partial paths that exist but don't have the final key return defaults 3. team_id_default fallback works with nested fields """ - from litellm.proxy.auth.handle_jwt import JWTHandler from litellm.proxy._types import LiteLLM_JWTAuth - + from litellm.proxy.auth.handle_jwt import JWTHandler + # Create JWT handler jwt_handler = JWTHandler() @@ -626,7 +626,7 @@ async def test_nested_jwt_field_missing_paths(): assert jwt_handler.get_org_id(incomplete_token, "default_org") == "default_org" # Test 5: Missing profile.object_id should return default (requires role_mappings) - from litellm.proxy._types import RoleMapping, LitellmUserRoles + from litellm.proxy._types import LitellmUserRoles, RoleMapping jwt_handler.litellm_jwtauth = LiteLLM_JWTAuth( object_id_jwt_field="profile.object_id", role_mappings=[RoleMapping(role="admin", internal_role=LitellmUserRoles.INTERNAL_USER)] @@ -663,9 +663,9 @@ async def test_metadata_prefix_handling_in_nested_fields(): The get_nested_value function should remove metadata. prefix before traversing """ - from litellm.proxy.auth.handle_jwt import JWTHandler from litellm.proxy._types import LiteLLM_JWTAuth - + from litellm.proxy.auth.handle_jwt import JWTHandler + # Create JWT handler jwt_handler = JWTHandler() @@ -685,3 +685,55 @@ async def test_metadata_prefix_handling_in_nested_fields(): # Test 2: user.sub should work normally without metadata prefix jwt_handler.litellm_jwtauth = LiteLLM_JWTAuth(user_id_jwt_field="sub") assert jwt_handler.get_user_id(token, None) == "u123" + + +@pytest.mark.asyncio +async def test_find_team_with_model_access_model_group(monkeypatch): + from litellm.caching import DualCache + from litellm.proxy.utils import ProxyLogging + from litellm.router import Router + + router = Router( + model_list=[ + { + "model_name": "gpt-4o-mini", + "litellm_params": {"model": "gpt-4o-mini"}, + "model_info": {"access_groups": ["test-group"]}, + } + ] + ) + import sys + import types + + proxy_server_module = types.ModuleType("proxy_server") + proxy_server_module.llm_router = router + monkeypatch.setitem(sys.modules, "litellm.proxy.proxy_server", proxy_server_module) + + team = LiteLLM_TeamTable(team_id="team-1", models=["test-group"]) + + async def mock_get_team_object(*args, **kwargs): # type: ignore + return team + + monkeypatch.setattr( + "litellm.proxy.auth.handle_jwt.get_team_object", mock_get_team_object + ) + + jwt_handler = JWTHandler() + jwt_handler.litellm_jwtauth = LiteLLM_JWTAuth() + + user_api_key_cache = DualCache() + proxy_logging_obj = ProxyLogging(user_api_key_cache=user_api_key_cache) + + team_id, team_obj = await JWTAuthManager.find_team_with_model_access( + team_ids={"team-1"}, + requested_model="gpt-4o-mini", + route="/chat/completions", + jwt_handler=jwt_handler, + prisma_client=None, + user_api_key_cache=user_api_key_cache, + parent_otel_span=None, + proxy_logging_obj=proxy_logging_obj, + ) + + assert team_id == "team-1" + assert team_obj.team_id == "team-1" \ No newline at end of file From 0e53b1feab9c1ff0337d36bf0b7aae1ea9ba1a45 Mon Sep 17 00:00:00 2001 From: Sannan Nasir <36917391+msannan2@users.noreply.github.com> Date: Sun, 10 Aug 2025 04:26:33 +0500 Subject: [PATCH 14/32] Add digitalocean provider (#12169) * Add digitalocean provider * Add digitalocean provider * Revert "Add digitalocean provider" This reverts commit 96dda40f45b3d12ea03e861d060ec81460b7759e. * changes * fixes * Update transformation * refactoring * rename provider to Gradient AI * fixes * Incorporte review comments * revert changes * fix typo * revert change * incorporated review comments * Revert "Incorporte review comments" This reverts commit 37bd51bd54ef4fd52ccc12866e47f8de9476d597. * changes * Revert "Revert "Incorporte review comments" This reverts commit 37bd51bd54ef4fd52ccc12866e47f8de9476d597." This reverts commit 68c8a198ee0d6441c3a52f6c6a49c9c95a4cb0a8. * changes * fixes * Update provider_specific_fields.tsx --- README.md | 13 +- docs/my-website/docs/providers/gradient_ai.md | 79 ++++++ docs/my-website/sidebars.js | 11 +- litellm/__init__.py | 8 +- litellm/constants.py | 1 + .../get_llm_provider_logic.py | 9 + .../llms/gradient_ai/chat/transformation.py | 147 +++++++++++ litellm/main.py | 19 ++ litellm/types/utils.py | 3 +- litellm/utils.py | 2 + model_prices_and_context_window.json | 124 ++++++++++ .../test_gradient_ai_chat_transformation.py | 91 +++++++ .../out/assets/logos/gradientai.svg | 229 ++++++++++++++++++ .../add_model/provider_specific_fields.tsx | 30 ++- .../src/components/provider_info_helpers.tsx | 12 +- 15 files changed, 752 insertions(+), 26 deletions(-) create mode 100644 docs/my-website/docs/providers/gradient_ai.md create mode 100644 litellm/llms/gradient_ai/chat/transformation.py create mode 100644 tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py create mode 100644 ui/litellm-dashboard/out/assets/logos/gradientai.svg diff --git a/README.md b/README.md index 528dd53581..47878747a6 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Support for more providers. Missing a provider or LLM Platform, raise a [feature # Usage ([**Docs**](https://docs.litellm.ai/docs/)) > [!IMPORTANT] -> LiteLLM v1.0.0 now requires `openai>=1.0.0`. Migration guide [here](https://docs.litellm.ai/docs/migration) +> LiteLLM v1.0.0 now requires `openai>=1.0.0`. Migration guide [here](https://docs.litellm.ai/docs/migration) > LiteLLM v1.40.14+ now requires `pydantic>=2.0.0`. No changes required. @@ -132,7 +132,7 @@ print(response) ## Streaming ([Docs](https://docs.litellm.ai/docs/completion/stream)) -liteLLM supports streaming the model response back, pass `stream=True` to get a streaming iterator in response. +liteLLM supports streaming the model response back, pass `stream=True` to get a streaming iterator in response. Streaming is supported for all models (Bedrock, Huggingface, TogetherAI, Azure, OpenAI, etc.) ```python @@ -234,7 +234,7 @@ $ litellm --model huggingface/bigcode/starcoder > [!IMPORTANT] -> 💡 [Use LiteLLM Proxy with Langchain (Python, JS), OpenAI SDK (Python, JS) Anthropic SDK, Mistral SDK, LlamaIndex, Instructor, Curl](https://docs.litellm.ai/docs/proxy/user_keys) +> 💡 [Use LiteLLM Proxy with Langchain (Python, JS), OpenAI SDK (Python, JS) Anthropic SDK, Mistral SDK, LlamaIndex, Instructor, Curl](https://docs.litellm.ai/docs/proxy/user_keys) ```python import openai # openai v1.0.0+ @@ -266,7 +266,7 @@ echo 'LITELLM_MASTER_KEY="sk-1234"' > .env # Add the litellm salt key - you cannot change this after adding a model # It is used to encrypt / decrypt your LLM API Key credentials -# We recommend - https://1password.com/password-generator/ +# We recommend - https://1password.com/password-generator/ # password generator to get a random hash for litellm salt key echo 'LITELLM_SALT_KEY="sk-1234"' >> .env @@ -340,6 +340,7 @@ curl 'http://0.0.0.0:4000/key/generate' \ | [xinference [Xorbits Inference]](https://docs.litellm.ai/docs/providers/xinference) | | | | | ✅ | | | [FriendliAI](https://docs.litellm.ai/docs/providers/friendliai) | ✅ | ✅ | ✅ | ✅ | | | | [Galadriel](https://docs.litellm.ai/docs/providers/galadriel) | ✅ | ✅ | ✅ | ✅ | | | +| [GradientAI](https://docs.litellm.ai/docs/providers/gradient_ai) | ✅ | ✅ | | | | | | [Novita AI](https://novita.ai/models/llm?utm_source=github_litellm&utm_medium=github_readme&utm_campaign=github_link) | ✅ | ✅ | ✅ | ✅ | | | | [Featherless AI](https://docs.litellm.ai/docs/providers/featherless_ai) | ✅ | ✅ | ✅ | ✅ | | | | [Nebius AI Studio](https://docs.litellm.ai/docs/providers/nebius) | ✅ | ✅ | ✅ | ✅ | ✅ | | @@ -348,7 +349,7 @@ curl 'http://0.0.0.0:4000/key/generate' \ ## Contributing -Interested in contributing? Contributions to LiteLLM Python SDK, Proxy Server, and LLM integrations are both accepted and highly encouraged! +Interested in contributing? Contributions to LiteLLM Python SDK, Proxy Server, and LLM integrations are both accepted and highly encouraged! **Quick start:** `git clone` → `make install-dev` → `make format` → `make lint` → `make test-unit` @@ -359,7 +360,7 @@ For companies that need better security, user management and professional suppor [Talk to founders](https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat) -This covers: +This covers: - ✅ **Features under the [LiteLLM Commercial License](https://docs.litellm.ai/docs/proxy/enterprise):** - ✅ **Feature Prioritization** - ✅ **Custom Integrations** diff --git a/docs/my-website/docs/providers/gradient_ai.md b/docs/my-website/docs/providers/gradient_ai.md new file mode 100644 index 0000000000..7b5eef04dc --- /dev/null +++ b/docs/my-website/docs/providers/gradient_ai.md @@ -0,0 +1,79 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# GradientAI +https://digitalocean.com/products/gradientai + + +LiteLLM provides native support for GradientAI models. +To use a GradientAI model, specify it as `gradient_ai/` in your LiteLLM requests. + + +## API Key & Endpoint + +Set your credentials and endpoint as environment variables: + +```python +import os +os.environ['GRADIENT_AI_API_KEY'] = "your-api-key" +os.environ['GRADIENT_AI_AGENT_ENDPOINT'] = "https://api.gradient_ai.com/api/v1/chat" # default endpoint +``` + +## Sample Usage + +```python +from litellm import completion +import os + +os.environ['GRADIENT_AI_API_KEY'] = "your-api-key" +response = completion( + model="gradient_ai/model-name", + messages=[ + {"role": "user", "content": "Hello, how are you?"} + ], +) +print(response.choices[0].message.content) +``` + +## Streaming Example + +```python +from litellm import completion +import os + +os.environ['GRADIENT_AI_API_KEY'] = "your-api-key" +response = completion( + model="gradient_ai/model-name", + messages=[ + {"role": "user", "content": "Write a story about a robot learning to love"} + ], + stream=True, +) + +for chunk in response: + print(chunk.choices[0].delta.content or "", end="") +``` + +## Supported Parameters + +| Parameter | Type | Description | +|-----------------------------------|--------------|--------------------------------------------------------------------| +| `temperature` | float | Controls randomness (0.0-2.0) | +| `top_p` | float | Nucleus sampling parameter (0.0-1.0) | +| `max_tokens` | int | Maximum tokens to generate | +| `max_completion_tokens` | int | Alternative to max_tokens | +| `stream` | bool | Whether to stream the response | +| `k` | int | Top results to return from knowledge bases | +| `retrieval_method` | string | Retrieval strategy (rewrite/step_back/sub_queries/none) | +| `frequency_penalty` | float | Penalizes repeated tokens (-2.0 to 2.0) | +| `presence_penalty` | float | Penalizes tokens based on presence (-2.0 to 2.0) | +| `stop` | string/list | Sequences to stop generation | +| `kb_filters` | List[Dict] | Filters for knowledge base retrieval | +| `instruction_override` | string | Override agent's default instruction | +| `include_retrieval_info` | bool | Include document retrieval metadata | +| `include_guardrails_info` | bool | Include guardrail trigger metadata | +| `provide_citations` | bool | Include citations in response | + +--- + +For more details, see [DigitalOcean GradientAI documentation](https://digitalocean.com/products/gradientai). \ No newline at end of file diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index 14dc2a6252..419afcd546 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -82,12 +82,12 @@ const sidebars = { "tutorials/cost_tracking_coding", ] }, - + ], // But you can create a sidebar manually tutorialSidebar: [ { type: "doc", id: "index" }, // NEW - + { type: "category", label: "LiteLLM Proxy Server", @@ -214,7 +214,7 @@ const sidebars = { "proxy/dynamic_logging" ], }, - + { type: "category", label: "Secret Managers", @@ -467,6 +467,7 @@ const sidebars = { "providers/custom_llm_server", "providers/petals", "providers/snowflake", + "providers/gradient_ai", "providers/featherless_ai", "providers/nebius", "providers/dashscope", @@ -505,7 +506,7 @@ const sidebars = { ] }, - + { type: "category", label: "Routing, Loadbalancing & Fallbacks", @@ -536,7 +537,7 @@ const sidebars = { }, ], }, - + { type: "category", label: "Load Testing", diff --git a/litellm/__init__.py b/litellm/__init__.py index bb53fd3a4d..d1f0648889 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -231,6 +231,7 @@ aleph_alpha_key: Optional[str] = None nlp_cloud_key: Optional[str] = None novita_api_key: Optional[str] = None snowflake_key: Optional[str] = None +gradient_ai_api_key: Optional[str] = None nebius_key: Optional[str] = None common_cloud_provider_auth_params: dict = { "params": ["project", "region_name", "token"], @@ -520,6 +521,7 @@ sambanova_models: List = [] novita_models: List = [] assemblyai_models: List = [] snowflake_models: List = [] +gradient_ai_models: List = [] llama_models: List = [] nscale_models: List = [] nebius_models: List = [] @@ -703,6 +705,8 @@ def add_known_models(): jina_ai_models.append(key) elif value.get("litellm_provider") == "snowflake": snowflake_models.append(key) + elif value.get("litellm_provider") == "gradient_ai": + gradient_ai_models.append(key) elif value.get("litellm_provider") == "featherless_ai": featherless_ai_models.append(key) elif value.get("litellm_provider") == "deepgram": @@ -802,6 +806,7 @@ model_list = ( + assemblyai_models + jina_ai_models + snowflake_models + + gradient_ai_models + llama_models + featherless_ai_models + nscale_models @@ -875,6 +880,7 @@ models_by_provider: dict = { "assemblyai": assemblyai_models, "jina_ai": jina_ai_models, "snowflake": snowflake_models, + "gradient_ai": gradient_ai_models, "meta_llama": llama_models, "nscale": nscale_models, "featherless_ai": featherless_ai_models, @@ -1141,7 +1147,7 @@ from .llms.openai.chat.o_series_transformation import ( ) from .llms.snowflake.chat.transformation import SnowflakeConfig - +from .llms.gradient_ai.chat.transformation import GradientAIConfig openaiOSeriesConfig = OpenAIOSeriesConfig() from .llms.openai.chat.gpt_transformation import ( OpenAIGPTConfig, diff --git a/litellm/constants.py b/litellm/constants.py index c7404f10a7..61a4af41be 100644 --- a/litellm/constants.py +++ b/litellm/constants.py @@ -270,6 +270,7 @@ LITELLM_CHAT_PROVIDERS = [ "llamafile", "lm_studio", "galadriel", + "gradient_ai", "github_copilot", # GitHub Copilot Chat API "novita", "meta_llama", diff --git a/litellm/litellm_core_utils/get_llm_provider_logic.py b/litellm/litellm_core_utils/get_llm_provider_logic.py index 702196a7f0..cc39b7b590 100644 --- a/litellm/litellm_core_utils/get_llm_provider_logic.py +++ b/litellm/litellm_core_utils/get_llm_provider_logic.py @@ -351,6 +351,8 @@ def get_llm_provider( # noqa: PLR0915 custom_llm_provider = "openai" elif model in litellm.empower_models: custom_llm_provider = "empower" + elif model in litellm.gradient_ai_models: + custom_llm_provider = "gradient_ai" elif model == "*": custom_llm_provider = "openai" # bytez models @@ -664,6 +666,13 @@ def _get_openai_compatible_provider_info( # noqa: PLR0915 or f"https://{get_secret('SNOWFLAKE_ACCOUNT_ID')}.snowflakecomputing.com/api/v2/cortex/inference:complete" ) # type: ignore dynamic_api_key = api_key or get_secret_str("SNOWFLAKE_JWT") + elif custom_llm_provider == "gradient_ai": + ( + api_base, + dynamic_api_key, + ) = litellm.GradientAIConfig()._get_openai_compatible_provider_info( + api_base, api_key + ) elif custom_llm_provider == "featherless_ai": ( api_base, diff --git a/litellm/llms/gradient_ai/chat/transformation.py b/litellm/llms/gradient_ai/chat/transformation.py new file mode 100644 index 0000000000..d631affdef --- /dev/null +++ b/litellm/llms/gradient_ai/chat/transformation.py @@ -0,0 +1,147 @@ +from typing import List, Optional, Tuple, Union, Dict, Literal + +from litellm.secret_managers.main import get_secret_str +from litellm.types.llms.openai import ( + AllMessageValues, +) + +from ...openai_like.chat.transformation import OpenAILikeChatConfig + +# Default GradientAI endpoint +GRADIENT_AI_SERVERLESS_ENDPOINT = "https://inference.do-ai.run" + + +class GradientAIConfig(OpenAILikeChatConfig): + + k: Optional[int] = None + kb_filters: Optional[List[Dict]] = None + filter_kb_content_by_query_metadata: Optional[bool] = None + instruction_override: Optional[str] = None + include_functions_info: Optional[bool] = None + include_retrieval_info: Optional[bool] = None + include_guardrails_info: Optional[bool] = None + provide_citations: Optional[bool] = None + retrieval_method: Optional[Literal["rewrite", "step_back", "sub_queries", "none"]] = None + + def __init__( + self, + frequency_penalty: Optional[float] = None, + max_tokens: Optional[int] = None, + max_completion_tokens: Optional[int] = None, + presence_penalty: Optional[float] = None, + retrieval_method: Optional[str] = None, + stop: Optional[Union[str, List[str]]] = None, + stream: Optional[bool] = None, + temperature: Optional[float] = None, + top_p: Optional[float] = None, + k: Optional[int] = None, + kb_filters: Optional[List[Dict]] = None, + filter_kb_content_by_query_metadata: Optional[bool] = None, + instruction_override: Optional[str] = None, + include_functions_info: Optional[bool] = None, + include_retrieval_info: Optional[bool] = None, + include_guardrails_info: Optional[bool] = None, + provide_citations: Optional[bool] = None, + ) -> None: + locals_ = locals().copy() + for key, value in locals_.items(): + if key != "self" and value is not None: + setattr(self.__class__, key, value) + + @classmethod + def get_config(cls): + return super().get_config() + + def get_supported_openai_params(self, model: str) -> list: + supported_params = [ + "frequency_penalty", + "max_tokens", + "max_completion_tokens", + "presence_penalty", + "stop", + "stream", + "stream_options", + "temperature", + "top_p", + # GradientAI specific parameters + "k", + "kb_filters", + "filter_kb_content_by_query_metadata", + "instruction_override", + "include_functions_info", + "include_retrieval_info", + "include_guardrails_info", + "provide_citations", + "retrieval_method", + ] + return supported_params + + def validate_environment(self, + headers: dict, + model: str, + messages: List[AllMessageValues], + optional_params: dict, + litellm_params: dict, + api_key: Optional[str] = None, + api_base: Optional[str] = None): + api_key = api_key or get_secret_str("GRADIENT_AI_API_KEY") + if api_key is None: + raise ValueError("GradientAI API key not found") + if headers is None: + headers = {} + headers["Authorization"] = f"Bearer {api_key}" + headers["Content-Type"] = "application/json" + return headers + + def get_complete_url( + self, + api_base: Optional[str], + api_key: Optional[str], + model: str, + optional_params: dict, + litellm_params: dict, + stream: Optional[bool] = None, + ) -> str: + gradient_ai_endpoint = get_secret_str("GRADIENT_AI_AGENT_ENDPOINT") + complete_url = f"{GRADIENT_AI_SERVERLESS_ENDPOINT}/v1/chat/completions" + + if api_base and api_base != GRADIENT_AI_SERVERLESS_ENDPOINT: + complete_url = f"{api_base}/api/v1/chat/completions" + elif gradient_ai_endpoint and gradient_ai_endpoint != GRADIENT_AI_SERVERLESS_ENDPOINT: + complete_url = f"{gradient_ai_endpoint}/api/v1/chat/completions" + + return complete_url + + def _get_openai_compatible_provider_info( + self, api_base: Optional[str], api_key: Optional[str] + ) -> Tuple[Optional[str], Optional[str]]: + gradient_ai_endpoint = get_secret_str("GRADIENT_AI_AGENT_ENDPOINT") + + if not api_base and not gradient_ai_endpoint: + api_base = GRADIENT_AI_SERVERLESS_ENDPOINT + else: + api_base = api_base or gradient_ai_endpoint + + dynamic_api_key = api_key or get_secret_str("GRADIENT_AI_API_KEY") + return api_base, dynamic_api_key + + def map_openai_params( + self, + non_default_params: dict, + optional_params: dict, + model: str, + drop_params: bool = False, + replace_max_completion_tokens_with_max_tokens: bool = False, + ) -> dict: + supported_openai_params = self.get_supported_openai_params(model=model) + for param, value in non_default_params.items(): + if param in supported_openai_params: + optional_params[param] = value + elif not drop_params: + from litellm.utils import UnsupportedParamsError + raise UnsupportedParamsError( + status_code=400, + message=f"GradientAI does not support parameter '{param}'. To drop unsupported params, set `drop_params=True`." + ) + + return optional_params diff --git a/litellm/main.py b/litellm/main.py index 124652fcb5..e2479b073c 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -3303,6 +3303,25 @@ def completion( # type: ignore # noqa: PLR0915 additional_args={"headers": headers}, ) raise e + elif custom_llm_provider == "gradient_ai": + + api_base = litellm.api_base or api_base + response = base_llm_http_handler.completion( + model=model, + stream=stream, + messages=messages, + acompletion=acompletion, + api_base=api_base, + model_response=model_response, + optional_params=optional_params, + litellm_params=litellm_params, + custom_llm_provider="gradient_ai", + timeout=timeout, + headers=headers, + encoding=encoding, + api_key=api_key, + logging_obj=logging, + ) elif custom_llm_provider == "bytez": api_key = ( diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 75c7d28460..e68a9b9ae3 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -1618,7 +1618,7 @@ class ImageResponse(OpenAIImageResponse, BaseLiteLLMOpenAIResponseObject): usage: Optional[ImageUsage] = None # type: ignore """ - Users might use litellm with older python versions, we don't want this to break for them. + Users might use litellm with older python versions, we don't want this to break for them. Happens when their OpenAIImageResponse has the old OpenAI usage class. """ @@ -2324,6 +2324,7 @@ class LlmProviders(str, Enum): ASSEMBLYAI = "assemblyai" GITHUB_COPILOT = "github_copilot" SNOWFLAKE = "snowflake" + GRADIENT_AI = "gradient_ai" LLAMA = "meta_llama" NSCALE = "nscale" PG_VECTOR = "pg_vector" diff --git a/litellm/utils.py b/litellm/utils.py index 667625b68b..17d10b04b6 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -6963,6 +6963,8 @@ class ProviderConfigManager: return litellm.LiteLLMProxyChatConfig() elif litellm.LlmProviders.OPENAI == provider: return litellm.OpenAIGPTConfig() + elif litellm.LlmProviders.GRADIENT_AI == provider: + return litellm.GradientAIConfig() elif litellm.LlmProviders.NSCALE == provider: return litellm.NscaleConfig() elif litellm.LlmProviders.OCI == provider: diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 1bd7b460d6..7cfc9dea5a 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -17098,6 +17098,130 @@ "litellm_provider": "snowflake", "mode": "chat" }, + "gradient_ai/anthropic-claude-3.7-sonnet": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 15e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/anthropic-claude-3.5-sonnet": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 15e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/anthropic-claude-3.5-haiku": { + "input_cost_per_token": 8e-07, + "output_cost_per_token": 4e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/anthropic-claude-3-opus": { + "input_cost_per_token": 15e-06, + "output_cost_per_token": 75e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/deepseek-r1-distill-llama-70b": { + "input_cost_per_token": 99e-08, + "output_cost_per_token": 99e-08, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 8000, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/llama3.3-70b-instruct": { + "input_cost_per_token": 65e-08, + "output_cost_per_token": 65e-08, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 2048, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/llama3-8b-instruct": { + "input_cost_per_token": 2e-07, + "output_cost_per_token": 2e-07, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 512, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/mistral-nemo-instruct-2407": { + "input_cost_per_token": 3e-07, + "output_cost_per_token": 3e-07, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 512, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-o3": { + "input_cost_per_token": 2e-06, + "output_cost_per_token": 8e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 100000, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-o3-mini": { + "input_cost_per_token": 11e-07, + "output_cost_per_token": 44e-07, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 100000, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-gpt-4o": { + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 16384, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-gpt-4o-mini": { + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 16384, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/alibaba-qwen3-32b": { + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 2048, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, "nscale/meta-llama/Llama-4-Scout-17B-16E-Instruct": { "input_cost_per_token": 9e-08, "output_cost_per_token": 2.9e-07, diff --git a/tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py b/tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py new file mode 100644 index 0000000000..66b4b36fcd --- /dev/null +++ b/tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py @@ -0,0 +1,91 @@ +import os +import sys +import pytest + +sys.path.insert( + 0, os.path.abspath("../../../../..") +) # Adds the parent directory to the system path + +from litellm.llms.gradient_ai.chat.transformation import GradientAIConfig, GRADIENT_AI_SERVERLESS_ENDPOINT + +DO_ENDPOINT_PATH = "/api/v1/chat/completions" +DO_BASE_URL = "https://api.gradient_ai.com" + +@pytest.fixture +def config(): + return GradientAIConfig() + +def test_validate_environment_sets_headers(monkeypatch, config): + monkeypatch.setenv("GRADIENT_AI_API_KEY", "test-key") + headers = {} + result = config.validate_environment( + headers=headers, + model="gradient_ai/test-model", + messages=[], + optional_params={}, + litellm_params={}, + api_key=None, + api_base=None, + ) + assert result["Authorization"] == "Bearer test-key" + assert result["Content-Type"] == "application/json" + +def test_get_complete_url_custom_base(config): + url = config.get_complete_url( + api_base=DO_BASE_URL, + api_key="test-key", + model="gradient_ai/test-model", + optional_params={}, + litellm_params={}, + stream=False, + ) + assert url == f"{DO_BASE_URL}{DO_ENDPOINT_PATH}" + +def test_get_complete_url_default_serverless(monkeypatch, config): + monkeypatch.delenv("GRADIENT_AI_AGENT_ENDPOINT", raising=False) + url = config.get_complete_url( + api_base=None, + api_key="test-key", + model="gradient_ai/test-model", + optional_params={}, + litellm_params={}, + stream=False, + ) + assert url == f"{GRADIENT_AI_SERVERLESS_ENDPOINT}/v1/chat/completions" + +def test_get_complete_url_with_env_endpoint(monkeypatch, config): + monkeypatch.setenv("GRADIENT_AI_AGENT_ENDPOINT", DO_BASE_URL) + url = config.get_complete_url( + api_base=None, + api_key="test-key", + model="gradient_ai/test-model", + optional_params={}, + litellm_params={}, + stream=False, + ) + assert url == f"{DO_BASE_URL}{DO_ENDPOINT_PATH}" + +def test_transform_messages_handles_dicts_only(config): + messages = [ + {"role": "assistant", "content": "Hello!"}, + {"role": "user", "content": "Hi!"}, + ] + out = config._transform_messages(messages, model="gradient_ai/test-model") + assert out[0]["role"] == "assistant" + assert out[0]["content"] == "Hello!" + assert out[1]["role"] == "user" + assert out[1]["content"] == "Hi!" + +def test_get_openai_compatible_provider_info_env(monkeypatch, config): + monkeypatch.setenv("GRADIENT_AI_AGENT_ENDPOINT", DO_BASE_URL) + monkeypatch.setenv("GRADIENT_AI_API_KEY", "env-key") + api_base, api_key = config._get_openai_compatible_provider_info(None, None) + assert api_base == DO_BASE_URL + assert api_key == "env-key" + +def test_get_openai_compatible_provider_info_default(monkeypatch, config): + monkeypatch.delenv("GRADIENT_AI_AGENT_ENDPOINT", raising=False) + monkeypatch.setenv("GRADIENT_AI_API_KEY", "env-key") + api_base, api_key = config._get_openai_compatible_provider_info(None, None) + assert api_base == GRADIENT_AI_SERVERLESS_ENDPOINT + assert api_key == "env-key" \ No newline at end of file diff --git a/ui/litellm-dashboard/out/assets/logos/gradientai.svg b/ui/litellm-dashboard/out/assets/logos/gradientai.svg new file mode 100644 index 0000000000..7e99cdda8f --- /dev/null +++ b/ui/litellm-dashboard/out/assets/logos/gradientai.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/litellm-dashboard/src/components/add_model/provider_specific_fields.tsx b/ui/litellm-dashboard/src/components/add_model/provider_specific_fields.tsx index 8d910bc130..d74283ec97 100644 --- a/ui/litellm-dashboard/src/components/add_model/provider_specific_fields.tsx +++ b/ui/litellm-dashboard/src/components/add_model/provider_specific_fields.tsx @@ -374,6 +374,20 @@ const PROVIDER_CREDENTIAL_FIELDS: Record = type: "password", required: true }], + [Providers.GradientAI]: [ + { + key: "api_base", + label: "GradientAI Endpoint", + placeholder: "https://...", + required: false + }, + { + key: "api_key", + label: "GradientAI API Key", + type: "password", + required: true + } + ], [Providers.Triton]: [{ key: "api_key", label: "API Key", @@ -446,7 +460,7 @@ const ProviderSpecificFields: React.FC = ({ onChange(info: any) { console.log("Upload onChange triggered in ProviderSpecificFields"); console.log("Current form values:", form.getFieldsValue()); - + if (info.file.status !== "uploading") { console.log(info.file, info.fileList); } @@ -465,7 +479,7 @@ const ProviderSpecificFields: React.FC = ({ className={field.key === "vertex_credentials" ? "mb-0" : undefined} > {field.type === "select" ? ( - ) : field.type === "upload" ? ( - { // First call the original onChange if (uploadProps?.onChange) { uploadProps.onChange(info); } - + // Check the field value after a short delay setTimeout(() => { const value = form.getFieldValue(field.key); @@ -494,9 +508,9 @@ const ProviderSpecificFields: React.FC = ({ }>Click to Upload ) : ( - )} @@ -536,4 +550,4 @@ const ProviderSpecificFields: React.FC = ({ ); }; -export default ProviderSpecificFields; \ No newline at end of file +export default ProviderSpecificFields; diff --git a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx index 0ca9e20b8e..1d42ac0974 100644 --- a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx +++ b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx @@ -17,6 +17,7 @@ export enum Providers { ElevenLabs = "ElevenLabs", FireworksAI = "Fireworks AI", Google_AI_Studio = "Google AI Studio", + GradientAI = "GradientAI", Groq = "Groq", JinaAI = "Jina AI", MistralAI = "Mistral AI", @@ -35,7 +36,7 @@ export enum Providers { Voyage = "Voyage AI", xAI = "xAI", } - + export const provider_map: Record = { OpenAI: "openai", OpenAI_Text: "text-completion-openai", @@ -61,6 +62,7 @@ export const provider_map: Record = { TogetherAI: "together_ai", Openrouter: "openrouter", FireworksAI: "fireworks_ai", + GradientAI: "gradient_ai", Triton: "triton", Deepgram: "deepgram", ElevenLabs: "elevenlabs", @@ -99,6 +101,7 @@ export const providerLogoMap: Record = { [Providers.TogetherAI]: `${asset_logos_folder}togetherai.svg`, [Providers.Vertex_AI]: `${asset_logos_folder}google.svg`, [Providers.xAI]: `${asset_logos_folder}xai.svg`, + [Providers.GradientAI]: `${asset_logos_folder}gradientai.svg`, [Providers.Triton]: `${asset_logos_folder}nvidia_triton.png`, [Providers.Deepgram]: `${asset_logos_folder}deepgram.png`, [Providers.ElevenLabs]: `${asset_logos_folder}elevenlabs.png`, @@ -169,9 +172,9 @@ export const getPlaceholder = (selectedProvider: string): string => { console.log(`Provider key: ${providerKey}`); let custom_llm_provider = provider_map[providerKey]; console.log(`Provider mapped to: ${custom_llm_provider}`); - + let providerModels: Array = []; - + if (providerKey && typeof modelMap === "object") { Object.entries(modelMap).forEach(([key, value]) => { if ( @@ -184,7 +187,6 @@ export const getPlaceholder = (selectedProvider: string): string => { providerModels.push(key); } }); - // Special case for cohere // we need both cohere_chat and cohere models to show on dropdown if (providerKey == Providers.Cohere) { @@ -217,6 +219,6 @@ export const getPlaceholder = (selectedProvider: string): string => { }); } } - + return providerModels; }; From 9f6f96d76c28f0297e3e074d6376dcd3b1967e09 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Sat, 9 Aug 2025 16:30:04 -0700 Subject: [PATCH 15/32] Litellm dev 08 07 2025 p1 (#13418) * fix(router.py): support base model for model group usage allows model group info to show accurate cost information for azure models * fix(router.py): fix changes * test: add unit tests * build(pyproject.toml): bump openai version requirements support custom tool from responses api Closes https://github.com/BerriAI/litellm/issues/13391 * docs(responses_api.md): add verbosity + free-form function calling parameters * docs(responses_api.md): add cfg + minimal reasoning to docs Closes https://github.com/BerriAI/litellm/issues/13391 * docs(responses_api.md): add proxy examples to docs * refactor: fix ruff error --- .../docs/providers/openai/responses_api.md | 352 +++++++++ litellm/proxy/_new_secret_config.yaml | 2 +- litellm/router.py | 17 + poetry.lock | 668 ++++-------------- tests/test_litellm/test_router.py | 289 ++++++++ 5 files changed, 810 insertions(+), 518 deletions(-) diff --git a/docs/my-website/docs/providers/openai/responses_api.md b/docs/my-website/docs/providers/openai/responses_api.md index db2d781ca1..e96a2f9522 100644 --- a/docs/my-website/docs/providers/openai/responses_api.md +++ b/docs/my-website/docs/providers/openai/responses_api.md @@ -492,3 +492,355 @@ print(response_with_mcp_call) +## Verbosity Parameter + +The `verbosity` parameter is supported for the `responses` API. + + + + +```python showLineNumbers title="Verbosity Parameter" +from litellm import responses + +question = "Write a poem about a boy and his first pet dog." + +for verbosity in ["low", "medium", "high"]: + response = responses( + model="gpt-5-mini", + input=question, + text={"verbosity": verbosity} + ) + + print(response) +``` + + + + +```python +from openai import OpenAI +import pandas as pd +from IPython.display import display + +client = OpenAI( + base_url="http://localhost:4000", # Your proxy URL + api_key="your-api-key" # Your proxy API key +) + +question = "Write a poem about a boy and his first pet dog." + +data = [] + +for verbosity in ["low", "medium", "high"]: + response = client.responses.create( + model="gpt-5-mini", + input=question, + text={"verbosity": verbosity} + ) + + # Extract text + output_text = "" + for item in response.output: + if hasattr(item, "content"): + for content in item.content: + if hasattr(content, "text"): + output_text += content.text + + usage = response.usage + data.append({ + "Verbosity": verbosity, + "Sample Output": output_text, + "Output Tokens": usage.output_tokens + }) + +# Create DataFrame +df = pd.DataFrame(data) + +# Display nicely with centered headers +pd.set_option('display.max_colwidth', None) +styled_df = df.style.set_table_styles( + [ + {'selector': 'th', 'props': [('text-align', 'center')]}, # Center column headers + {'selector': 'td', 'props': [('text-align', 'left')]} # Left-align table cells + ] +) + +display(styled_df) + +``` + + + + + +## Free-form Function Calling + + + + + +```python showLineNumbers title="Free-form Function Calling" +import litellm + +response = litellm.responses( + response = client.responses.create( + model="gpt-5-mini", + input="Please use the code_exec tool to calculate the area of a circle with radius equal to the number of 'r's in strawberry", + text={"format": {"type": "text"}}, + tools=[ + { + "type": "custom", + "name": "code_exec", + "description": "Executes arbitrary python code", + } + ] +) +print(response.output) +``` + + + + +```python showLineNumbers title="Free-form Function Calling" +from openai import OpenAI + +client = OpenAI( + base_url="http://localhost:4000", # Your proxy URL + api_key="your-api-key" # Your proxy API key +) + +response = client.responses.create( + model="gpt-5-mini", + input="Please use the code_exec tool to calculate the area of a circle with radius equal to the number of 'r's in strawberry", + text={"format": {"type": "text"}}, + tools=[ + { + "type": "custom", + "name": "code_exec", + "description": "Executes arbitrary python code", + } + ] +) +print(response.output) +``` + + + + + +## Context-Free Grammar + + + + +```python showLineNumbers title="Context-Free Grammar" +import litellm + +import textwrap + +# ----------------- grammars for MS SQL dialect ----------------- +mssql_grammar = textwrap.dedent(r""" + // ---------- Punctuation & operators ---------- + SP: " " + COMMA: "," + GT: ">" + EQ: "=" + SEMI: ";" + + // ---------- Start ---------- + start: "SELECT" SP "TOP" SP NUMBER SP select_list SP "FROM" SP table SP "WHERE" SP amount_filter SP "AND" SP date_filter SP "ORDER" SP "BY" SP sort_cols SEMI + + // ---------- Projections ---------- + select_list: column (COMMA SP column)* + column: IDENTIFIER + + // ---------- Tables ---------- + table: IDENTIFIER + + // ---------- Filters ---------- + amount_filter: "total_amount" SP GT SP NUMBER + date_filter: "order_date" SP GT SP DATE + + // ---------- Sorting ---------- + sort_cols: "order_date" SP "DESC" + + // ---------- Terminals ---------- + IDENTIFIER: /[A-Za-z_][A-Za-z0-9_]*/ + NUMBER: /[0-9]+/ + DATE: /'[0-9]{4}-[0-9]{2}-[0-9]{2}'/ + """) + +sql_prompt_mssql = ( + "Call the mssql_grammar to generate a query for Microsoft SQL Server that retrieve the " + "five most recent orders per customer, showing customer_id, order_id, order_date, and total_amount, " + "where total_amount > 500 and order_date is after '2025-01-01'. " +) + + +response = litellm.responses( + model="gpt-5", + input=sql_prompt_mssql, + text={"format": {"type": "text"}}, + tools=[ + { + "type": "custom", + "name": "mssql_grammar", + "description": "Executes read-only Microsoft SQL Server queries limited to SELECT statements with TOP and basic WHERE/ORDER BY. YOU MUST REASON HEAVILY ABOUT THE QUERY AND MAKE SURE IT OBEYS THE GRAMMAR.", + "format": { + "type": "grammar", + "syntax": "lark", + "definition": mssql_grammar + } + }, + ], + parallel_tool_calls=False +) + +print("--- MS SQL Query ---") +print(response_mssql.output[1].input) +``` + + + + +```python showLineNumbers title="Context-Free Grammar" +from openai import OpenAI + +client = OpenAI( + base_url="http://localhost:4000", # Your proxy URL + api_key="your-api-key" # Your proxy API key +) + +import textwrap + +# ----------------- grammars for MS SQL dialect ----------------- +mssql_grammar = textwrap.dedent(r""" + // ---------- Punctuation & operators ---------- + SP: " " + COMMA: "," + GT: ">" + EQ: "=" + SEMI: ";" + + // ---------- Start ---------- + start: "SELECT" SP "TOP" SP NUMBER SP select_list SP "FROM" SP table SP "WHERE" SP amount_filter SP "AND" SP date_filter SP "ORDER" SP "BY" SP sort_cols SEMI + + // ---------- Projections ---------- + select_list: column (COMMA SP column)* + column: IDENTIFIER + + // ---------- Tables ---------- + table: IDENTIFIER + + // ---------- Filters ---------- + amount_filter: "total_amount" SP GT SP NUMBER + date_filter: "order_date" SP GT SP DATE + + // ---------- Sorting ---------- + sort_cols: "order_date" SP "DESC" + + // ---------- Terminals ---------- + IDENTIFIER: /[A-Za-z_][A-Za-z0-9_]*/ + NUMBER: /[0-9]+/ + DATE: /'[0-9]{4}-[0-9]{2}-[0-9]{2}'/ + """) + +sql_prompt_mssql = ( + "Call the mssql_grammar to generate a query for Microsoft SQL Server that retrieve the " + "five most recent orders per customer, showing customer_id, order_id, order_date, and total_amount, " + "where total_amount > 500 and order_date is after '2025-01-01'. " +) + + +response = client.responses.create( + model="gpt-5", + input=sql_prompt_mssql, + text={"format": {"type": "text"}}, + tools=[ + { + "type": "custom", + "name": "mssql_grammar", + "description": "Executes read-only Microsoft SQL Server queries limited to SELECT statements with TOP and basic WHERE/ORDER BY. YOU MUST REASON HEAVILY ABOUT THE QUERY AND MAKE SURE IT OBEYS THE GRAMMAR.", + "format": { + "type": "grammar", + "syntax": "lark", + "definition": mssql_grammar + } + }, + ], + parallel_tool_calls=False +) + +print("--- MS SQL Query ---") +print(response_mssql.output[1].input) +``` + + + + +## Minimal Reasoning + + + + + +```python showLineNumbers title="Minimal Reasoning" +import litellm + +response = litellm.responses( + model="gpt-5", + input= [{ 'role': 'developer', 'content': prompt }, + { 'role': 'user', 'content': 'The food that the restaurant was great! I recommend it to everyone.' }], + reasoning = { + "effort": "minimal" + }, +) + +print(response) +``` + + + +```python showLineNumbers title="Minimal Reasoning" +from openai import OpenAI + +client = OpenAI( + base_url="http://localhost:4000", # Your proxy URL + api_key="your-api-key" # Your proxy API key +) + + +prompt = "Classify sentiment of the review as positive|neutral|negative. Return one word only." + + +response = client.responses.create( + model="gpt-5", + input= [{ 'role': 'developer', 'content': prompt }, + { 'role': 'user', 'content': 'The food that the restaurant was great! I recommend it to everyone.' }], + reasoning = { + "effort": "minimal" + }, +) + +# Extract model's text output +output_text = "" +for item in response.output: + if hasattr(item, "content"): + for content in item.content: + if hasattr(content, "text"): + output_text += content.text + +# Token usage details +usage = response.usage + +print("--------------------------------") +print("Output:") +print(output_text) + + + +``` + + + + diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index cb41dfbd75..c04c076661 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -21,4 +21,4 @@ litellm_settings: return_response_headers: true store_audit_logs: true callbacks: ["prometheus", "resend_email", "otel"] - cache: true \ No newline at end of file + cache: true diff --git a/litellm/router.py b/litellm/router.py index dbd5b4c6b2..b5dac3263c 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -5540,6 +5540,23 @@ class Router: except Exception: pass + ## check for base model + try: + if custom_model_info is not None: + base_model = custom_model_info.get("base_model", None) + if base_model is not None: + ## update litellm model info with base model info + base_model_info = litellm.get_model_info(model=base_model) + if base_model_info is not None: + custom_model_info = custom_model_info or {} + # Base model provides defaults, custom model info overrides + custom_model_info = _update_dictionary( + cast(dict, base_model_info), + custom_model_info, + ) + except Exception: + pass + if custom_model_info is not None and litellm_model_name_model_info is not None: model_info = cast( ModelInfo, diff --git a/poetry.lock b/poetry.lock index a7781ff52f..133667d8da 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6,7 +6,6 @@ version = "2.4.4" description = "Happy Eyeballs for asyncio" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "aiohappyeyeballs-2.4.4-py3-none-any.whl", hash = "sha256:a980909d50efcd44795c4afeca523296716d50cd756ddca6af8c65b996e27de8"}, {file = "aiohappyeyeballs-2.4.4.tar.gz", hash = "sha256:5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745"}, @@ -18,7 +17,6 @@ version = "3.10.11" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "aiohttp-3.10.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5077b1a5f40ffa3ba1f40d537d3bec4383988ee51fbba6b74aa8fb1bc466599e"}, {file = "aiohttp-3.10.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8d6a14a4d93b5b3c2891fca94fa9d41b2322a68194422bef0dd5ec1e57d7d298"}, @@ -123,7 +121,7 @@ multidict = ">=4.5,<7.0" yarl = ">=1.12.0,<2.0" [package.extras] -speedups = ["Brotli ; platform_python_implementation == \"CPython\"", "aiodns (>=3.2.0) ; sys_platform == \"linux\" or sys_platform == \"darwin\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" @@ -131,7 +129,6 @@ version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" optional = false python-versions = ">=3.7" -groups = ["main"] files = [ {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, @@ -146,8 +143,6 @@ version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" optional = true python-versions = ">=3.6" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, @@ -159,8 +154,6 @@ version = "1.16.4" description = "A database migration tool for SQLAlchemy." optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "alembic-1.16.4-py3-none-any.whl", hash = "sha256:b05e51e8e82efc1abd14ba2af6392897e145930c3e0a2faf2b0da2f7f7fd660d"}, {file = "alembic-1.16.4.tar.gz", hash = "sha256:efab6ada0dd0fae2c92060800e0bf5c1dc26af15a10e02fb4babff164b4725e2"}, @@ -181,7 +174,6 @@ version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -196,7 +188,6 @@ version = "4.5.2" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"}, {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"}, @@ -210,7 +201,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21.0b1) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\""] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -219,8 +210,6 @@ version = "3.11.0" description = "In-process task scheduler with Cron-like capabilities" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "APScheduler-3.11.0-py3-none-any.whl", hash = "sha256:fc134ca32e50f5eadcc4938e3a4545ab19131435e851abb40b34d63d5141c6da"}, {file = "apscheduler-3.11.0.tar.gz", hash = "sha256:4c622d250b0955a65d5d0eb91c33e6d43fd879834bf541e0a18661ae60460133"}, @@ -238,7 +227,7 @@ mongodb = ["pymongo (>=3.0)"] redis = ["redis (>=3.0)"] rethinkdb = ["rethinkdb (>=2.4.0)"] sqlalchemy = ["sqlalchemy (>=1.4)"] -test = ["APScheduler[etcd,mongodb,redis,rethinkdb,sqlalchemy,tornado,zookeeper]", "PySide6 ; platform_python_implementation == \"CPython\" and python_version < \"3.14\"", "anyio (>=4.5.2)", "gevent ; python_version < \"3.14\"", "pytest", "pytz", "twisted ; python_version < \"3.14\""] +test = ["APScheduler[etcd,mongodb,redis,rethinkdb,sqlalchemy,tornado,zookeeper]", "PySide6", "anyio (>=4.5.2)", "gevent", "pytest", "pytz", "twisted"] tornado = ["tornado (>=4.3)"] twisted = ["twisted"] zookeeper = ["kazoo"] @@ -247,10 +236,8 @@ zookeeper = ["kazoo"] name = "async-timeout" version = "5.0.1" description = "Timeout context manager for asyncio programs" -optional = true +optional = false python-versions = ">=3.8" -groups = ["main"] -markers = "python_full_version < \"3.11.3\" and (extra == \"extra-proxy\" or extra == \"proxy\") or python_version <= \"3.10\"" files = [ {file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"}, {file = "async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3"}, @@ -262,19 +249,18 @@ version = "25.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] [package.extras] -benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] -tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "azure-core" @@ -282,7 +268,6 @@ version = "1.33.0" description = "Microsoft Azure Core Library for Python" optional = false python-versions = ">=3.8" -groups = ["main", "proxy-dev"] files = [ {file = "azure_core-1.33.0-py3-none-any.whl", hash = "sha256:9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f"}, {file = "azure_core-1.33.0.tar.gz", hash = "sha256:f367aa07b5e3005fec2c1e184b882b0b039910733907d001c20fb08ebb8c0eb9"}, @@ -303,7 +288,6 @@ version = "1.21.0" description = "Microsoft Azure Identity Library for Python" optional = false python-versions = ">=3.8" -groups = ["main", "proxy-dev"] files = [ {file = "azure_identity-1.21.0-py3-none-any.whl", hash = "sha256:258ea6325537352440f71b35c3dffe9d240eae4a5126c1b7ce5efd5766bd9fd9"}, {file = "azure_identity-1.21.0.tar.gz", hash = "sha256:ea22ce6e6b0f429bc1b8d9212d5b9f9877bd4c82f1724bfa910760612c07a9a6"}, @@ -322,8 +306,6 @@ version = "4.9.0" description = "Microsoft Azure Key Vault Secrets Client Library for Python" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "azure_keyvault_secrets-4.9.0-py3-none-any.whl", hash = "sha256:33c7e2aca2cc2092cebc8c6e96eca36a5cc30c767e16ea429c5fa21270e9fba6"}, {file = "azure_keyvault_secrets-4.9.0.tar.gz", hash = "sha256:2a03bb2ffd9a0d6c8ad1c330d9d0310113985a9de06607ece378fd72a5889fe1"}, @@ -340,8 +322,6 @@ version = "12.26.0" description = "Microsoft Azure Blob Storage Client Library for Python" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "azure_storage_blob-12.26.0-py3-none-any.whl", hash = "sha256:8c5631b8b22b4f53ec5fff2f3bededf34cfef111e2af613ad42c9e6de00a77fe"}, {file = "azure_storage_blob-12.26.0.tar.gz", hash = "sha256:5dd7d7824224f7de00bfeb032753601c982655173061e242f13be6e26d78d71f"}, @@ -362,8 +342,6 @@ version = "2.17.0" description = "Internationalization utilities" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2"}, {file = "babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d"}, @@ -373,7 +351,7 @@ files = [ pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} [package.extras] -dev = ["backports.zoneinfo ; python_version < \"3.9\"", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata ; sys_platform == \"win32\""] +dev = ["backports.zoneinfo", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata"] [[package]] name = "backoff" @@ -381,12 +359,10 @@ version = "2.2.1" description = "Function decoration for backoff and retry" optional = false python-versions = ">=3.7,<4.0" -groups = ["main", "dev"] files = [ {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, ] -markers = {main = "python_version >= \"3.9\" and (extra == \"semantic-router\" or extra == \"proxy\") or extra == \"proxy\""} [[package]] name = "backports-zoneinfo" @@ -394,8 +370,6 @@ version = "0.2.1" description = "Backport of the standard library zoneinfo module" optional = true python-versions = ">=3.6" -groups = ["main"] -markers = "extra == \"proxy\" and python_version < \"3.9\"" files = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722"}, @@ -424,7 +398,6 @@ version = "23.12.1" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" -groups = ["main", "dev"] files = [ {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, @@ -461,7 +434,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4) ; sys_platform != \"win32\" or implementation_name != \"pypy\"", "aiohttp (>=3.7.4,!=3.9.0) ; sys_platform == \"win32\" and implementation_name == \"pypy\""] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -471,8 +444,6 @@ version = "1.9.0" description = "Fast, simple object-to-object and broadcast signaling" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc"}, {file = "blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf"}, @@ -484,8 +455,6 @@ version = "1.34.34" description = "The AWS SDK for Python" optional = true python-versions = ">= 3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "boto3-1.34.34-py3-none-any.whl", hash = "sha256:33a8b6d9136fa7427160edb92d2e50f2035f04e9d63a2d1027349053e12626aa"}, {file = "boto3-1.34.34.tar.gz", hash = "sha256:b2f321e20966f021ec800b7f2c01287a3dd04fc5965acdfbaa9c505a24ca45d1"}, @@ -505,8 +474,6 @@ version = "1.34.162" description = "Low-level, data-driven core of boto 3." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "botocore-1.34.162-py3-none-any.whl", hash = "sha256:2d918b02db88d27a75b48275e6fb2506e9adaaddbec1ffa6a8a0898b34e769be"}, {file = "botocore-1.34.162.tar.gz", hash = "sha256:adc23be4fb99ad31961236342b7cbf3c0bfc62532cd02852196032e8c0d682f3"}, @@ -529,8 +496,6 @@ version = "5.5.2" description = "Extensible memoizing collections and decorators" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"extra-proxy\") or extra == \"extra-proxy\"" files = [ {file = "cachetools-5.5.2-py3-none-any.whl", hash = "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a"}, {file = "cachetools-5.5.2.tar.gz", hash = "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4"}, @@ -542,7 +507,6 @@ version = "2025.8.3" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"}, {file = "certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407"}, @@ -554,7 +518,6 @@ version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, @@ -624,7 +587,6 @@ files = [ {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] -markers = {main = "platform_python_implementation != \"PyPy\" or extra == \"proxy\"", dev = "platform_python_implementation != \"PyPy\"", proxy-dev = "platform_python_implementation != \"PyPy\""} [package.dependencies] pycparser = "*" @@ -635,7 +597,6 @@ version = "3.4.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, @@ -737,7 +698,6 @@ version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, @@ -752,8 +712,6 @@ version = "3.1.1" description = "Pickler class to extend the standard pickle.Pickler functionality" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "cloudpickle-3.1.1-py3-none-any.whl", hash = "sha256:c8c5a44295039331ee9dad40ba100a9c7297b6f988e50e87ccdf3765a668350e"}, {file = "cloudpickle-3.1.1.tar.gz", hash = "sha256:b216fa8ae4019d5482a8ac3c95d8f6346115d8835911fd4aefd1a445e4242c64"}, @@ -765,8 +723,6 @@ version = "4.57" description = "Python SDK for the Cohere API" optional = true python-versions = ">=3.8,<4.0" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"semantic-router\"" files = [ {file = "cohere-4.57-py3-none-any.whl", hash = "sha256:479bdea81ae119e53f671f1ae808fcff9df88211780525d7ef2f7b99dfb32e59"}, {file = "cohere-4.57.tar.gz", hash = "sha256:71ace0204a92d1a2a8d4b949b88b353b4f22fc645486851924284cc5a0eb700d"}, @@ -786,12 +742,10 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -markers = {main = "sys_platform == \"win32\" and (extra == \"utils\" or extra == \"semantic-router\") and python_version >= \"3.9\" or platform_system == \"Windows\" or sys_platform == \"win32\" and extra == \"utils\"", dev = "platform_system == \"Windows\" or sys_platform == \"win32\"", proxy-dev = "platform_system == \"Windows\""} [[package]] name = "coloredlogs" @@ -799,8 +753,6 @@ version = "15.0.1" description = "Colored terminal output for Python's logging module" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "coloredlogs-15.0.1-py2.py3-none-any.whl", hash = "sha256:612ee75c546f53e92e70049c9dbfcc18c935a2b9a53b66085ce9ef6a6e5c0934"}, {file = "coloredlogs-15.0.1.tar.gz", hash = "sha256:7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0"}, @@ -818,8 +770,6 @@ version = "6.9.0" description = "Add colours to the output of Python's logging module." optional = true python-versions = ">=3.6" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"semantic-router\"" files = [ {file = "colorlog-6.9.0-py3-none-any.whl", hash = "sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff"}, {file = "colorlog-6.9.0.tar.gz", hash = "sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2"}, @@ -837,8 +787,6 @@ version = "1.3.2" description = "Python library for calculating contours of 2D quadrilateral grids" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934"}, {file = "contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989"}, @@ -915,7 +863,6 @@ version = "43.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"}, {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"}, @@ -965,8 +912,6 @@ version = "0.12.1" description = "Composable style cycles" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30"}, {file = "cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c"}, @@ -978,15 +923,13 @@ tests = ["pytest", "pytest-cov", "pytest-xdist"] [[package]] name = "databricks-sdk" -version = "0.61.0" +version = "0.62.0" description = "Databricks SDK for Python (Beta)" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ - {file = "databricks_sdk-0.61.0-py3-none-any.whl", hash = "sha256:709ac7c709f843567b04fba6cea8a53ee644b79314e9a9ac4db0c1b3c1d2d5fe"}, - {file = "databricks_sdk-0.61.0.tar.gz", hash = "sha256:06e50663c2c87e94f5e505390b74bc5c7c5330f4b4be35616b7aed06cf940af0"}, + {file = "databricks_sdk-0.62.0-py3-none-any.whl", hash = "sha256:79d4abe60306239985a5b718583923e13316c5417204017b0dadf74bccfcc6e1"}, + {file = "databricks_sdk-0.62.0.tar.gz", hash = "sha256:12f8da735f74cba5265dcb0620c30941628f63787e6ea7e57cc5ed22d9e1b987"}, ] [package.dependencies] @@ -994,9 +937,9 @@ google-auth = ">=2.0,<3.0" requests = ">=2.28.1,<3" [package.extras] -dev = ["autoflake", "black", "build", "databricks-connect", "httpx", "ipython", "ipywidgets", "isort", "langchain-openai ; python_version > \"3.7\"", "openai", "pycodestyle", "pyfakefs", "pytest", "pytest-cov", "pytest-mock", "pytest-rerunfailures", "pytest-xdist", "requests-mock", "wheel"] +dev = ["autoflake", "black", "build", "databricks-connect", "httpx", "ipython", "ipywidgets", "isort", "langchain-openai", "openai", "pycodestyle", "pyfakefs", "pytest", "pytest-cov", "pytest-mock", "pytest-rerunfailures", "pytest-xdist", "requests-mock", "wheel"] notebook = ["ipython (>=8,<10)", "ipywidgets (>=8,<9)"] -openai = ["httpx", "langchain-openai ; python_version > \"3.7\"", "openai"] +openai = ["httpx", "langchain-openai", "openai"] [[package]] name = "deprecated" @@ -1004,18 +947,16 @@ version = "1.2.18" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, ] -markers = {main = "python_version >= \"3.10\""} [package.dependencies] wrapt = ">=1.10,<2" [package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools ; python_version >= \"3.12\"", "tox"] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools", "tox"] [[package]] name = "diskcache" @@ -1023,8 +964,6 @@ version = "5.6.3" description = "Disk Cache -- Disk and file backed persistent cache." optional = true python-versions = ">=3" -groups = ["main"] -markers = "extra == \"caching\"" files = [ {file = "diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19"}, {file = "diskcache-5.6.3.tar.gz", hash = "sha256:2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc"}, @@ -1036,7 +975,6 @@ version = "1.9.0" description = "Distro - an OS platform information API" optional = false python-versions = ">=3.6" -groups = ["main"] files = [ {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, @@ -1048,8 +986,6 @@ version = "2.6.1" description = "DNS toolkit" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "dnspython-2.6.1-py3-none-any.whl", hash = "sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50"}, {file = "dnspython-2.6.1.tar.gz", hash = "sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc"}, @@ -1070,8 +1006,6 @@ version = "7.1.0" description = "A Python library for the Docker Engine API." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "docker-7.1.0-py3-none-any.whl", hash = "sha256:c96b93b7f0a746f9e77d325bcfb87422a3d8bd4f03136ae8a85b37f1898d5fc0"}, {file = "docker-7.1.0.tar.gz", hash = "sha256:ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c"}, @@ -1094,8 +1028,6 @@ version = "0.20.1" description = "Docutils -- Python Documentation Utilities" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, @@ -1107,8 +1039,6 @@ version = "2.2.0" description = "A robust email address syntax and deliverability validation library." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "email_validator-2.2.0-py3-none-any.whl", hash = "sha256:561977c2d73ce3611850a06fa56b414621e0c8faa9d66f2611407d87465da631"}, {file = "email_validator-2.2.0.tar.gz", hash = "sha256:cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7"}, @@ -1124,8 +1054,6 @@ version = "1.3.0" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] -markers = "python_version <= \"3.10\"" files = [ {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, @@ -1143,8 +1071,6 @@ version = "0.115.14" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"proxy\") or extra == \"proxy\"" files = [ {file = "fastapi-0.115.14-py3-none-any.whl", hash = "sha256:6c0c8bf9420bd58f565e585036d971872472b4f7d3f6c73b698e10cffdefb3ca"}, {file = "fastapi-0.115.14.tar.gz", hash = "sha256:b1de15cdc1c499a4da47914db35d0e4ef8f1ce62b624e94e0e5824421df99739"}, @@ -1165,8 +1091,6 @@ version = "0.16.0" description = "FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account)" optional = true python-versions = "<4.0,>=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "fastapi_sso-0.16.0-py3-none-any.whl", hash = "sha256:3a66a942474ef9756d3a9d8b945d55bd9faf99781facdb9b87a40b73d6d6b0c3"}, {file = "fastapi_sso-0.16.0.tar.gz", hash = "sha256:f3941f986347566b7d3747c710cf474a907f581bfb6697ff3bb3e44eb76b438c"}, @@ -1185,8 +1109,6 @@ version = "1.12.0" description = "Fast read/write of AVRO files" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"semantic-router\"" files = [ {file = "fastavro-1.12.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e38497bd24136aad2c47376ee958be4f5b775d6f03c11893fc636eea8c1c3b40"}, {file = "fastavro-1.12.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e8d8401b021f4b3dfc05e6f82365f14de8d170a041fbe3345f992c9c13d4f0ff"}, @@ -1238,7 +1160,6 @@ version = "3.16.1" description = "A platform independent file lock." optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, @@ -1247,7 +1168,7 @@ files = [ [package.extras] docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] -typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] +typing = ["typing-extensions (>=4.12.2)"] [[package]] name = "flake8" @@ -1255,7 +1176,6 @@ version = "6.1.0" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.8.1" -groups = ["dev"] files = [ {file = "flake8-6.1.0-py2.py3-none-any.whl", hash = "sha256:ffdfce58ea94c6580c77888a86506937f9a1a227dfcd15f245d694ae20a6b6e5"}, {file = "flake8-6.1.0.tar.gz", hash = "sha256:d5b3857f07c030bdb5bf41c7f53799571d75c4491748a3adcd47de929e34cd23"}, @@ -1272,8 +1192,6 @@ version = "3.1.1" description = "A simple framework for building complex web applications." optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "flask-3.1.1-py3-none-any.whl", hash = "sha256:07aae2bb5eaf77993ef57e357491839f5fd9f4dc281593a81a9e4d79a24f295c"}, {file = "flask-3.1.1.tar.gz", hash = "sha256:284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e"}, @@ -1297,8 +1215,6 @@ version = "4.59.0" description = "Tools to manipulate font files" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "fonttools-4.59.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:524133c1be38445c5c0575eacea42dbd44374b310b1ffc4b60ff01d881fabb96"}, {file = "fonttools-4.59.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21e606b2d38fed938dde871c5736822dd6bda7a4631b92e509a1f5cd1b90c5df"}, @@ -1345,17 +1261,17 @@ files = [ ] [package.extras] -all = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\"", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0) ; python_version <= \"3.12\"", "xattr ; sys_platform == \"darwin\"", "zopfli (>=0.1.4)"] +all = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres", "pycairo", "scipy", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0)", "xattr", "zopfli (>=0.1.4)"] graphite = ["lz4 (>=1.7.4.2)"] -interpolatable = ["munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\""] +interpolatable = ["munkres", "pycairo", "scipy"] lxml = ["lxml (>=4.0)"] pathops = ["skia-pathops (>=0.5.0)"] plot = ["matplotlib"] repacker = ["uharfbuzz (>=0.23.0)"] symfont = ["sympy"] -type1 = ["xattr ; sys_platform == \"darwin\""] -unicode = ["unicodedata2 (>=15.1.0) ; python_version <= \"3.12\""] -woff = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "zopfli (>=0.1.4)"] +type1 = ["xattr"] +unicode = ["unicodedata2 (>=15.1.0)"] +woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] [[package]] name = "frozenlist" @@ -1363,7 +1279,6 @@ version = "1.5.0" description = "A list-like structure which implements collections.abc.MutableSequence" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a"}, {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb"}, @@ -1465,7 +1380,6 @@ version = "2025.3.0" description = "File-system specification" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "fsspec-2025.3.0-py3-none-any.whl", hash = "sha256:efb87af3efa9103f94ca91a7f8cb7a4df91af9f74fc106c9c7ea0efd7277c1b3"}, {file = "fsspec-2025.3.0.tar.gz", hash = "sha256:a935fd1ea872591f2b5148907d103488fc523295e6c64b835cfad8c3eca44972"}, @@ -1505,8 +1419,6 @@ version = "4.0.12" description = "Git Object Database" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf"}, {file = "gitdb-4.0.12.tar.gz", hash = "sha256:5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571"}, @@ -1521,8 +1433,6 @@ version = "3.1.45" description = "GitPython is a Python library used to interact with Git repositories" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "gitpython-3.1.45-py3-none-any.whl", hash = "sha256:8908cb2e02fb3b93b7eb0f2827125cb699869470432cc885f019b8fd0fccff77"}, {file = "gitpython-3.1.45.tar.gz", hash = "sha256:85b0ee964ceddf211c41b9f27a49086010a190fd8132a24e21f362a4b36a791c"}, @@ -1533,7 +1443,7 @@ gitdb = ">=4.0.1,<5" [package.extras] doc = ["sphinx (>=7.1.2,<7.2)", "sphinx-autodoc-typehints", "sphinx_rtd_theme"] -test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3.8\"", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions ; python_version < \"3.11\""] +test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] [[package]] name = "google-api-core" @@ -1541,8 +1451,6 @@ version = "2.25.1" description = "Google API client core library" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "google_api_core-2.25.1-py3-none-any.whl", hash = "sha256:8a2a56c1fef82987a524371f99f3bd0143702fecc670c72e600c1cda6bf8dbb7"}, {file = "google_api_core-2.25.1.tar.gz", hash = "sha256:d2aaa0b13c78c61cb3f4282c464c046e45fbd75755683c9c525e6e8f7ed0a5e8"}, @@ -1557,18 +1465,18 @@ grpcio = [ ] grpcio-status = [ {version = ">=1.49.1,<2.0.0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, - {version = ">=1.33.2,<2.0.0", optional = true, markers = "extra == \"grpc\""}, + {version = ">=1.33.2,<2.0.0", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, ] proto-plus = [ - {version = ">=1.22.3,<2.0.0"}, {version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""}, + {version = ">=1.22.3,<2.0.0", markers = "python_version < \"3.13\""}, ] protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" requests = ">=2.18.0,<3.0.0" [package.extras] async-rest = ["google-auth[aiohttp] (>=2.35.0,<3.0.0)"] -grpc = ["grpcio (>=1.33.2,<2.0.0)", "grpcio (>=1.49.1,<2.0.0) ; python_version >= \"3.11\"", "grpcio-status (>=1.33.2,<2.0.0)", "grpcio-status (>=1.49.1,<2.0.0) ; python_version >= \"3.11\""] +grpc = ["grpcio (>=1.33.2,<2.0.0)", "grpcio (>=1.49.1,<2.0.0)", "grpcio-status (>=1.33.2,<2.0.0)", "grpcio-status (>=1.49.1,<2.0.0)"] grpcgcp = ["grpcio-gcp (>=0.2.2,<1.0.0)"] grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.0)"] @@ -1578,8 +1486,6 @@ version = "2.40.3" description = "Google Authentication Library" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"extra-proxy\") or extra == \"extra-proxy\"" files = [ {file = "google_auth-2.40.3-py2.py3-none-any.whl", hash = "sha256:1370d4593e86213563547f97a92752fc658456fe4514c809544f330fed45a7ca"}, {file = "google_auth-2.40.3.tar.gz", hash = "sha256:500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77"}, @@ -1593,11 +1499,11 @@ rsa = ">=3.1.4,<5" [package.extras] aiohttp = ["aiohttp (>=3.6.2,<4.0.0)", "requests (>=2.20.0,<3.0.0)"] enterprise-cert = ["cryptography", "pyopenssl"] -pyjwt = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] -pyopenssl = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] +pyjwt = ["cryptography (<39.0.0)", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] +pyopenssl = ["cryptography (<39.0.0)", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] reauth = ["pyu2f (>=0.1.5)"] requests = ["requests (>=2.20.0,<3.0.0)"] -testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] +testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0)", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] urllib3 = ["packaging", "urllib3"] [[package]] @@ -1606,8 +1512,6 @@ version = "2.19.1" description = "Google Cloud Iam API client library" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "google_cloud_iam-2.19.1-py3-none-any.whl", hash = "sha256:11b08b86d82510021f9dd9f0beb5a08219e070deab09e28d4c0ce49f8c70997d"}, {file = "google_cloud_iam-2.19.1.tar.gz", hash = "sha256:f059c369ad98af6be3401f0f5d087775d775fb96833be1e9ab8048c422fb1bf4"}, @@ -1618,8 +1522,8 @@ google-api-core = {version = ">=1.34.1,<2.0.dev0 || >=2.11.dev0,<3.0.0", extras google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0" grpc-google-iam-v1 = ">=0.12.4,<1.0.0" proto-plus = [ - {version = ">=1.22.3,<2.0.0"}, {version = ">=1.25.0,<2.0.0", markers = "python_version >= \"3.13\""}, + {version = ">=1.22.3,<2.0.0", markers = "python_version < \"3.13\""}, ] protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" @@ -1629,8 +1533,6 @@ version = "2.24.2" description = "Google Cloud Kms API client library" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "google_cloud_kms-2.24.2-py2.py3-none-any.whl", hash = "sha256:368209b035dfac691a467c1cf50986d8b1b26cac1166bdfbaa25d738df91ff7b"}, {file = "google_cloud_kms-2.24.2.tar.gz", hash = "sha256:e9e18bbfafd1a4035c76c03fb5ff03f4f57f596d08e1a9ede7e69ec0151b27a1"}, @@ -1649,12 +1551,10 @@ version = "1.70.0" description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8"}, {file = "googleapis_common_protos-1.70.0.tar.gz", hash = "sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257"}, ] -markers = {main = "extra == \"extra-proxy\""} [package.dependencies] grpcio = {version = ">=1.44.0,<2.0.0", optional = true, markers = "extra == \"grpc\""} @@ -1669,8 +1569,6 @@ version = "3.4.3" description = "GraphQL Framework for Python" optional = true python-versions = "*" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "graphene-3.4.3-py2.py3-none-any.whl", hash = "sha256:820db6289754c181007a150db1f7fff544b94142b556d12e3ebc777a7bf36c71"}, {file = "graphene-3.4.3.tar.gz", hash = "sha256:2a3786948ce75fe7e078443d37f609cbe5bb36ad8d6b828740ad3b95ed1a0aaa"}, @@ -1692,8 +1590,6 @@ version = "3.2.6" description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." optional = true python-versions = "<4,>=3.6" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "graphql_core-3.2.6-py3-none-any.whl", hash = "sha256:78b016718c161a6fb20a7d97bbf107f331cd1afe53e45566c59f776ed7f0b45f"}, {file = "graphql_core-3.2.6.tar.gz", hash = "sha256:c08eec22f9e40f0bd61d805907e3b3b1b9a320bc606e23dc145eebca07c8fbab"}, @@ -1705,8 +1601,6 @@ version = "3.2.0" description = "Relay library for graphql-core" optional = true python-versions = ">=3.6,<4" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "graphql-relay-3.2.0.tar.gz", hash = "sha256:1ff1c51298356e481a0be009ccdff249832ce53f30559c1338f22a0e0d17250c"}, {file = "graphql_relay-3.2.0-py3-none-any.whl", hash = "sha256:c9b22bd28b170ba1fe674c74384a8ff30a76c8e26f88ac3aa1584dd3179953e5"}, @@ -1717,72 +1611,70 @@ graphql-core = ">=3.2,<3.3" [[package]] name = "greenlet" -version = "3.2.3" +version = "3.2.4" description = "Lightweight in-process concurrent programming" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") and extra == \"mlflow\" and python_version < \"3.14\"" files = [ - {file = "greenlet-3.2.3-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:1afd685acd5597349ee6d7a88a8bec83ce13c106ac78c196ee9dde7c04fe87be"}, - {file = "greenlet-3.2.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:761917cac215c61e9dc7324b2606107b3b292a8349bdebb31503ab4de3f559ac"}, - {file = "greenlet-3.2.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a433dbc54e4a37e4fff90ef34f25a8c00aed99b06856f0119dcf09fbafa16392"}, - {file = "greenlet-3.2.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:72e77ed69312bab0434d7292316d5afd6896192ac4327d44f3d613ecb85b037c"}, - {file = "greenlet-3.2.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:68671180e3849b963649254a882cd544a3c75bfcd2c527346ad8bb53494444db"}, - {file = "greenlet-3.2.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:49c8cfb18fb419b3d08e011228ef8a25882397f3a859b9fe1436946140b6756b"}, - {file = "greenlet-3.2.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:efc6dc8a792243c31f2f5674b670b3a95d46fa1c6a912b8e310d6f542e7b0712"}, - {file = "greenlet-3.2.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:731e154aba8e757aedd0781d4b240f1225b075b4409f1bb83b05ff410582cf00"}, - {file = "greenlet-3.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:96c20252c2f792defe9a115d3287e14811036d51e78b3aaddbee23b69b216302"}, - {file = "greenlet-3.2.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:784ae58bba89fa1fa5733d170d42486580cab9decda3484779f4759345b29822"}, - {file = "greenlet-3.2.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0921ac4ea42a5315d3446120ad48f90c3a6b9bb93dd9b3cf4e4d84a66e42de83"}, - {file = "greenlet-3.2.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:d2971d93bb99e05f8c2c0c2f4aa9484a18d98c4c3bd3c62b65b7e6ae33dfcfaf"}, - {file = "greenlet-3.2.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c667c0bf9d406b77a15c924ef3285e1e05250948001220368e039b6aa5b5034b"}, - {file = "greenlet-3.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:592c12fb1165be74592f5de0d70f82bc5ba552ac44800d632214b76089945147"}, - {file = "greenlet-3.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29e184536ba333003540790ba29829ac14bb645514fbd7e32af331e8202a62a5"}, - {file = "greenlet-3.2.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:93c0bb79844a367782ec4f429d07589417052e621aa39a5ac1fb99c5aa308edc"}, - {file = "greenlet-3.2.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:751261fc5ad7b6705f5f76726567375bb2104a059454e0226e1eef6c756748ba"}, - {file = "greenlet-3.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:83a8761c75312361aa2b5b903b79da97f13f556164a7dd2d5448655425bd4c34"}, - {file = "greenlet-3.2.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:25ad29caed5783d4bd7a85c9251c651696164622494c00802a139c00d639242d"}, - {file = "greenlet-3.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:88cd97bf37fe24a6710ec6a3a7799f3f81d9cd33317dcf565ff9950c83f55e0b"}, - {file = "greenlet-3.2.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:baeedccca94880d2f5666b4fa16fc20ef50ba1ee353ee2d7092b383a243b0b0d"}, - {file = "greenlet-3.2.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:be52af4b6292baecfa0f397f3edb3c6092ce071b499dd6fe292c9ac9f2c8f264"}, - {file = "greenlet-3.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0cc73378150b8b78b0c9fe2ce56e166695e67478550769536a6742dca3651688"}, - {file = "greenlet-3.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:706d016a03e78df129f68c4c9b4c4f963f7d73534e48a24f5f5a7101ed13dbbb"}, - {file = "greenlet-3.2.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:419e60f80709510c343c57b4bb5a339d8767bf9aef9b8ce43f4f143240f88b7c"}, - {file = "greenlet-3.2.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:93d48533fade144203816783373f27a97e4193177ebaaf0fc396db19e5d61163"}, - {file = "greenlet-3.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:7454d37c740bb27bdeddfc3f358f26956a07d5220818ceb467a483197d84f849"}, - {file = "greenlet-3.2.3-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:500b8689aa9dd1ab26872a34084503aeddefcb438e2e7317b89b11eaea1901ad"}, - {file = "greenlet-3.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a07d3472c2a93117af3b0136f246b2833fdc0b542d4a9799ae5f41c28323faef"}, - {file = "greenlet-3.2.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:8704b3768d2f51150626962f4b9a9e4a17d2e37c8a8d9867bbd9fa4eb938d3b3"}, - {file = "greenlet-3.2.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:5035d77a27b7c62db6cf41cf786cfe2242644a7a337a0e155c80960598baab95"}, - {file = "greenlet-3.2.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2d8aa5423cd4a396792f6d4580f88bdc6efcb9205891c9d40d20f6e670992efb"}, - {file = "greenlet-3.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2c724620a101f8170065d7dded3f962a2aea7a7dae133a009cada42847e04a7b"}, - {file = "greenlet-3.2.3-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:873abe55f134c48e1f2a6f53f7d1419192a3d1a4e873bace00499a4e45ea6af0"}, - {file = "greenlet-3.2.3-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:024571bbce5f2c1cfff08bf3fbaa43bbc7444f580ae13b0099e95d0e6e67ed36"}, - {file = "greenlet-3.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:5195fb1e75e592dd04ce79881c8a22becdfa3e6f500e7feb059b1e6fdd54d3e3"}, - {file = "greenlet-3.2.3-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:3d04332dddb10b4a211b68111dabaee2e1a073663d117dc10247b5b1642bac86"}, - {file = "greenlet-3.2.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8186162dffde068a465deab08fc72c767196895c39db26ab1c17c0b77a6d8b97"}, - {file = "greenlet-3.2.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f4bfbaa6096b1b7a200024784217defedf46a07c2eee1a498e94a1b5f8ec5728"}, - {file = "greenlet-3.2.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:ed6cfa9200484d234d8394c70f5492f144b20d4533f69262d530a1a082f6ee9a"}, - {file = "greenlet-3.2.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:02b0df6f63cd15012bed5401b47829cfd2e97052dc89da3cfaf2c779124eb892"}, - {file = "greenlet-3.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:86c2d68e87107c1792e2e8d5399acec2487a4e993ab76c792408e59394d52141"}, - {file = "greenlet-3.2.3-cp314-cp314-win_amd64.whl", hash = "sha256:8c47aae8fbbfcf82cc13327ae802ba13c9c36753b67e760023fd116bc124a62a"}, - {file = "greenlet-3.2.3-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:42efc522c0bd75ffa11a71e09cd8a399d83fafe36db250a87cf1dacfaa15dc64"}, - {file = "greenlet-3.2.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d760f9bdfe79bff803bad32b4d8ffb2c1d2ce906313fc10a83976ffb73d64ca7"}, - {file = "greenlet-3.2.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:8324319cbd7b35b97990090808fdc99c27fe5338f87db50514959f8059999805"}, - {file = "greenlet-3.2.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:8c37ef5b3787567d322331d5250e44e42b58c8c713859b8a04c6065f27efbf72"}, - {file = "greenlet-3.2.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ce539fb52fb774d0802175d37fcff5c723e2c7d249c65916257f0a940cee8904"}, - {file = "greenlet-3.2.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:003c930e0e074db83559edc8705f3a2d066d4aa8c2f198aff1e454946efd0f26"}, - {file = "greenlet-3.2.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7e70ea4384b81ef9e84192e8a77fb87573138aa5d4feee541d8014e452b434da"}, - {file = "greenlet-3.2.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:22eb5ba839c4b2156f18f76768233fe44b23a31decd9cc0d4cc8141c211fd1b4"}, - {file = "greenlet-3.2.3-cp39-cp39-win32.whl", hash = "sha256:4532f0d25df67f896d137431b13f4cdce89f7e3d4a96387a41290910df4d3a57"}, - {file = "greenlet-3.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:aaa7aae1e7f75eaa3ae400ad98f8644bb81e1dc6ba47ce8a93d3f17274e08322"}, - {file = "greenlet-3.2.3.tar.gz", hash = "sha256:8b0dd8ae4c0d6f5e54ee55ba935eeb3d735a9b58a8a1e5b5cbab64e01a39f365"}, + {file = "greenlet-3.2.4-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:8c68325b0d0acf8d91dde4e6f930967dd52a5302cd4062932a6b2e7c2969f47c"}, + {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:94385f101946790ae13da500603491f04a76b6e4c059dab271b3ce2e283b2590"}, + {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f10fd42b5ee276335863712fa3da6608e93f70629c631bf77145021600abc23c"}, + {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c8c9e331e58180d0d83c5b7999255721b725913ff6bc6cf39fa2a45841a4fd4b"}, + {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:58b97143c9cc7b86fc458f215bd0932f1757ce649e05b640fea2e79b54cedb31"}, + {file = "greenlet-3.2.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c2ca18a03a8cfb5b25bc1cbe20f3d9a4c80d8c3b13ba3df49ac3961af0b1018d"}, + {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9fe0a28a7b952a21e2c062cd5756d34354117796c6d9215a87f55e38d15402c5"}, + {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8854167e06950ca75b898b104b63cc646573aa5fef1353d4508ecdd1ee76254f"}, + {file = "greenlet-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:73f49b5368b5359d04e18d15828eecc1806033db5233397748f4ca813ff1056c"}, + {file = "greenlet-3.2.4-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:96378df1de302bc38e99c3a9aa311967b7dc80ced1dcc6f171e99842987882a2"}, + {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ee8fae0519a337f2329cb78bd7a8e128ec0f881073d43f023c7b8d4831d5246"}, + {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:94abf90142c2a18151632371140b3dba4dee031633fe614cb592dbb6c9e17bc3"}, + {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:4d1378601b85e2e5171b99be8d2dc85f594c79967599328f95c1dc1a40f1c633"}, + {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0db5594dce18db94f7d1650d7489909b57afde4c580806b8d9203b6e79cdc079"}, + {file = "greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2523e5246274f54fdadbce8494458a2ebdcdbc7b802318466ac5606d3cded1f8"}, + {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1987de92fec508535687fb807a5cea1560f6196285a4cde35c100b8cd632cc52"}, + {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:55e9c5affaa6775e2c6b67659f3a71684de4c549b3dd9afca3bc773533d284fa"}, + {file = "greenlet-3.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9c40adce87eaa9ddb593ccb0fa6a07caf34015a29bf8d344811665b573138db9"}, + {file = "greenlet-3.2.4-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3b67ca49f54cede0186854a008109d6ee71f66bd57bb36abd6d0a0267b540cdd"}, + {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddf9164e7a5b08e9d22511526865780a576f19ddd00d62f8a665949327fde8bb"}, + {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f28588772bb5fb869a8eb331374ec06f24a83a9c25bfa1f38b6993afe9c1e968"}, + {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:5c9320971821a7cb77cfab8d956fa8e39cd07ca44b6070db358ceb7f8797c8c9"}, + {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c60a6d84229b271d44b70fb6e5fa23781abb5d742af7b808ae3f6efd7c9c60f6"}, + {file = "greenlet-3.2.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b3812d8d0c9579967815af437d96623f45c0f2ae5f04e366de62a12d83a8fb0"}, + {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:abbf57b5a870d30c4675928c37278493044d7c14378350b3aa5d484fa65575f0"}, + {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20fb936b4652b6e307b8f347665e2c615540d4b42b3b4c8a321d8286da7e520f"}, + {file = "greenlet-3.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7d4e128405eea3814a12cc2605e0e6aedb4035bf32697f72deca74de4105e02"}, + {file = "greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31"}, + {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945"}, + {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:710638eb93b1fa52823aa91bf75326f9ecdfd5e0466f00789246a5280f4ba0fc"}, + {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c5111ccdc9c88f423426df3fd1811bfc40ed66264d35aa373420a34377efc98a"}, + {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d76383238584e9711e20ebe14db6c88ddcedc1829a9ad31a584389463b5aa504"}, + {file = "greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671"}, + {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b"}, + {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d25c5091190f2dc0eaa3f950252122edbbadbb682aa7b1ef2f8af0f8c0afefae"}, + {file = "greenlet-3.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:554b03b6e73aaabec3745364d6239e9e012d64c68ccd0b8430c64ccc14939a8b"}, + {file = "greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0"}, + {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f"}, + {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c17b6b34111ea72fc5a4e4beec9711d2226285f0386ea83477cbb97c30a3f3a5"}, + {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1"}, + {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735"}, + {file = "greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337"}, + {file = "greenlet-3.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:e37ab26028f12dbb0ff65f29a8d3d44a765c61e729647bf2ddfbbed621726f01"}, + {file = "greenlet-3.2.4-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:b6a7c19cf0d2742d0809a4c05975db036fdff50cd294a93632d6a310bf9ac02c"}, + {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:27890167f55d2387576d1f41d9487ef171849ea0359ce1510ca6e06c8bece11d"}, + {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:18d9260df2b5fbf41ae5139e1be4e796d99655f023a636cd0e11e6406cca7d58"}, + {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:671df96c1f23c4a0d4077a325483c1503c96a1b7d9db26592ae770daa41233d4"}, + {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:16458c245a38991aa19676900d48bd1a6f2ce3e16595051a4db9d012154e8433"}, + {file = "greenlet-3.2.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9913f1a30e4526f432991f89ae263459b1c64d1608c0d22a5c79c287b3c70df"}, + {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b90654e092f928f110e0007f572007c9727b5265f7632c2fa7415b4689351594"}, + {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:81701fd84f26330f0d5f4944d4e92e61afe6319dcd9775e39396e39d7c3e5f98"}, + {file = "greenlet-3.2.4-cp39-cp39-win32.whl", hash = "sha256:65458b409c1ed459ea899e939f0e1cdb14f58dbc803f2f93c5eab5694d32671b"}, + {file = "greenlet-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:d2e685ade4dafd447ede19c31277a224a239a0a1a4eca4e6390efedf20260cfb"}, + {file = "greenlet-3.2.4.tar.gz", hash = "sha256:0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d"}, ] [package.extras] docs = ["Sphinx", "furo"] -test = ["objgraph", "psutil"] +test = ["objgraph", "psutil", "setuptools"] [[package]] name = "grpc-google-iam-v1" @@ -1790,8 +1682,6 @@ version = "0.14.2" description = "IAM API client library" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "grpc_google_iam_v1-0.14.2-py3-none-any.whl", hash = "sha256:a3171468459770907926d56a440b2bb643eec1d7ba215f48f3ecece42b4d8351"}, {file = "grpc_google_iam_v1-0.14.2.tar.gz", hash = "sha256:b3e1fc387a1a329e41672197d0ace9de22c78dd7d215048c4c78712073f7bd20"}, @@ -1808,7 +1698,6 @@ version = "1.70.0" description = "HTTP/2-based RPC framework" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "grpcio-1.70.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:95469d1977429f45fe7df441f586521361e235982a0b39e33841549143ae2851"}, {file = "grpcio-1.70.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:ed9718f17fbdb472e33b869c77a16d0b55e166b100ec57b016dc7de9c8d236bf"}, @@ -1866,7 +1755,6 @@ files = [ {file = "grpcio-1.70.0-cp39-cp39-win_amd64.whl", hash = "sha256:a31d7e3b529c94e930a117b2175b2efd179d96eb3c7a21ccb0289a8ab05b645c"}, {file = "grpcio-1.70.0.tar.gz", hash = "sha256:8d1584a68d5922330025881e63a6c1b54cc8117291d382e4fa69339b6d914c56"}, ] -markers = {main = "extra == \"extra-proxy\""} [package.extras] protobuf = ["grpcio-tools (>=1.70.0)"] @@ -1877,8 +1765,6 @@ version = "1.62.3" description = "Status proto mapping for gRPC" optional = true python-versions = ">=3.6" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "grpcio-status-1.62.3.tar.gz", hash = "sha256:289bdd7b2459794a12cf95dc0cb727bd4a1742c37bd823f760236c937e53a485"}, {file = "grpcio_status-1.62.3-py3-none-any.whl", hash = "sha256:f9049b762ba8de6b1086789d8315846e094edac2c50beaf462338b301a8fd4b8"}, @@ -1895,8 +1781,6 @@ version = "23.0.0" description = "WSGI HTTP Server for UNIX" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "platform_system != \"Windows\" and (extra == \"mlflow\" or extra == \"proxy\") and python_version >= \"3.10\" or extra == \"proxy\"" files = [ {file = "gunicorn-23.0.0-py3-none-any.whl", hash = "sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d"}, {file = "gunicorn-23.0.0.tar.gz", hash = "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec"}, @@ -1918,7 +1802,6 @@ version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, @@ -1930,7 +1813,6 @@ version = "4.1.0" description = "HTTP/2 State-Machine based protocol implementation" optional = false python-versions = ">=3.6.1" -groups = ["proxy-dev"] files = [ {file = "h2-4.1.0-py3-none-any.whl", hash = "sha256:03a46bcf682256c95b5fd9e9a99c1323584c3eec6440d379b9903d709476bc6d"}, {file = "h2-4.1.0.tar.gz", hash = "sha256:a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb"}, @@ -1942,21 +1824,19 @@ hyperframe = ">=6.0,<7" [[package]] name = "hf-xet" -version = "1.1.5" +version = "1.1.7" description = "Fast transfer of large files with the Hugging Face Hub." optional = false python-versions = ">=3.8" -groups = ["main"] -markers = "platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"arm64\" or platform_machine == \"aarch64\"" files = [ - {file = "hf_xet-1.1.5-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:f52c2fa3635b8c37c7764d8796dfa72706cc4eded19d638331161e82b0792e23"}, - {file = "hf_xet-1.1.5-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:9fa6e3ee5d61912c4a113e0708eaaef987047616465ac7aa30f7121a48fc1af8"}, - {file = "hf_xet-1.1.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc874b5c843e642f45fd85cda1ce599e123308ad2901ead23d3510a47ff506d1"}, - {file = "hf_xet-1.1.5-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dbba1660e5d810bd0ea77c511a99e9242d920790d0e63c0e4673ed36c4022d18"}, - {file = "hf_xet-1.1.5-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ab34c4c3104133c495785d5d8bba3b1efc99de52c02e759cf711a91fd39d3a14"}, - {file = "hf_xet-1.1.5-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:83088ecea236d5113de478acb2339f92c95b4fb0462acaa30621fac02f5a534a"}, - {file = "hf_xet-1.1.5-cp37-abi3-win_amd64.whl", hash = "sha256:73e167d9807d166596b4b2f0b585c6d5bd84a26dea32843665a8b58f6edba245"}, - {file = "hf_xet-1.1.5.tar.gz", hash = "sha256:69ebbcfd9ec44fdc2af73441619eeb06b94ee34511bbcf57cd423820090f5694"}, + {file = "hf_xet-1.1.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:60dae4b44d520819e54e216a2505685248ec0adbdb2dd4848b17aa85a0375cde"}, + {file = "hf_xet-1.1.7-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:b109f4c11e01c057fc82004c9e51e6cdfe2cb230637644ade40c599739067b2e"}, + {file = "hf_xet-1.1.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6efaaf1a5a9fc3a501d3e71e88a6bfebc69ee3a716d0e713a931c8b8d920038f"}, + {file = "hf_xet-1.1.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:751571540f9c1fbad9afcf222a5fb96daf2384bf821317b8bfb0c59d86078513"}, + {file = "hf_xet-1.1.7-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:18b61bbae92d56ae731b92087c44efcac216071182c603fc535f8e29ec4b09b8"}, + {file = "hf_xet-1.1.7-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:713f2bff61b252f8523739969f247aa354ad8e6d869b8281e174e2ea1bb8d604"}, + {file = "hf_xet-1.1.7-cp37-abi3-win_amd64.whl", hash = "sha256:2e356da7d284479ae0f1dea3cf5a2f74fdf925d6dca84ac4341930d892c7cb34"}, + {file = "hf_xet-1.1.7.tar.gz", hash = "sha256:20cec8db4561338824a3b5f8c19774055b04a8df7fff0cb1ff2cb1a0c1607b80"}, ] [package.extras] @@ -1968,7 +1848,6 @@ version = "4.0.0" description = "Pure-Python HPACK header compression" optional = false python-versions = ">=3.6.1" -groups = ["proxy-dev"] files = [ {file = "hpack-4.0.0-py3-none-any.whl", hash = "sha256:84a076fad3dc9a9f8063ccb8041ef100867b1878b25ef0ee63847a5d53818a6c"}, {file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"}, @@ -1980,7 +1859,6 @@ version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, @@ -2002,7 +1880,6 @@ version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, @@ -2015,7 +1892,7 @@ httpcore = "==1.*" idna = "*" [package.extras] -brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +brotli = ["brotli", "brotlicffi"] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -2027,8 +1904,6 @@ version = "0.4.1" description = "Consume Server-Sent Event (SSE) messages with HTTPX." optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ {file = "httpx_sse-0.4.1-py3-none-any.whl", hash = "sha256:cba42174344c3a5b06f255ce65b350880f962d99ead85e776f23c6618a377a37"}, {file = "httpx_sse-0.4.1.tar.gz", hash = "sha256:8f44d34414bc7b21bf3602713005c5df4917884f76072479b21f68befa4ea26e"}, @@ -2036,14 +1911,13 @@ files = [ [[package]] name = "huggingface-hub" -version = "0.34.3" +version = "0.34.4" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" -groups = ["main"] files = [ - {file = "huggingface_hub-0.34.3-py3-none-any.whl", hash = "sha256:5444550099e2d86e68b2898b09e85878fbd788fc2957b506c6a79ce060e39492"}, - {file = "huggingface_hub-0.34.3.tar.gz", hash = "sha256:d58130fd5aa7408480681475491c0abd7e835442082fbc3ef4d45b6c39f83853"}, + {file = "huggingface_hub-0.34.4-py3-none-any.whl", hash = "sha256:9b365d781739c93ff90c359844221beef048403f1bc1f1c123c191257c3c890a"}, + {file = "huggingface_hub-0.34.4.tar.gz", hash = "sha256:a4228daa6fb001be3f4f4bdaf9a0db00e1739235702848df00885c9b5742c85c"}, ] [package.dependencies] @@ -2057,16 +1931,16 @@ tqdm = ">=4.42.1" typing-extensions = ">=3.7.4.3" [package.extras] -all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "authlib (>=1.3.2)", "fastapi", "gradio (>=4.0.0)", "httpx", "itsdangerous", "jedi", "libcst (>=1.4.0)", "mypy (==1.15.0) ; python_version >= \"3.9\"", "mypy (>=1.14.1,<1.15.0) ; python_version == \"3.8\"", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] +all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "authlib (>=1.3.2)", "fastapi", "gradio (>=4.0.0)", "httpx", "itsdangerous", "jedi", "libcst (>=1.4.0)", "mypy (==1.15.0)", "mypy (>=1.14.1,<1.15.0)", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] cli = ["InquirerPy (==0.3.4)"] -dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "authlib (>=1.3.2)", "fastapi", "gradio (>=4.0.0)", "httpx", "itsdangerous", "jedi", "libcst (>=1.4.0)", "mypy (==1.15.0) ; python_version >= \"3.9\"", "mypy (>=1.14.1,<1.15.0) ; python_version == \"3.8\"", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] +dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "authlib (>=1.3.2)", "fastapi", "gradio (>=4.0.0)", "httpx", "itsdangerous", "jedi", "libcst (>=1.4.0)", "mypy (==1.15.0)", "mypy (>=1.14.1,<1.15.0)", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] hf-transfer = ["hf-transfer (>=0.1.4)"] hf-xet = ["hf-xet (>=1.1.2,<2.0.0)"] inference = ["aiohttp"] mcp = ["aiohttp", "mcp (>=1.8.0)", "typer"] oauth = ["authlib (>=1.3.2)", "fastapi", "httpx", "itsdangerous"] -quality = ["libcst (>=1.4.0)", "mypy (==1.15.0) ; python_version >= \"3.9\"", "mypy (>=1.14.1,<1.15.0) ; python_version == \"3.8\"", "ruff (>=0.9.0)"] +quality = ["libcst (>=1.4.0)", "mypy (==1.15.0)", "mypy (>=1.14.1,<1.15.0)", "ruff (>=0.9.0)"] tensorflow = ["graphviz", "pydot", "tensorflow"] tensorflow-testing = ["keras (<3.0)", "tensorflow"] testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "authlib (>=1.3.2)", "fastapi", "gradio (>=4.0.0)", "httpx", "itsdangerous", "jedi", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] @@ -2079,8 +1953,6 @@ version = "10.0" description = "Human friendly output for text interfaces using Python" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "humanfriendly-10.0-py2.py3-none-any.whl", hash = "sha256:1697e1a8a8f550fd43c2865cd84542fc175a61dcb779b6fee18cf6b6ccba1477"}, {file = "humanfriendly-10.0.tar.gz", hash = "sha256:6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc"}, @@ -2095,7 +1967,6 @@ version = "0.15.0" description = "A ASGI Server based on Hyper libraries and inspired by Gunicorn" optional = false python-versions = ">=3.7" -groups = ["proxy-dev"] files = [ {file = "hypercorn-0.15.0-py3-none-any.whl", hash = "sha256:5008944999612fd188d7a1ca02e89d20065642b89503020ac392dfed11840730"}, {file = "hypercorn-0.15.0.tar.gz", hash = "sha256:d517f68d5dc7afa9a9d50ecefb0f769f466ebe8c1c18d2c2f447a24e763c9a63"}, @@ -2113,7 +1984,7 @@ wsproto = ">=0.14.0" docs = ["pydata_sphinx_theme", "sphinxcontrib_mermaid"] h3 = ["aioquic (>=0.9.0,<1.0)"] trio = ["exceptiongroup (>=1.1.0)", "trio (>=0.22.0)"] -uvloop = ["uvloop ; platform_system != \"Windows\""] +uvloop = ["uvloop"] [[package]] name = "hyperframe" @@ -2121,7 +1992,6 @@ version = "6.0.1" description = "HTTP/2 framing layer for Python" optional = false python-versions = ">=3.6.1" -groups = ["proxy-dev"] files = [ {file = "hyperframe-6.0.1-py3-none-any.whl", hash = "sha256:0ec6bafd80d8ad2195c4f03aacba3a8265e57bc4cff261e802bf39970ed02a15"}, {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, @@ -2133,7 +2003,6 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -2148,8 +2017,6 @@ version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, @@ -2161,7 +2028,6 @@ version = "6.11.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "importlib_metadata-6.11.0-py3-none-any.whl", hash = "sha256:f0afba6205ad8f8947c7d338b5342d5db2afbfd82f9cbef7879a9539cc12eb9b"}, {file = "importlib_metadata-6.11.0.tar.gz", hash = "sha256:1231cf92d825c9e03cfc4da076a16de6422c863558229ea0b22b675657463443"}, @@ -2173,7 +2039,7 @@ zipp = ">=0.5" [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7) ; platform_python_implementation != \"PyPy\"", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1) ; platform_python_implementation != \"PyPy\"", "pytest-perf (>=0.9.2)", "pytest-ruff"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "importlib-resources" @@ -2181,8 +2047,6 @@ version = "6.4.5" description = "Read resources from Python packages" optional = false python-versions = ">=3.8" -groups = ["main"] -markers = "python_version < \"3.9\"" files = [ {file = "importlib_resources-6.4.5-py3-none-any.whl", hash = "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717"}, {file = "importlib_resources-6.4.5.tar.gz", hash = "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065"}, @@ -2192,7 +2056,7 @@ files = [ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] @@ -2205,7 +2069,6 @@ version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, @@ -2217,8 +2080,6 @@ version = "0.7.2" description = "An ISO 8601 date/time/duration parser and formatter" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\" or extra == \"proxy\"" files = [ {file = "isodate-0.7.2-py3-none-any.whl", hash = "sha256:28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15"}, {file = "isodate-0.7.2.tar.gz", hash = "sha256:4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6"}, @@ -2230,8 +2091,6 @@ version = "2.2.0" description = "Safely pass data to untrusted environments and back." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, @@ -2243,7 +2102,6 @@ version = "3.1.6" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" -groups = ["main", "proxy-dev"] files = [ {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, @@ -2261,7 +2119,6 @@ version = "0.9.1" description = "Fast iterable JSON parser." optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "jiter-0.9.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c0163baa7ee85860fdc14cc39263014500df901eeffdf94c1eab9a2d713b2a9d"}, {file = "jiter-0.9.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:514d4dd845e0af4da15112502e6fcb952f0721f27f17e530454e379472b90c14"}, @@ -2347,8 +2204,6 @@ version = "1.0.1" description = "JSON Matching Expressions" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980"}, {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, @@ -2360,8 +2215,6 @@ version = "1.5.1" description = "Lightweight pipelining with Python functions" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "joblib-1.5.1-py3-none-any.whl", hash = "sha256:4719a31f054c7d766948dcd83e9613686b27114f190f717cec7eaa2084f8a74a"}, {file = "joblib-1.5.1.tar.gz", hash = "sha256:f4f86e351f39fe3d0d32a9f2c3d8af1ee4cec285aafcb27003dda5205576b444"}, @@ -2373,7 +2226,6 @@ version = "4.23.0" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, @@ -2397,7 +2249,6 @@ version = "2023.12.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "jsonschema_specifications-2023.12.1-py3-none-any.whl", hash = "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c"}, {file = "jsonschema_specifications-2023.12.1.tar.gz", hash = "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc"}, @@ -2413,8 +2264,6 @@ version = "1.4.8" description = "A fast implementation of the Cassowary constraint solver" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "kiwisolver-1.4.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88c6f252f6816a73b1f8c904f7bbe02fd67c09a69f7cb8a0eecdbf5ce78e63db"}, {file = "kiwisolver-1.4.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c72941acb7b67138f35b879bbe85be0f6c6a70cab78fe3ef6db9c024d9223e5b"}, @@ -2504,7 +2353,6 @@ version = "2.54.1" description = "A client library for accessing langfuse" optional = false python-versions = "<4.0,>=3.8.1" -groups = ["dev"] files = [ {file = "langfuse-2.54.1-py3-none-any.whl", hash = "sha256:1f1261cf763886758c70e192133340ff296169cc0930cde725eee52d467eb661"}, {file = "langfuse-2.54.1.tar.gz", hash = "sha256:7efc70799740ffa0ac7e04066e0596fb6433e8e501fc850c6a4e7967de6de8a7"}, @@ -2530,8 +2378,6 @@ version = "0.1.19" description = "Package for LiteLLM Enterprise features" optional = true python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "litellm_enterprise-0.1.19.tar.gz", hash = "sha256:a70794a9c66f069f6eb73b283639f783ac4138ec2684058a696e8d6210cdc4fa"}, ] @@ -2542,8 +2388,6 @@ version = "0.2.16" description = "Additional files for the LiteLLM Proxy. Reduces the size of the main litellm package." optional = true python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "litellm_proxy_extras-0.2.16.tar.gz", hash = "sha256:81a1e8a172feb7da86985f529e891ca7be66ba293ae3e716bf69b266fa776a04"}, ] @@ -2554,8 +2398,6 @@ version = "1.3.10" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "mako-1.3.10-py3-none-any.whl", hash = "sha256:baef24a52fc4fc514a0887ac600f9f1cff3d82c61d4d700a1fa84d597b88db59"}, {file = "mako-1.3.10.tar.gz", hash = "sha256:99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28"}, @@ -2575,8 +2417,6 @@ version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, @@ -2601,7 +2441,6 @@ version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" -groups = ["main", "proxy-dev"] files = [ {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, @@ -2671,8 +2510,6 @@ version = "3.10.5" description = "Python plotting package" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "matplotlib-3.10.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:5d4773a6d1c106ca05cb5a5515d277a6bb96ed09e5c8fab6b7741b8fcaa62c8f"}, {file = "matplotlib-3.10.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc88af74e7ba27de6cbe6faee916024ea35d895ed3d61ef6f58c4ce97da7185a"}, @@ -2751,7 +2588,6 @@ version = "0.7.0" description = "McCabe checker, plugin for flake8" optional = false python-versions = ">=3.6" -groups = ["dev"] files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, @@ -2759,15 +2595,13 @@ files = [ [[package]] name = "mcp" -version = "1.12.3" +version = "1.12.4" description = "Model Context Protocol SDK" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ - {file = "mcp-1.12.3-py3-none-any.whl", hash = "sha256:5483345bf39033b858920a5b6348a303acacf45b23936972160ff152107b850e"}, - {file = "mcp-1.12.3.tar.gz", hash = "sha256:ab2e05f5e5c13e1dc90a4a9ef23ac500a6121362a564447855ef0ab643a99fed"}, + {file = "mcp-1.12.4-py3-none-any.whl", hash = "sha256:7aa884648969fab8e78b89399d59a683202972e12e6bc9a1c88ce7eda7743789"}, + {file = "mcp-1.12.4.tar.gz", hash = "sha256:0765585e9a3a5916a3c3ab8659330e493adc7bd8b2ca6120c2d7a0c43e034ca5"}, ] [package.dependencies] @@ -2794,8 +2628,6 @@ version = "0.1.2" description = "Markdown URL utilities" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -2807,8 +2639,6 @@ version = "0.4.1" description = "" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "ml_dtypes-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1fe8b5b5e70cd67211db94b05cfd58dace592f24489b038dc6f9fe347d2e07d5"}, {file = "ml_dtypes-0.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c09a6d11d8475c2a9fd2bc0695628aec105f97cab3b3a3fb7c9660348ff7d24"}, @@ -2831,10 +2661,10 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.23.3", markers = "python_version >= \"3.11\""}, - {version = ">1.20"}, - {version = ">=1.21.2", markers = "python_version >= \"3.10\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">1.20", markers = "python_version < \"3.10\""}, + {version = ">=1.23.3", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=1.21.2", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, ] [package.extras] @@ -2842,15 +2672,13 @@ dev = ["absl-py", "pyink", "pylint (>=2.6.0)", "pytest", "pytest-xdist"] [[package]] name = "mlflow" -version = "3.2.0rc0" +version = "3.2.0" description = "MLflow is an open source platform for the complete machine learning lifecycle" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ - {file = "mlflow-3.2.0rc0-py3-none-any.whl", hash = "sha256:c6b8bf6cf03ff292885cbb01f0c30cb8e80a8f21af96eb9ba0030ed8a8b7ee59"}, - {file = "mlflow-3.2.0rc0.tar.gz", hash = "sha256:5e6b3499a8e1b331c7806c64c5e1e44cdb8640e4d438be450cf8f82baca48c42"}, + {file = "mlflow-3.2.0-py3-none-any.whl", hash = "sha256:db97b925cc8afba15caf3749dcb4a95be83f9608e974f23253fbbc1d675247ea"}, + {file = "mlflow-3.2.0.tar.gz", hash = "sha256:e96bd42238ea8b477691c8a8f6e8bdbf9247415ad7892e6e885994c6940bcf74"}, ] [package.dependencies] @@ -2860,8 +2688,8 @@ Flask = "<4" graphene = "<4" gunicorn = {version = "<24", markers = "platform_system != \"Windows\""} matplotlib = "<4" -mlflow-skinny = "3.2.0rc0" -mlflow-tracing = "3.2.0rc0" +mlflow-skinny = "3.2.0" +mlflow-tracing = "3.2.0" numpy = "<3" pandas = "<3" pyarrow = ">=4.0.0,<22" @@ -2885,15 +2713,13 @@ xethub = ["mlflow-xethub"] [[package]] name = "mlflow-skinny" -version = "3.2.0rc0" +version = "3.2.0" description = "MLflow is an open source platform for the complete machine learning lifecycle" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ - {file = "mlflow_skinny-3.2.0rc0-py3-none-any.whl", hash = "sha256:eb832fbc5232c9917f61c4d51ba6f6294b475e48e7dc747b98d0f55b701cc198"}, - {file = "mlflow_skinny-3.2.0rc0.tar.gz", hash = "sha256:1321228d91a01a4fbdfb17083f51b7d475934da4df7fe3637523b6d7949a81e5"}, + {file = "mlflow_skinny-3.2.0-py3-none-any.whl", hash = "sha256:ec33a6fc164973e3b4d208e4ab8bec118ea93ff890ffbd08817b66468235ed71"}, + {file = "mlflow_skinny-3.2.0.tar.gz", hash = "sha256:b359ec082a0a966e4e8e80f03d850da7fa677ebe57e67b1c0877029e5eeee443"}, ] [package.dependencies] @@ -2930,15 +2756,13 @@ xethub = ["mlflow-xethub"] [[package]] name = "mlflow-tracing" -version = "3.2.0rc0" +version = "3.2.0" description = "MLflow Tracing SDK is an open-source, lightweight Python package that only includes the minimum set of dependencies and functionality to instrument your code/models/agents with MLflow Tracing." optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ - {file = "mlflow_tracing-3.2.0rc0-py3-none-any.whl", hash = "sha256:4bb5e24e1bee4d16037c985710bf2b5b0589e6e77aef36ca7f96279f4cb6ed46"}, - {file = "mlflow_tracing-3.2.0rc0.tar.gz", hash = "sha256:30b487ef6443bffa2f24a0c53e81283d05347c587742efa89c499bbbe049d2d4"}, + {file = "mlflow_tracing-3.2.0-py3-none-any.whl", hash = "sha256:4180d48b6b68a70b3e37987def3b0689d3f4ba722f5d2b98344c3717d2289b99"}, + {file = "mlflow_tracing-3.2.0.tar.gz", hash = "sha256:6f3dd940752ca28871b09880e9426d1293460822faa8706b33af1d50c29a0355"}, ] [package.dependencies] @@ -2956,7 +2780,6 @@ version = "1.33.0" description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect." optional = false python-versions = ">=3.7" -groups = ["main", "proxy-dev"] files = [ {file = "msal-1.33.0-py3-none-any.whl", hash = "sha256:c0cd41cecf8eaed733ee7e3be9e040291eba53b0f262d3ae9c58f38b04244273"}, {file = "msal-1.33.0.tar.gz", hash = "sha256:836ad80faa3e25a7d71015c990ce61f704a87328b1e73bcbb0623a18cbf17510"}, @@ -2968,7 +2791,7 @@ PyJWT = {version = ">=1.0.0,<3", extras = ["crypto"]} requests = ">=2.0.0,<3" [package.extras] -broker = ["pymsalruntime (>=0.14,<0.19) ; python_version >= \"3.6\" and platform_system == \"Windows\"", "pymsalruntime (>=0.17,<0.19) ; python_version >= \"3.8\" and platform_system == \"Darwin\"", "pymsalruntime (>=0.18,<0.19) ; python_version >= \"3.8\" and platform_system == \"Linux\""] +broker = ["pymsalruntime (>=0.14,<0.19)", "pymsalruntime (>=0.17,<0.19)", "pymsalruntime (>=0.18,<0.19)"] [[package]] name = "msal-extensions" @@ -2976,7 +2799,6 @@ version = "1.3.0" description = "Microsoft Authentication Library extensions (MSAL EX) provides a persistence API that can save your data on disk, encrypted on Windows, macOS and Linux. Concurrent data access will be coordinated by a file lock mechanism." optional = false python-versions = ">=3.7" -groups = ["main", "proxy-dev"] files = [ {file = "msal_extensions-1.3.0-py3-none-any.whl", hash = "sha256:105328ddcbdd342016c9949d8f89e3917554740c8ab26669c0fa0e069e730a0e"}, {file = "msal_extensions-1.3.0.tar.gz", hash = "sha256:96918996642b38c78cd59b55efa0f06fd1373c90e0949be8615697c048fba62c"}, @@ -2994,7 +2816,6 @@ version = "6.1.0" description = "multidict implementation" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60"}, {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1"}, @@ -3099,7 +2920,6 @@ version = "1.14.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, @@ -3159,7 +2979,6 @@ version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.8" -groups = ["main", "dev"] files = [ {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, @@ -3171,7 +2990,6 @@ version = "1.9.1" description = "Node.js virtual environment builder" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -groups = ["main", "proxy-dev"] files = [ {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, @@ -3183,8 +3001,6 @@ version = "1.26.4" description = "Fundamental package for array computing in Python" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.9\" and (python_version >= \"3.10\" or extra == \"extra-proxy\" or extra == \"semantic-router\") and (python_version < \"3.14\" or extra == \"semantic-router\" or extra == \"mlflow\") and (extra == \"extra-proxy\" or extra == \"semantic-router\" or extra == \"mlflow\")" files = [ {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"}, {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"}, @@ -3230,8 +3046,6 @@ version = "1.7.0" description = "Sphinx extension to support docstrings in Numpy format" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "numpydoc-1.7.0-py3-none-any.whl", hash = "sha256:5a56419d931310d79a06cfc2a126d1558700feeb9b4f3d8dcae1a8134be829c9"}, {file = "numpydoc-1.7.0.tar.gz", hash = "sha256:866e5ae5b6509dcf873fc6381120f5c31acf13b135636c1a81d68c166a95f921"}, @@ -3243,7 +3057,7 @@ tabulate = ">=0.8.10" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [package.extras] -developer = ["pre-commit (>=3.3)", "tomli ; python_version < \"3.11\""] +developer = ["pre-commit (>=3.3)", "tomli"] doc = ["matplotlib (>=3.5)", "numpy (>=1.22)", "pydata-sphinx-theme (>=0.13.3)", "sphinx (>=7)"] test = ["matplotlib", "pytest", "pytest-cov"] @@ -3253,8 +3067,6 @@ version = "3.3.1" description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "oauthlib-3.3.1-py3-none-any.whl", hash = "sha256:88119c938d2b8fb88561af5f6ee0eec8cc8d552b7bb1f712743136eb7523b7a1"}, {file = "oauthlib-3.3.1.tar.gz", hash = "sha256:0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9"}, @@ -3271,7 +3083,6 @@ version = "1.99.5" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "openai-1.99.5-py3-none-any.whl", hash = "sha256:4e870f9501b7c36132e2be13313ce3c4d6915a837e7a299c483aab6a6d4412e9"}, {file = "openai-1.99.5.tar.gz", hash = "sha256:aa97ac3326cac7949c5e4ac0274c454c1d19c939760107ae0d3948fc26a924ca"}, @@ -3299,12 +3110,10 @@ version = "1.25.0" description = "OpenTelemetry Python API" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "opentelemetry_api-1.25.0-py3-none-any.whl", hash = "sha256:757fa1aa020a0f8fa139f8959e53dec2051cc26b832e76fa839a6d76ecefd737"}, {file = "opentelemetry_api-1.25.0.tar.gz", hash = "sha256:77c4985f62f2614e42ce77ee4c9da5fa5f0bc1e1821085e9a47533a9323ae869"}, ] -markers = {main = "python_version >= \"3.10\""} [package.dependencies] deprecated = ">=1.2.6" @@ -3316,7 +3125,6 @@ version = "1.25.0" description = "OpenTelemetry Collector Exporters" optional = false python-versions = ">=3.8" -groups = ["dev", "proxy-dev"] files = [ {file = "opentelemetry_exporter_otlp-1.25.0-py3-none-any.whl", hash = "sha256:d67a831757014a3bc3174e4cd629ae1493b7ba8d189e8a007003cacb9f1a6b60"}, {file = "opentelemetry_exporter_otlp-1.25.0.tar.gz", hash = "sha256:ce03199c1680a845f82e12c0a6a8f61036048c07ec7a0bd943142aca8fa6ced0"}, @@ -3332,7 +3140,6 @@ version = "1.25.0" description = "OpenTelemetry Protobuf encoding" optional = false python-versions = ">=3.8" -groups = ["dev", "proxy-dev"] files = [ {file = "opentelemetry_exporter_otlp_proto_common-1.25.0-py3-none-any.whl", hash = "sha256:15637b7d580c2675f70246563363775b4e6de947871e01d0f4e3881d1848d693"}, {file = "opentelemetry_exporter_otlp_proto_common-1.25.0.tar.gz", hash = "sha256:c93f4e30da4eee02bacd1e004eb82ce4da143a2f8e15b987a9f603e0a85407d3"}, @@ -3347,7 +3154,6 @@ version = "1.25.0" description = "OpenTelemetry Collector Protobuf over gRPC Exporter" optional = false python-versions = ">=3.8" -groups = ["dev", "proxy-dev"] files = [ {file = "opentelemetry_exporter_otlp_proto_grpc-1.25.0-py3-none-any.whl", hash = "sha256:3131028f0c0a155a64c430ca600fd658e8e37043cb13209f0109db5c1a3e4eb4"}, {file = "opentelemetry_exporter_otlp_proto_grpc-1.25.0.tar.gz", hash = "sha256:c0b1661415acec5af87625587efa1ccab68b873745ca0ee96b69bb1042087eac"}, @@ -3368,7 +3174,6 @@ version = "1.25.0" description = "OpenTelemetry Collector Protobuf over HTTP Exporter" optional = false python-versions = ">=3.8" -groups = ["dev", "proxy-dev"] files = [ {file = "opentelemetry_exporter_otlp_proto_http-1.25.0-py3-none-any.whl", hash = "sha256:2eca686ee11b27acd28198b3ea5e5863a53d1266b91cda47c839d95d5e0541a6"}, {file = "opentelemetry_exporter_otlp_proto_http-1.25.0.tar.gz", hash = "sha256:9f8723859e37c75183ea7afa73a3542f01d0fd274a5b97487ea24cb683d7d684"}, @@ -3389,7 +3194,6 @@ version = "1.25.0" description = "OpenTelemetry Python Proto" optional = false python-versions = ">=3.8" -groups = ["dev", "proxy-dev"] files = [ {file = "opentelemetry_proto-1.25.0-py3-none-any.whl", hash = "sha256:f07e3341c78d835d9b86665903b199893befa5e98866f63d22b00d0b7ca4972f"}, {file = "opentelemetry_proto-1.25.0.tar.gz", hash = "sha256:35b6ef9dc4a9f7853ecc5006738ad40443701e52c26099e197895cbda8b815a3"}, @@ -3404,12 +3208,10 @@ version = "1.25.0" description = "OpenTelemetry Python SDK" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "opentelemetry_sdk-1.25.0-py3-none-any.whl", hash = "sha256:d97ff7ec4b351692e9d5a15af570c693b8715ad78b8aafbec5c7100fe966b4c9"}, {file = "opentelemetry_sdk-1.25.0.tar.gz", hash = "sha256:ce7fc319c57707ef5bf8b74fb9f8ebdb8bfafbe11898410e0d2a761d08a98ec7"}, ] -markers = {main = "python_version >= \"3.10\""} [package.dependencies] opentelemetry-api = "1.25.0" @@ -3422,12 +3224,10 @@ version = "0.46b0" description = "OpenTelemetry Semantic Conventions" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "opentelemetry_semantic_conventions-0.46b0-py3-none-any.whl", hash = "sha256:6daef4ef9fa51d51855d9f8e0ccd3a1bd59e0e545abe99ac6203804e36ab3e07"}, {file = "opentelemetry_semantic_conventions-0.46b0.tar.gz", hash = "sha256:fbc982ecbb6a6e90869b15c1673be90bd18c8a56ff1cffc0864e38e2edffaefa"}, ] -markers = {main = "python_version >= \"3.10\""} [package.dependencies] opentelemetry-api = "1.25.0" @@ -3438,8 +3238,6 @@ version = "3.10.15" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "orjson-3.10.15-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:552c883d03ad185f720d0c09583ebde257e41b9521b74ff40e08b7dec4559c04"}, {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:616e3e8d438d02e4854f70bfdc03a6bcdb697358dbaa6bcd19cbe24d24ece1f8"}, @@ -3528,7 +3326,6 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -3540,8 +3337,6 @@ version = "2.3.1" description = "Powerful data structures for data analysis, time series, and statistics" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "pandas-2.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:22c2e866f7209ebc3a8f08d75766566aae02bcc91d196935a1d9e59c7b990ac9"}, {file = "pandas-2.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3583d348546201aff730c8c47e49bc159833f971c2899d6097bce68b9112a4f1"}, @@ -3589,9 +3384,9 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.22.4", markers = "python_version < \"3.11\""}, + {version = ">=1.23.2", markers = "python_version == \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -3628,7 +3423,6 @@ version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" -groups = ["main", "dev"] files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, @@ -3640,8 +3434,6 @@ version = "11.3.0" description = "Python Imaging Library (Fork)" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "pillow-11.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1b9c17fd4ace828b3003dfd1e30bff24863e0eb59b535e8f80194d9cc7ecf860"}, {file = "pillow-11.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:65dc69160114cdd0ca0f35cb434633c75e8e7fad4cf855177a05bf38678f73ad"}, @@ -3757,7 +3549,7 @@ fpx = ["olefile"] mic = ["olefile"] test-arrow = ["pyarrow"] tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "trove-classifiers (>=2024.10.12)"] -typing = ["typing-extensions ; python_version < \"3.10\""] +typing = ["typing-extensions"] xmp = ["defusedxml"] [[package]] @@ -3766,8 +3558,6 @@ version = "1.3.10" description = "Resolve a name to an object." optional = false python-versions = ">=3.6" -groups = ["main"] -markers = "python_version < \"3.9\"" files = [ {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, @@ -3779,7 +3569,6 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" -groups = ["main", "dev"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -3796,7 +3585,6 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -3808,20 +3596,18 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "polars" -version = "1.32.0" +version = "1.32.2" description = "Blazingly fast DataFrame library" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ - {file = "polars-1.32.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:94f7c6a3b30bc99bc6b682ea42bb1ae983e33a302ca21aacbac50ae19e34fcf2"}, - {file = "polars-1.32.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8bf14c16164839e62c741a863942a94a9a463db21e797452fca996c8afaf8827"}, - {file = "polars-1.32.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4c15adb97d44766d30c759f5cebbdb64d361e8349ef10b5afc7413f71bf4b72"}, - {file = "polars-1.32.0-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:13af55890734f89b76016a395fb2e7460e7d9feecf50ed2f55cf0f05a1c0c991"}, - {file = "polars-1.32.0-cp39-abi3-win_amd64.whl", hash = "sha256:0397fc2501a5d5f1bb3fe8d27e0c26c7a5349b4110157c0fb7833cd3f5921c9e"}, - {file = "polars-1.32.0-cp39-abi3-win_arm64.whl", hash = "sha256:dd84e24422509e1ec9be46f67f758d0bd9944d1ae4eacecee4f53adaa8ecd822"}, - {file = "polars-1.32.0.tar.gz", hash = "sha256:b01045981c0f23eeccfbfc870b782f93e73b74b29212fdfc8aae0be9024bc1fb"}, + {file = "polars-1.32.2-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:f21da6a5210898ec800b7e9e667fb53eb9161b7ceb812ee6555ff5661a00e517"}, + {file = "polars-1.32.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:d3f4e061312ef6c2a907378ce407a6132734fe1a13f261a1984a1a9ca2f6febc"}, + {file = "polars-1.32.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a711a750cfc19f1f883d2b46895dd698abf4d446ca41c3bf510ced0ff1178057"}, + {file = "polars-1.32.2-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:d1c53a828eedc215fb0dabc7cef02c6f4ad042157512ddb99840fd42b8da1e8a"}, + {file = "polars-1.32.2-cp39-abi3-win_amd64.whl", hash = "sha256:5e1660a584e89e1d60cd89984feca38a695e491a966581fefe8be99c230ea154"}, + {file = "polars-1.32.2-cp39-abi3-win_arm64.whl", hash = "sha256:cd390364f6f3927474bd0aed255103195b9d2b3eef0f0c5bb429db5e6311615e"}, + {file = "polars-1.32.2.tar.gz", hash = "sha256:b4c5cefc7cf7a2461f8800cf2c09976c47cb1fd959c6ef3024d5618b497f05d3"}, ] [package.extras] @@ -3847,7 +3633,7 @@ pyarrow = ["pyarrow (>=7.0.0)"] pydantic = ["pydantic"] sqlalchemy = ["polars[pandas]", "sqlalchemy"] style = ["great-tables (>=0.8.0)"] -timezone = ["tzdata ; platform_system == \"Windows\""] +timezone = ["tzdata"] xlsx2csv = ["xlsx2csv (>=0.8.0)"] xlsxwriter = ["xlsxwriter"] @@ -3857,7 +3643,6 @@ version = "2.0.0" description = "A pure-Python implementation of the HTTP/2 priority tree" optional = false python-versions = ">=3.6.1" -groups = ["proxy-dev"] files = [ {file = "priority-2.0.0-py3-none-any.whl", hash = "sha256:6f8eefce5f3ad59baf2c080a664037bb4725cd0a790d53d59ab4059288faf6aa"}, {file = "priority-2.0.0.tar.gz", hash = "sha256:c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0"}, @@ -3869,7 +3654,6 @@ version = "0.11.0" description = "Prisma Client Python is an auto-generated and fully type-safe database client" optional = false python-versions = ">=3.7.0" -groups = ["main", "proxy-dev"] files = [ {file = "prisma-0.11.0-py3-none-any.whl", hash = "sha256:22bb869e59a2968b99f3483bb417717273ffbc569fd1e9ceed95e5614cbaf53a"}, {file = "prisma-0.11.0.tar.gz", hash = "sha256:3f2f2fd2361e1ec5ff655f2a04c7860c2f2a5bc4c91f78ca9c5c6349735bf693"}, @@ -3895,7 +3679,6 @@ version = "0.20.0" description = "Python client for the Prometheus monitoring system." optional = false python-versions = ">=3.8" -groups = ["proxy-dev"] files = [ {file = "prometheus_client-0.20.0-py3-none-any.whl", hash = "sha256:cde524a85bce83ca359cc837f28b8c0db5cac7aa653a588fd7e84ba061c329e7"}, {file = "prometheus_client-0.20.0.tar.gz", hash = "sha256:287629d00b147a32dcb2be0b9df905da599b2d82f80377083ec8463309a4bb89"}, @@ -3910,7 +3693,6 @@ version = "0.2.0" description = "Accelerated property cache" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58"}, {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b"}, @@ -4018,8 +3800,6 @@ version = "1.26.1" description = "Beautiful, Pythonic protocol buffers" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "proto_plus-1.26.1-py3-none-any.whl", hash = "sha256:13285478c2dcf2abb829db158e1047e2f1e8d63a077d94263c2b88b043c75a66"}, {file = "proto_plus-1.26.1.tar.gz", hash = "sha256:21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012"}, @@ -4037,7 +3817,6 @@ version = "4.25.8" description = "" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "protobuf-4.25.8-cp310-abi3-win32.whl", hash = "sha256:504435d831565f7cfac9f0714440028907f1975e4bed228e58e72ecfff58a1e0"}, {file = "protobuf-4.25.8-cp310-abi3-win_amd64.whl", hash = "sha256:bd551eb1fe1d7e92c1af1d75bdfa572eff1ab0e5bf1736716814cdccdb2360f9"}, @@ -4051,7 +3830,6 @@ files = [ {file = "protobuf-4.25.8-py3-none-any.whl", hash = "sha256:15a0af558aa3b13efef102ae6e4f3efac06f1eea11afb3a57db2901447d9fb59"}, {file = "protobuf-4.25.8.tar.gz", hash = "sha256:6135cf8affe1fc6f76cced2641e4ea8d3e59518d1f24ae41ba97bcad82d397cd"}, ] -markers = {main = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"extra-proxy\") or extra == \"extra-proxy\""} [[package]] name = "pyarrow" @@ -4059,8 +3837,6 @@ version = "21.0.0" description = "Python library for Apache Arrow" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "pyarrow-21.0.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:e563271e2c5ff4d4a4cbeb2c83d5cf0d4938b891518e676025f7268c6fe5fe26"}, {file = "pyarrow-21.0.0-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:fee33b0ca46f4c85443d6c450357101e47d53e6c3f008d658c27a2d020d44c79"}, @@ -4116,8 +3892,6 @@ version = "0.6.1" description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"extra-proxy\") or extra == \"extra-proxy\"" files = [ {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, @@ -4129,8 +3903,6 @@ version = "0.4.2" description = "A collection of ASN.1-based protocols modules" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"extra-proxy\") or extra == \"extra-proxy\"" files = [ {file = "pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a"}, {file = "pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6"}, @@ -4145,7 +3917,6 @@ version = "2.11.1" description = "Python style guide checker" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"}, {file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"}, @@ -4157,12 +3928,10 @@ version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] -markers = {main = "platform_python_implementation != \"PyPy\" or extra == \"proxy\"", dev = "platform_python_implementation != \"PyPy\"", proxy-dev = "platform_python_implementation != \"PyPy\""} [[package]] name = "pydantic" @@ -4170,7 +3939,6 @@ version = "2.10.6" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584"}, {file = "pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236"}, @@ -4184,7 +3952,7 @@ typing-extensions = ">=4.12.2" [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] +timezone = ["tzdata"] [[package]] name = "pydantic-core" @@ -4192,7 +3960,6 @@ version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, @@ -4305,8 +4072,6 @@ version = "2.10.1" description = "Settings management using Pydantic" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ {file = "pydantic_settings-2.10.1-py3-none-any.whl", hash = "sha256:a60952460b99cf661dc25c29c0ef171721f98bfcb52ef8d9ea4c943d7c8cc796"}, {file = "pydantic_settings-2.10.1.tar.gz", hash = "sha256:06f0062169818d0f5524420a360d632d5857b83cffd4d42fe29597807a1614ee"}, @@ -4330,7 +4095,6 @@ version = "3.1.0" description = "passive checker of Python programs" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"}, {file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"}, @@ -4342,8 +4106,6 @@ version = "2.19.2" description = "Pygments is a syntax highlighting package written in Python." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"utils\" or extra == \"proxy\"" files = [ {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, @@ -4358,7 +4120,6 @@ version = "2.9.0" description = "JSON Web Token implementation in Python" optional = false python-versions = ">=3.8" -groups = ["main", "proxy-dev"] files = [ {file = "PyJWT-2.9.0-py3-none-any.whl", hash = "sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850"}, {file = "pyjwt-2.9.0.tar.gz", hash = "sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c"}, @@ -4379,8 +4140,6 @@ version = "1.5.0" description = "Python binding to the Networking and Cryptography (NaCl) library" optional = true python-versions = ">=3.6" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"}, {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"}, @@ -4407,8 +4166,6 @@ version = "3.2.3" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "pyparsing-3.2.3-py3-none-any.whl", hash = "sha256:a749938e02d6fd0b59b356ca504a24982314bb090c383e3cf201c95ef7e2bfcf"}, {file = "pyparsing-3.2.3.tar.gz", hash = "sha256:b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be"}, @@ -4423,8 +4180,6 @@ version = "3.5.4" description = "A python implementation of GNU readline." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.9\" and sys_platform == \"win32\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "pyreadline3-3.5.4-py3-none-any.whl", hash = "sha256:eaf8e6cc3c49bcccf145fc6067ba8643d1df34d604a1ec0eccbf7a18e6d3fae6"}, {file = "pyreadline3-3.5.4.tar.gz", hash = "sha256:8d57d53039a1c75adba8e50dd3d992b28143480816187ea5efbd5c78e6c885b7"}, @@ -4439,7 +4194,6 @@ version = "7.4.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" -groups = ["dev"] files = [ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, @@ -4462,7 +4216,6 @@ version = "0.21.2" description = "Pytest support for asyncio" optional = false python-versions = ">=3.7" -groups = ["dev"] files = [ {file = "pytest_asyncio-0.21.2-py3-none-any.whl", hash = "sha256:ab664c88bb7998f711d8039cacd4884da6430886ae8bbd4eded552ed2004f16b"}, {file = "pytest_asyncio-0.21.2.tar.gz", hash = "sha256:d67738fc232b94b326b9d060750beb16e0074210b98dd8b58a5239fa2a154f45"}, @@ -4481,7 +4234,6 @@ version = "3.14.1" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "pytest_mock-3.14.1-py3-none-any.whl", hash = "sha256:178aefcd11307d874b4cd3100344e7e2d888d9791a6a1d9bfe90fbc1b74fd1d0"}, {file = "pytest_mock-3.14.1.tar.gz", hash = "sha256:159e9edac4c451ce77a5cdb9fc5d1100708d2dd4ba3c3df572f14097351af80e"}, @@ -4499,8 +4251,6 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"proxy\") or extra == \"proxy\"" files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -4515,7 +4265,6 @@ version = "1.0.1" description = "Read key-value pairs from a .env file and set them as environment variables" optional = false python-versions = ">=3.8" -groups = ["main", "proxy-dev"] files = [ {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, @@ -4530,8 +4279,6 @@ version = "0.0.18" description = "A streaming multipart parser for Python" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "python_multipart-0.0.18-py3-none-any.whl", hash = "sha256:efe91480f485f6a361427a541db4796f9e1591afc0fb8e7a4ba06bfbc6708996"}, {file = "python_multipart-0.0.18.tar.gz", hash = "sha256:7a68db60c8bfb82e460637fa4750727b45af1d5e2ed215593f917f64694d34fe"}, @@ -4543,8 +4290,6 @@ version = "3.0.0" description = "Universally unique lexicographically sortable identifier" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "python_ulid-3.0.0-py3-none-any.whl", hash = "sha256:e4c4942ff50dbd79167ad01ac725ec58f924b4018025ce22c858bfcff99a5e31"}, {file = "python_ulid-3.0.0.tar.gz", hash = "sha256:e50296a47dc8209d28629a22fc81ca26c00982c78934bd7766377ba37ea49a9f"}, @@ -4559,8 +4304,6 @@ version = "2025.2" description = "World timezone definitions, modern and historical" optional = true python-versions = "*" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\" or python_version < \"3.9\" and extra == \"utils\"" files = [ {file = "pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00"}, {file = "pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3"}, @@ -4572,8 +4315,6 @@ version = "311" description = "Python for Window Extensions" optional = true python-versions = "*" -groups = ["main"] -markers = "python_version >= \"3.10\" and sys_platform == \"win32\" and (extra == \"proxy\" or extra == \"mlflow\")" files = [ {file = "pywin32-311-cp310-cp310-win32.whl", hash = "sha256:d03ff496d2a0cd4a5893504789d4a15399133fe82517455e78bad62efbb7f0a3"}, {file = "pywin32-311-cp310-cp310-win_amd64.whl", hash = "sha256:797c2772017851984b97180b0bebe4b620bb86328e8a884bb626156295a63b3b"}, @@ -4603,7 +4344,6 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -4666,8 +4406,6 @@ version = "5.3.1" description = "Python client for Redis database and key-value store" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.9\" and (extra == \"extra-proxy\" or extra == \"proxy\") and python_version < \"3.14\" or extra == \"proxy\"" files = [ {file = "redis-5.3.1-py3-none-any.whl", hash = "sha256:dc1909bd24669cc31b5f67a039700b16ec30571096c5f1f0d9d2324bff31af97"}, {file = "redis-5.3.1.tar.gz", hash = "sha256:ca49577a531ea64039b5a36db3d6cd1a0c7a60c34124d46924a45b956e8cf14c"}, @@ -4687,8 +4425,6 @@ version = "0.4.1" description = "Python client library and CLI for using Redis as a vector database" optional = true python-versions = "<3.14,>=3.9" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "redisvl-0.4.1-py3-none-any.whl", hash = "sha256:6db5d5bc95b1fe8032a1cdae74ce1c65bc7fe9054e5429b5d34d5a91d28bae5f"}, {file = "redisvl-0.4.1.tar.gz", hash = "sha256:fd6a36426ba94792c0efca20915c31232d4ee3cc58eb23794a62c142696401e6"}, @@ -4698,8 +4434,8 @@ files = [ coloredlogs = ">=15.0,<16.0" ml-dtypes = ">=0.4.0,<0.5.0" numpy = [ - {version = ">=1,<2", markers = "python_version < \"3.12\""}, {version = ">=1.26.0,<3", markers = "python_version >= \"3.12\""}, + {version = ">=1,<2", markers = "python_version < \"3.12\""}, ] pydantic = ">=2,<3" python-ulid = ">=3.0.0,<4.0.0" @@ -4713,7 +4449,7 @@ bedrock = ["boto3[bedrock] (>=1.36.0,<2.0.0)"] cohere = ["cohere (>=4.44)"] mistralai = ["mistralai (>=1.0.0)"] openai = ["openai (>=1.13.0,<2.0.0)"] -sentence-transformers = ["scipy (<1.15) ; python_version < \"3.10\"", "scipy (>=1.15,<2.0) ; python_version >= \"3.10\"", "sentence-transformers (>=3.4.0,<4.0.0)"] +sentence-transformers = ["scipy (<1.15)", "scipy (>=1.15,<2.0)", "sentence-transformers (>=3.4.0,<4.0.0)"] vertexai = ["google-cloud-aiplatform (>=1.26,<2.0)", "protobuf (>=5.29.1,<6.0.0)"] voyageai = ["voyageai (>=0.2.2)"] @@ -4723,7 +4459,6 @@ version = "0.35.1" description = "JSON Referencing + Python" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "referencing-0.35.1-py3-none-any.whl", hash = "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de"}, {file = "referencing-0.35.1.tar.gz", hash = "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"}, @@ -4739,7 +4474,6 @@ version = "2024.11.6" description = "Alternative regular expression module, to replace re." optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91"}, {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0"}, @@ -4843,7 +4577,6 @@ version = "2.31.0" description = "Python HTTP for Humans." optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, @@ -4865,7 +4598,6 @@ version = "1.12.1" description = "Mock out responses from the requests package" optional = false python-versions = ">=3.5" -groups = ["dev"] files = [ {file = "requests-mock-1.12.1.tar.gz", hash = "sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401"}, {file = "requests_mock-1.12.1-py2.py3-none-any.whl", hash = "sha256:b1e37054004cdd5e56c84454cc7df12b25f90f382159087f4b6915aaeef39563"}, @@ -4883,8 +4615,6 @@ version = "0.8.0" description = "Resend Python SDK" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "extra == \"extra-proxy\"" files = [ {file = "resend-0.8.0-py2.py3-none-any.whl", hash = "sha256:adc1515dadf4f4fc6b90db55a237f0f37fc56fd74287a986519a8a187fdb661d"}, {file = "resend-0.8.0.tar.gz", hash = "sha256:94142394701724dbcfcd8f760f675c662a1025013e741dd7cc773ca885526257"}, @@ -4899,7 +4629,6 @@ version = "0.25.7" description = "A utility library for mocking out the `requests` Python library." optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "responses-0.25.7-py3-none-any.whl", hash = "sha256:92ca17416c90fe6b35921f52179bff29332076bb32694c0df02dcac2c6bc043c"}, {file = "responses-0.25.7.tar.gz", hash = "sha256:8ebae11405d7a5df79ab6fd54277f6f2bc29b2d002d0dd2d5c632594d1ddcedb"}, @@ -4911,7 +4640,7 @@ requests = ">=2.30.0,<3.0" urllib3 = ">=1.25.10,<3.0" [package.extras] -tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli ; python_version < \"3.11\"", "tomli-w", "types-PyYAML", "types-requests"] +tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli", "tomli-w", "types-PyYAML", "types-requests"] [[package]] name = "respx" @@ -4919,7 +4648,6 @@ version = "0.22.0" description = "A utility for mocking out the Python HTTPX and HTTP Core libraries." optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "respx-0.22.0-py2.py3-none-any.whl", hash = "sha256:631128d4c9aba15e56903fb5f66fb1eff412ce28dd387ca3a81339e52dbd3ad0"}, {file = "respx-0.22.0.tar.gz", hash = "sha256:3c8924caa2a50bd71aefc07aa812f2466ff489f1848c96e954a5362d17095d91"}, @@ -4934,8 +4662,6 @@ version = "13.7.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = true python-versions = ">=3.7.0" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, @@ -4955,7 +4681,6 @@ version = "0.20.1" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "rpds_py-0.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a649dfd735fff086e8a9d0503a9f0c7d01b7912a333c7ae77e1515c08c146dad"}, {file = "rpds_py-0.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f16bc1334853e91ddaaa1217045dd7be166170beec337576818461268a3de67f"}, @@ -5068,8 +4793,6 @@ version = "2.3.3" description = "RQ is a simple, lightweight, library for creating background jobs, and processing them." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "rq-2.3.3-py3-none-any.whl", hash = "sha256:2202c4409c4c527ac4bee409867d6c02515dd110030499eb0de54c7374aee0ce"}, {file = "rq-2.3.3.tar.gz", hash = "sha256:20c41c977b6f27c852a41bd855893717402bae7b8d9607dca21fe9dd55453e22"}, @@ -5085,8 +4808,6 @@ version = "4.9.1" description = "Pure-Python RSA implementation" optional = true python-versions = "<4,>=3.6" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"extra-proxy\") or extra == \"extra-proxy\"" files = [ {file = "rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762"}, {file = "rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75"}, @@ -5101,7 +4822,6 @@ version = "0.1.15" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" -groups = ["dev"] files = [ {file = "ruff-0.1.15-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:5fe8d54df166ecc24106db7dd6a68d44852d14eb0729ea4672bb4d96c320b7df"}, {file = "ruff-0.1.15-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6f0bfbb53c4b4de117ac4d6ddfd33aa5fc31beeaa21d23c45c6dd249faf9126f"}, @@ -5128,8 +4848,6 @@ version = "0.10.4" description = "An Amazon S3 Transfer Manager" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "s3transfer-0.10.4-py3-none-any.whl", hash = "sha256:244a76a24355363a68164241438de1b72f8781664920260c48465896b712a41e"}, {file = "s3transfer-0.10.4.tar.gz", hash = "sha256:29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7"}, @@ -5147,8 +4865,6 @@ version = "1.7.1" description = "A set of python modules for machine learning and data mining" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "scikit_learn-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:406204dd4004f0517f0b23cf4b28c6245cbd51ab1b6b78153bc784def214946d"}, {file = "scikit_learn-1.7.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:16af2e44164f05d04337fd1fc3ae7c4ea61fd9b0d527e22665346336920fe0e1"}, @@ -5199,8 +4915,6 @@ version = "1.15.3" description = "Fundamental algorithms for scientific computing in Python" optional = true python-versions = ">=3.10" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "scipy-1.15.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:a345928c86d535060c9c2b25e71e87c39ab2f22fc96e9636bd74d1dbf9de448c"}, {file = "scipy-1.15.3-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:ad3432cb0f9ed87477a8d97f03b763fd1d57709f1bbde3c9369b1dff5503b253"}, @@ -5256,7 +4970,7 @@ numpy = ">=1.23.5,<2.5" [package.extras] dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodestyle", "pydevtool", "rich-click", "ruff (>=0.0.292)", "types-psutil", "typing_extensions"] doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.19.1)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.0.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)"] -test = ["Cython", "array-api-strict (>=2.0,<2.1.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja ; sys_platform != \"emscripten\"", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] +test = ["Cython", "array-api-strict (>=2.0,<2.1.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] [[package]] name = "semantic-router" @@ -5264,8 +4978,6 @@ version = "0.0.20" description = "Super fast semantic router for AI decision making" optional = true python-versions = ">=3.9,<4.0" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"semantic-router\"" files = [ {file = "semantic_router-0.0.20-py3-none-any.whl", hash = "sha256:7a713401564fb6cf22b566046ad32a4224e4f357be8de6583ca3b9ee328c8f95"}, {file = "semantic_router-0.0.20.tar.gz", hash = "sha256:26119a4628ca72b2fa9eacd446ea763b6f1925a661a34e26945433d2601efac7"}, @@ -5281,7 +4993,7 @@ pydantic = ">=2.5.3,<3.0.0" pyyaml = ">=6.0.1,<7.0.0" [package.extras] -fastembed = ["fastembed (>=0.1.3,<0.2.0) ; python_version < \"3.12\""] +fastembed = ["fastembed (>=0.1.3,<0.2.0)"] hybrid = ["pinecone-text (>=0.7.1,<0.8.0)"] local = ["llama-cpp-python (>=0.2.28,<0.3.0)", "torch (>=2.1.0,<3.0.0)", "transformers (>=4.36.2,<5.0.0)"] @@ -5291,7 +5003,6 @@ version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main", "proxy-dev"] files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, @@ -5303,8 +5014,6 @@ version = "5.0.2" description = "A pure Python implementation of a sliding window memory map manager" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "smmap-5.0.2-py3-none-any.whl", hash = "sha256:b30115f0def7d7531d22a0fb6502488d879e75b260a9db4d0819cfb25403af5e"}, {file = "smmap-5.0.2.tar.gz", hash = "sha256:26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5"}, @@ -5316,7 +5025,6 @@ version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -5328,8 +5036,6 @@ version = "3.0.1" description = "This package provides 32 stemmers for 30 languages generated from Snowball algorithms." optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064"}, {file = "snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895"}, @@ -5341,8 +5047,6 @@ version = "7.1.2" description = "Python documentation generator" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe"}, {file = "sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f"}, @@ -5378,8 +5082,6 @@ version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, @@ -5395,8 +5097,6 @@ version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." optional = true python-versions = ">=3.5" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, @@ -5412,8 +5112,6 @@ version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, @@ -5429,8 +5127,6 @@ version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" optional = true python-versions = ">=3.5" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, @@ -5445,8 +5141,6 @@ version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." optional = true python-versions = ">=3.5" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, @@ -5462,8 +5156,6 @@ version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." optional = true python-versions = ">=3.5" -groups = ["main"] -markers = "extra == \"utils\"" files = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, @@ -5479,8 +5171,6 @@ version = "2.0.42" description = "Database Abstraction Library" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "SQLAlchemy-2.0.42-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7ee065898359fdee83961aed5cf1fb4cfa913ba71b58b41e036001d90bebbf7a"}, {file = "SQLAlchemy-2.0.42-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56bc76d86216443daa2e27e6b04a9b96423f0b69b5d0c40c7f4b9a4cdf7d8d90"}, @@ -5576,8 +5266,6 @@ version = "0.5.3" description = "A non-validating SQL parser." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "sqlparse-0.5.3-py3-none-any.whl", hash = "sha256:cf2196ed3418f3ba5de6af7e82c694a9fbdbfecccdfc72e281548517081f16ca"}, {file = "sqlparse-0.5.3.tar.gz", hash = "sha256:09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272"}, @@ -5593,8 +5281,6 @@ version = "2.1.3" description = "SSE plugin for Starlette" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ {file = "sse_starlette-2.1.3-py3-none-any.whl", hash = "sha256:8ec846438b4665b9e8c560fcdea6bc8081a3abf7942faa95e5a744999d219772"}, {file = "sse_starlette-2.1.3.tar.gz", hash = "sha256:9cd27eb35319e1414e3d2558ee7414487f9529ce3b3cf9b21434fd110e017169"}, @@ -5614,8 +5300,6 @@ version = "0.44.0" description = "The little ASGI library that shines." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"proxy\") or extra == \"proxy\"" files = [ {file = "starlette-0.44.0-py3-none-any.whl", hash = "sha256:19edeb75844c16dcd4f9dd72f22f9108c1539f3fc9c4c88885654fef64f85aea"}, {file = "starlette-0.44.0.tar.gz", hash = "sha256:e35166950a3ccccc701962fe0711db0bc14f2ecd37c6f9fe5e3eae0cbaea8715"}, @@ -5623,6 +5307,7 @@ files = [ [package.dependencies] anyio = ">=3.4.0,<5" +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.18)", "pyyaml"] @@ -5633,8 +5318,6 @@ version = "0.9.0" description = "Pretty-print tabular data" optional = true python-versions = ">=3.7" -groups = ["main"] -markers = "python_version >= \"3.9\" and (extra == \"extra-proxy\" or extra == \"utils\") and python_version < \"3.14\" or extra == \"utils\"" files = [ {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, @@ -5649,8 +5332,6 @@ version = "0.2.2" description = "backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout" optional = false python-versions = "*" -groups = ["proxy-dev"] -markers = "python_version <= \"3.10\"" files = [ {file = "taskgroup-0.2.2-py2.py3-none-any.whl", hash = "sha256:e2c53121609f4ae97303e9ea1524304b4de6faf9eb2c9280c7f87976479a52fb"}, {file = "taskgroup-0.2.2.tar.gz", hash = "sha256:078483ac3e78f2e3f973e2edbf6941374fbea81b9c5d0a96f51d297717f4752d"}, @@ -5666,8 +5347,6 @@ version = "9.1.2" description = "Retry code until it succeeds" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.9\" and extra == \"extra-proxy\" and python_version < \"3.14\"" files = [ {file = "tenacity-9.1.2-py3-none-any.whl", hash = "sha256:f77bf36710d8b73a50b2dd155c97b870017ad21afe6ab300326b0371b3b05138"}, {file = "tenacity-9.1.2.tar.gz", hash = "sha256:1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb"}, @@ -5683,8 +5362,6 @@ version = "3.6.0" description = "threadpoolctl" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "threadpoolctl-3.6.0-py3-none-any.whl", hash = "sha256:43a0b8fd5a2928500110039e43a5eed8480b918967083ea48dc3ab9f13c4a7fb"}, {file = "threadpoolctl-3.6.0.tar.gz", hash = "sha256:8ab8b4aa3491d812b623328249fab5302a68d2d71745c8a4c719a2fcaba9f44e"}, @@ -5696,7 +5373,6 @@ version = "0.7.0" description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "tiktoken-0.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485f3cc6aba7c6b6ce388ba634fbba656d9ee27f766216f45146beb4ac18b25f"}, {file = "tiktoken-0.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e54be9a2cd2f6d6ffa3517b064983fb695c9a9d8aa7d574d1ef3c3f931a99225"}, @@ -5749,7 +5425,6 @@ version = "0.21.0" description = "" optional = false python-versions = ">=3.7" -groups = ["main"] files = [ {file = "tokenizers-0.21.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:3c4c93eae637e7d2aaae3d376f06085164e1660f89304c0ab2b1d08a406636b2"}, {file = "tokenizers-0.21.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:f53ea537c925422a2e0e92a24cce96f6bc5046bbef24a1652a5edc8ba975f62e"}, @@ -5782,8 +5457,6 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] -markers = "python_version <= \"3.10\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -5825,7 +5498,6 @@ version = "0.13.3" description = "Style preserving TOML library" optional = false python-versions = ">=3.8" -groups = ["main", "proxy-dev"] files = [ {file = "tomlkit-0.13.3-py3-none-any.whl", hash = "sha256:c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0"}, {file = "tomlkit-0.13.3.tar.gz", hash = "sha256:430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1"}, @@ -5837,7 +5509,6 @@ version = "4.67.1" description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" -groups = ["main"] files = [ {file = "tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2"}, {file = "tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2"}, @@ -5859,7 +5530,6 @@ version = "1.16.0.20241221" description = "Typing stubs for cffi" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "types_cffi-1.16.0.20241221-py3-none-any.whl", hash = "sha256:e5b76b4211d7a9185f6ab8d06a106d56c7eb80af7cdb8bfcb4186ade10fb112f"}, {file = "types_cffi-1.16.0.20241221.tar.gz", hash = "sha256:1c96649618f4b6145f58231acb976e0b448be6b847f7ab733dabe62dfbff6591"}, @@ -5874,7 +5544,6 @@ version = "24.1.0.20240722" description = "Typing stubs for pyOpenSSL" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "types-pyOpenSSL-24.1.0.20240722.tar.gz", hash = "sha256:47913b4678a01d879f503a12044468221ed8576263c1540dcb0484ca21b08c39"}, {file = "types_pyOpenSSL-24.1.0.20240722-py3-none-any.whl", hash = "sha256:6a7a5d2ec042537934cfb4c9d4deb0e16c4c6250b09358df1f083682fe6fda54"}, @@ -5890,7 +5559,6 @@ version = "6.0.12.20241230" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6"}, {file = "types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c"}, @@ -5902,7 +5570,6 @@ version = "4.6.0.20241004" description = "Typing stubs for redis" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "types-redis-4.6.0.20241004.tar.gz", hash = "sha256:5f17d2b3f9091ab75384153bfa276619ffa1cf6a38da60e10d5e6749cc5b902e"}, {file = "types_redis-4.6.0.20241004-py3-none-any.whl", hash = "sha256:ef5da68cb827e5f606c8f9c0b49eeee4c2669d6d97122f301d3a55dc6a63f6ed"}, @@ -5918,8 +5585,6 @@ version = "2.31.0.6" description = "Typing stubs for requests" optional = false python-versions = ">=3.7" -groups = ["dev"] -markers = "python_version < \"3.10\"" files = [ {file = "types-requests-2.31.0.6.tar.gz", hash = "sha256:cd74ce3b53c461f1228a9b783929ac73a666658f223e28ed29753771477b3bd0"}, {file = "types_requests-2.31.0.6-py3-none-any.whl", hash = "sha256:a2db9cb228a81da8348b49ad6db3f5519452dd20a9c1e1a868c83c5fe88fd1a9"}, @@ -5934,8 +5599,6 @@ version = "2.32.0.20241016" description = "Typing stubs for requests" optional = false python-versions = ">=3.8" -groups = ["dev"] -markers = "python_version >= \"3.10\"" files = [ {file = "types-requests-2.32.0.20241016.tar.gz", hash = "sha256:0d9cad2f27515d0e3e3da7134a1b6f28fb97129d86b867f24d9c726452634d95"}, {file = "types_requests-2.32.0.20241016-py3-none-any.whl", hash = "sha256:4195d62d6d3e043a4eaaf08ff8a62184584d2e8684e9d2aa178c7915a7da3747"}, @@ -5950,7 +5613,6 @@ version = "75.8.0.20250110" description = "Typing stubs for setuptools" optional = false python-versions = ">=3.8" -groups = ["dev"] files = [ {file = "types_setuptools-75.8.0.20250110-py3-none-any.whl", hash = "sha256:a9f12980bbf9bcdc23ecd80755789085bad6bfce4060c2275bc2b4ca9f2bc480"}, {file = "types_setuptools-75.8.0.20250110.tar.gz", hash = "sha256:96f7ec8bbd6e0a54ea180d66ad68ad7a1d7954e7281a710ea2de75e355545271"}, @@ -5962,8 +5624,6 @@ version = "1.26.25.14" description = "Typing stubs for urllib3" optional = false python-versions = "*" -groups = ["dev"] -markers = "python_version < \"3.10\"" files = [ {file = "types-urllib3-1.26.25.14.tar.gz", hash = "sha256:229b7f577c951b8c1b92c1bc2b2fdb0b49847bd2af6d1cc2a2e3dd340f3bda8f"}, {file = "types_urllib3-1.26.25.14-py3-none-any.whl", hash = "sha256:9683bbb7fb72e32bfe9d2be6e04875fbe1b3eeec3cbb4ea231435aa7fd6b4f0e"}, @@ -5975,7 +5635,6 @@ version = "4.13.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, @@ -5987,8 +5646,6 @@ version = "0.4.1" description = "Runtime typing introspection tools" optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ {file = "typing_inspection-0.4.1-py3-none-any.whl", hash = "sha256:389055682238f53b04f7badcb49b989835495a96700ced5dab2d8feae4b26f51"}, {file = "typing_inspection-0.4.1.tar.gz", hash = "sha256:6ae134cc0203c33377d43188d4064e9b357dba58cff3185f22924610e70a9d28"}, @@ -6003,8 +5660,6 @@ version = "2025.2" description = "Provider of IANA time zone data" optional = true python-versions = ">=2" -groups = ["main"] -markers = "python_version >= \"3.10\" and platform_system == \"Windows\" and (extra == \"proxy\" or extra == \"mlflow\") or python_version >= \"3.10\" and extra == \"mlflow\" or platform_system == \"Windows\" and extra == \"proxy\"" files = [ {file = "tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8"}, {file = "tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9"}, @@ -6016,8 +5671,6 @@ version = "5.2" description = "tzinfo object for the local timezone" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "tzlocal-5.2-py3-none-any.whl", hash = "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8"}, {file = "tzlocal-5.2.tar.gz", hash = "sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e"}, @@ -6036,16 +5689,14 @@ version = "1.26.20" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" -groups = ["main", "dev", "proxy-dev"] -markers = "python_version < \"3.10\"" files = [ {file = "urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e"}, {file = "urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32"}, ] [package.extras] -brotli = ["brotli (==1.0.9) ; os_name != \"nt\" and python_version < \"3\" and platform_python_implementation == \"CPython\"", "brotli (>=1.0.9) ; python_version >= \"3\" and platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; (os_name != \"nt\" or python_version >= \"3\") and platform_python_implementation != \"CPython\"", "brotlipy (>=0.6.0) ; os_name == \"nt\" and python_version < \"3\""] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress ; python_version == \"2.7\"", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +brotli = ["brotli (==1.0.9)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] @@ -6054,15 +5705,13 @@ version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] -markers = "python_version >= \"3.10\"" files = [ {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] -brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] @@ -6073,8 +5722,6 @@ version = "0.29.0" description = "The lightning-fast ASGI server." optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "python_version >= \"3.10\" and (extra == \"mlflow\" or extra == \"proxy\") or extra == \"proxy\"" files = [ {file = "uvicorn-0.29.0-py3-none-any.whl", hash = "sha256:2c2aac7ff4f4365c206fd773a39bf4ebd1047c238f8b8268ad996829323473de"}, {file = "uvicorn-0.29.0.tar.gz", hash = "sha256:6a69214c0b6a087462412670b3ef21224fa48cae0e452b5883e8e8bdfdd11dd0"}, @@ -6086,7 +5733,7 @@ h11 = ">=0.8" typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} [package.extras] -standard = ["colorama (>=0.4) ; sys_platform == \"win32\"", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1) ; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\"", "watchfiles (>=0.13)", "websockets (>=10.4)"] +standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] [[package]] name = "uvloop" @@ -6094,8 +5741,6 @@ version = "0.21.0" description = "Fast implementation of asyncio event loop on top of libuv" optional = true python-versions = ">=3.8.0" -groups = ["main"] -markers = "sys_platform != \"win32\" and extra == \"proxy\"" files = [ {file = "uvloop-0.21.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ec7e6b09a6fdded42403182ab6b832b71f4edaf7f37a9a0e371a01db5f0cb45f"}, {file = "uvloop-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:196274f2adb9689a289ad7d65700d37df0c0930fd8e4e743fa4834e850d7719d"}, @@ -6147,8 +5792,6 @@ version = "3.0.2" description = "Waitress WSGI server" optional = true python-versions = ">=3.9.0" -groups = ["main"] -markers = "python_version >= \"3.10\" and platform_system == \"Windows\" and extra == \"mlflow\"" files = [ {file = "waitress-3.0.2-py3-none-any.whl", hash = "sha256:c56d67fd6e87c2ee598b76abdd4e96cfad1f24cacdea5078d382b1f9d7b5ed2e"}, {file = "waitress-3.0.2.tar.gz", hash = "sha256:682aaaf2af0c44ada4abfb70ded36393f0e307f4ab9456a215ce0020baefc31f"}, @@ -6164,8 +5807,6 @@ version = "13.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = true python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"proxy\"" files = [ {file = "websockets-13.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f48c749857f8fb598fb890a75f540e3221d0976ed0bf879cf3c7eef34151acee"}, {file = "websockets-13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c7e72ce6bda6fb9409cc1e8164dd41d7c91466fb599eb047cfda72fe758a34a7"}, @@ -6261,8 +5902,6 @@ version = "3.1.3" description = "The comprehensive WSGI web application library." optional = true python-versions = ">=3.9" -groups = ["main"] -markers = "python_version >= \"3.10\" and extra == \"mlflow\"" files = [ {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, @@ -6280,7 +5919,6 @@ version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, @@ -6362,7 +6000,6 @@ files = [ {file = "wrapt-1.17.2-py3-none-any.whl", hash = "sha256:b18f2d1533a71f069c7f82d524a52599053d4c7166e9dd374ae2136b7f40f7c8"}, {file = "wrapt-1.17.2.tar.gz", hash = "sha256:41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3"}, ] -markers = {main = "python_version >= \"3.10\""} [[package]] name = "wsproto" @@ -6370,7 +6007,6 @@ version = "1.2.0" description = "WebSockets state-machine based protocol implementation" optional = false python-versions = ">=3.7.0" -groups = ["proxy-dev"] files = [ {file = "wsproto-1.2.0-py3-none-any.whl", hash = "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736"}, {file = "wsproto-1.2.0.tar.gz", hash = "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065"}, @@ -6385,7 +6021,6 @@ version = "1.15.2" description = "Yet another URL library" optional = false python-versions = ">=3.8" -groups = ["main"] files = [ {file = "yarl-1.15.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e4ee8b8639070ff246ad3649294336b06db37a94bdea0d09ea491603e0be73b8"}, {file = "yarl-1.15.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a7cf963a357c5f00cb55b1955df8bbe68d2f2f65de065160a1c26b85a1e44172"}, @@ -6498,18 +6133,17 @@ version = "3.20.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" -groups = ["main", "dev", "proxy-dev"] files = [ {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [extras] @@ -6521,6 +6155,6 @@ semantic-router = ["semantic-router"] utils = ["numpydoc"] [metadata] -lock-version = "2.1" +lock-version = "2.0" python-versions = ">=3.8.1,<4.0, !=3.9.7" content-hash = "1be89745d648fd61387e2856d44ed70e632f5c98c9d847a8a548551a86ff479d" diff --git a/tests/test_litellm/test_router.py b/tests/test_litellm/test_router.py index 0a6ea31a1b..234941449b 100644 --- a/tests/test_litellm/test_router.py +++ b/tests/test_litellm/test_router.py @@ -1401,3 +1401,292 @@ def test_should_include_deployment(): model_name=model_name, team_id=team_id, ) + + +def test_get_deployment_model_info_base_model_flow(): + """Test that get_deployment_model_info correctly handles the base model flow""" + from unittest.mock import patch + + router = litellm.Router( + model_list=[ + { + "model_name": "test-model", + "litellm_params": {"model": "gpt-3.5-turbo"}, + } + ], + ) + + # Mock data for the test + mock_custom_model_info = { + "base_model": "gpt-3.5-turbo", + "input_cost_per_token": 0.001, + "output_cost_per_token": 0.002, + "custom_field": "custom_value", + } + + mock_base_model_info = { + "key": "gpt-3.5-turbo", + "max_tokens": 4096, + "max_input_tokens": 4096, + "max_output_tokens": 4096, + "input_cost_per_token": 0.0015, # This should be overridden by custom model info + "output_cost_per_token": 0.002, + "litellm_provider": "openai", + "mode": "chat", + "supported_openai_params": ["temperature", "max_tokens"], + } + + mock_litellm_model_name_info = { + "key": "test-model", + "max_tokens": 2048, + "max_input_tokens": 2048, + "max_output_tokens": 2048, + "input_cost_per_token": 0.0005, + "output_cost_per_token": 0.001, + "litellm_provider": "test_provider", + "mode": "completion", + "supported_openai_params": ["temperature"], + } + + # Test Case 1: Base model flow with custom model info that has base_model + with patch.object( + litellm, "model_cost", {"test-custom-model": mock_custom_model_info} + ): + with patch.object(litellm, "get_model_info") as mock_get_model_info: + # Configure mock returns + mock_get_model_info.side_effect = lambda model: { + "gpt-3.5-turbo": mock_base_model_info, + "test-model": mock_litellm_model_name_info, + }.get(model) + + result = router.get_deployment_model_info( + model_id="test-custom-model", model_name="test-model" + ) + + # Verify that get_model_info was called for both base model and model name + assert mock_get_model_info.call_count == 2 + mock_get_model_info.assert_any_call( + model="gpt-3.5-turbo" + ) # base model call + mock_get_model_info.assert_any_call(model="test-model") # model name call + + # Verify the result contains merged information + assert result is not None + + # Test the correct merging behavior after fix: + # 1. base_model_info provides defaults, custom_model_info overrides (correct priority) + # 2. The result of step 1 gets merged into litellm_model_name_info (custom+base override litellm) + + # Fields from custom model (should override base model values) + assert ( + result["input_cost_per_token"] == 0.001 + ) # From custom model (overrides base 0.0015) + assert ( + result["output_cost_per_token"] == 0.002 + ) # From custom model (same as base) + assert result["custom_field"] == "custom_value" # From custom model + + # Fields from base model that weren't overridden by custom + assert result["max_tokens"] == 4096 # From base model + assert result["litellm_provider"] == "openai" # From base model + assert ( + result["mode"] == "chat" + ) # From base model (overrides litellm "completion") + + # The key field comes from base model since both base and litellm have it + # and base model info overrides litellm model name info in final merge + assert ( + result["key"] == "gpt-3.5-turbo" + ) # From base model (overrides litellm key) + + # Test Case 2: Custom model info without base_model + mock_custom_model_info_no_base = { + "input_cost_per_token": 0.001, + "output_cost_per_token": 0.002, + "custom_field": "custom_value", + } + + with patch.object( + litellm, + "model_cost", + {"test-custom-model-no-base": mock_custom_model_info_no_base}, + ): + with patch.object(litellm, "get_model_info") as mock_get_model_info: + mock_get_model_info.side_effect = lambda model: { + "test-model": mock_litellm_model_name_info, + }.get(model) + + result = router.get_deployment_model_info( + model_id="test-custom-model-no-base", model_name="test-model" + ) + + # Should only call get_model_info once for model name (no base model) + assert mock_get_model_info.call_count == 1 + mock_get_model_info.assert_called_with(model="test-model") + + # Verify the result contains merged information + assert result is not None + assert result["input_cost_per_token"] == 0.001 # From custom model + assert result["max_tokens"] == 2048 # From litellm model name info + assert result["custom_field"] == "custom_value" # From custom model + assert result["mode"] == "completion" # From litellm model name info + + # Test Case 3: No custom model info, only litellm model name info + with patch.object(litellm, "model_cost", {}): # Empty model cost + with patch.object(litellm, "get_model_info") as mock_get_model_info: + mock_get_model_info.side_effect = lambda model: { + "test-model": mock_litellm_model_name_info, + }.get(model) + + result = router.get_deployment_model_info( + model_id="non-existent-model", model_name="test-model" + ) + + # Should only call get_model_info once for model name + assert mock_get_model_info.call_count == 1 + mock_get_model_info.assert_called_with(model="test-model") + + # Result should be just the litellm model name info + assert result is not None + assert result == mock_litellm_model_name_info + + # Test Case 4: Base model info retrieval fails (exception handling) + mock_custom_model_info_invalid_base = { + "base_model": "invalid-base-model", + "input_cost_per_token": 0.001, + "output_cost_per_token": 0.002, + } + + with patch.object( + litellm, + "model_cost", + {"test-custom-model-invalid": mock_custom_model_info_invalid_base}, + ): + with patch.object(litellm, "get_model_info") as mock_get_model_info: + # Mock get_model_info to raise exception for invalid base model + def mock_get_model_info_side_effect(model): + if model == "invalid-base-model": + raise Exception("Model not found") + elif model == "test-model": + return mock_litellm_model_name_info + return None + + mock_get_model_info.side_effect = mock_get_model_info_side_effect + + result = router.get_deployment_model_info( + model_id="test-custom-model-invalid", model_name="test-model" + ) + + # Should handle exception gracefully and still return merged result + assert result is not None + assert result["input_cost_per_token"] == 0.001 # From custom model + assert result["mode"] == "completion" # From litellm model name info + + # Test Case 5: Both model_cost.get() and get_model_info() return None + with patch.object(litellm, "model_cost", {}): + with patch.object( + litellm, "get_model_info", side_effect=Exception("Not found") + ): + result = router.get_deployment_model_info( + model_id="non-existent", model_name="non-existent" + ) + + # Should return None when no model info is found + assert result is None + + print("✓ All base model flow test cases passed!") + + +@patch("litellm.model_cost", {}) +def test_get_deployment_model_info_base_model_merge_priority(): + """Test that base model info merging respects the correct priority order""" + from unittest.mock import patch + + router = litellm.Router( + model_list=[ + { + "model_name": "test-model", + "litellm_params": {"model": "gpt-3.5-turbo"}, + } + ], + ) + + # Test data with overlapping fields to test merge priority + mock_custom_model_info = { + "base_model": "gpt-4", + "input_cost_per_token": 0.01, # Should override base model value + "max_tokens": 8000, # Should override base model value + "custom_only_field": "custom_value", + } + + mock_base_model_info = { + "key": "gpt-4", + "max_tokens": 4096, # Should be overridden by custom model + "input_cost_per_token": 0.03, # Should be overridden by custom model + "output_cost_per_token": 0.06, # Should be preserved (not in custom) + "litellm_provider": "openai", + "base_only_field": "base_value", + } + + mock_litellm_model_name_info = { + "key": "test-model", + "max_tokens": 2048, # Should be overridden by final custom model info + "input_cost_per_token": 0.005, # Should be overridden by final custom model info + "output_cost_per_token": 0.01, # Should be overridden by final custom model info + "mode": "completion", + "litellm_only_field": "litellm_value", + } + + with patch.object( + litellm, "model_cost", {"custom-model-id": mock_custom_model_info} + ): + with patch.object(litellm, "get_model_info") as mock_get_model_info: + mock_get_model_info.side_effect = lambda model: { + "gpt-4": mock_base_model_info, + "test-model": mock_litellm_model_name_info, + }.get(model) + + result = router.get_deployment_model_info( + model_id="custom-model-id", model_name="test-model" + ) + + assert result is not None + + # Test correct merge priority after fix: + # 1. base_model_info provides defaults + # 2. custom_model_info overrides base_model_info + # 3. Result from steps 1-2 overrides litellm_model_name_info + + # Fields that should come from custom model info (highest priority) + assert ( + result["input_cost_per_token"] == 0.01 + ) # From custom model (overrides base 0.03) + assert ( + result["max_tokens"] == 8000 + ) # From custom model (overrides base 4096) + assert result["custom_only_field"] == "custom_value" # From custom model + + # Fields that should come from base model (not overridden by custom) + assert ( + result["output_cost_per_token"] == 0.06 + ) # From base model (not in custom) + assert ( + result["litellm_provider"] == "openai" + ) # From base model (not in custom) + assert ( + result["base_only_field"] == "base_value" + ) # From base model (not in custom) + + # Fields that should come from litellm model name info (not overridden by custom+base) + assert ( + result["mode"] == "completion" + ) # From litellm model name info (not in custom or base) + assert ( + result["litellm_only_field"] == "litellm_value" + ) # From litellm model name info (not in custom or base) + + # Key comes from base model since both base and litellm have key fields + # and the merged custom+base overrides litellm in the final merge + assert result["key"] == "gpt-4" + + print("✓ Base model merge priority test passed!") From 0eedf7c4477cdd2fcba5d89313aea3105b04deb6 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 9 Aug 2025 16:31:41 -0700 Subject: [PATCH 16/32] build: update local model cost map --- ...odel_prices_and_context_window_backup.json | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 1bd7b460d6..7cfc9dea5a 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -17098,6 +17098,130 @@ "litellm_provider": "snowflake", "mode": "chat" }, + "gradient_ai/anthropic-claude-3.7-sonnet": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 15e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/anthropic-claude-3.5-sonnet": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 15e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/anthropic-claude-3.5-haiku": { + "input_cost_per_token": 8e-07, + "output_cost_per_token": 4e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/anthropic-claude-3-opus": { + "input_cost_per_token": 15e-06, + "output_cost_per_token": 75e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 1024, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/deepseek-r1-distill-llama-70b": { + "input_cost_per_token": 99e-08, + "output_cost_per_token": 99e-08, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 8000, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/llama3.3-70b-instruct": { + "input_cost_per_token": 65e-08, + "output_cost_per_token": 65e-08, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 2048, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/llama3-8b-instruct": { + "input_cost_per_token": 2e-07, + "output_cost_per_token": 2e-07, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 512, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/mistral-nemo-instruct-2407": { + "input_cost_per_token": 3e-07, + "output_cost_per_token": 3e-07, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 512, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-o3": { + "input_cost_per_token": 2e-06, + "output_cost_per_token": 8e-06, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 100000, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-o3-mini": { + "input_cost_per_token": 11e-07, + "output_cost_per_token": 44e-07, + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 100000, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-gpt-4o": { + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 16384, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/openai-gpt-4o-mini": { + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 16384, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, + "gradient_ai/alibaba-qwen3-32b": { + "litellm_provider": "gradient_ai", + "mode": "chat", + "max_tokens": 2048, + "supported_endpoints": ["/v1/chat/completions"], + "supported_modalities": ["text"], + "supports_tool_choice": false + }, "nscale/meta-llama/Llama-4-Scout-17B-16E-Instruct": { "input_cost_per_token": 9e-08, "output_cost_per_token": 2.9e-07, From ece2c9c65d2bc197989e8c14e064e20b996069e4 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 9 Aug 2025 16:31:51 -0700 Subject: [PATCH 17/32] =?UTF-8?q?bump:=20version=201.75.4=20=E2=86=92=201.?= =?UTF-8?q?75.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 838d956a08..b6ad2ff092 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "1.75.4" +version = "1.75.5" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT" @@ -154,7 +154,7 @@ requires = ["poetry-core", "wheel"] build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "1.75.4" +version = "1.75.5" version_files = [ "pyproject.toml:^version" ] From c742c762881eafe5220c78b27568ea51411c362d Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Sun, 10 Aug 2025 07:32:11 -0700 Subject: [PATCH 18/32] Litellm release notes 08 10 2025 (#13479) * docs(index.md): initial doc * build(index.md): initial notes * docs(index.md): add llm translation tickets * docs(index.md): document new model support * docs(index.md): document all pricing changes * docs(index.md): add llm api endpoints * docs(index.md): add doc on mcp gateway * docs(index.md): add all remaining rc notes * docs(index.md): cleanup --- .../release_notes/v1.75.5-stable/index.md | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 docs/my-website/release_notes/v1.75.5-stable/index.md diff --git a/docs/my-website/release_notes/v1.75.5-stable/index.md b/docs/my-website/release_notes/v1.75.5-stable/index.md new file mode 100644 index 0000000000..381ae2310b --- /dev/null +++ b/docs/my-website/release_notes/v1.75.5-stable/index.md @@ -0,0 +1,242 @@ +--- +title: "[PRE-RELEASE]v1.75.5-stable" +slug: "v1-75-5" +date: 2025-08-02T10:00:00 +authors: + - name: Krrish Dholakia + title: CEO, LiteLLM + url: https://www.linkedin.com/in/krish-d/ + image_url: https://pbs.twimg.com/profile_images/1298587542745358340/DZv3Oj-h_400x400.jpg + - name: Ishaan Jaffer + title: CTO, LiteLLM + url: https://www.linkedin.com/in/reffajnaahsi/ + image_url: https://pbs.twimg.com/profile_images/1613813310264340481/lz54oEiB_400x400.jpg + +hide_table_of_contents: false +--- + +import Image from '@theme/IdealImage'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Deploy this version + +:::info + +This release is not out yet. + +::: + +--- + +## New Models / Updated Models + +#### New Model Support + +| Provider | Model | Context Window | Input ($/1M tokens) | Output ($/1M tokens) | +| ----------- | -------------------------------------- | -------------- | ------------------- | -------------------- | +| Bedrock | `bedrock/us.anthropic.claude-opus-4-1-20250805-v1:0` | 200k | $15 | $75 | +| Bedrock | `bedrock/openai.gpt-oss-20b-1:0` | 200k | 0.07 | 0.3 | +| Bedrock | `bedrock/openai.gpt-oss-120b-1:0` | 200k | 0.15 | 0.6 | +| Fireworks AI | `fireworks_ai/accounts/fireworks/models/glm-4p5` | 128k | 0.55 | 2.19 | +| Fireworks AI | `fireworks_ai/accounts/fireworks/models/glm-4p5-air` | 128k | 0.22 | 0.88 | +| Fireworks AI | `fireworks_ai/accounts/fireworks/models/gpt-oss-120b` | 131072 | 0.15 | 0.6 | +| Fireworks AI | `fireworks_ai/accounts/fireworks/models/gpt-oss-20b` | 131072 | 0.05 | 0.2 | +| Groq | `groq/openai/gpt-oss-20b` | 131072 | 0.1 | 0.5 | +| Groq | `groq/openai/gpt-oss-120b` | 131072 | 0.15 | 0.75 | +| OpenAI | `openai/gpt-5` | 400k | 1.25 | 10 | +| OpenAI | `openai/gpt-5-2025-08-07` | 400k | 1.25 | 10 | +| OpenAI | `openai/gpt-5-mini` | 400k | 0.25 | 2 | +| OpenAI | `openai/gpt-5-mini-2025-08-07` | 400k | 0.25 | 2 | +| OpenAI | `openai/gpt-5-nano` | 400k | 0.05 | 0.4 | +| OpenAI | `openai/gpt-5-nano-2025-08-07` | 400k | 0.05 | 0.4 | +| OpenAI | `openai/gpt-5-chat` | 400k | 1.25 | 10 | +| OpenAI | `openai/gpt-5-chat-latest` | 400k | 1.25 | 10 | +| Azure | `azure/gpt-5` | 400k | 1.25 | 10 | +| Azure | `azure/gpt-5-2025-08-07` | 400k | 1.25 | 10 | +| Azure | `azure/gpt-5-mini` | 400k | 0.25 | 2 | +| Azure | `azure/gpt-5-mini-2025-08-07` | 400k | 0.25 | 2 | +| Azure | `azure/gpt-5-nano-2025-08-07` | 400k | 0.05 | 0.4 | +| Azure | `azure/gpt-5-nano` | 400k | 0.05 | 0.4 | +| Azure | `azure/gpt-5-chat` | 400k | 1.25 | 10 | +| Azure | `azure/gpt-5-chat-latest` | 400k | 1.25 | 10 | + +#### Features + +- **[OCI](../../docs/providers/oci)** + - New LLM provider - [PR #13206](https://github.com/BerriAI/litellm/pull/13206) +- **[JinaAI](../../docs/providers/jina_ai)** + - support multimodal embedding models - [PR #13181](https://github.com/BerriAI/litellm/pull/13181) +- **GPT-5 ([OpenAI](../../docs/providers/openai)/[Azure](../../docs/providers/azure))** + - Support drop_params for temperature - [PR #13390](https://github.com/BerriAI/litellm/pull/13390) + - Map max_tokens to max_completion_tokens - [PR #13390](https://github.com/BerriAI/litellm/pull/13390) +- **[Anthropic](../../docs/providers/anthropic)** + - Add claude-opus-4-1 on model cost map - [PR #13384](https://github.com/BerriAI/litellm/pull/13384) +- **[OpenRouter](../../docs/providers/openrouter)** + - Add gpt-oss to model cost map - [PR #13442](https://github.com/BerriAI/litellm/pull/13442) +- **[Cerebras](../../docs/providers/cerebras)** + - Add gpt-oss to model cost map - [PR #13442](https://github.com/BerriAI/litellm/pull/13442) +- **[Azure](../../docs/providers/azure)** + - Support drop params for ‘temperature’ on o-series models - [PR #13353](https://github.com/BerriAI/litellm/pull/13353) +- **[GradientAI](../../docs/providers/gradient_ai)** + - New LLM Provider - [PR #12169](https://github.com/BerriAI/litellm/pull/12169) + +#### Bugs + +- **[OpenAI](../../docs/providers/openai)** + - Add ‘service_tier’ and ‘safety_identifier’ as supported responses api params - [PR #13258](https://github.com/BerriAI/litellm/pull/13258) + - Correct pricing for web search on 4o-mini - [PR #13269](https://github.com/BerriAI/litellm/pull/13269) +- **[Mistral](../../docs/providers/mistral)** + - Handle $id and $schema fields when calling mistral - [PR #13389](https://github.com/BerriAI/litellm/pull/13389) +--- + +## LLM API Endpoints + +#### Features + +- `/responses` + - Responses API Session Handling w/ support for images - [PR #13347](https://github.com/BerriAI/litellm/pull/13347) + - failed if input containing ResponseReasoningItem - [PR #13465](https://github.com/BerriAI/litellm/pull/13465) + - Support custom tools - [PR #13418](https://github.com/BerriAI/litellm/pull/13418) + +#### Bugs + +- `/chat/completions` + - Fix completion_token_details usage object missing ‘text’ tokens - [PR #13234](https://github.com/BerriAI/litellm/pull/13234) + - (SDK) handle tool being a pydantic object - [PR #13274](https://github.com/BerriAI/litellm/pull/13274) + - include cost in streaming usage object - [PR #13418](https://github.com/BerriAI/litellm/pull/13418) + - Exclude none fields on /chat/completion - allows usage with n8n - [PR #13320](https://github.com/BerriAI/litellm/pull/13320) +- `/responses` + - Transform function call in response for non-openai models (gemini/anthropic) - [PR #13260](https://github.com/BerriAI/litellm/pull/13260) + - Fix unsupported operand error with model groups - [PR #13293](https://github.com/BerriAI/litellm/pull/13293) + - Responses api session management for streaming responses - [PR #13396](https://github.com/BerriAI/litellm/pull/13396) +- `/v1/messages` + - Added litellm claude code count tokens - [PR #13261](https://github.com/BerriAI/litellm/pull/13261) +- `/vector_stores` + - Fix create/search vector store errors - [PR #13285](https://github.com/BerriAI/litellm/pull/13285) +--- + +## [MCP Gateway](../../docs/mcp) + +#### Features + +- Add route check for internal users - [PR #13350](https://github.com/BerriAI/litellm/pull/13350) +- MCP Guardrails - docs - [PR #13392](https://github.com/BerriAI/litellm/pull/13392) + + +#### Bugs + +- Fix auth on UI for bearer token servers - [PR #13312](https://github.com/BerriAI/litellm/pull/13312) +- allow access group on mcp tool retrieval - [PR #13425](https://github.com/BerriAI/litellm/pull/13425) + + +--- + +## Management Endpoints / UI + +#### Features + +- **Teams** + - Add team deletion check for teams with keys - [PR #12953](https://github.com/BerriAI/litellm/pull/12953) +- **Models** + - Add ability to set model alias per key/team - [PR #13276](https://github.com/BerriAI/litellm/pull/13276) + - New button to reload model pricing from model cost map - [PR #13464](https://github.com/BerriAI/litellm/pull/13464), [PR #13470](https://github.com/BerriAI/litellm/pull/13470) +- **Keys** + - Make ‘team’ field required when creating service account keys - [PR #13302](https://github.com/BerriAI/litellm/pull/13302) + - Gray out key-based logging settings for non-enterprise users - prevents confusion on if ‘logging’ all up is supported - [PR #13431](https://github.com/BerriAI/litellm/pull/13431) +- **Navbar** + - Add logo customization for LiteLLM admin UI - [PR #12958](https://github.com/BerriAI/litellm/pull/12958) +- **Logs** + - Add token breakdowns on logs + session page - [PR #13357](https://github.com/BerriAI/litellm/pull/13357) +- **Usage** + - Ensure Usage Page loads after the DB has large entries - [PR #13400](https://github.com/BerriAI/litellm/pull/13400) +- **Test Key Page** + - allow uploading images for /chat/completions and /responses - [PR #13445](https://github.com/BerriAI/litellm/pull/13445) +- **MCP** + - Add auth tokens to local storage auth - [PR #13473](https://github.com/BerriAI/litellm/pull/13473) + +#### Bugs + +- **Custom Root Path** + - Fix login route when SSO is enabled - [PR #13267](https://github.com/BerriAI/litellm/pull/13267) +- **Customers/End-users** + - Allow calling /v1/models when end user over budget - allows model listing to work on OpenWebUI when customer over budget - [PR #13320](https://github.com/BerriAI/litellm/pull/13320) +- **Teams** + - Remove user - team membership, when user removed from team - [PR #13433](https://github.com/BerriAI/litellm/pull/13433) +- **Errors** + - Bubble up network errors to user for Logging and Alerts page - [PR #13427](https://github.com/BerriAI/litellm/pull/13427) +- **Model Hub** + - Show pricing for azure models, when base model is set - [PR #13418](https://github.com/BerriAI/litellm/pull/13418) +--- + +## Logging / Guardrail Integrations + +#### Features + +- **Bedrock Guardrails** + - Redacted sensitive information in bedrock guardrails error message - [PR #13356](https://github.com/BerriAI/litellm/pull/13356) +- **Standard Logging Payload** + - Fix ‘can’t register atextexit’ bug - [PR #13436](https://github.com/BerriAI/litellm/pull/13436) + +#### Bugs + +- **Braintrust** + - Allow setting of braintrust callback base url - [PR #13368](https://github.com/BerriAI/litellm/pull/13368) +- **OTEL** + - Track pre_call hook latency - [PR #13362](https://github.com/BerriAI/litellm/pull/13362) + +--- + +## Performance / Loadbalancing / Reliability improvements + +#### Features + +- **Team-BYOK models** + - Add wildcard model support - [PR #13278](https://github.com/BerriAI/litellm/pull/13278) +- **Caching** + - GCP IAM auth support for caching - [PR #13275](https://github.com/BerriAI/litellm/pull/13275) +- **Latency** + - reduce p99 latency w/ redis enabled by 50% - only updates model usage if tpm/rpm limits set - [PR #13362](https://github.com/BerriAI/litellm/pull/13362) + +--- + +## General Proxy Improvements + +#### Features + +- **Models** + - Support /v1/models/\{model_id\} retrieval - [PR #13268](https://github.com/BerriAI/litellm/pull/13268) +- **Multi-instance** + - Ensure disable_llm_api_endpoints works - [PR #13278](https://github.com/BerriAI/litellm/pull/13278) +- **Logs** + - Add apscheduler log suppress - [PR #13299](https://github.com/BerriAI/litellm/pull/13299) +- **Helm** + - Add labels to migrations job template - [PR #13343](https://github.com/BerriAI/litellm/pull/13343) s/o [@unique-jakub](https://github.com/unique-jakub) + +#### Bugs + +- **Non-root image** + - Fix non-root image for migration - [PR #13379](https://github.com/BerriAI/litellm/pull/13379) +- **Get Routes** + - Load get routes when using fastapi-offline - [PR #13466](https://github.com/BerriAI/litellm/pull/13466) +- **Health checks** + - Generate unique trace IDs for Langfuse health checks - [PR #13468](https://github.com/BerriAI/litellm/pull/13468) +- **Swagger** + - Allow using Swagger for /chat/completions - [PR #13469](https://github.com/BerriAI/litellm/pull/13469) +- **Auth** + - Fix JWTs access not working with model access groups - [PR #13474](https://github.com/BerriAI/litellm/pull/13474) + +--- + +## New Contributors + +* @bbartels made their first contribution in https://github.com/BerriAI/litellm/pull/13244 +* @breno-aumo made their first contribution in https://github.com/BerriAI/litellm/pull/13206 +* @pascalwhoop made their first contribution in https://github.com/BerriAI/litellm/pull/13122 +* @ZPerling made their first contribution in https://github.com/BerriAI/litellm/pull/13045 +* @zjx20 made their first contribution in https://github.com/BerriAI/litellm/pull/13181 +* @edwarddamato made their first contribution in https://github.com/BerriAI/litellm/pull/13368 +* @msannan2 made their first contribution in https://github.com/BerriAI/litellm/pull/12169 + + +## **[Full Changelog](https://github.com/BerriAI/litellm/compare/v1.74.15-stable...v1.75.5-stable.rc-draft)** \ No newline at end of file From 184687157e053e106721f14b25cb22f896efe499 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Sun, 10 Aug 2025 07:38:35 -0700 Subject: [PATCH 19/32] Litellm model cost map fixes (#13480) * build(model_prices_and_context_window.json): fix max token values * build(model_prices_and_context_window.json): fix max token values * build(model_prices_and_context_window.json): fix azure gpt-5-chat pricing --- .../model_prices_and_context_window_backup.json | 16 ++++++++-------- model_prices_and_context_window.json | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 7cfc9dea5a..28dec7cce9 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -2457,7 +2457,7 @@ }, "azure/gpt-5-chat": { "max_tokens": 128000, - "max_input_tokens": 128000, + "max_input_tokens": 400000, "max_output_tokens": 128000, "input_cost_per_token": 1.25e-06, "output_cost_per_token": 1e-05, @@ -2490,7 +2490,7 @@ }, "azure/gpt-5-chat-latest": { "max_tokens": 128000, - "max_input_tokens": 128000, + "max_input_tokens": 400000, "max_output_tokens": 128000, "input_cost_per_token": 1.25e-06, "output_cost_per_token": 1e-05, @@ -12582,8 +12582,8 @@ }, "openai.gpt-oss-20b-1:0": { "max_tokens": 128000, - "max_input_tokens": 200000, - "max_output_tokens": 32000, + "max_input_tokens": 128000, + "max_output_tokens": 128000, "input_cost_per_token": 7e-08, "output_cost_per_token": 3e-07, "litellm_provider": "bedrock_converse", @@ -12596,8 +12596,8 @@ }, "openai.gpt-oss-120b-1:0": { "max_tokens": 128000, - "max_input_tokens": 200000, - "max_output_tokens": 32000, + "max_input_tokens": 128000, + "max_output_tokens": 128000, "input_cost_per_token": 1.5e-07, "output_cost_per_token": 6e-07, "litellm_provider": "bedrock_converse", @@ -15605,7 +15605,7 @@ "supports_tool_choice": false }, "fireworks_ai/accounts/fireworks/models/glm-4p5": { - "max_tokens": 128000, + "max_tokens": 96000, "max_input_tokens": 128000, "max_output_tokens": 96000, "input_cost_per_token": 5.5e-07, @@ -15618,7 +15618,7 @@ "source": "https://fireworks.ai/models/fireworks/glm-4p5" }, "fireworks_ai/accounts/fireworks/models/glm-4p5-air": { - "max_tokens": 128000, + "max_tokens": 96000, "max_input_tokens": 128000, "max_output_tokens": 96000, "input_cost_per_token": 2.2e-07, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 7cfc9dea5a..28dec7cce9 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -2457,7 +2457,7 @@ }, "azure/gpt-5-chat": { "max_tokens": 128000, - "max_input_tokens": 128000, + "max_input_tokens": 400000, "max_output_tokens": 128000, "input_cost_per_token": 1.25e-06, "output_cost_per_token": 1e-05, @@ -2490,7 +2490,7 @@ }, "azure/gpt-5-chat-latest": { "max_tokens": 128000, - "max_input_tokens": 128000, + "max_input_tokens": 400000, "max_output_tokens": 128000, "input_cost_per_token": 1.25e-06, "output_cost_per_token": 1e-05, @@ -12582,8 +12582,8 @@ }, "openai.gpt-oss-20b-1:0": { "max_tokens": 128000, - "max_input_tokens": 200000, - "max_output_tokens": 32000, + "max_input_tokens": 128000, + "max_output_tokens": 128000, "input_cost_per_token": 7e-08, "output_cost_per_token": 3e-07, "litellm_provider": "bedrock_converse", @@ -12596,8 +12596,8 @@ }, "openai.gpt-oss-120b-1:0": { "max_tokens": 128000, - "max_input_tokens": 200000, - "max_output_tokens": 32000, + "max_input_tokens": 128000, + "max_output_tokens": 128000, "input_cost_per_token": 1.5e-07, "output_cost_per_token": 6e-07, "litellm_provider": "bedrock_converse", @@ -15605,7 +15605,7 @@ "supports_tool_choice": false }, "fireworks_ai/accounts/fireworks/models/glm-4p5": { - "max_tokens": 128000, + "max_tokens": 96000, "max_input_tokens": 128000, "max_output_tokens": 96000, "input_cost_per_token": 5.5e-07, @@ -15618,7 +15618,7 @@ "source": "https://fireworks.ai/models/fireworks/glm-4p5" }, "fireworks_ai/accounts/fireworks/models/glm-4p5-air": { - "max_tokens": 128000, + "max_tokens": 96000, "max_input_tokens": 128000, "max_output_tokens": 96000, "input_cost_per_token": 2.2e-07, From 0aeb4f165383fa01436c0df46d2fb763b15d7975 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Sun, 10 Aug 2025 09:23:36 -0700 Subject: [PATCH 20/32] fix(health_check_helpers.py): set max tokens for wildcard call to 10, fixes calling gpt-5-nano via wildcard on openai (#13482) gpt-5-nano raises errors for max_tokens=1 --- .../health_check_helpers.py | 12 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 .../static/chunks/154-7bf3bbb913e68f71.js | 1 + .../static/chunks/154-ff9562264ad409e1.js | 1 - .../static/chunks/162-741f64e7b75eb970.js | 1 - .../static/chunks/162-f2925685093720a4.js | 1 + ...782e3848de3.js => 172-25e8f67ccf021150.js} | 2 +- .../static/chunks/247-7557228b7131016b.js | 12 + .../static/chunks/487-79ed94231812dae7.js | 4 + .../static/chunks/760-4dbc0194adfbea2a.js | 12 - .../static/chunks/85-52b9060394399707.js | 1 + .../static/chunks/85-aa9694ed291cdedf.js | 1 - .../static/chunks/866-9e1803a09e9ae8da.js | 2 +- .../static/chunks/90-d2b5ed6f7f6e342e.js | 4 - .../chunks/app/layout-25a743106e1c9456.js | 1 - .../chunks/app/layout-f4acf18888f0aa20.js | 1 + ...ea2a6c311e.js => page-72c8a8dbd0d3984f.js} | 2 +- ...a42ba475f3.js => page-10c235fc18df224f.js} | 2 +- .../app/onboarding/page-6b5d568180da3ccd.js | 1 + .../app/onboarding/page-94ef2a34b1440aa2.js | 1 - .../chunks/app/page-c64580821d04b2c5.js | 1 + .../chunks/app/page-e71feaa99a0e3050.js | 1 - ...80647d.js => main-app-4f7318ae681a6d94.js} | 2 +- .../out/_next/static/css/3c0e0d4261b19d44.css | 3 - .../out/_next/static/css/c8d591a6ccd18f71.css | 3 + litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 4 +- litellm/proxy/_experimental/out/model_hub.txt | 4 +- .../_experimental/out/model_hub_table.html | 1 - .../_experimental/out/model_hub_table.txt | 4 +- .../out/model_hub_table/index.html | 1 + .../proxy/_experimental/out/onboarding.html | 1 - .../proxy/_experimental/out/onboarding.txt | 4 +- litellm/proxy/_new_secret_config.yaml | 29 +-- .../health_endpoints/_health_endpoints.py | 105 ++++---- ui/litellm-dashboard/out/404.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 .../static/chunks/154-7bf3bbb913e68f71.js | 1 + .../static/chunks/154-ff9562264ad409e1.js | 1 - .../static/chunks/162-741f64e7b75eb970.js | 1 - .../static/chunks/162-f2925685093720a4.js | 1 + ...782e3848de3.js => 172-25e8f67ccf021150.js} | 2 +- .../static/chunks/247-7557228b7131016b.js | 12 + .../static/chunks/487-79ed94231812dae7.js | 4 + .../static/chunks/760-4dbc0194adfbea2a.js | 12 - .../static/chunks/85-52b9060394399707.js | 1 + .../static/chunks/85-aa9694ed291cdedf.js | 1 - .../static/chunks/866-9e1803a09e9ae8da.js | 2 +- .../static/chunks/90-d2b5ed6f7f6e342e.js | 4 - .../chunks/app/layout-25a743106e1c9456.js | 1 - .../chunks/app/layout-f4acf18888f0aa20.js | 1 + ...ea2a6c311e.js => page-72c8a8dbd0d3984f.js} | 2 +- ...a42ba475f3.js => page-10c235fc18df224f.js} | 2 +- .../app/onboarding/page-6b5d568180da3ccd.js | 1 + .../app/onboarding/page-94ef2a34b1440aa2.js | 1 - .../chunks/app/page-c64580821d04b2c5.js | 1 + .../chunks/app/page-e71feaa99a0e3050.js | 1 - ...80647d.js => main-app-4f7318ae681a6d94.js} | 2 +- .../out/_next/static/css/3c0e0d4261b19d44.css | 3 - .../out/_next/static/css/c8d591a6ccd18f71.css | 3 + .../out/assets/logos/gradientai.svg | 229 ------------------ ui/litellm-dashboard/out/index.html | 2 +- ui/litellm-dashboard/out/index.txt | 4 +- ui/litellm-dashboard/out/model_hub.html | 2 +- ui/litellm-dashboard/out/model_hub.txt | 4 +- ui/litellm-dashboard/out/model_hub_table.html | 2 +- ui/litellm-dashboard/out/model_hub_table.txt | 4 +- ui/litellm-dashboard/out/onboarding.html | 2 +- ui/litellm-dashboard/out/onboarding.txt | 4 +- 71 files changed, 156 insertions(+), 386 deletions(-) rename litellm/proxy/_experimental/out/_next/static/{zvEphJL9GILaCMSn4AXPU => ILJ2l6ZzNB2f7RRsIZVJI}/_buildManifest.js (100%) rename litellm/proxy/_experimental/out/_next/static/{zvEphJL9GILaCMSn4AXPU => ILJ2l6ZzNB2f7RRsIZVJI}/_ssgManifest.js (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/154-7bf3bbb913e68f71.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/154-ff9562264ad409e1.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/162-741f64e7b75eb970.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/162-f2925685093720a4.js rename litellm/proxy/_experimental/out/_next/static/chunks/{172-2755b782e3848de3.js => 172-25e8f67ccf021150.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/247-7557228b7131016b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/487-79ed94231812dae7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/760-4dbc0194adfbea2a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/85-52b9060394399707.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/85-aa9694ed291cdedf.js rename ui/litellm-dashboard/out/_next/static/chunks/866-3523e0e07cf314f6.js => litellm/proxy/_experimental/out/_next/static/chunks/866-9e1803a09e9ae8da.js (99%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/90-d2b5ed6f7f6e342e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/app/layout-25a743106e1c9456.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/app/layout-f4acf18888f0aa20.js rename litellm/proxy/_experimental/out/_next/static/chunks/app/model_hub/{page-8fa4c9ea2a6c311e.js => page-72c8a8dbd0d3984f.js} (50%) rename litellm/proxy/_experimental/out/_next/static/chunks/app/model_hub_table/{page-41ea0aa42ba475f3.js => page-10c235fc18df224f.js} (57%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/app/onboarding/page-6b5d568180da3ccd.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/app/onboarding/page-94ef2a34b1440aa2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/app/page-c64580821d04b2c5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/app/page-e71feaa99a0e3050.js rename litellm/proxy/_experimental/out/_next/static/chunks/{main-app-475d6efe4080647d.js => main-app-4f7318ae681a6d94.js} (54%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/css/3c0e0d4261b19d44.css create mode 100644 litellm/proxy/_experimental/out/_next/static/css/c8d591a6ccd18f71.css delete mode 100644 litellm/proxy/_experimental/out/model_hub_table.html create mode 100644 litellm/proxy/_experimental/out/model_hub_table/index.html delete mode 100644 litellm/proxy/_experimental/out/onboarding.html rename ui/litellm-dashboard/out/_next/static/{zvEphJL9GILaCMSn4AXPU => ILJ2l6ZzNB2f7RRsIZVJI}/_buildManifest.js (100%) rename ui/litellm-dashboard/out/_next/static/{zvEphJL9GILaCMSn4AXPU => ILJ2l6ZzNB2f7RRsIZVJI}/_ssgManifest.js (100%) create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/154-7bf3bbb913e68f71.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/154-ff9562264ad409e1.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/162-741f64e7b75eb970.js create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/162-f2925685093720a4.js rename ui/litellm-dashboard/out/_next/static/chunks/{172-2755b782e3848de3.js => 172-25e8f67ccf021150.js} (99%) create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/247-7557228b7131016b.js create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/487-79ed94231812dae7.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/760-4dbc0194adfbea2a.js create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/85-52b9060394399707.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/85-aa9694ed291cdedf.js rename litellm/proxy/_experimental/out/_next/static/chunks/866-3523e0e07cf314f6.js => ui/litellm-dashboard/out/_next/static/chunks/866-9e1803a09e9ae8da.js (99%) delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/90-d2b5ed6f7f6e342e.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/app/layout-25a743106e1c9456.js create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/app/layout-f4acf18888f0aa20.js rename ui/litellm-dashboard/out/_next/static/chunks/app/model_hub/{page-8fa4c9ea2a6c311e.js => page-72c8a8dbd0d3984f.js} (50%) rename ui/litellm-dashboard/out/_next/static/chunks/app/model_hub_table/{page-41ea0aa42ba475f3.js => page-10c235fc18df224f.js} (57%) create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/app/onboarding/page-6b5d568180da3ccd.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/app/onboarding/page-94ef2a34b1440aa2.js create mode 100644 ui/litellm-dashboard/out/_next/static/chunks/app/page-c64580821d04b2c5.js delete mode 100644 ui/litellm-dashboard/out/_next/static/chunks/app/page-e71feaa99a0e3050.js rename ui/litellm-dashboard/out/_next/static/chunks/{main-app-475d6efe4080647d.js => main-app-4f7318ae681a6d94.js} (54%) delete mode 100644 ui/litellm-dashboard/out/_next/static/css/3c0e0d4261b19d44.css create mode 100644 ui/litellm-dashboard/out/_next/static/css/c8d591a6ccd18f71.css delete mode 100644 ui/litellm-dashboard/out/assets/logos/gradientai.svg diff --git a/litellm/litellm_core_utils/health_check_helpers.py b/litellm/litellm_core_utils/health_check_helpers.py index 7a2c005e8f..2f41247993 100644 --- a/litellm/litellm_core_utils/health_check_helpers.py +++ b/litellm/litellm_core_utils/health_check_helpers.py @@ -1,12 +1,13 @@ - """ Helper functions for health check calls. """ + from typing import TYPE_CHECKING if TYPE_CHECKING: from litellm.litellm_core_utils.litellm_logging import Logging + class HealthCheckHelpers: @staticmethod @@ -38,10 +39,9 @@ class HealthCheckHelpers: model_params["model"] = cheapest_models[0] model_params["litellm_logging_obj"] = litellm_logging_obj model_params["fallbacks"] = fallback_models - model_params["max_tokens"] = 1 + model_params["max_tokens"] = 10 # gpt-5-nano throws errors for max_tokens=1 await acompletion(**model_params) return {} - @staticmethod def _update_model_params_with_health_check_tracking_information( @@ -57,6 +57,7 @@ class HealthCheckHelpers: """ from litellm.proxy._types import UserAPIKeyAuth from litellm.proxy.litellm_pre_call_utils import LiteLLMProxyRequestSetup + _metadata_variable_name = "litellm_metadata" litellm_metadata = HealthCheckHelpers._get_metadata_for_health_check_call() model_params[_metadata_variable_name] = litellm_metadata @@ -66,13 +67,14 @@ class HealthCheckHelpers: _metadata_variable_name=_metadata_variable_name, ) return model_params - + @staticmethod def _get_metadata_for_health_check_call(): """ Returns the metadata for the health check call. """ from litellm.constants import LITTELM_INTERNAL_HEALTH_SERVICE_ACCOUNT_NAME + return { "tags": [LITTELM_INTERNAL_HEALTH_SERVICE_ACCOUNT_NAME], - } \ No newline at end of file + } diff --git a/litellm/proxy/_experimental/out/_next/static/zvEphJL9GILaCMSn4AXPU/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/ILJ2l6ZzNB2f7RRsIZVJI/_buildManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/zvEphJL9GILaCMSn4AXPU/_buildManifest.js rename to litellm/proxy/_experimental/out/_next/static/ILJ2l6ZzNB2f7RRsIZVJI/_buildManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/zvEphJL9GILaCMSn4AXPU/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/ILJ2l6ZzNB2f7RRsIZVJI/_ssgManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/zvEphJL9GILaCMSn4AXPU/_ssgManifest.js rename to litellm/proxy/_experimental/out/_next/static/ILJ2l6ZzNB2f7RRsIZVJI/_ssgManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/154-7bf3bbb913e68f71.js b/litellm/proxy/_experimental/out/_next/static/chunks/154-7bf3bbb913e68f71.js new file mode 100644 index 0000000000..da2cab320b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/154-7bf3bbb913e68f71.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[154],{31283:function(e,t,o){o.d(t,{o:function(){return a.Z}});var a=o(49566)},63610:function(e,t,o){o.d(t,{d:function(){return u}});var a=o(57437),r=o(2265),n=o(64482),c=o(52787),s=o(20577),l=o(13634),i=o(31283),d=o(15424),p=o(89970),h=o(19250);let u=["metadata","config","enforced_params","aliases"],w=(e,t)=>u.includes(e)||"json"===t.format,g=e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch(e){return!1}},f=(e,t,o)=>{let a={max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"}[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[o]||"Text input";return w(e,t)?"".concat(a,"\nMust be valid JSON format"):t.enum?"Select from available options\nAllowed values: ".concat(t.enum.join(", ")):a};t.Z=e=>{let{schemaComponent:t,excludedFields:o=[],form:u,overrideLabels:m={},overrideTooltips:y={},customValidation:k={},defaultValues:C={}}=e,[_,T]=(0,r.useState)(null),[E,j]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{try{let e=(await (0,h.getOpenAPISchema)()).components.schemas[t];if(!e)throw Error('Schema component "'.concat(t,'" not found'));T(e);let a={};Object.keys(e.properties).filter(e=>!o.includes(e)&&void 0!==C[e]).forEach(e=>{a[e]=C[e]}),u.setFieldsValue(a)}catch(e){console.error("Schema fetch error:",e),j(e instanceof Error?e.message:"Failed to fetch schema")}})()},[t,u,o]);let S=e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"},v=(e,t)=>{var o;let r;let h=S(t),u=null==_?void 0:null===(o=_.required)||void 0===o?void 0:o.includes(e),T=m[e]||t.title||e,E=y[e]||t.description,j=[];u&&j.push({required:!0,message:"".concat(T," is required")}),k[e]&&j.push({validator:k[e]}),w(e,t)&&j.push({validator:async(e,t)=>{if(t&&!g(t))throw Error("Please enter valid JSON")}});let v=E?(0,a.jsxs)("span",{children:[T," ",(0,a.jsx)(p.Z,{title:E,children:(0,a.jsx)(d.Z,{style:{marginLeft:"4px"}})})]}):T;return r=w(e,t)?(0,a.jsx)(n.default.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,a.jsx)(c.default,{children:t.enum.map(e=>(0,a.jsx)(c.default.Option,{value:e,children:e},e))}):"number"===h||"integer"===h?(0,a.jsx)(s.Z,{style:{width:"100%"},precision:"integer"===h?0:void 0}):"duration"===e?(0,a.jsx)(i.o,{placeholder:"eg: 30s, 30h, 30d"}):(0,a.jsx)(i.o,{placeholder:E||""}),(0,a.jsx)(l.Z.Item,{label:v,name:e,className:"mt-8",rules:j,initialValue:C[e],help:(0,a.jsx)("div",{className:"text-xs text-gray-500",children:f(e,t,h)}),children:r},e)};return E?(0,a.jsxs)("div",{className:"text-red-500",children:["Error: ",E]}):(null==_?void 0:_.properties)?(0,a.jsx)("div",{children:Object.entries(_.properties).filter(e=>{let[t]=e;return!o.includes(t)}).map(e=>{let[t,o]=e;return v(t,o)})}):null}},19250:function(e,t,o){o.r(t),o.d(t,{DEFAULT_ORGANIZATION:function(){return h},PredictedSpendLogsCall:function(){return tn},addAllowedIP:function(){return ew},adminGlobalActivity:function(){return eG},adminGlobalActivityExceptions:function(){return eA},adminGlobalActivityExceptionsPerDeployment:function(){return eR},adminGlobalActivityPerModel:function(){return eU},adminGlobalCacheActivity:function(){return eJ},adminSpendLogsCall:function(){return ex},adminTopEndUsersCall:function(){return eO},adminTopKeysCall:function(){return eP},adminTopModelsCall:function(){return eI},adminspendByProvider:function(){return eB},alertingSettingsCall:function(){return J},allEndUsersCall:function(){return ev},allTagNamesCall:function(){return eS},availableTeamListCall:function(){return Z},budgetCreateCall:function(){return P},budgetDeleteCall:function(){return x},budgetUpdateCall:function(){return O},cachingHealthCheckCall:function(){return tT},callMCPTool:function(){return tV},cancelModelCostMapReload:function(){return S},claimOnboardingToken:function(){return en},convertPromptFileToJson:function(){return tO},createGuardrailCall:function(){return tG},createMCPServer:function(){return tM},createPassThroughEndpoint:function(){return tg},createPromptCall:function(){return tF},credentialCreateCall:function(){return eQ},credentialDeleteCall:function(){return e0},credentialGetCall:function(){return e$},credentialListCall:function(){return eX},credentialUpdateCall:function(){return e1},defaultProxyBaseUrl:function(){return c},deleteAllowedIP:function(){return eg},deleteCallback:function(){return od},deleteConfigFieldSetting:function(){return tm},deleteGuardrailCall:function(){return t8},deleteMCPServer:function(){return tz},deletePassThroughEndpointsCall:function(){return ty},deletePromptCall:function(){return tP},fetchMCPAccessGroups:function(){return tI},fetchMCPServers:function(){return tR},formatDate:function(){return n},getAllowedIPs:function(){return eu},getBudgetList:function(){return tl},getBudgetSettings:function(){return ti},getCallbacksCall:function(){return td},getConfigFieldSetting:function(){return tu},getDefaultTeamSettings:function(){return tK},getEmailEventSettings:function(){return t6},getGeneralSettingsCall:function(){return tp},getGuardrailInfo:function(){return oo},getGuardrailProviderSpecificParams:function(){return ot},getGuardrailUISettings:function(){return oe},getGuardrailsList:function(){return tv},getInternalUserSettings:function(){return tU},getModelCostMapReloadStatus:function(){return v},getOnboardingCredentials:function(){return er},getOpenAPISchema:function(){return _},getPassThroughEndpointInfo:function(){return oi},getPassThroughEndpointsCall:function(){return th},getPossibleUserRoles:function(){return eW},getPromptInfo:function(){return tN},getPromptsList:function(){return tb},getProxyBaseUrl:function(){return d},getProxyUISettings:function(){return tS},getPublicModelHubInfo:function(){return C},getRemainingUsers:function(){return os},getSSOSettings:function(){return or},getTeamPermissionsCall:function(){return tX},getTotalSpendCall:function(){return ea},getUiConfig:function(){return k},healthCheckCall:function(){return tC},healthCheckHistoryCall:function(){return tE},individualModelHealthCheckCall:function(){return t_},invitationClaimCall:function(){return G},invitationCreateCall:function(){return B},keyCreateCall:function(){return A},keyCreateServiceAccountCall:function(){return U},keyDeleteCall:function(){return I},keyInfoCall:function(){return eM},keyInfoV1Call:function(){return ez},keyListCall:function(){return eD},keySpendLogsCall:function(){return eT},keyUpdateCall:function(){return e2},latestHealthChecksCall:function(){return tj},listMCPTools:function(){return tD},makeModelGroupPublic:function(){return y},mcpToolsCall:function(){return op},modelAvailableCall:function(){return e_},modelCostMap:function(){return T},modelCreateCall:function(){return b},modelDeleteCall:function(){return F},modelExceptionsCall:function(){return ek},modelHubCall:function(){return eh},modelHubPublicModelsCall:function(){return ep},modelInfoCall:function(){return ei},modelInfoV1Call:function(){return ed},modelMetricsCall:function(){return ef},modelMetricsSlowResponsesCall:function(){return ey},modelPatchUpdateCall:function(){return e4},modelSettingsCall:function(){return N},modelUpdateCall:function(){return e5},organizationCreateCall:function(){return K},organizationDeleteCall:function(){return X},organizationInfoCall:function(){return W},organizationListCall:function(){return Y},organizationMemberAddCall:function(){return te},organizationMemberDeleteCall:function(){return tt},organizationMemberUpdateCall:function(){return to},organizationUpdateCall:function(){return Q},patchPromptCall:function(){return tB},perUserAnalyticsCall:function(){return o_},proxyBaseUrl:function(){return l},regenerateKeyCall:function(){return ec},reloadModelCostMap:function(){return E},resetEmailEventSettings:function(){return t9},scheduleModelCostMapReload:function(){return j},serverRootPath:function(){return s},serviceHealthCheck:function(){return ts},sessionSpendLogsCall:function(){return t0},setCallbacksCall:function(){return tk},setGlobalLitellmHeaderName:function(){return m},slackBudgetAlertsHealthCheck:function(){return tc},spendUsersCall:function(){return eV},streamingModelMetricsCall:function(){return em},tagCreateCall:function(){return tq},tagDailyActivityCall:function(){return et},tagDauCall:function(){return of},tagDeleteCall:function(){return tW},tagDistinctCall:function(){return ok},tagInfoCall:function(){return tZ},tagListCall:function(){return tY},tagMauCall:function(){return oy},tagUpdateCall:function(){return tH},tagWauCall:function(){return om},tagsSpendLogsCall:function(){return ej},teamBulkMemberAddCall:function(){return e7},teamCreateCall:function(){return eK},teamDailyActivityCall:function(){return eo},teamDeleteCall:function(){return L},teamInfoCall:function(){return V},teamListCall:function(){return H},teamMemberAddCall:function(){return e6},teamMemberDeleteCall:function(){return e8},teamMemberUpdateCall:function(){return e9},teamPermissionsUpdateCall:function(){return t$},teamSpendLogsCall:function(){return eE},teamUpdateCall:function(){return e3},testConnectionRequest:function(){return eL},testMCPConnectionRequest:function(){return oh},testMCPToolsListRequest:function(){return ou},transformRequestCall:function(){return $},uiAuditLogsCall:function(){return oc},uiSpendLogDetailsCall:function(){return tJ},uiSpendLogsCall:function(){return eF},updateConfigFieldSetting:function(){return tf},updateDefaultTeamSettings:function(){return tQ},updateEmailEventSettings:function(){return t7},updateGuardrailCall:function(){return oa},updateInternalUserSettings:function(){return tA},updateMCPServer:function(){return tL},updatePassThroughEndpoint:function(){return ol},updatePassThroughFieldSetting:function(){return tw},updatePromptCall:function(){return tx},updateSSOSettings:function(){return on},updateUsefulLinksCall:function(){return eC},userAgentAnalyticsCall:function(){return og},userAgentSummaryCall:function(){return oC},userBulkUpdateUserCall:function(){return tr},userCreateCall:function(){return R},userDailyActivityAggregatedCall:function(){return eZ},userDailyActivityCall:function(){return ee},userDeleteCall:function(){return M},userFilterUICall:function(){return eb},userGetAllUsersCall:function(){return eY},userGetRequesedtModelsCall:function(){return eH},userInfoCall:function(){return D},userListCall:function(){return z},userRequestModelCall:function(){return eq},userSpendLogsCall:function(){return eN},userUpdateUserCall:function(){return ta},v2TeamListCall:function(){return q},vectorStoreCreateCall:function(){return t1},vectorStoreDeleteCall:function(){return t3},vectorStoreInfoCall:function(){return t4},vectorStoreListCall:function(){return t2},vectorStoreSearchCall:function(){return ow},vectorStoreUpdateCall:function(){return t5}});var a=o(42264),r=o(63610);let n=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)},c=null,s="/",l=null;console.log=function(){};let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=window.location.origin,a=t||o;console.log("proxyBaseUrl:",l),console.log("serverRootPath:",e),e.length>0&&!a.endsWith(e)&&"/"!=e&&(a+=e,l=a),console.log("Updated proxyBaseUrl:",l)},d=()=>l||window.location.origin,p={GET:"GET",DELETE:"DELETE"},h="default_organization",u=0,w=async e=>{let t=Date.now();t-u>6e4?(e.includes("Authentication Error - Expired Key")&&(a.ZP.info("UI Session Expired. Logging out."),u=t,document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.href=window.location.pathname),u=t):console.log("Error suppressed to prevent spam:",e)},g="Authorization",f="x-mcp-auth";function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Authorization";console.log("setGlobalLitellmHeaderName: ".concat(e)),g=e}let y=async(e,t)=>{let o=l?"".concat(l,"/model_group/make_public"):"/model_group/make_public";return(await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},k=async()=>{console.log("Getting UI config");let e=await fetch(c?"".concat(c,"/litellm/.well-known/litellm-ui-config"):"/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),i(t.server_root_path,t.proxy_base_url),t},C=async()=>{let e=await fetch(c?"".concat(c,"/public/model_hub/info"):"/public/model_hub/info");return await e.json()},_=async()=>{let e=l?"".concat(l,"/openapi.json"):"/openapi.json",t=await fetch(e);return await t.json()},T=async e=>{try{let t=l?"".concat(l,"/get/litellm_model_cost_map"):"/get/litellm_model_cost_map",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("received litellm model cost data: ".concat(a)),a}catch(e){throw console.error("Failed to get model cost map:",e),e}},E=async e=>{try{let t=l?"".concat(l,"/reload/model_cost_map"):"/reload/model_cost_map",o=await fetch(t,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("Model cost map reload response: ".concat(a)),a}catch(e){throw console.error("Failed to reload model cost map:",e),e}},j=async(e,t)=>{try{let o=l?"".concat(l,"/schedule/model_cost_map_reload?hours=").concat(t):"/schedule/model_cost_map_reload?hours=".concat(t),a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}}),r=await a.json();return console.log("Schedule model cost map reload response: ".concat(r)),r}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},S=async e=>{try{let t=l?"".concat(l,"/schedule/model_cost_map_reload"):"/schedule/model_cost_map_reload",o=await fetch(t,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("Cancel model cost map reload response: ".concat(a)),a}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},v=async e=>{try{let t=l?"".concat(l,"/schedule/model_cost_map_reload/status"):"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){console.error("Status request failed with status: ".concat(o.status));let e=await o.text();throw console.error("Error response:",e),Error("HTTP ".concat(o.status,": ").concat(e))}let a=await o.json();return console.log("Model cost map reload status:",a),a}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},b=async(e,t)=>{try{let o=l?"".concat(l,"/model/new"):"/model/new",r=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text()||"Network response was not ok";throw a.ZP.error(e),Error(e)}let n=await r.json();return console.log("API Response:",n),a.ZP.destroy(),a.ZP.success("Model ".concat(t.model_name," created successfully"),2),n}catch(e){throw console.error("Failed to create key:",e),e}},N=async e=>{try{let t=l?"".concat(l,"/model/settings"):"/model/settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){console.error("Failed to get model settings:",e)}},F=async(e,t)=>{console.log("model_id in model delete call: ".concat(t));try{let o=l?"".concat(l,"/model/delete"):"/model/delete",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},x=async(e,t)=>{if(console.log("budget_id in budget delete call: ".concat(t)),null!=e)try{let o=l?"".concat(l,"/budget/delete"):"/budget/delete",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},P=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let o=l?"".concat(l,"/budget/new"):"/budget/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},O=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let o=l?"".concat(l,"/budget/update"):"/budget/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},B=async(e,t)=>{try{let o=l?"".concat(l,"/invitation/new"):"/invitation/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let o=l?"".concat(l,"/invitation/claim"):"/invitation/claim",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},J=async e=>{try{let t=l?"".concat(l,"/alerting/settings"):"/alerting/settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},U=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),r.d))if(t[e]){console.log("formValues.".concat(e,":"),t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",t);let o=l?"".concat(l,"/key/service-account/generate"):"/key/service-account/generate",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let n=await a.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},A=async(e,t,o)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),r.d))if(o[e]){console.log("formValues.".concat(e,":"),o[e]);try{o[e]=JSON.parse(o[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",o);let a=l?"".concat(l,"/key/generate"):"/key/generate",n=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!n.ok){let e=await n.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},R=async(e,t,o)=>{try{if(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),o.auto_create_key=!1,o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",o);let a=l?"".concat(l,"/user/new"):"/user/new",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},I=async(e,t)=>{try{let o=l?"".concat(l,"/key/delete"):"/key/delete";console.log("in keyDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},M=async(e,t)=>{try{let o=l?"".concat(l,"/user/delete"):"/user/delete";console.log("in userDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete user(s):",e),e}},L=async(e,t)=>{try{let o=l?"".concat(l,"/team/delete"):"/team/delete";console.log("in teamDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},z=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let p=l?"".concat(l,"/user/list"):"/user/list";console.log("in userListCall");let h=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");h.append("user_ids",e)}o&&h.append("page",o.toString()),a&&h.append("page_size",a.toString()),r&&h.append("user_email",r),n&&h.append("role",n),c&&h.append("team",c),s&&h.append("sso_user_ids",s),i&&h.append("sort_by",i),d&&h.append("sort_order",d);let u=h.toString();u&&(p+="?".concat(u));let f=await fetch(p,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw w(e),Error("Network response was not ok")}let m=await f.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},D=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0,n=arguments.length>5?arguments[5]:void 0,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];console.log("userInfoCall: ".concat(t,", ").concat(o,", ").concat(a,", ").concat(r,", ").concat(n,", ").concat(c));try{let s;if(a){s=l?"".concat(l,"/user/list"):"/user/list";let e=new URLSearchParams;null!=r&&e.append("page",r.toString()),null!=n&&e.append("page_size",n.toString()),s+="?".concat(e.toString())}else s=l?"".concat(l,"/user/info"):"/user/info",("Admin"!==o&&"Admin Viewer"!==o||c)&&t&&(s+="?user_id=".concat(t));console.log("Requesting user data from:",s);let i=await fetch(s,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}let d=await i.json();return console.log("API Response:",d),d}catch(e){throw console.error("Failed to fetch user data:",e),e}},V=async(e,t)=>{try{let o=l?"".concat(l,"/team/info"):"/team/info";t&&(o="".concat(o,"?team_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},q=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6],arguments.length>7&&void 0!==arguments[7]&&arguments[7],arguments.length>8&&void 0!==arguments[8]&&arguments[8];try{let n=l?"".concat(l,"/v2/team/list"):"/v2/team/list";console.log("in teamInfoCall");let c=new URLSearchParams;o&&c.append("user_id",o.toString()),t&&c.append("organization_id",t.toString()),a&&c.append("team_id",a.toString()),r&&c.append("team_alias",r.toString());let s=c.toString();s&&(n+="?".concat(s));let i=await fetch(n,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}let d=await i.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},H=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=l?"".concat(l,"/team/list"):"/team/list";console.log("in teamInfoCall");let c=new URLSearchParams;o&&c.append("user_id",o.toString()),t&&c.append("organization_id",t.toString()),a&&c.append("team_id",a.toString()),r&&c.append("team_alias",r.toString());let s=c.toString();s&&(n+="?".concat(s));let i=await fetch(n,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}let d=await i.json();return console.log("/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},Z=async e=>{try{let t=l?"".concat(l,"/team/available"):"/team/available";console.log("in availableTeamListCall");let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("/team/available_teams API Response:",a),a}catch(e){throw e}},Y=async e=>{try{let t=l?"".concat(l,"/organization/list"):"/organization/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},W=async(e,t)=>{try{let o=l?"".concat(l,"/organization/info"):"/organization/info";t&&(o="".concat(o,"?organization_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let o=l?"".concat(l,"/organization/new"):"/organization/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let o=l?"".concat(l,"/organization/update"):"/organization/update",a=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update Team Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{let o=l?"".concat(l,"/organization/delete"):"/organization/delete",a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!a.ok){let e=await a.text();throw w(e),Error("Error deleting organization: ".concat(e))}return await a.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},$=async(e,t)=>{try{let o=l?"".concat(l,"/utils/transform_request"):"/utils/transform_request",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},ee=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;try{let r=l?"".concat(l,"/user/daily/activity"):"/user/daily/activity",c=new URLSearchParams;c.append("start_date",n(t)),c.append("end_date",n(o)),c.append("page_size","1000"),c.append("page",a.toString());let s=c.toString();s&&(r+="?".concat(s));let i=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},et=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let c=l?"".concat(l,"/tag/daily/activity"):"/tag/daily/activity",s=new URLSearchParams;s.append("start_date",n(t)),s.append("end_date",n(o)),s.append("page_size","1000"),s.append("page",a.toString()),r&&s.append("tags",r.join(","));let i=s.toString();i&&(c+="?".concat(i));let d=await fetch(c,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.text();throw w(e),Error("Network response was not ok")}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},eo=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let c=l?"".concat(l,"/team/daily/activity"):"/team/daily/activity",s=new URLSearchParams;s.append("start_date",n(t)),s.append("end_date",n(o)),s.append("page_size","1000"),s.append("page",a.toString()),r&&s.append("team_ids",r.join(",")),s.append("exclude_team_ids","litellm-dashboard");let i=s.toString();i&&(c+="?".concat(i));let d=await fetch(c,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.text();throw w(e),Error("Network response was not ok")}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},ea=async e=>{try{let t=l?"".concat(l,"/global/spend"):"/global/spend",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},er=async e=>{try{let t=l?"".concat(l,"/onboarding/get_token"):"/onboarding/get_token";t+="?invite_link=".concat(e);let o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t,o,a)=>{let r=l?"".concat(l,"/onboarding/claim_token"):"/onboarding/claim_token";try{let n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:o,password:a})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to delete key:",e),e}},ec=async(e,t,o)=>{try{let a=l?"".concat(l,"/key/").concat(t,"/regenerate"):"/key/".concat(t,"/regenerate"),r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Regenerate key Response:",n),n}catch(e){throw console.error("Failed to regenerate key:",e),e}},es=!1,el=null,ei=async(e,t,o)=>{try{console.log("modelInfoCall:",e,t,o);let r=l?"".concat(l,"/v2/model/info"):"/v2/model/info",n=new URLSearchParams;n.append("include_team_models","true"),n.toString()&&(r+="?".concat(n.toString()));let c=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw e+="error shown=".concat(es),es||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),a.ZP.info(e,10),es=!0,el&&clearTimeout(el),el=setTimeout(()=>{es=!1},1e4)),Error("Network response was not ok")}let s=await c.json();return console.log("modelInfoCall:",s),s}catch(e){throw console.error("Failed to create key:",e),e}},ed=async(e,t)=>{try{let o=l?"".concat(l,"/v1/model/info"):"/v1/model/info";o+="?litellm_model_id=".concat(t);let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok)throw await a.text(),Error("Network response was not ok");let r=await a.json();return console.log("modelInfoV1Call:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},ep=async()=>{let e=l?"".concat(l,"/public/model_hub"):"/public/model_hub";return(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json()},eh=async e=>{try{let t=l?"".concat(l,"/model_group/info"):"/model_group/info",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log("modelHubCall:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eu=async e=>{try{let t=l?"".concat(l,"/get/allowed_ips"):"/get/allowed_ips",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw Error("Network response was not ok: ".concat(e))}let a=await o.json();return console.log("getAllowedIPs:",a),a.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},ew=async(e,t)=>{try{let o=l?"".concat(l,"/add/allowed_ip"):"/add/allowed_ip",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.text();throw Error("Network response was not ok: ".concat(e))}let r=await a.json();return console.log("addAllowedIP:",r),r}catch(e){throw console.error("Failed to add allowed IP:",e),e}},eg=async(e,t)=>{try{let o=l?"".concat(l,"/delete/allowed_ip"):"/delete/allowed_ip",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.text();throw Error("Network response was not ok: ".concat(e))}let r=await a.json();return console.log("deleteAllowedIP:",r),r}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},ef=async(e,t,o,a,r,n,c,s)=>{try{let t=l?"".concat(l,"/model/metrics"):"/model/metrics";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(c,"&customer=").concat(s));let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/model/streaming_metrics"):"/model/streaming_metrics";t&&(r="".concat(r,"?_selected_model_group=").concat(t,"&startTime=").concat(o,"&endTime=").concat(a));let n=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ey=async(e,t,o,a,r,n,c,s)=>{try{let t=l?"".concat(l,"/model/metrics/slow_responses"):"/model/metrics/slow_responses";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(c,"&customer=").concat(s));let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ek=async(e,t,o,a,r,n,c,s)=>{try{let t=l?"".concat(l,"/model/metrics/exceptions"):"/model/metrics/exceptions";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(c,"&customer=").concat(s));let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eC=async(e,t)=>{try{let o=l?"".concat(l,"/model_hub/update_useful_links"):"/model_hub/update_useful_links",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},e_=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6]);console.log("in /models calls, globalLitellmHeaderName",g);try{let t=l?"".concat(l,"/models"):"/models",o=new URLSearchParams;o.append("include_model_access_groups","True"),!0===a&&o.append("return_wildcard_routes","True"),!0===n&&o.append("only_model_access_groups","True"),r&&o.append("team_id",r.toString()),o.toString()&&(t+="?".concat(o.toString()));let c=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}return await c.json()}catch(e){throw console.error("Failed to create key:",e),e}},eT=async(e,t)=>{try{let o=l?"".concat(l,"/global/spend/logs"):"/global/spend/logs";console.log("in keySpendLogsCall:",o);let a=await fetch("".concat(o,"?api_key=").concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eE=async e=>{try{let t=l?"".concat(l,"/global/spend/teams"):"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let o=await fetch("".concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/spend/tags"):"/global/spend/tags";t&&o&&(r="".concat(r,"?start_date=").concat(t,"&end_date=").concat(o)),a&&(r+="".concat(r,"&tags=").concat(a.join(","))),console.log("in tagsSpendLogsCall:",r);let n=await fetch("".concat(r),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=l?"".concat(l,"/global/spend/all_tag_names"):"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},ev=async e=>{try{let t=l?"".concat(l,"/global/all_end_users"):"/global/all_end_users";console.log("in global/all_end_users call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eb=async(e,t)=>{try{let o=l?"".concat(l,"/user/filter/ui"):"/user/filter/ui";t.get("user_email")&&(o+="?user_email=".concat(t.get("user_email"))),t.get("user_id")&&(o+="?user_id=".concat(t.get("user_id")));let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eN=async(e,t,o,a,r,n)=>{try{console.log("user role in spend logs call: ".concat(o));let t=l?"".concat(l,"/spend/logs"):"/spend/logs";t="App Owner"==o?"".concat(t,"?user_id=").concat(a,"&start_date=").concat(r,"&end_date=").concat(n):"".concat(t,"?start_date=").concat(r,"&end_date=").concat(n);let c=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t,o,a,r,n,c,s,i,d,p,h)=>{try{let u=l?"".concat(l,"/spend/logs/ui"):"/spend/logs/ui",f=new URLSearchParams;t&&f.append("api_key",t),o&&f.append("team_id",o),a&&f.append("request_id",a),r&&f.append("start_date",r),n&&f.append("end_date",n),c&&f.append("page",c.toString()),s&&f.append("page_size",s.toString()),i&&f.append("user_id",i),d&&f.append("end_user",d),p&&f.append("status_filter",p),h&&f.append("model",h);let m=f.toString();m&&(u+="?".concat(m));let y=await fetch(u,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!y.ok){let e=await y.text();throw w(e),Error("Network response was not ok")}let k=await y.json();return console.log("Spend Logs Response:",k),k}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},ex=async e=>{try{let t=l?"".concat(l,"/global/spend/logs"):"/global/spend/logs",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eP=async e=>{try{let t=l?"".concat(l,"/global/spend/keys?limit=5"):"/global/spend/keys?limit=5",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eO=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/spend/end_users"):"/global/spend/end_users",n="";n=t?JSON.stringify({api_key:t,startTime:o,endTime:a}):JSON.stringify({startTime:o,endTime:a});let c={method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:n},s=await fetch(r,c);if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}let i=await s.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eB=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/spend/provider"):"/global/spend/provider";o&&a&&(r+="?start_date=".concat(o,"&end_date=").concat(a)),t&&(r+="&api_key=".concat(t));let n={method:"GET",headers:{[g]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eG=async(e,t,o)=>{try{let a=l?"".concat(l,"/global/activity"):"/global/activity";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[g]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eJ=async(e,t,o)=>{try{let a=l?"".concat(l,"/global/activity/cache_hits"):"/global/activity/cache_hits";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[g]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eU=async(e,t,o)=>{try{let a=l?"".concat(l,"/global/activity/model"):"/global/activity/model";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[g]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eA=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/activity/exceptions"):"/global/activity/exceptions";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[g]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eR=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/activity/exceptions/deployment"):"/global/activity/exceptions/deployment";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[g]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eI=async e=>{try{let t=l?"".concat(l,"/global/spend/models?limit=5"):"/global/spend/models?limit=5",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eM=async(e,t)=>{try{let o=l?"".concat(l,"/v2/key/info"):"/v2/key/info",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!a.ok){let e=await a.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let r=l?"".concat(l,"/health/test_connection"):"/health/test_connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[g]:"Bearer ".concat(e)},body:JSON.stringify({litellm_params:t,mode:o})}),c=n.headers.get("content-type");if(!c||!c.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(n.status,": ").concat(n.statusText,"). Check network tab for details."))}let s=await n.json();if(!n.ok||"error"===s.status){if("error"===s.status);else{var a;return{status:"error",message:(null===(a=s.error)||void 0===a?void 0:a.message)||"Connection test failed: ".concat(n.status," ").concat(n.statusText)}}}return s}catch(e){throw console.error("Model connection test error:",e),e}},ez=async(e,t)=>{try{console.log("entering keyInfoV1Call");let o=l?"".concat(l,"/key/info"):"/key/info";o="".concat(o,"?key=").concat(t);let r=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(console.log("response",r),!r.ok){let e=await r.text();w(e),a.ZP.error("Failed to fetch key info - "+e)}let n=await r.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},eD=async function(e,t,o,a,r,n,c,s){let i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let p=l?"".concat(l,"/key/list"):"/key/list";console.log("in keyListCall");let h=new URLSearchParams;o&&h.append("team_id",o.toString()),t&&h.append("organization_id",t.toString()),a&&h.append("key_alias",a),n&&h.append("key_hash",n),r&&h.append("user_id",r.toString()),c&&h.append("page",c.toString()),s&&h.append("size",s.toString()),i&&h.append("sort_by",i),d&&h.append("sort_order",d),h.append("return_full_object","true"),h.append("include_team_keys","true");let u=h.toString();u&&(p+="?".concat(u));let f=await fetch(p,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw w(e),Error("Network response was not ok")}let m=await f.json();return console.log("/team/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},eV=async(e,t)=>{try{let o=l?"".concat(l,"/spend/users"):"/spend/users";console.log("in spendUsersCall:",o);let a=await fetch("".concat(o,"?user_id=").concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get spend for user",e),e}},eq=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/user/request_model"):"/user/request_model",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:o,justification:a})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=l?"".concat(l,"/user/get_requests"):"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to get requested models:",e),e}},eZ=async(e,t,o)=>{try{let a=l?"".concat(l,"/user/daily/activity/aggregated"):"/user/daily/activity/aggregated",r=new URLSearchParams,n=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};r.append("start_date",n(t)),r.append("end_date",n(o));let c=r.toString();c&&(a+="?".concat(c));let s=await fetch(a,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},eY=async(e,t)=>{try{let o=l?"".concat(l,"/user/get_users?role=").concat(t):"/user/get_users?role=".concat(t);console.log("in userGetAllUsersCall:",o);let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get requested models:",e),e}},eW=async e=>{try{let t=l?"".concat(l,"/user/available_roles"):"/user/available_roles",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log("response from user/available_role",a),a}catch(e){throw e}},eK=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=l?"".concat(l,"/team/new"):"/team/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eQ=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=l?"".concat(l,"/credentials"):"/credentials",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eX=async e=>{try{let t=l?"".concat(l,"/credentials"):"/credentials";console.log("in credentialListCall");let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},e$=async(e,t,o)=>{try{let a=l?"".concat(l,"/credentials"):"/credentials";t?a+="/by_name/".concat(t):o&&(a+="/by_model/".concat(o)),console.log("in credentialListCall");let r=await fetch(a,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e0=async(e,t)=>{try{let o=l?"".concat(l,"/credentials/").concat(t):"/credentials/".concat(t);console.log("in credentialDeleteCall:",t);let a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},e1=async(e,t,o)=>{try{if(console.log("Form Values in credentialUpdateCall:",o),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let a=l?"".concat(l,"/credentials/").concat(t):"/credentials/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let o=l?"".concat(l,"/key/update"):"/key/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update key Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let o=l?"".concat(l,"/team/update"):"/team/update",r=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),a.ZP.error("Failed to update team settings: "+e),Error(e)}let n=await r.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},e4=async(e,t,o)=>{try{console.log("Form Values in modelUpateCall:",t);let a=l?"".concat(l,"/model/").concat(o,"/update"):"/model/".concat(o,"/update"),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update model Response:",n),n}catch(e){throw console.error("Failed to update model:",e),e}},e5=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let o=l?"".concat(l,"/model/update"):"/model/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update model Response:",r),r}catch(e){throw console.error("Failed to update model:",e),e}},e6=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=l?"".concat(l,"/team/member_add"):"/team/member_add",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:o})});if(!n.ok){var a;let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},e7=async(e,t,o,a,r)=>{try{console.log("Bulk add team members:",{teamId:t,members:o,maxBudgetInTeam:a});let c=l?"".concat(l,"/team/bulk_member_add"):"/team/bulk_member_add",s={team_id:t};r?s.all_users=!0:s.members=o,null!=a&&(s.max_budget_in_team=a);let i=await fetch(c,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok){var n;let e=await i.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(n=t.detail)||void 0===n?void 0:n.error)||"Failed to bulk add team members",a=Error(o);throw a.raw=t,a}let d=await i.json();return console.log("Bulk team member add API Response:",d),d}catch(e){throw console.error("Failed to bulk add team members:",e),e}},e9=async(e,t,o)=>{try{console.log("Form Values in teamMemberUpdateCall:",o);let r=l?"".concat(l,"/team/member_update"):"/team/member_update",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,role:o.role,user_id:o.user_id})});if(!n.ok){var a;let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to update team member:",e),e}},e8=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=l?"".concat(l,"/team/member_delete"):"/team/member_delete",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==o.user_email&&{user_email:o.user_email},...void 0!==o.user_id&&{user_id:o.user_id}})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=l?"".concat(l,"/organization/member_add"):"/organization/member_add",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create organization member:",e),e}},tt=async(e,t,o)=>{try{console.log("Form Values in organizationMemberDeleteCall:",o);let a=l?"".concat(l,"/organization/member_delete"):"/organization/member_delete",r=await fetch(a,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to delete organization member:",e),e}},to=async(e,t,o)=>{try{console.log("Form Values in organizationMemberUpdateCall:",o);let a=l?"".concat(l,"/organization/member_update"):"/organization/member_update",r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to update organization member:",e),e}},ta=async(e,t,o)=>{try{console.log("Form Values in userUpdateUserCall:",t);let a=l?"".concat(l,"/user/update"):"/user/update",r={...t};null!==o&&(r.user_role=o),r=JSON.stringify(r);let n=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!n.ok){let e=await n.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},tr=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let r;console.log("Form Values in userUpdateUserCall:",t);let n=l?"".concat(l,"/user/bulk_update"):"/user/bulk_update";if(a)r=JSON.stringify({all_users:!0,user_updates:t});else if(o&&o.length>0){let e=[];for(let a of o)e.push({user_id:a,...t});r=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let c=await fetch(n,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!c.ok){let e=await c.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let s=await c.json();return console.log("API Response:",s),s}catch(e){throw console.error("Failed to create key:",e),e}},tn=async(e,t)=>{try{let o=l?"".concat(l,"/global/predict/spend/logs"):"/global/predict/spend/logs",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},tc=async e=>{try{let t=l?"".concat(l,"/health/services?service=slack_budget_alerts"):"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error(e)}let r=await o.json();return a.ZP.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",r),r}catch(e){throw console.error("Failed to perform health check:",e),e}},ts=async(e,t)=>{try{let o=l?"".concat(l,"/health/services?service=").concat(t):"/health/services?service=".concat(t);console.log("Checking Slack Budget Alerts service health");let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error(e)}return await a.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tl=async e=>{try{let t=l?"".concat(l,"/budget/list"):"/budget/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},ti=async e=>{try{let t=l?"".concat(l,"/budget/settings"):"/budget/settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},td=async(e,t,o)=>{try{let t=l?"".concat(l,"/get/config/callbacks"):"/get/config/callbacks",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tp=async e=>{try{let t=l?"".concat(l,"/config/list?config_type=general_settings"):"/config/list?config_type=general_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},th=async e=>{try{let t=l?"".concat(l,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tu=async(e,t)=>{try{let o=l?"".concat(l,"/config/field/info?field_name=").concat(t):"/config/field/info?field_name=".concat(t),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok)throw await a.text(),Error("Network response was not ok");return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tw=async(e,t,o)=>{try{let r=l?"".concat(l,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return a.ZP.success("Successfully updated value!"),c}catch(e){throw console.error("Failed to set callbacks:",e),e}},tg=async(e,t)=>{try{let o=l?"".concat(l,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tf=async(e,t,o)=>{try{let r=l?"".concat(l,"/config/field/update"):"/config/field/update",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o,config_type:"general_settings"})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return a.ZP.success("Successfully updated value!"),c}catch(e){throw console.error("Failed to set callbacks:",e),e}},tm=async(e,t)=>{try{let o=l?"".concat(l,"/config/field/delete"):"/config/field/delete",r=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return a.ZP.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},ty=async(e,t)=>{try{let o=l?"".concat(l,"/config/pass_through_endpoint?endpoint_id=").concat(t):"/config/pass_through_endpoint".concat(t),a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tk=async(e,t)=>{try{let o=l?"".concat(l,"/config/update"):"/config/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tC=async e=>{try{let t=l?"".concat(l,"/health"):"/health",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to call /health:",e),e}},t_=async(e,t)=>{try{let o=l?"".concat(l,"/health?model=").concat(encodeURIComponent(t)):"/health?model=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw Error(e||"Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to call /health for model ".concat(t,":"),e),e}},tT=async e=>{try{let t=l?"".concat(l,"/cache/ping"):"/cache/ping",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tE=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;try{let n=l?"".concat(l,"/health/history"):"/health/history",c=new URLSearchParams;t&&c.append("model",t),o&&c.append("status_filter",o),c.append("limit",a.toString()),c.append("offset",r.toString()),c.toString()&&(n+="?".concat(c.toString()));let s=await fetch(n,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error(e)}return await s.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tj=async e=>{try{let t=l?"".concat(l,"/health/latest"):"/health/latest",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tS=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",l);let t=l?"".concat(l,"/sso/get/ui_settings"):"/sso/get/ui_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tv=async e=>{try{let t=l?"".concat(l,"/v2/guardrails/list"):"/v2/guardrails/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},tb=async e=>{try{let t=l?"".concat(l,"/prompts/list"):"/prompts/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},tN=async(e,t)=>{try{let o=l?"".concat(l,"/prompts/").concat(t,"/info"):"/prompts/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},tF=async(e,t)=>{try{let o=l?"".concat(l,"/prompts"):"/prompts",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},tx=async(e,t,o)=>{try{let a=l?"".concat(l,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PUT",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},tP=async(e,t)=>{try{let o=l?"".concat(l,"/prompts/").concat(t):"/prompts/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},tO=async(e,t)=>{try{let o=new FormData;o.append("file",t);let a=l?"".concat(l,"/utils/dotprompt_json_converter"):"/utils/dotprompt_json_converter",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e)},body:o});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},tB=async(e,t,o)=>{try{let a=l?"".concat(l,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},tG=async(e,t)=>{try{let o=l?"".concat(l,"/guardrails"):"/guardrails",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!a.ok){let e=await a.text();throw w(e),Error(e)}let r=await a.json();return console.log("Create guardrail response:",r),r}catch(e){throw console.error("Failed to create guardrail:",e),e}},tJ=async(e,t,o)=>{try{let a=l?"".concat(l,"/spend/logs/ui/").concat(t,"?start_date=").concat(encodeURIComponent(o)):"/spend/logs/ui/".concat(t,"?start_date=").concat(encodeURIComponent(o));console.log("Fetching log details from:",a);let r=await fetch(a,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Fetched log details:",n),n}catch(e){throw console.error("Failed to fetch log details:",e),e}},tU=async e=>{try{let t=l?"".concat(l,"/get/internal_user_settings"):"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched SSO settings:",a),a}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},tA=async(e,t)=>{try{let o=l?"".concat(l,"/update/internal_user_settings"):"/update/internal_user_settings";console.log("Updating internal user settings:",t);let r=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.text();throw w(e),Error(e)}let n=await r.json();return console.log("Updated internal user settings:",n),a.ZP.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},tR=async e=>{try{let t=l?"".concat(l,"/v1/mcp/server"):"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let o=await fetch(t,{method:p.GET,headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched MCP servers:",a),a}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},tI=async e=>{try{let t=l?"".concat(l,"/v1/mcp/access_groups"):"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let o=await fetch(t,{method:p.GET,headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched MCP access groups:",a),a.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},tM=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let o=l?"".concat(l,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},tL=async(e,t)=>{try{let o=l?"".concat(l,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"PUT",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},tz=async(e,t)=>{try{let o=(l?"".concat(l):"")+"/v1/mcp/server/".concat(t);console.log("in deleteMCPServer:",t);let a=await fetch(o,{method:p.DELETE,headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}}catch(e){throw console.error("Failed to delete key:",e),e}},tD=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/mcp-rest/tools/list?server_id=").concat(t):"/mcp-rest/tools/list?server_id=".concat(t);console.log("Fetching MCP tools from:",r);let n={[g]:"Bearer ".concat(e),"Content-Type":"application/json"};a&&o?n["x-mcp-".concat(a,"-authorization")]=o:o&&(n[f]=o);let c=await fetch(r,{method:"GET",headers:n}),s=await c.json();if(console.log("Fetched MCP tools response:",s),!c.ok){if(s.error&&s.message)throw Error(s.message);throw Error("Failed to fetch MCP tools")}return s}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools"}}},tV=async(e,t,o,a,r)=>{try{let n=l?"".concat(l,"/mcp-rest/tools/call"):"/mcp-rest/tools/call";console.log("Calling MCP tool:",t,"with arguments:",o);let c={[g]:"Bearer ".concat(e),"Content-Type":"application/json"};r?c["x-mcp-".concat(r,"-authorization")]=a:c[f]=a;let s=await fetch(n,{method:"POST",headers:c,body:JSON.stringify({name:t,arguments:o})});if(!s.ok){let e="Network response was not ok",t=null,o=await s.text();try{let a=JSON.parse(o);a.detail?"string"==typeof a.detail?e=a.detail:"object"==typeof a.detail&&(e=a.detail.message||a.detail.error||"An error occurred",t=a.detail):e=a.message||a.error||e}catch(t){console.error("Failed to parse JSON error response:",t),o&&(e=o)}let a=Error(e);throw a.status=s.status,a.statusText=s.statusText,a.details=t,w(e),a}let i=await s.json();return console.log("MCP tool call response:",i),i}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},tq=async(e,t)=>{try{let o=l?"".concat(l,"/tag/new"):"/tag/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await w(e);return}return await a.json()}catch(e){throw console.error("Error creating tag:",e),e}},tH=async(e,t)=>{try{let o=l?"".concat(l,"/tag/update"):"/tag/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await w(e);return}return await a.json()}catch(e){throw console.error("Error updating tag:",e),e}},tZ=async(e,t)=>{try{let o=l?"".concat(l,"/tag/info"):"/tag/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({names:t})});if(!a.ok){let e=await a.text();return await w(e),{}}return await a.json()}catch(e){throw console.error("Error getting tag info:",e),e}},tY=async e=>{try{let t=l?"".concat(l,"/tag/list"):"/tag/list",o=await fetch(t,{method:"GET",headers:{Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.text();return await w(e),{}}return await o.json()}catch(e){throw console.error("Error listing tags:",e),e}},tW=async(e,t)=>{try{let o=l?"".concat(l,"/tag/delete"):"/tag/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({name:t})});if(!a.ok){let e=await a.text();await w(e);return}return await a.json()}catch(e){throw console.error("Error deleting tag:",e),e}},tK=async e=>{try{let t=l?"".concat(l,"/get/default_team_settings"):"/get/default_team_settings";console.log("Fetching default team settings from:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched default team settings:",a),a}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},tQ=async(e,t)=>{try{let o=l?"".concat(l,"/update/default_team_settings"):"/update/default_team_settings";console.log("Updating default team settings:",t);let r=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Updated default team settings:",n),a.ZP.success("Default team settings updated successfully"),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},tX=async(e,t)=>{try{let o=l?"".concat(l,"/team/permissions_list?team_id=").concat(t):"/team/permissions_list?team_id=".concat(t),a=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("Team permissions response:",r),r}catch(e){throw console.error("Failed to get team permissions:",e),e}},t$=async(e,t,o)=>{try{let a=l?"".concat(l,"/team/permissions_update"):"/team/permissions_update",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({team_id:t,team_member_permissions:o})});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Team permissions response:",n),n}catch(e){throw console.error("Failed to update team permissions:",e),e}},t0=async(e,t)=>{try{let o=l?"".concat(l,"/spend/logs/session/ui?session_id=").concat(encodeURIComponent(t)):"/spend/logs/session/ui?session_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},t1=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/new"):"/vector_store/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to create vector store")}return await a.json()}catch(e){throw console.error("Error creating vector store:",e),e}},t2=async function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let t=l?"".concat(l,"/vector_store/list"):"/vector_store/list",o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to list vector stores")}return await o.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},t3=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/delete"):"/vector_store/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to delete vector store")}return await a.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},t4=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/info"):"/vector_store/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to get vector store info")}return await a.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},t5=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/update"):"/vector_store/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to update vector store")}return await a.json()}catch(e){throw console.error("Error updating vector store:",e),e}},t6=async e=>{try{let t=l?"".concat(l,"/email/event_settings"):"/email/event_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to get email event settings")}let a=await o.json();return console.log("Email event settings response:",a),a}catch(e){throw console.error("Failed to get email event settings:",e),e}},t7=async(e,t)=>{try{let o=l?"".concat(l,"/email/event_settings"):"/email/event_settings",a=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Failed to update email event settings")}let r=await a.json();return console.log("Update email event settings response:",r),r}catch(e){throw console.error("Failed to update email event settings:",e),e}},t9=async e=>{try{let t=l?"".concat(l,"/email/event_settings/reset"):"/email/event_settings/reset",o=await fetch(t,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to reset email event settings")}let a=await o.json();return console.log("Reset email event settings response:",a),a}catch(e){throw console.error("Failed to reset email event settings:",e),e}},t8=async(e,t)=>{try{let o=l?"".concat(l,"/guardrails/").concat(t):"/guardrails/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error(e)}let r=await a.json();return console.log("Delete guardrail response:",r),r}catch(e){throw console.error("Failed to delete guardrail:",e),e}},oe=async e=>{try{let t=l?"".concat(l,"/guardrails/ui/add_guardrail_settings"):"/guardrails/ui/add_guardrail_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to get guardrail UI settings")}let a=await o.json();return console.log("Guardrail UI settings response:",a),a}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},ot=async e=>{try{let t=l?"".concat(l,"/guardrails/ui/provider_specific_params"):"/guardrails/ui/provider_specific_params",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to get guardrail provider specific parameters")}let a=await o.json();return console.log("Guardrail provider specific params response:",a),a}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oo=async(e,t)=>{try{let o=l?"".concat(l,"/guardrails/").concat(t,"/info"):"/guardrails/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Failed to get guardrail info")}let r=await a.json();return console.log("Guardrail info response:",r),r}catch(e){throw console.error("Failed to get guardrail info:",e),e}},oa=async(e,t,o)=>{try{let a=l?"".concat(l,"/guardrails/").concat(t):"/guardrails/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Failed to update guardrail")}let n=await r.json();return console.log("Update guardrail response:",n),n}catch(e){throw console.error("Failed to update guardrail:",e),e}},or=async e=>{try{let t=l?"".concat(l,"/get/sso_settings"):"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched SSO configuration:",a),a}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},on=async(e,t)=>{try{let o=l?"".concat(l,"/update/sso_settings"):"/update/sso_settings";console.log("Updating SSO configuration:",t);let a=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("Updated SSO configuration:",r),r}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},oc=async(e,t,o,a,r)=>{try{let t=l?"".concat(l,"/audit"):"/audit",o=new URLSearchParams;a&&o.append("page",a.toString()),r&&o.append("page_size",r.toString());let n=o.toString();n&&(t+="?".concat(n));let c=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}return await c.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},os=async e=>{try{let t=l?"".concat(l,"/user/available_users"):"/user/available_users",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e)}});if(!o.ok){if(404===o.status)return null;let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},ol=async(e,t,o)=>{try{let r=l?"".concat(l,"/config/pass_through_endpoint/").concat(encodeURIComponent(t)):"/config/pass_through_endpoint/".concat(encodeURIComponent(t)),n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return a.ZP.success("Pass through endpoint updated successfully"),c}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},oi=async(e,t)=>{try{let o=l?"".concat(l,"/config/pass_through_endpoint?endpoint_id=").concat(encodeURIComponent(t)):"/config/pass_through_endpoint?endpoint_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=(await a.json()).endpoints;if(!r||0===r.length)throw Error("Pass through endpoint not found");return r[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},od=async(e,t)=>{try{let o=l?"".concat(l,"/config/callback/delete"):"/config/callback/delete",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},op=async e=>{let t=d(),o=await fetch("".concat(t,"/v1/mcp/tools"),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw Error("HTTP error! status: ".concat(o.status));return await o.json()},oh=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let a=l?"".concat(l,"/mcp-rest/test/connection"):"/mcp-rest/test/connection",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",[g]:"Bearer ".concat(e)},body:JSON.stringify(t)}),n=r.headers.get("content-type");if(!n||!n.includes("application/json")){let e=await r.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(r.status,": ").concat(r.statusText,"). Check network tab for details."))}let c=await r.json();if(!r.ok||"error"===c.status){if("error"===c.status);else{var o;return{status:"error",message:(null===(o=c.error)||void 0===o?void 0:o.message)||"MCP connection test failed: ".concat(r.status," ").concat(r.statusText)}}}return c}catch(e){throw console.error("MCP connection test error:",e),e}},ou=async(e,t)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=l?"".concat(l,"/mcp-rest/test/tools/list"):"/mcp-rest/test/tools/list",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[g]:"Bearer ".concat(e)},body:JSON.stringify(t)}),r=a.headers.get("content-type");if(!r||!r.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(a.status,": ").concat(a.statusText,"). Check network tab for details."))}let n=await a.json();if((!a.ok||n.error)&&!n.error)return{tools:[],error:"request_failed",message:n.message||"MCP tools list failed: ".concat(a.status," ").concat(a.statusText)};return n}catch(e){throw console.error("MCP tools list test error:",e),e}},ow=async(e,t,o)=>{try{let a="".concat(d(),"/v1/vector_stores/").concat(t,"/search"),r=await fetch(a,{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({query:o})});if(!r.ok){let e=await r.text();return await w(e),null}return await r.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},og=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,n=arguments.length>5?arguments[5]:void 0;try{let c=l?"".concat(l,"/tag/user-agent/analytics"):"/tag/user-agent/analytics",s=new URLSearchParams,i=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};s.append("start_date",i(t)),s.append("end_date",i(o)),s.append("page",a.toString()),s.append("page_size",r.toString()),n&&s.append("user_agent_filter",n);let d=s.toString();d&&(c+="?".concat(d));let p=await fetch(c,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!p.ok){let e=await p.text();throw w(e),Error("Network response was not ok")}return await p.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},of=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/dau"):"/tag/dau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},om=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/wau"):"/tag/wau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},oy=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/mau"):"/tag/mau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},ok=async e=>{try{let t=l?"".concat(l,"/tag/distinct"):"/tag/distinct",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oC=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/summary"):"/tag/summary",n=new URLSearchParams,c=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};n.append("start_date",c(t)),n.append("end_date",c(o)),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let s=n.toString();s&&(r+="?".concat(s));let i=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}return await i.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},o_=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,a=arguments.length>3?arguments[3]:void 0;try{let r=l?"".concat(l,"/tag/user-agent/per-user-analytics"):"/tag/user-agent/per-user-analytics",n=new URLSearchParams;n.append("page",t.toString()),n.append("page_size",o.toString()),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}}},3914:function(e,t,o){function a(){let e=window.location.hostname,t=["Lax","Strict","None"];["/","/ui"].forEach(o=>{document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,";"),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,";"),t.forEach(t=>{let a="None"===t?" Secure;":"";document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; SameSite=").concat(t,";").concat(a),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,"; SameSite=").concat(t,";").concat(a)})}),console.log("After clearing cookies:",document.cookie)}function r(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));return t?t.split("=")[1]:null}o.d(t,{b:function(){return a},e:function(){return r}})}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/154-ff9562264ad409e1.js b/litellm/proxy/_experimental/out/_next/static/chunks/154-ff9562264ad409e1.js deleted file mode 100644 index 1904510f5c..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/154-ff9562264ad409e1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[154],{31283:function(e,t,o){o.d(t,{o:function(){return a.Z}});var a=o(49566)},63610:function(e,t,o){o.d(t,{d:function(){return u}});var a=o(57437),r=o(2265),n=o(64482),c=o(52787),s=o(20577),l=o(13634),i=o(31283),d=o(15424),p=o(89970),h=o(19250);let u=["metadata","config","enforced_params","aliases"],w=(e,t)=>u.includes(e)||"json"===t.format,g=e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch(e){return!1}},f=(e,t,o)=>{let a={max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"}[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[o]||"Text input";return w(e,t)?"".concat(a,"\nMust be valid JSON format"):t.enum?"Select from available options\nAllowed values: ".concat(t.enum.join(", ")):a};t.Z=e=>{let{schemaComponent:t,excludedFields:o=[],form:u,overrideLabels:m={},overrideTooltips:y={},customValidation:k={},defaultValues:C={}}=e,[_,T]=(0,r.useState)(null),[E,j]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{try{let e=(await (0,h.getOpenAPISchema)()).components.schemas[t];if(!e)throw Error('Schema component "'.concat(t,'" not found'));T(e);let a={};Object.keys(e.properties).filter(e=>!o.includes(e)&&void 0!==C[e]).forEach(e=>{a[e]=C[e]}),u.setFieldsValue(a)}catch(e){console.error("Schema fetch error:",e),j(e instanceof Error?e.message:"Failed to fetch schema")}})()},[t,u,o]);let S=e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"},v=(e,t)=>{var o;let r;let h=S(t),u=null==_?void 0:null===(o=_.required)||void 0===o?void 0:o.includes(e),T=m[e]||t.title||e,E=y[e]||t.description,j=[];u&&j.push({required:!0,message:"".concat(T," is required")}),k[e]&&j.push({validator:k[e]}),w(e,t)&&j.push({validator:async(e,t)=>{if(t&&!g(t))throw Error("Please enter valid JSON")}});let v=E?(0,a.jsxs)("span",{children:[T," ",(0,a.jsx)(p.Z,{title:E,children:(0,a.jsx)(d.Z,{style:{marginLeft:"4px"}})})]}):T;return r=w(e,t)?(0,a.jsx)(n.default.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,a.jsx)(c.default,{children:t.enum.map(e=>(0,a.jsx)(c.default.Option,{value:e,children:e},e))}):"number"===h||"integer"===h?(0,a.jsx)(s.Z,{style:{width:"100%"},precision:"integer"===h?0:void 0}):"duration"===e?(0,a.jsx)(i.o,{placeholder:"eg: 30s, 30h, 30d"}):(0,a.jsx)(i.o,{placeholder:E||""}),(0,a.jsx)(l.Z.Item,{label:v,name:e,className:"mt-8",rules:j,initialValue:C[e],help:(0,a.jsx)("div",{className:"text-xs text-gray-500",children:f(e,t,h)}),children:r},e)};return E?(0,a.jsxs)("div",{className:"text-red-500",children:["Error: ",E]}):(null==_?void 0:_.properties)?(0,a.jsx)("div",{children:Object.entries(_.properties).filter(e=>{let[t]=e;return!o.includes(t)}).map(e=>{let[t,o]=e;return v(t,o)})}):null}},19250:function(e,t,o){o.r(t),o.d(t,{DEFAULT_ORGANIZATION:function(){return h},PredictedSpendLogsCall:function(){return tt},addAllowedIP:function(){return ed},adminGlobalActivity:function(){return ex},adminGlobalActivityExceptions:function(){return eB},adminGlobalActivityExceptionsPerDeployment:function(){return eG},adminGlobalActivityPerModel:function(){return eO},adminGlobalCacheActivity:function(){return eP},adminSpendLogsCall:function(){return ev},adminTopEndUsersCall:function(){return eN},adminTopKeysCall:function(){return eb},adminTopModelsCall:function(){return eJ},adminspendByProvider:function(){return eF},alertingSettingsCall:function(){return P},allEndUsersCall:function(){return eT},allTagNamesCall:function(){return e_},availableTeamListCall:function(){return D},budgetCreateCall:function(){return b},budgetDeleteCall:function(){return v},budgetUpdateCall:function(){return N},cachingHealthCheckCall:function(){return ty},callMCPTool:function(){return tM},claimOnboardingToken:function(){return et},convertPromptFileToJson:function(){return tN},createGuardrailCall:function(){return tx},createMCPServer:function(){return tU},createPassThroughEndpoint:function(){return tp},createPromptCall:function(){return tS},credentialCreateCall:function(){return eZ},credentialDeleteCall:function(){return eK},credentialGetCall:function(){return eW},credentialListCall:function(){return eY},credentialUpdateCall:function(){return eQ},defaultProxyBaseUrl:function(){return c},deleteAllowedIP:function(){return ep},deleteCallback:function(){return oc},deleteConfigFieldSetting:function(){return tu},deleteGuardrailCall:function(){return t5},deleteMCPServer:function(){return tI},deletePassThroughEndpointsCall:function(){return tw},deletePromptCall:function(){return tb},fetchMCPAccessGroups:function(){return tJ},fetchMCPServers:function(){return tG},formatDate:function(){return n},getAllowedIPs:function(){return ei},getBudgetList:function(){return tr},getBudgetSettings:function(){return tn},getCallbacksCall:function(){return tc},getConfigFieldSetting:function(){return ti},getDefaultTeamSettings:function(){return tH},getEmailEventSettings:function(){return t2},getGeneralSettingsCall:function(){return ts},getGuardrailInfo:function(){return t9},getGuardrailProviderSpecificParams:function(){return t7},getGuardrailUISettings:function(){return t6},getGuardrailsList:function(){return tT},getInternalUserSettings:function(){return tO},getOnboardingCredentials:function(){return ee},getOpenAPISchema:function(){return _},getPassThroughEndpointInfo:function(){return on},getPassThroughEndpointsCall:function(){return tl},getPossibleUserRoles:function(){return eq},getPromptInfo:function(){return tj},getPromptsList:function(){return tE},getProxyBaseUrl:function(){return d},getProxyUISettings:function(){return t_},getPublicModelHubInfo:function(){return C},getRemainingUsers:function(){return oa},getSSOSettings:function(){return oe},getTeamPermissionsCall:function(){return tY},getTotalSpendCall:function(){return $},getUiConfig:function(){return k},healthCheckCall:function(){return tf},healthCheckHistoryCall:function(){return tk},individualModelHealthCheckCall:function(){return tm},invitationClaimCall:function(){return x},invitationCreateCall:function(){return F},keyCreateCall:function(){return B},keyCreateServiceAccountCall:function(){return O},keyDeleteCall:function(){return J},keyInfoCall:function(){return eU},keyInfoV1Call:function(){return eI},keyListCall:function(){return eR},keySpendLogsCall:function(){return ey},keyUpdateCall:function(){return eX},latestHealthChecksCall:function(){return tC},listMCPTools:function(){return tR},makeModelGroupPublic:function(){return y},mcpToolsCall:function(){return os},modelAvailableCall:function(){return em},modelCostMap:function(){return T},modelCreateCall:function(){return E},modelDeleteCall:function(){return S},modelExceptionsCall:function(){return eg},modelHubCall:function(){return el},modelHubPublicModelsCall:function(){return es},modelInfoCall:function(){return en},modelInfoV1Call:function(){return ec},modelMetricsCall:function(){return eh},modelMetricsSlowResponsesCall:function(){return ew},modelPatchUpdateCall:function(){return e0},modelSettingsCall:function(){return j},modelUpdateCall:function(){return e1},organizationCreateCall:function(){return H},organizationDeleteCall:function(){return Y},organizationInfoCall:function(){return q},organizationListCall:function(){return V},organizationMemberAddCall:function(){return e6},organizationMemberDeleteCall:function(){return e7},organizationMemberUpdateCall:function(){return e9},organizationUpdateCall:function(){return Z},patchPromptCall:function(){return tF},perUserAnalyticsCall:function(){return om},proxyBaseUrl:function(){return l},regenerateKeyCall:function(){return eo},resetEmailEventSettings:function(){return t4},serverRootPath:function(){return s},serviceHealthCheck:function(){return ta},sessionSpendLogsCall:function(){return tK},setCallbacksCall:function(){return tg},setGlobalLitellmHeaderName:function(){return m},slackBudgetAlertsHealthCheck:function(){return to},spendUsersCall:function(){return eM},streamingModelMetricsCall:function(){return eu},tagCreateCall:function(){return tz},tagDailyActivityCall:function(){return Q},tagDauCall:function(){return oh},tagDeleteCall:function(){return tq},tagDistinctCall:function(){return og},tagInfoCall:function(){return tD},tagListCall:function(){return tV},tagMauCall:function(){return ow},tagUpdateCall:function(){return tL},tagWauCall:function(){return ou},tagsSpendLogsCall:function(){return eC},teamBulkMemberAddCall:function(){return e3},teamCreateCall:function(){return eH},teamDailyActivityCall:function(){return X},teamDeleteCall:function(){return A},teamInfoCall:function(){return M},teamListCall:function(){return L},teamMemberAddCall:function(){return e2},teamMemberDeleteCall:function(){return e5},teamMemberUpdateCall:function(){return e4},teamPermissionsUpdateCall:function(){return tW},teamSpendLogsCall:function(){return ek},teamUpdateCall:function(){return e$},testConnectionRequest:function(){return eA},testMCPConnectionRequest:function(){return ol},testMCPToolsListRequest:function(){return oi},transformRequestCall:function(){return W},uiAuditLogsCall:function(){return oo},uiSpendLogDetailsCall:function(){return tP},uiSpendLogsCall:function(){return eS},updateConfigFieldSetting:function(){return th},updateDefaultTeamSettings:function(){return tZ},updateEmailEventSettings:function(){return t3},updateGuardrailCall:function(){return t8},updateInternalUserSettings:function(){return tB},updateMCPServer:function(){return tA},updatePassThroughEndpoint:function(){return or},updatePassThroughFieldSetting:function(){return td},updatePromptCall:function(){return tv},updateSSOSettings:function(){return ot},updateUsefulLinksCall:function(){return ef},userAgentAnalyticsCall:function(){return op},userAgentSummaryCall:function(){return of},userBulkUpdateUserCall:function(){return te},userCreateCall:function(){return G},userDailyActivityAggregatedCall:function(){return eD},userDailyActivityCall:function(){return K},userDeleteCall:function(){return U},userFilterUICall:function(){return eE},userGetAllUsersCall:function(){return eV},userGetRequesedtModelsCall:function(){return eL},userInfoCall:function(){return R},userListCall:function(){return I},userRequestModelCall:function(){return ez},userSpendLogsCall:function(){return ej},userUpdateUserCall:function(){return e8},v2TeamListCall:function(){return z},vectorStoreCreateCall:function(){return tQ},vectorStoreDeleteCall:function(){return t$},vectorStoreInfoCall:function(){return t0},vectorStoreListCall:function(){return tX},vectorStoreSearchCall:function(){return od},vectorStoreUpdateCall:function(){return t1}});var a=o(42264),r=o(63610);let n=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)},c=null,s="/",l=null;console.log=function(){};let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=window.location.origin,a=t||o;console.log("proxyBaseUrl:",l),console.log("serverRootPath:",e),e.length>0&&!a.endsWith(e)&&"/"!=e&&(a+=e,l=a),console.log("Updated proxyBaseUrl:",l)},d=()=>l||window.location.origin,p={GET:"GET",DELETE:"DELETE"},h="default_organization",u=0,w=async e=>{let t=Date.now();t-u>6e4?(e.includes("Authentication Error - Expired Key")&&(a.ZP.info("UI Session Expired. Logging out."),u=t,document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.href=window.location.pathname),u=t):console.log("Error suppressed to prevent spam:",e)},g="Authorization",f="x-mcp-auth";function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Authorization";console.log("setGlobalLitellmHeaderName: ".concat(e)),g=e}let y=async(e,t)=>{let o=l?"".concat(l,"/model_group/make_public"):"/model_group/make_public";return(await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},k=async()=>{console.log("Getting UI config");let e=await fetch(c?"".concat(c,"/litellm/.well-known/litellm-ui-config"):"/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),i(t.server_root_path,t.proxy_base_url),t},C=async()=>{let e=await fetch(c?"".concat(c,"/public/model_hub/info"):"/public/model_hub/info");return await e.json()},_=async()=>{let e=l?"".concat(l,"/openapi.json"):"/openapi.json",t=await fetch(e);return await t.json()},T=async e=>{try{let t=l?"".concat(l,"/get/litellm_model_cost_map"):"/get/litellm_model_cost_map",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("received litellm model cost data: ".concat(a)),a}catch(e){throw console.error("Failed to get model cost map:",e),e}},E=async(e,t)=>{try{let o=l?"".concat(l,"/model/new"):"/model/new",r=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text()||"Network response was not ok";throw a.ZP.error(e),Error(e)}let n=await r.json();return console.log("API Response:",n),a.ZP.destroy(),a.ZP.success("Model ".concat(t.model_name," created successfully"),2),n}catch(e){throw console.error("Failed to create key:",e),e}},j=async e=>{try{let t=l?"".concat(l,"/model/settings"):"/model/settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){console.error("Failed to get model settings:",e)}},S=async(e,t)=>{console.log("model_id in model delete call: ".concat(t));try{let o=l?"".concat(l,"/model/delete"):"/model/delete",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},v=async(e,t)=>{if(console.log("budget_id in budget delete call: ".concat(t)),null!=e)try{let o=l?"".concat(l,"/budget/delete"):"/budget/delete",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},b=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let o=l?"".concat(l,"/budget/new"):"/budget/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},N=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let o=l?"".concat(l,"/budget/update"):"/budget/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},F=async(e,t)=>{try{let o=l?"".concat(l,"/invitation/new"):"/invitation/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},x=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let o=l?"".concat(l,"/invitation/claim"):"/invitation/claim",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},P=async e=>{try{let t=l?"".concat(l,"/alerting/settings"):"/alerting/settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},O=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),r.d))if(t[e]){console.log("formValues.".concat(e,":"),t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",t);let o=l?"".concat(l,"/key/service-account/generate"):"/key/service-account/generate",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let n=await a.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},B=async(e,t,o)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),r.d))if(o[e]){console.log("formValues.".concat(e,":"),o[e]);try{o[e]=JSON.parse(o[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",o);let a=l?"".concat(l,"/key/generate"):"/key/generate",n=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!n.ok){let e=await n.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t,o)=>{try{if(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),o.auto_create_key=!1,o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",o);let a=l?"".concat(l,"/user/new"):"/user/new",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{let o=l?"".concat(l,"/key/delete"):"/key/delete";console.log("in keyDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},U=async(e,t)=>{try{let o=l?"".concat(l,"/user/delete"):"/user/delete";console.log("in userDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete user(s):",e),e}},A=async(e,t)=>{try{let o=l?"".concat(l,"/team/delete"):"/team/delete";console.log("in teamDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},I=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let p=l?"".concat(l,"/user/list"):"/user/list";console.log("in userListCall");let h=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");h.append("user_ids",e)}o&&h.append("page",o.toString()),a&&h.append("page_size",a.toString()),r&&h.append("user_email",r),n&&h.append("role",n),c&&h.append("team",c),s&&h.append("sso_user_ids",s),i&&h.append("sort_by",i),d&&h.append("sort_order",d);let u=h.toString();u&&(p+="?".concat(u));let f=await fetch(p,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw w(e),Error("Network response was not ok")}let m=await f.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},R=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0,n=arguments.length>5?arguments[5]:void 0,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];console.log("userInfoCall: ".concat(t,", ").concat(o,", ").concat(a,", ").concat(r,", ").concat(n,", ").concat(c));try{let s;if(a){s=l?"".concat(l,"/user/list"):"/user/list";let e=new URLSearchParams;null!=r&&e.append("page",r.toString()),null!=n&&e.append("page_size",n.toString()),s+="?".concat(e.toString())}else s=l?"".concat(l,"/user/info"):"/user/info",("Admin"!==o&&"Admin Viewer"!==o||c)&&t&&(s+="?user_id=".concat(t));console.log("Requesting user data from:",s);let i=await fetch(s,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}let d=await i.json();return console.log("API Response:",d),d}catch(e){throw console.error("Failed to fetch user data:",e),e}},M=async(e,t)=>{try{let o=l?"".concat(l,"/team/info"):"/team/info";t&&(o="".concat(o,"?team_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},z=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6],arguments.length>7&&void 0!==arguments[7]&&arguments[7],arguments.length>8&&void 0!==arguments[8]&&arguments[8];try{let n=l?"".concat(l,"/v2/team/list"):"/v2/team/list";console.log("in teamInfoCall");let c=new URLSearchParams;o&&c.append("user_id",o.toString()),t&&c.append("organization_id",t.toString()),a&&c.append("team_id",a.toString()),r&&c.append("team_alias",r.toString());let s=c.toString();s&&(n+="?".concat(s));let i=await fetch(n,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}let d=await i.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},L=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=l?"".concat(l,"/team/list"):"/team/list";console.log("in teamInfoCall");let c=new URLSearchParams;o&&c.append("user_id",o.toString()),t&&c.append("organization_id",t.toString()),a&&c.append("team_id",a.toString()),r&&c.append("team_alias",r.toString());let s=c.toString();s&&(n+="?".concat(s));let i=await fetch(n,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}let d=await i.json();return console.log("/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},D=async e=>{try{let t=l?"".concat(l,"/team/available"):"/team/available";console.log("in availableTeamListCall");let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("/team/available_teams API Response:",a),a}catch(e){throw e}},V=async e=>{try{let t=l?"".concat(l,"/organization/list"):"/organization/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{try{let o=l?"".concat(l,"/organization/info"):"/organization/info";t&&(o="".concat(o,"?organization_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},H=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let o=l?"".concat(l,"/organization/new"):"/organization/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Z=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let o=l?"".concat(l,"/organization/update"):"/organization/update",a=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update Team Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let o=l?"".concat(l,"/organization/delete"):"/organization/delete",a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!a.ok){let e=await a.text();throw w(e),Error("Error deleting organization: ".concat(e))}return await a.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},W=async(e,t)=>{try{let o=l?"".concat(l,"/utils/transform_request"):"/utils/transform_request",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},K=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;try{let r=l?"".concat(l,"/user/daily/activity"):"/user/daily/activity",c=new URLSearchParams;c.append("start_date",n(t)),c.append("end_date",n(o)),c.append("page_size","1000"),c.append("page",a.toString());let s=c.toString();s&&(r+="?".concat(s));let i=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},Q=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let c=l?"".concat(l,"/tag/daily/activity"):"/tag/daily/activity",s=new URLSearchParams;s.append("start_date",n(t)),s.append("end_date",n(o)),s.append("page_size","1000"),s.append("page",a.toString()),r&&s.append("tags",r.join(","));let i=s.toString();i&&(c+="?".concat(i));let d=await fetch(c,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.text();throw w(e),Error("Network response was not ok")}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},X=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let c=l?"".concat(l,"/team/daily/activity"):"/team/daily/activity",s=new URLSearchParams;s.append("start_date",n(t)),s.append("end_date",n(o)),s.append("page_size","1000"),s.append("page",a.toString()),r&&s.append("team_ids",r.join(",")),s.append("exclude_team_ids","litellm-dashboard");let i=s.toString();i&&(c+="?".concat(i));let d=await fetch(c,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.text();throw w(e),Error("Network response was not ok")}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},$=async e=>{try{let t=l?"".concat(l,"/global/spend"):"/global/spend",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ee=async e=>{try{let t=l?"".concat(l,"/onboarding/get_token"):"/onboarding/get_token";t+="?invite_link=".concat(e);let o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,o,a)=>{let r=l?"".concat(l,"/onboarding/claim_token"):"/onboarding/claim_token";try{let n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:o,password:a})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to delete key:",e),e}},eo=async(e,t,o)=>{try{let a=l?"".concat(l,"/key/").concat(t,"/regenerate"):"/key/".concat(t,"/regenerate"),r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Regenerate key Response:",n),n}catch(e){throw console.error("Failed to regenerate key:",e),e}},ea=!1,er=null,en=async(e,t,o)=>{try{console.log("modelInfoCall:",e,t,o);let r=l?"".concat(l,"/v2/model/info"):"/v2/model/info",n=new URLSearchParams;n.append("include_team_models","true"),n.toString()&&(r+="?".concat(n.toString()));let c=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw e+="error shown=".concat(ea),ea||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),a.ZP.info(e,10),ea=!0,er&&clearTimeout(er),er=setTimeout(()=>{ea=!1},1e4)),Error("Network response was not ok")}let s=await c.json();return console.log("modelInfoCall:",s),s}catch(e){throw console.error("Failed to create key:",e),e}},ec=async(e,t)=>{try{let o=l?"".concat(l,"/v1/model/info"):"/v1/model/info";o+="?litellm_model_id=".concat(t);let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok)throw await a.text(),Error("Network response was not ok");let r=await a.json();return console.log("modelInfoV1Call:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},es=async()=>{let e=l?"".concat(l,"/public/model_hub"):"/public/model_hub";return(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json()},el=async e=>{try{let t=l?"".concat(l,"/model_group/info"):"/model_group/info",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log("modelHubCall:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ei=async e=>{try{let t=l?"".concat(l,"/get/allowed_ips"):"/get/allowed_ips",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw Error("Network response was not ok: ".concat(e))}let a=await o.json();return console.log("getAllowedIPs:",a),a.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},ed=async(e,t)=>{try{let o=l?"".concat(l,"/add/allowed_ip"):"/add/allowed_ip",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.text();throw Error("Network response was not ok: ".concat(e))}let r=await a.json();return console.log("addAllowedIP:",r),r}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ep=async(e,t)=>{try{let o=l?"".concat(l,"/delete/allowed_ip"):"/delete/allowed_ip",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.text();throw Error("Network response was not ok: ".concat(e))}let r=await a.json();return console.log("deleteAllowedIP:",r),r}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eh=async(e,t,o,a,r,n,c,s)=>{try{let t=l?"".concat(l,"/model/metrics"):"/model/metrics";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(c,"&customer=").concat(s));let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/model/streaming_metrics"):"/model/streaming_metrics";t&&(r="".concat(r,"?_selected_model_group=").concat(t,"&startTime=").concat(o,"&endTime=").concat(a));let n=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ew=async(e,t,o,a,r,n,c,s)=>{try{let t=l?"".concat(l,"/model/metrics/slow_responses"):"/model/metrics/slow_responses";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(c,"&customer=").concat(s));let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t,o,a,r,n,c,s)=>{try{let t=l?"".concat(l,"/model/metrics/exceptions"):"/model/metrics/exceptions";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(c,"&customer=").concat(s));let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ef=async(e,t)=>{try{let o=l?"".concat(l,"/model_hub/update_useful_links"):"/model_hub/update_useful_links",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},em=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6]);console.log("in /models calls, globalLitellmHeaderName",g);try{let t=l?"".concat(l,"/models"):"/models",o=new URLSearchParams;o.append("include_model_access_groups","True"),!0===a&&o.append("return_wildcard_routes","True"),!0===n&&o.append("only_model_access_groups","True"),r&&o.append("team_id",r.toString()),o.toString()&&(t+="?".concat(o.toString()));let c=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}return await c.json()}catch(e){throw console.error("Failed to create key:",e),e}},ey=async(e,t)=>{try{let o=l?"".concat(l,"/global/spend/logs"):"/global/spend/logs";console.log("in keySpendLogsCall:",o);let a=await fetch("".concat(o,"?api_key=").concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},ek=async e=>{try{let t=l?"".concat(l,"/global/spend/teams"):"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let o=await fetch("".concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eC=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/spend/tags"):"/global/spend/tags";t&&o&&(r="".concat(r,"?start_date=").concat(t,"&end_date=").concat(o)),a&&(r+="".concat(r,"&tags=").concat(a.join(","))),console.log("in tagsSpendLogsCall:",r);let n=await fetch("".concat(r),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to create key:",e),e}},e_=async e=>{try{let t=l?"".concat(l,"/global/spend/all_tag_names"):"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eT=async e=>{try{let t=l?"".concat(l,"/global/all_end_users"):"/global/all_end_users";console.log("in global/all_end_users call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eE=async(e,t)=>{try{let o=l?"".concat(l,"/user/filter/ui"):"/user/filter/ui";t.get("user_email")&&(o+="?user_email=".concat(t.get("user_email"))),t.get("user_id")&&(o+="?user_id=".concat(t.get("user_id")));let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,o,a,r,n)=>{try{console.log("user role in spend logs call: ".concat(o));let t=l?"".concat(l,"/spend/logs"):"/spend/logs";t="App Owner"==o?"".concat(t,"?user_id=").concat(a,"&start_date=").concat(r,"&end_date=").concat(n):"".concat(t,"?start_date=").concat(r,"&end_date=").concat(n);let c=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eS=async(e,t,o,a,r,n,c,s,i,d,p,h)=>{try{let u=l?"".concat(l,"/spend/logs/ui"):"/spend/logs/ui",f=new URLSearchParams;t&&f.append("api_key",t),o&&f.append("team_id",o),a&&f.append("request_id",a),r&&f.append("start_date",r),n&&f.append("end_date",n),c&&f.append("page",c.toString()),s&&f.append("page_size",s.toString()),i&&f.append("user_id",i),d&&f.append("end_user",d),p&&f.append("status_filter",p),h&&f.append("model",h);let m=f.toString();m&&(u+="?".concat(m));let y=await fetch(u,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!y.ok){let e=await y.text();throw w(e),Error("Network response was not ok")}let k=await y.json();return console.log("Spend Logs Response:",k),k}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},ev=async e=>{try{let t=l?"".concat(l,"/global/spend/logs"):"/global/spend/logs",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eb=async e=>{try{let t=l?"".concat(l,"/global/spend/keys?limit=5"):"/global/spend/keys?limit=5",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eN=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/spend/end_users"):"/global/spend/end_users",n="";n=t?JSON.stringify({api_key:t,startTime:o,endTime:a}):JSON.stringify({startTime:o,endTime:a});let c={method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:n},s=await fetch(r,c);if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}let i=await s.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/spend/provider"):"/global/spend/provider";o&&a&&(r+="?start_date=".concat(o,"&end_date=").concat(a)),t&&(r+="&api_key=".concat(t));let n={method:"GET",headers:{[g]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},ex=async(e,t,o)=>{try{let a=l?"".concat(l,"/global/activity"):"/global/activity";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[g]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eP=async(e,t,o)=>{try{let a=l?"".concat(l,"/global/activity/cache_hits"):"/global/activity/cache_hits";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[g]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eO=async(e,t,o)=>{try{let a=l?"".concat(l,"/global/activity/model"):"/global/activity/model";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[g]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok)throw await n.text(),Error("Network response was not ok");let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eB=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/activity/exceptions"):"/global/activity/exceptions";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[g]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eG=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/global/activity/exceptions/deployment"):"/global/activity/exceptions/deployment";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[g]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eJ=async e=>{try{let t=l?"".concat(l,"/global/spend/models?limit=5"):"/global/spend/models?limit=5",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eU=async(e,t)=>{try{let o=l?"".concat(l,"/v2/key/info"):"/v2/key/info",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!a.ok){let e=await a.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eA=async(e,t,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let r=l?"".concat(l,"/health/test_connection"):"/health/test_connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[g]:"Bearer ".concat(e)},body:JSON.stringify({litellm_params:t,mode:o})}),c=n.headers.get("content-type");if(!c||!c.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(n.status,": ").concat(n.statusText,"). Check network tab for details."))}let s=await n.json();if(!n.ok||"error"===s.status){if("error"===s.status);else{var a;return{status:"error",message:(null===(a=s.error)||void 0===a?void 0:a.message)||"Connection test failed: ".concat(n.status," ").concat(n.statusText)}}}return s}catch(e){throw console.error("Model connection test error:",e),e}},eI=async(e,t)=>{try{console.log("entering keyInfoV1Call");let o=l?"".concat(l,"/key/info"):"/key/info";o="".concat(o,"?key=").concat(t);let r=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(console.log("response",r),!r.ok){let e=await r.text();w(e),a.ZP.error("Failed to fetch key info - "+e)}let n=await r.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},eR=async function(e,t,o,a,r,n,c,s){let i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let p=l?"".concat(l,"/key/list"):"/key/list";console.log("in keyListCall");let h=new URLSearchParams;o&&h.append("team_id",o.toString()),t&&h.append("organization_id",t.toString()),a&&h.append("key_alias",a),n&&h.append("key_hash",n),r&&h.append("user_id",r.toString()),c&&h.append("page",c.toString()),s&&h.append("size",s.toString()),i&&h.append("sort_by",i),d&&h.append("sort_order",d),h.append("return_full_object","true"),h.append("include_team_keys","true");let u=h.toString();u&&(p+="?".concat(u));let f=await fetch(p,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw w(e),Error("Network response was not ok")}let m=await f.json();return console.log("/team/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},eM=async(e,t)=>{try{let o=l?"".concat(l,"/spend/users"):"/spend/users";console.log("in spendUsersCall:",o);let a=await fetch("".concat(o,"?user_id=").concat(t),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get spend for user",e),e}},ez=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/user/request_model"):"/user/request_model",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:o,justification:a})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return console.log(c),c}catch(e){throw console.error("Failed to create key:",e),e}},eL=async e=>{try{let t=l?"".concat(l,"/user/get_requests"):"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to get requested models:",e),e}},eD=async(e,t,o)=>{try{let a=l?"".concat(l,"/user/daily/activity/aggregated"):"/user/daily/activity/aggregated",r=new URLSearchParams,n=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};r.append("start_date",n(t)),r.append("end_date",n(o));let c=r.toString();c&&(a+="?".concat(c));let s=await fetch(a,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},eV=async(e,t)=>{try{let o=l?"".concat(l,"/user/get_users?role=").concat(t):"/user/get_users?role=".concat(t);console.log("in userGetAllUsersCall:",o);let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get requested models:",e),e}},eq=async e=>{try{let t=l?"".concat(l,"/user/available_roles"):"/user/available_roles",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let a=await o.json();return console.log("response from user/available_role",a),a}catch(e){throw e}},eH=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=l?"".concat(l,"/team/new"):"/team/new",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eZ=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=l?"".concat(l,"/credentials"):"/credentials",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eY=async e=>{try{let t=l?"".concat(l,"/credentials"):"/credentials";console.log("in credentialListCall");let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eW=async(e,t,o)=>{try{let a=l?"".concat(l,"/credentials"):"/credentials";t?a+="/by_name/".concat(t):o&&(a+="/by_model/".concat(o)),console.log("in credentialListCall");let r=await fetch(a,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eK=async(e,t)=>{try{let o=l?"".concat(l,"/credentials/").concat(t):"/credentials/".concat(t);console.log("in credentialDeleteCall:",t);let a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},eQ=async(e,t,o)=>{try{if(console.log("Form Values in credentialUpdateCall:",o),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let a=l?"".concat(l,"/credentials/").concat(t):"/credentials/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let o=l?"".concat(l,"/key/update"):"/key/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update key Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},e$=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let o=l?"".concat(l,"/team/update"):"/team/update",r=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),a.ZP.error("Failed to update team settings: "+e),Error(e)}let n=await r.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},e0=async(e,t,o)=>{try{console.log("Form Values in modelUpateCall:",t);let a=l?"".concat(l,"/model/").concat(o,"/update"):"/model/".concat(o,"/update"),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update model Response:",n),n}catch(e){throw console.error("Failed to update model:",e),e}},e1=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let o=l?"".concat(l,"/model/update"):"/model/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update model Response:",r),r}catch(e){throw console.error("Failed to update model:",e),e}},e2=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=l?"".concat(l,"/team/member_add"):"/team/member_add",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:o})});if(!n.ok){var a;let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t,o,a,r)=>{try{console.log("Bulk add team members:",{teamId:t,members:o,maxBudgetInTeam:a});let c=l?"".concat(l,"/team/bulk_member_add"):"/team/bulk_member_add",s={team_id:t};r?s.all_users=!0:s.members=o,null!=a&&(s.max_budget_in_team=a);let i=await fetch(c,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok){var n;let e=await i.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(n=t.detail)||void 0===n?void 0:n.error)||"Failed to bulk add team members",a=Error(o);throw a.raw=t,a}let d=await i.json();return console.log("Bulk team member add API Response:",d),d}catch(e){throw console.error("Failed to bulk add team members:",e),e}},e4=async(e,t,o)=>{try{console.log("Form Values in teamMemberUpdateCall:",o);let r=l?"".concat(l,"/team/member_update"):"/team/member_update",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,role:o.role,user_id:o.user_id})});if(!n.ok){var a;let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to update team member:",e),e}},e5=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=l?"".concat(l,"/team/member_delete"):"/team/member_delete",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==o.user_email&&{user_email:o.user_email},...void 0!==o.user_id&&{user_id:o.user_id}})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e6=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=l?"".concat(l,"/organization/member_add"):"/organization/member_add",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create organization member:",e),e}},e7=async(e,t,o)=>{try{console.log("Form Values in organizationMemberDeleteCall:",o);let a=l?"".concat(l,"/organization/member_delete"):"/organization/member_delete",r=await fetch(a,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to delete organization member:",e),e}},e9=async(e,t,o)=>{try{console.log("Form Values in organizationMemberUpdateCall:",o);let a=l?"".concat(l,"/organization/member_update"):"/organization/member_update",r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...o})});if(!r.ok){let e=await r.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to update organization member:",e),e}},e8=async(e,t,o)=>{try{console.log("Form Values in userUpdateUserCall:",t);let a=l?"".concat(l,"/user/update"):"/user/update",r={...t};null!==o&&(r.user_role=o),r=JSON.stringify(r);let n=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!n.ok){let e=await n.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},te=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let r;console.log("Form Values in userUpdateUserCall:",t);let n=l?"".concat(l,"/user/bulk_update"):"/user/bulk_update";if(a)r=JSON.stringify({all_users:!0,user_updates:t});else if(o&&o.length>0){let e=[];for(let a of o)e.push({user_id:a,...t});r=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let c=await fetch(n,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!c.ok){let e=await c.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let s=await c.json();return console.log("API Response:",s),s}catch(e){throw console.error("Failed to create key:",e),e}},tt=async(e,t)=>{try{let o=l?"".concat(l,"/global/predict/spend/logs"):"/global/predict/spend/logs",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},to=async e=>{try{let t=l?"".concat(l,"/health/services?service=slack_budget_alerts"):"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error(e)}let r=await o.json();return a.ZP.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",r),r}catch(e){throw console.error("Failed to perform health check:",e),e}},ta=async(e,t)=>{try{let o=l?"".concat(l,"/health/services?service=").concat(t):"/health/services?service=".concat(t);console.log("Checking Slack Budget Alerts service health");let a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error(e)}return await a.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tr=async e=>{try{let t=l?"".concat(l,"/budget/list"):"/budget/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tn=async e=>{try{let t=l?"".concat(l,"/budget/settings"):"/budget/settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tc=async(e,t,o)=>{try{let t=l?"".concat(l,"/get/config/callbacks"):"/get/config/callbacks",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},ts=async e=>{try{let t=l?"".concat(l,"/config/list?config_type=general_settings"):"/config/list?config_type=general_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tl=async e=>{try{let t=l?"".concat(l,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},ti=async(e,t)=>{try{let o=l?"".concat(l,"/config/field/info?field_name=").concat(t):"/config/field/info?field_name=".concat(t),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok)throw await a.text(),Error("Network response was not ok");return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},td=async(e,t,o)=>{try{let r=l?"".concat(l,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return a.ZP.success("Successfully updated value!"),c}catch(e){throw console.error("Failed to set callbacks:",e),e}},tp=async(e,t)=>{try{let o=l?"".concat(l,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},th=async(e,t,o)=>{try{let r=l?"".concat(l,"/config/field/update"):"/config/field/update",n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o,config_type:"general_settings"})});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return a.ZP.success("Successfully updated value!"),c}catch(e){throw console.error("Failed to set callbacks:",e),e}},tu=async(e,t)=>{try{let o=l?"".concat(l,"/config/field/delete"):"/config/field/delete",r=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return a.ZP.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async(e,t)=>{try{let o=l?"".concat(l,"/config/pass_through_endpoint?endpoint_id=").concat(t):"/config/pass_through_endpoint".concat(t),a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tg=async(e,t)=>{try{let o=l?"".concat(l,"/config/update"):"/config/update",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tf=async e=>{try{let t=l?"".concat(l,"/health"):"/health",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tm=async(e,t)=>{try{let o=l?"".concat(l,"/health?model=").concat(encodeURIComponent(t)):"/health?model=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw Error(e||"Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to call /health for model ".concat(t,":"),e),e}},ty=async e=>{try{let t=l?"".concat(l,"/cache/ping"):"/cache/ping",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tk=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;try{let n=l?"".concat(l,"/health/history"):"/health/history",c=new URLSearchParams;t&&c.append("model",t),o&&c.append("status_filter",o),c.append("limit",a.toString()),c.append("offset",r.toString()),c.toString()&&(n+="?".concat(c.toString()));let s=await fetch(n,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error(e)}return await s.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tC=async e=>{try{let t=l?"".concat(l,"/health/latest"):"/health/latest",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},t_=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",l);let t=l?"".concat(l,"/sso/get/ui_settings"):"/sso/get/ui_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tT=async e=>{try{let t=l?"".concat(l,"/v2/guardrails/list"):"/v2/guardrails/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},tE=async e=>{try{let t=l?"".concat(l,"/prompts/list"):"/prompts/list",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},tj=async(e,t)=>{try{let o=l?"".concat(l,"/prompts/").concat(t,"/info"):"/prompts/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},tS=async(e,t)=>{try{let o=l?"".concat(l,"/prompts"):"/prompts",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},tv=async(e,t,o)=>{try{let a=l?"".concat(l,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PUT",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},tb=async(e,t)=>{try{let o=l?"".concat(l,"/prompts/").concat(t):"/prompts/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},tN=async(e,t)=>{try{let o=new FormData;o.append("file",t);let a=l?"".concat(l,"/utils/dotprompt_json_converter"):"/utils/dotprompt_json_converter",r=await fetch(a,{method:"POST",headers:{[g]:"Bearer ".concat(e)},body:o});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},tF=async(e,t,o)=>{try{let a=l?"".concat(l,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},tx=async(e,t)=>{try{let o=l?"".concat(l,"/guardrails"):"/guardrails",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!a.ok){let e=await a.text();throw w(e),Error(e)}let r=await a.json();return console.log("Create guardrail response:",r),r}catch(e){throw console.error("Failed to create guardrail:",e),e}},tP=async(e,t,o)=>{try{let a=l?"".concat(l,"/spend/logs/ui/").concat(t,"?start_date=").concat(encodeURIComponent(o)):"/spend/logs/ui/".concat(t,"?start_date=").concat(encodeURIComponent(o));console.log("Fetching log details from:",a);let r=await fetch(a,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Fetched log details:",n),n}catch(e){throw console.error("Failed to fetch log details:",e),e}},tO=async e=>{try{let t=l?"".concat(l,"/get/internal_user_settings"):"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched SSO settings:",a),a}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},tB=async(e,t)=>{try{let o=l?"".concat(l,"/update/internal_user_settings"):"/update/internal_user_settings";console.log("Updating internal user settings:",t);let r=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.text();throw w(e),Error(e)}let n=await r.json();return console.log("Updated internal user settings:",n),a.ZP.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},tG=async e=>{try{let t=l?"".concat(l,"/v1/mcp/server"):"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let o=await fetch(t,{method:p.GET,headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched MCP servers:",a),a}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},tJ=async e=>{try{let t=l?"".concat(l,"/v1/mcp/access_groups"):"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let o=await fetch(t,{method:p.GET,headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched MCP access groups:",a),a.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},tU=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let o=l?"".concat(l,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw w(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},tA=async(e,t)=>{try{let o=l?"".concat(l,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"PUT",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},tI=async(e,t)=>{try{let o=(l?"".concat(l):"")+"/v1/mcp/server/".concat(t);console.log("in deleteMCPServer:",t);let a=await fetch(o,{method:p.DELETE,headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}}catch(e){throw console.error("Failed to delete key:",e),e}},tR=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/mcp-rest/tools/list?server_id=").concat(t):"/mcp-rest/tools/list?server_id=".concat(t);console.log("Fetching MCP tools from:",r);let n={[g]:"Bearer ".concat(e),"Content-Type":"application/json"};a&&o?n["x-mcp-".concat(a,"-authorization")]=o:o&&(n[f]=o);let c=await fetch(r,{method:"GET",headers:n}),s=await c.json();if(console.log("Fetched MCP tools response:",s),!c.ok){if(s.error&&s.message)throw Error(s.message);throw Error("Failed to fetch MCP tools")}return s}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools"}}},tM=async(e,t,o,a,r)=>{try{let n=l?"".concat(l,"/mcp-rest/tools/call"):"/mcp-rest/tools/call";console.log("Calling MCP tool:",t,"with arguments:",o);let c={[g]:"Bearer ".concat(e),"Content-Type":"application/json"};r?c["x-mcp-".concat(r,"-authorization")]=a:c[f]=a;let s=await fetch(n,{method:"POST",headers:c,body:JSON.stringify({name:t,arguments:o})});if(!s.ok){let e="Network response was not ok",t=null,o=await s.text();try{let a=JSON.parse(o);a.detail?"string"==typeof a.detail?e=a.detail:"object"==typeof a.detail&&(e=a.detail.message||a.detail.error||"An error occurred",t=a.detail):e=a.message||a.error||e}catch(t){console.error("Failed to parse JSON error response:",t),o&&(e=o)}let a=Error(e);throw a.status=s.status,a.statusText=s.statusText,a.details=t,w(e),a}let i=await s.json();return console.log("MCP tool call response:",i),i}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},tz=async(e,t)=>{try{let o=l?"".concat(l,"/tag/new"):"/tag/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await w(e);return}return await a.json()}catch(e){throw console.error("Error creating tag:",e),e}},tL=async(e,t)=>{try{let o=l?"".concat(l,"/tag/update"):"/tag/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await w(e);return}return await a.json()}catch(e){throw console.error("Error updating tag:",e),e}},tD=async(e,t)=>{try{let o=l?"".concat(l,"/tag/info"):"/tag/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({names:t})});if(!a.ok){let e=await a.text();return await w(e),{}}return await a.json()}catch(e){throw console.error("Error getting tag info:",e),e}},tV=async e=>{try{let t=l?"".concat(l,"/tag/list"):"/tag/list",o=await fetch(t,{method:"GET",headers:{Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.text();return await w(e),{}}return await o.json()}catch(e){throw console.error("Error listing tags:",e),e}},tq=async(e,t)=>{try{let o=l?"".concat(l,"/tag/delete"):"/tag/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({name:t})});if(!a.ok){let e=await a.text();await w(e);return}return await a.json()}catch(e){throw console.error("Error deleting tag:",e),e}},tH=async e=>{try{let t=l?"".concat(l,"/get/default_team_settings"):"/get/default_team_settings";console.log("Fetching default team settings from:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched default team settings:",a),a}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},tZ=async(e,t)=>{try{let o=l?"".concat(l,"/update/default_team_settings"):"/update/default_team_settings";console.log("Updating default team settings:",t);let r=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Updated default team settings:",n),a.ZP.success("Default team settings updated successfully"),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},tY=async(e,t)=>{try{let o=l?"".concat(l,"/team/permissions_list?team_id=").concat(t):"/team/permissions_list?team_id=".concat(t),a=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("Team permissions response:",r),r}catch(e){throw console.error("Failed to get team permissions:",e),e}},tW=async(e,t,o)=>{try{let a=l?"".concat(l,"/team/permissions_update"):"/team/permissions_update",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({team_id:t,team_member_permissions:o})});if(!r.ok){let e=await r.text();throw w(e),Error("Network response was not ok")}let n=await r.json();return console.log("Team permissions response:",n),n}catch(e){throw console.error("Failed to update team permissions:",e),e}},tK=async(e,t)=>{try{let o=l?"".concat(l,"/spend/logs/session/ui?session_id=").concat(encodeURIComponent(t)):"/spend/logs/session/ui?session_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},tQ=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/new"):"/vector_store/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to create vector store")}return await a.json()}catch(e){throw console.error("Error creating vector store:",e),e}},tX=async function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let t=l?"".concat(l,"/vector_store/list"):"/vector_store/list",o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to list vector stores")}return await o.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},t$=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/delete"):"/vector_store/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to delete vector store")}return await a.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},t0=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/info"):"/vector_store/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to get vector store info")}return await a.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},t1=async(e,t)=>{try{let o=l?"".concat(l,"/vector_store/update"):"/vector_store/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to update vector store")}return await a.json()}catch(e){throw console.error("Error updating vector store:",e),e}},t2=async e=>{try{let t=l?"".concat(l,"/email/event_settings"):"/email/event_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to get email event settings")}let a=await o.json();return console.log("Email event settings response:",a),a}catch(e){throw console.error("Failed to get email event settings:",e),e}},t3=async(e,t)=>{try{let o=l?"".concat(l,"/email/event_settings"):"/email/event_settings",a=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Failed to update email event settings")}let r=await a.json();return console.log("Update email event settings response:",r),r}catch(e){throw console.error("Failed to update email event settings:",e),e}},t4=async e=>{try{let t=l?"".concat(l,"/email/event_settings/reset"):"/email/event_settings/reset",o=await fetch(t,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to reset email event settings")}let a=await o.json();return console.log("Reset email event settings response:",a),a}catch(e){throw console.error("Failed to reset email event settings:",e),e}},t5=async(e,t)=>{try{let o=l?"".concat(l,"/guardrails/").concat(t):"/guardrails/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error(e)}let r=await a.json();return console.log("Delete guardrail response:",r),r}catch(e){throw console.error("Failed to delete guardrail:",e),e}},t6=async e=>{try{let t=l?"".concat(l,"/guardrails/ui/add_guardrail_settings"):"/guardrails/ui/add_guardrail_settings",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to get guardrail UI settings")}let a=await o.json();return console.log("Guardrail UI settings response:",a),a}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},t7=async e=>{try{let t=l?"".concat(l,"/guardrails/ui/provider_specific_params"):"/guardrails/ui/provider_specific_params",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Failed to get guardrail provider specific parameters")}let a=await o.json();return console.log("Guardrail provider specific params response:",a),a}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},t9=async(e,t)=>{try{let o=l?"".concat(l,"/guardrails/").concat(t,"/info"):"/guardrails/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Failed to get guardrail info")}let r=await a.json();return console.log("Guardrail info response:",r),r}catch(e){throw console.error("Failed to get guardrail info:",e),e}},t8=async(e,t,o)=>{try{let a=l?"".concat(l,"/guardrails/").concat(t):"/guardrails/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw w(e),Error("Failed to update guardrail")}let n=await r.json();return console.log("Update guardrail response:",n),n}catch(e){throw console.error("Failed to update guardrail:",e),e}},oe=async e=>{try{let t=l?"".concat(l,"/get/sso_settings"):"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}let a=await o.json();return console.log("Fetched SSO configuration:",a),a}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},ot=async(e,t)=>{try{let o=l?"".concat(l,"/update/sso_settings"):"/update/sso_settings";console.log("Updating SSO configuration:",t);let a=await fetch(o,{method:"PATCH",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=await a.json();return console.log("Updated SSO configuration:",r),r}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},oo=async(e,t,o,a,r)=>{try{let t=l?"".concat(l,"/audit"):"/audit",o=new URLSearchParams;a&&o.append("page",a.toString()),r&&o.append("page_size",r.toString());let n=o.toString();n&&(t+="?".concat(n));let c=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw w(e),Error("Network response was not ok")}return await c.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},oa=async e=>{try{let t=l?"".concat(l,"/user/available_users"):"/user/available_users",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e)}});if(!o.ok){if(404===o.status)return null;let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},or=async(e,t,o)=>{try{let r=l?"".concat(l,"/config/pass_through_endpoint/").concat(encodeURIComponent(t)):"/config/pass_through_endpoint/".concat(encodeURIComponent(t)),n=await fetch(r,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!n.ok){let e=await n.text();throw w(e),Error("Network response was not ok")}let c=await n.json();return a.ZP.success("Pass through endpoint updated successfully"),c}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},on=async(e,t)=>{try{let o=l?"".concat(l,"/config/pass_through_endpoint?endpoint_id=").concat(encodeURIComponent(t)):"/config/pass_through_endpoint?endpoint_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}let r=(await a.json()).endpoints;if(!r||0===r.length)throw Error("Pass through endpoint not found");return r[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},oc=async(e,t)=>{try{let o=l?"".concat(l,"/config/callback/delete"):"/config/callback/delete",a=await fetch(o,{method:"POST",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!a.ok){let e=await a.text();throw w(e),Error("Network response was not ok")}return await a.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},os=async e=>{let t=d(),o=await fetch("".concat(t,"/v1/mcp/tools"),{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw Error("HTTP error! status: ".concat(o.status));return await o.json()},ol=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let a=l?"".concat(l,"/mcp-rest/test/connection"):"/mcp-rest/test/connection",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",[g]:"Bearer ".concat(e)},body:JSON.stringify(t)}),n=r.headers.get("content-type");if(!n||!n.includes("application/json")){let e=await r.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(r.status,": ").concat(r.statusText,"). Check network tab for details."))}let c=await r.json();if(!r.ok||"error"===c.status){if("error"===c.status);else{var o;return{status:"error",message:(null===(o=c.error)||void 0===o?void 0:o.message)||"MCP connection test failed: ".concat(r.status," ").concat(r.statusText)}}}return c}catch(e){throw console.error("MCP connection test error:",e),e}},oi=async(e,t)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=l?"".concat(l,"/mcp-rest/test/tools/list"):"/mcp-rest/test/tools/list",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[g]:"Bearer ".concat(e)},body:JSON.stringify(t)}),r=a.headers.get("content-type");if(!r||!r.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(a.status,": ").concat(a.statusText,"). Check network tab for details."))}let n=await a.json();if((!a.ok||n.error)&&!n.error)return{tools:[],error:"request_failed",message:n.message||"MCP tools list failed: ".concat(a.status," ").concat(a.statusText)};return n}catch(e){throw console.error("MCP tools list test error:",e),e}},od=async(e,t,o)=>{try{let a="".concat(d(),"/v1/vector_stores/").concat(t,"/search"),r=await fetch(a,{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({query:o})});if(!r.ok){let e=await r.text();return await w(e),null}return await r.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},op=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,n=arguments.length>5?arguments[5]:void 0;try{let c=l?"".concat(l,"/tag/user-agent/analytics"):"/tag/user-agent/analytics",s=new URLSearchParams,i=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};s.append("start_date",i(t)),s.append("end_date",i(o)),s.append("page",a.toString()),s.append("page_size",r.toString()),n&&s.append("user_agent_filter",n);let d=s.toString();d&&(c+="?".concat(d));let p=await fetch(c,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!p.ok){let e=await p.text();throw w(e),Error("Network response was not ok")}return await p.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},oh=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/dau"):"/tag/dau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},ou=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/wau"):"/tag/wau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},ow=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/mau"):"/tag/mau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},og=async e=>{try{let t=l?"".concat(l,"/tag/distinct"):"/tag/distinct",o=await fetch(t,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw w(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},of=async(e,t,o,a)=>{try{let r=l?"".concat(l,"/tag/summary"):"/tag/summary",n=new URLSearchParams,c=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};n.append("start_date",c(t)),n.append("end_date",c(o)),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let s=n.toString();s&&(r+="?".concat(s));let i=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw w(e),Error("Network response was not ok")}return await i.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},om=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,a=arguments.length>3?arguments[3]:void 0;try{let r=l?"".concat(l,"/tag/user-agent/per-user-analytics"):"/tag/user-agent/per-user-analytics",n=new URLSearchParams;n.append("page",t.toString()),n.append("page_size",o.toString()),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let c=n.toString();c&&(r+="?".concat(c));let s=await fetch(r,{method:"GET",headers:{[g]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok){let e=await s.text();throw w(e),Error("Network response was not ok")}return await s.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}}},3914:function(e,t,o){function a(){let e=window.location.hostname,t=["Lax","Strict","None"];["/","/ui"].forEach(o=>{document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,";"),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,";"),t.forEach(t=>{let a="None"===t?" Secure;":"";document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; SameSite=").concat(t,";").concat(a),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,"; SameSite=").concat(t,";").concat(a)})}),console.log("After clearing cookies:",document.cookie)}function r(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));return t?t.split("=")[1]:null}o.d(t,{b:function(){return a},e:function(){return r}})}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/162-741f64e7b75eb970.js b/litellm/proxy/_experimental/out/_next/static/chunks/162-741f64e7b75eb970.js deleted file mode 100644 index 58e4372f8d..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/162-741f64e7b75eb970.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[162],{36724:function(e,t,n){n.d(t,{Dx:function(){return i.Z},Zb:function(){return s.Z},xv:function(){return r.Z},zx:function(){return a.Z}});var a=n(20831),s=n(12514),r=n(84264),i=n(96761)},19130:function(e,t,n){n.d(t,{RM:function(){return s.Z},SC:function(){return l.Z},iA:function(){return a.Z},pj:function(){return r.Z},ss:function(){return i.Z},xs:function(){return o.Z}});var a=n(21626),s=n(97214),r=n(28241),i=n(58834),o=n(69552),l=n(71876)},88658:function(e,t,n){n.d(t,{L:function(){return s}});var a=n(49817);let s=e=>{let t;let{apiKeySource:n,accessToken:s,apiKey:r,inputMessage:i,chatHistory:o,selectedTags:l,selectedVectorStores:c,selectedGuardrails:d,endpointType:m,selectedModel:p,selectedSdk:u}=e,g="session"===n?s:r,x=window.location.origin,h=i||"Your prompt here",f=h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),_=o.filter(e=>!e.isImage).map(e=>{let{role:t,content:n}=e;return{role:t,content:n}}),b={};l.length>0&&(b.tags=l),c.length>0&&(b.vector_stores=c),d.length>0&&(b.guardrails=d);let v=p||"your-model-name",j="azure"===u?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(x,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(x,'"\n)');switch(m){case a.KP.CHAT:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(v,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(v,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(f,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(v,'",\n input=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(v,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(f,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:t="azure"===u?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(v,'",\n prompt="').concat(i,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:t="azure"===u?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;default:t="\n# Code generation for this endpoint is not implemented yet."}return"".concat(j,"\n").concat(t)}},49817:function(e,t,n){var a,s,r,i;n.d(t,{KP:function(){return s},vf:function(){return l}}),(r=a||(a={})).IMAGE_GENERATION="image_generation",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",(i=s||(s={})).IMAGE="image",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages";let o={image_generation:"image",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages"},l=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=o[e];return console.log("endpointType:",t),t}return"chat"}},8048:function(e,t,n){n.d(t,{C:function(){return m}});var a=n(57437),s=n(71594),r=n(24525),i=n(2265),o=n(19130),l=n(44633),c=n(86462),d=n(49084);function m(e){let{data:t=[],columns:n,isLoading:m=!1,table:p,defaultSorting:u=[]}=e,[g,x]=i.useState(u),[h]=i.useState("onChange"),[f,_]=i.useState({}),[b,v]=i.useState({}),j=(0,s.b7)({data:t,columns:n,state:{sorting:g,columnSizing:f,columnVisibility:b},columnResizeMode:h,onSortingChange:x,onColumnSizingChange:_,onColumnVisibilityChange:v,getCoreRowModel:(0,r.sC)(),getSortedRowModel:(0,r.tj)(),enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return i.useEffect(()=>{p&&(p.current=j)},[j,p]),(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("div",{className:"relative min-w-full",children:(0,a.jsxs)(o.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,a.jsx)(o.ss,{children:j.getHeaderGroups().map(e=>(0,a.jsx)(o.SC,{children:e.headers.map(e=>{var t;return(0,a.jsxs)(o.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(l.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,a.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,a.jsx)(o.RM,{children:m?(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):j.getRowModel().rows.length>0?j.getRowModel().rows.map(e=>(0,a.jsx)(o.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,a.jsx)(o.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No models found"})})})})})]})})})})}},65373:function(e,t,n){n.d(t,{Z:function(){return f}});var a=n(57437),s=n(27648),r=n(2265),i=n(89970),o=n(80795),l=n(19250),c=n(15883),d=n(46346),m=n(57400),p=n(91870),u=n(40428),g=n(3914);let x=async e=>{if(!e)return null;try{return await (0,l.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var h=n(69734),f=e=>{let{userID:t,userEmail:n,userRole:f,premiumUser:_,proxySettings:b,setProxySettings:v,accessToken:j,isPublicPage:y=!1}=e,N=(0,l.getProxyBaseUrl)(),[w,A]=(0,r.useState)(""),{logoUrl:S}=(0,h.F)();(0,r.useEffect)(()=>{(async()=>{if(j){let e=await x(j);console.log("response from fetchProxySettings",e),e&&v(e)}})()},[j]),(0,r.useEffect)(()=>{A((null==b?void 0:b.PROXY_LOGOUT_URL)||"")},[b]);let I=[{key:"user-info",label:(0,a.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-2 text-gray-700"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),_?(0,a.jsx)(i.Z,{title:"Premium User",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,a.jsx)(i.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(m.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:f})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(p.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:n||"Unknown",children:n||"Unknown"})]})]})]})},{key:"logout",label:(0,a.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,g.b)(),window.location.href=w},children:[(0,a.jsx)(u.Z,{className:"mr-3 text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,a.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center h-12 px-4",children:[(0,a.jsx)("div",{className:"flex items-center flex-shrink-0",children:(0,a.jsx)(s.default,{href:"/",className:"flex items-center",children:(0,a.jsx)("img",{src:S||"".concat(N,"/get_image"),alt:"LiteLLM Brand",className:"h-8 w-auto"})})}),(0,a.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!y&&(0,a.jsx)(o.Z,{menu:{items:I,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,a.jsxs)("button",{className:"inline-flex items-center text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,a.jsx)("svg",{className:"ml-1 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},42673:function(e,t,n){var a,s;n.d(t,{Cl:function(){return a},bK:function(){return d},cd:function(){return o},dr:function(){return l},fK:function(){return r},ph:function(){return c}}),n(2265),(s=a||(a={})).Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Databricks="Databricks",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.Groq="Groq",s.JinaAI="Jina AI",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Perplexity="Perplexity",s.Sambanova="Sambanova",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI";let r={OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MistralAI:"mistral",Cohere:"cohere",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",FireworksAI:"fireworks_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra"},i="/ui/assets/logos/",o={Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),Databricks:"".concat(i,"databricks.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},l=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(r).find(t=>r[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:o[n],displayName:n}},c=e=>{if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";if("Azure"==e)return"azure/my-deployment";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let n=r[e];console.log("Provider mapped to: ".concat(n));let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&(s.litellm_provider===n||s.litellm_provider.includes(n))&&a.push(t)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"cohere_chat"===n.litellm_provider&&a.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"sagemaker_chat"===n.litellm_provider&&a.push(t)}))),a}},72162:function(e,t,n){var a=n(57437),s=n(2265),r=n(19250),i=n(8048),o=n(36724),l=n(42264),c=n(89970),d=n(3810),m=n(52787),p=n(91679),u=n(3477),g=n(17732),x=n(33245),h=n(78867),f=n(88658),_=n(49817),b=n(42673),v=n(65373);t.Z=e=>{var t,n;let{accessToken:j}=e,[y,N]=(0,s.useState)(null),[w,A]=(0,s.useState)("LiteLLM Gateway"),[S,I]=(0,s.useState)(null),[k,C]=(0,s.useState)(""),[E,O]=(0,s.useState)({}),[M,T]=(0,s.useState)(!0),[D,z]=(0,s.useState)(""),[P,L]=(0,s.useState)([]),[Z,R]=(0,s.useState)([]),[G,F]=(0,s.useState)([]),[H,K]=(0,s.useState)("I'm alive! ✓"),[U,V]=(0,s.useState)(!1),[W,q]=(0,s.useState)(null),[B,J]=(0,s.useState)({}),Y=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=async()=>{try{T(!0);let e=await (0,r.modelHubPublicModelsCall)();console.log("ModelHubData:",e),N(e)}catch(e){console.error("There was an error fetching the public model data",e),K("Service unavailable")}finally{T(!1)}};(async()=>{let e=await (0,r.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),A(e.docs_title),I(e.custom_docs_description),C(e.litellm_version),O(e.useful_links||{})})(),e()},[]),(0,s.useEffect)(()=>{},[D,P,Z,G]);let $=(0,s.useMemo)(()=>{if(!y)return[];let e=y;if(D.trim()){let t=D.toLowerCase(),n=t.split(/\s+/),a=y.filter(e=>{let a=e.model_group.toLowerCase();return!!a.includes(t)||n.every(e=>a.includes(e))});a.length>0&&(e=a.sort((e,n)=>{let a=e.model_group.toLowerCase(),s=n.model_group.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,o=a.startsWith(t)?100:0,l=s.startsWith(t)?100:0,c=t.split(/\s+/).every(e=>a.includes(e))?50:0,d=t.split(/\s+/).every(e=>s.includes(e))?50:0,m=a.length;return i+l+d+(1e3-s.length)-(r+o+c+(1e3-m))}))}return e.filter(e=>{let t=0===P.length||P.some(t=>e.providers.includes(t)),n=0===Z.length||Z.includes(e.mode||""),a=0===G.length||Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).some(e=>{let[t]=e,n=t.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return G.includes(n)});return t&&n&&a})},[y,D,P,Z,G]),X=e=>{q(e),V(!0)},Q=e=>{navigator.clipboard.writeText(e),l.ZP.success("Copied to clipboard!")},ee=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),et=e=>Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return t}),en=e=>"$".concat((1e6*e).toFixed(4)),ea=e=>e?e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toString():"N/A",es=(e,t)=>{let n=[];return e&&n.push("RPM: ".concat(e.toLocaleString())),t&&n.push("TPM: ".concat(t.toLocaleString())),n.length>0?n.join(", "):"N/A"};return(0,a.jsxs)("div",{className:"min-h-screen bg-white",children:[(0,a.jsx)(v.Z,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:J,proxySettings:B,accessToken:j||null,isPublicPage:!0}),(0,a.jsxs)("div",{className:"w-full px-8 py-12",children:[(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,a.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:S||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,a.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2",children:"\uD83D\uDD27"}),"Built with litellm: v",k]})})]}),E&&Object.keys(E).length>0&&(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(E||{}).map(e=>{let[t,n]=e;return(0,a.jsxs)("button",{onClick:()=>window.open(n,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4"}),(0,a.jsx)(o.xv,{className:"text-sm font-medium",children:t})]},t)})})]}),(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,a.jsxs)(o.xv,{className:"text-green-600 font-medium text-sm",children:["Service status: ",H]})})]}),(0,a.jsxs)(o.Zb,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,a.jsx)(c.Z,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,a.jsx)(x.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(g.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:D,onChange:e=>z(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,a.jsx)(m.default,{mode:"multiple",value:P,onChange:e=>L(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,b.dr)(e.value);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,a.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e.label})]})},children:y&&(e=>{let t=new Set;return e.forEach(e=>{e.providers.forEach(e=>t.add(e))}),Array.from(t)})(y).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,a.jsx)(m.default,{mode:"multiple",value:Z,onChange:e=>R(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:y&&(e=>{let t=new Set;return e.forEach(e=>{e.mode&&t.add(e.mode)}),Array.from(t)})(y).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,a.jsx)(m.default,{mode:"multiple",value:G,onChange:e=>F(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:y&&(e=>{let t=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).forEach(e=>{let[n]=e,a=n.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.add(a)})}),Array.from(t).sort()})(y).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(i.C,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(c.Z,{title:t.original.model_group,children:(0,a.jsx)(o.zx,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>X(t.original),children:t.original.model_group})})})},size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.providers;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>{let{logo:t}=(0,b.dr)(e);return(0,a.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.mode;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(e=>{switch(null==e?void 0:e.toLowerCase()){case"chat":return"\uD83D\uDCAC";case"rerank":return"\uD83D\uDD04";case"embedding":return"\uD83D\uDCC4";default:return"\uD83E\uDD16"}})(n||"")}),(0,a.jsx)(o.xv,{children:n||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:ea(t.original.max_input_tokens)})},size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:ea(t.original.max_output_tokens)})},size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.input_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?en(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.output_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?en(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return ee(t)});return 0===n.length?(0,a.jsx)(o.xv,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(d.Z,{color:"blue",className:"text-xs",children:n[0]})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(d.Z,{color:"blue",className:"text-xs",children:n[0]}),(0,a.jsx)(c.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Features:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:120},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original;return(0,a.jsx)(o.xv,{className:"text-xs text-gray-600",children:es(n.rpm,n.tpm)})},size:150}],data:$,isLoading:M,table:Y,defaultSorting:[{id:"model_group",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(o.xv,{className:"text-sm text-gray-600",children:["Showing ",$.length," of ",(null==y?void 0:y.length)||0," models"]})})]})]}),(0,a.jsx)(p.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==W?void 0:W.model_group)||"Model Details"}),W&&(0,a.jsx)(c.Z,{title:"Copy model name",children:(0,a.jsx)(h.Z,{onClick:()=>Q(W.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:U,footer:null,onOk:()=>{V(!1),q(null)},onCancel:()=>{V(!1),q(null)},children:W&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Model Name:"}),(0,a.jsx)(o.xv,{children:W.model_group})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Mode:"}),(0,a.jsx)(o.xv,{children:W.mode||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Providers:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:W.providers.map(e=>{let{logo:t}=(0,b.dr)(e);return(0,a.jsx)(d.Z,{color:"blue",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),W.model_group.includes("*")&&(0,a.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(x.Z,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800",children:["For example, with ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:W.model_group}),", you can use any string (",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:W.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(t=W.max_input_tokens)||void 0===t?void 0:t.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(n=W.max_output_tokens)||void 0===n?void 0:n.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:W.input_cost_per_token?en(W.input_cost_per_token):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:W.output_cost_per_token?en(W.output_cost_per_token):"Not specified"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=et(W),t=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,a.jsx)(o.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,n)=>(0,a.jsx)(d.Z,{color:t[n%t.length],children:ee(e)},e))})()})]}),(W.tpm||W.rpm)&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[W.tpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,a.jsx)(o.xv,{children:W.tpm.toLocaleString()})]}),W.rpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,a.jsx)(o.xv,{children:W.rpm.toLocaleString()})]})]})]}),W.supported_openai_params&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:W.supported_openai_params.map(e=>(0,a.jsx)(d.Z,{color:"green",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:(0,f.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,_.vf)(W.mode||"chat"),selectedModel:W.model_group,selectedSdk:"openai"})})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{Q((0,f.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,_.vf)(W.mode||"chat"),selectedModel:W.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})}},69734:function(e,t,n){n.d(t,{F:function(){return o},f:function(){return l}});var a=n(57437),s=n(2265),r=n(19250);let i=(0,s.createContext)(void 0),o=()=>{let e=(0,s.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},l=e=>{let{children:t,accessToken:n}=e,[o,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{if(n)try{let t=(0,r.getProxyBaseUrl)(),a=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(a.ok){var e;let t=await a.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&l(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[n]),(0,a.jsx)(i.Provider,{value:{logoUrl:o,setLogoUrl:l},children:t})}}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/162-f2925685093720a4.js b/litellm/proxy/_experimental/out/_next/static/chunks/162-f2925685093720a4.js new file mode 100644 index 0000000000..61e8b1eeba --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/162-f2925685093720a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[162],{36724:function(e,t,n){n.d(t,{Dx:function(){return i.Z},Zb:function(){return s.Z},xv:function(){return r.Z},zx:function(){return a.Z}});var a=n(20831),s=n(12514),r=n(84264),i=n(96761)},19130:function(e,t,n){n.d(t,{RM:function(){return s.Z},SC:function(){return l.Z},iA:function(){return a.Z},pj:function(){return r.Z},ss:function(){return i.Z},xs:function(){return o.Z}});var a=n(21626),s=n(97214),r=n(28241),i=n(58834),o=n(69552),l=n(71876)},88658:function(e,t,n){n.d(t,{L:function(){return s}});var a=n(49817);let s=e=>{let t;let{apiKeySource:n,accessToken:s,apiKey:r,inputMessage:i,chatHistory:o,selectedTags:l,selectedVectorStores:c,selectedGuardrails:d,endpointType:m,selectedModel:p,selectedSdk:u}=e,g="session"===n?s:r,x=window.location.origin,h=i||"Your prompt here",f=h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),_=o.filter(e=>!e.isImage).map(e=>{let{role:t,content:n}=e;return{role:t,content:n}}),b={};l.length>0&&(b.tags=l),c.length>0&&(b.vector_stores=c),d.length>0&&(b.guardrails=d);let v=p||"your-model-name",j="azure"===u?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(x,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(x,'"\n)');switch(m){case a.KP.CHAT:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(v,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(v,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(f,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(v,'",\n input=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(v,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(f,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:t="azure"===u?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(v,'",\n prompt="').concat(i,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:t="azure"===u?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;default:t="\n# Code generation for this endpoint is not implemented yet."}return"".concat(j,"\n").concat(t)}},49817:function(e,t,n){var a,s,r,i;n.d(t,{KP:function(){return s},vf:function(){return l}}),(r=a||(a={})).IMAGE_GENERATION="image_generation",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",(i=s||(s={})).IMAGE="image",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages";let o={image_generation:"image",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages"},l=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=o[e];return console.log("endpointType:",t),t}return"chat"}},29488:function(e,t,n){n.d(t,{Hc:function(){return i},Ui:function(){return r},e4:function(){return o},xd:function(){return l}});let a="litellm_mcp_auth_tokens",s=()=>{try{let e=localStorage.getItem(a);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},r=(e,t)=>{try{let n=s()[e];if(n&&n.serverAlias===t||n&&!t&&!n.serverAlias)return n.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},i=(e,t,n,r)=>{try{let i=s();i[e]={serverId:e,serverAlias:r,authValue:t,authType:n,timestamp:Date.now()},localStorage.setItem(a,JSON.stringify(i))}catch(e){console.error("Error storing MCP auth token:",e)}},o=e=>{try{let t=s();delete t[e],localStorage.setItem(a,JSON.stringify(t))}catch(e){console.error("Error removing MCP auth token:",e)}},l=()=>{try{localStorage.removeItem(a)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},8048:function(e,t,n){n.d(t,{C:function(){return m}});var a=n(57437),s=n(71594),r=n(24525),i=n(2265),o=n(19130),l=n(44633),c=n(86462),d=n(49084);function m(e){let{data:t=[],columns:n,isLoading:m=!1,table:p,defaultSorting:u=[]}=e,[g,x]=i.useState(u),[h]=i.useState("onChange"),[f,_]=i.useState({}),[b,v]=i.useState({}),j=(0,s.b7)({data:t,columns:n,state:{sorting:g,columnSizing:f,columnVisibility:b},columnResizeMode:h,onSortingChange:x,onColumnSizingChange:_,onColumnVisibilityChange:v,getCoreRowModel:(0,r.sC)(),getSortedRowModel:(0,r.tj)(),enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return i.useEffect(()=>{p&&(p.current=j)},[j,p]),(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("div",{className:"relative min-w-full",children:(0,a.jsxs)(o.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,a.jsx)(o.ss,{children:j.getHeaderGroups().map(e=>(0,a.jsx)(o.SC,{children:e.headers.map(e=>{var t;return(0,a.jsxs)(o.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(l.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,a.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,a.jsx)(o.RM,{children:m?(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):j.getRowModel().rows.length>0?j.getRowModel().rows.map(e=>(0,a.jsx)(o.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,a.jsx)(o.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No models found"})})})})})]})})})})}},65373:function(e,t,n){n.d(t,{Z:function(){return _}});var a=n(57437),s=n(27648),r=n(2265),i=n(89970),o=n(80795),l=n(19250),c=n(15883),d=n(46346),m=n(57400),p=n(91870),u=n(40428),g=n(3914);let x=async e=>{if(!e)return null;try{return await (0,l.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var h=n(69734),f=n(29488),_=e=>{let{userID:t,userEmail:n,userRole:_,premiumUser:b,proxySettings:v,setProxySettings:j,accessToken:y,isPublicPage:N=!1}=e,w=(0,l.getProxyBaseUrl)(),[S,A]=(0,r.useState)(""),{logoUrl:I}=(0,h.F)();(0,r.useEffect)(()=>{(async()=>{if(y){let e=await x(y);console.log("response from fetchProxySettings",e),e&&j(e)}})()},[y]),(0,r.useEffect)(()=>{A((null==v?void 0:v.PROXY_LOGOUT_URL)||"")},[v]);let k=[{key:"user-info",label:(0,a.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-2 text-gray-700"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),b?(0,a.jsx)(i.Z,{title:"Premium User",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,a.jsx)(i.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(m.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:_})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(p.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:n||"Unknown",children:n||"Unknown"})]})]})]})},{key:"logout",label:(0,a.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,g.b)(),(0,f.xd)(),window.location.href=S},children:[(0,a.jsx)(u.Z,{className:"mr-3 text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,a.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center h-12 px-4",children:[(0,a.jsx)("div",{className:"flex items-center flex-shrink-0",children:(0,a.jsx)(s.default,{href:"/",className:"flex items-center",children:(0,a.jsx)("img",{src:I||"".concat(w,"/get_image"),alt:"LiteLLM Brand",className:"h-8 w-auto"})})}),(0,a.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!N&&(0,a.jsx)(o.Z,{menu:{items:k,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,a.jsxs)("button",{className:"inline-flex items-center text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,a.jsx)("svg",{className:"ml-1 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},42673:function(e,t,n){var a,s;n.d(t,{Cl:function(){return a},bK:function(){return d},cd:function(){return o},dr:function(){return l},fK:function(){return r},ph:function(){return c}}),n(2265),(s=a||(a={})).Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Databricks="Databricks",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.JinaAI="Jina AI",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Perplexity="Perplexity",s.Sambanova="Sambanova",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI";let r={OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MistralAI:"mistral",Cohere:"cohere",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra"},i="/ui/assets/logos/",o={Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),Databricks:"".concat(i,"databricks.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},l=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(r).find(t=>r[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:o[n],displayName:n}},c=e=>{if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";if("Azure"==e)return"azure/my-deployment";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let n=r[e];console.log("Provider mapped to: ".concat(n));let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&(s.litellm_provider===n||s.litellm_provider.includes(n))&&a.push(t)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"cohere_chat"===n.litellm_provider&&a.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"sagemaker_chat"===n.litellm_provider&&a.push(t)}))),a}},72162:function(e,t,n){var a=n(57437),s=n(2265),r=n(19250),i=n(8048),o=n(36724),l=n(42264),c=n(89970),d=n(3810),m=n(52787),p=n(82680),u=n(3477),g=n(17732),x=n(33245),h=n(78867),f=n(88658),_=n(49817),b=n(42673),v=n(65373);t.Z=e=>{var t,n;let{accessToken:j}=e,[y,N]=(0,s.useState)(null),[w,S]=(0,s.useState)("LiteLLM Gateway"),[A,I]=(0,s.useState)(null),[k,C]=(0,s.useState)(""),[E,O]=(0,s.useState)({}),[M,T]=(0,s.useState)(!0),[D,z]=(0,s.useState)(""),[P,L]=(0,s.useState)([]),[Z,G]=(0,s.useState)([]),[R,H]=(0,s.useState)([]),[F,K]=(0,s.useState)("I'm alive! ✓"),[U,V]=(0,s.useState)(!1),[W,q]=(0,s.useState)(null),[J,B]=(0,s.useState)({}),Y=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=async()=>{try{T(!0);let e=await (0,r.modelHubPublicModelsCall)();console.log("ModelHubData:",e),N(e)}catch(e){console.error("There was an error fetching the public model data",e),K("Service unavailable")}finally{T(!1)}};(async()=>{let e=await (0,r.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),S(e.docs_title),I(e.custom_docs_description),C(e.litellm_version),O(e.useful_links||{})})(),e()},[]),(0,s.useEffect)(()=>{},[D,P,Z,R]);let $=(0,s.useMemo)(()=>{if(!y)return[];let e=y;if(D.trim()){let t=D.toLowerCase(),n=t.split(/\s+/),a=y.filter(e=>{let a=e.model_group.toLowerCase();return!!a.includes(t)||n.every(e=>a.includes(e))});a.length>0&&(e=a.sort((e,n)=>{let a=e.model_group.toLowerCase(),s=n.model_group.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,o=a.startsWith(t)?100:0,l=s.startsWith(t)?100:0,c=t.split(/\s+/).every(e=>a.includes(e))?50:0,d=t.split(/\s+/).every(e=>s.includes(e))?50:0,m=a.length;return i+l+d+(1e3-s.length)-(r+o+c+(1e3-m))}))}return e.filter(e=>{let t=0===P.length||P.some(t=>e.providers.includes(t)),n=0===Z.length||Z.includes(e.mode||""),a=0===R.length||Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).some(e=>{let[t]=e,n=t.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return R.includes(n)});return t&&n&&a})},[y,D,P,Z,R]),X=e=>{q(e),V(!0)},Q=e=>{navigator.clipboard.writeText(e),l.ZP.success("Copied to clipboard!")},ee=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),et=e=>Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return t}),en=e=>"$".concat((1e6*e).toFixed(4)),ea=e=>e?e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toString():"N/A",es=(e,t)=>{let n=[];return e&&n.push("RPM: ".concat(e.toLocaleString())),t&&n.push("TPM: ".concat(t.toLocaleString())),n.length>0?n.join(", "):"N/A"};return(0,a.jsxs)("div",{className:"min-h-screen bg-white",children:[(0,a.jsx)(v.Z,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:B,proxySettings:J,accessToken:j||null,isPublicPage:!0}),(0,a.jsxs)("div",{className:"w-full px-8 py-12",children:[(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,a.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:A||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,a.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2",children:"\uD83D\uDD27"}),"Built with litellm: v",k]})})]}),E&&Object.keys(E).length>0&&(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(E||{}).map(e=>{let[t,n]=e;return(0,a.jsxs)("button",{onClick:()=>window.open(n,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4"}),(0,a.jsx)(o.xv,{className:"text-sm font-medium",children:t})]},t)})})]}),(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,a.jsxs)(o.xv,{className:"text-green-600 font-medium text-sm",children:["Service status: ",F]})})]}),(0,a.jsxs)(o.Zb,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,a.jsx)(c.Z,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,a.jsx)(x.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(g.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:D,onChange:e=>z(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,a.jsx)(m.default,{mode:"multiple",value:P,onChange:e=>L(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,b.dr)(e.value);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,a.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e.label})]})},children:y&&(e=>{let t=new Set;return e.forEach(e=>{e.providers.forEach(e=>t.add(e))}),Array.from(t)})(y).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,a.jsx)(m.default,{mode:"multiple",value:Z,onChange:e=>G(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:y&&(e=>{let t=new Set;return e.forEach(e=>{e.mode&&t.add(e.mode)}),Array.from(t)})(y).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,a.jsx)(m.default,{mode:"multiple",value:R,onChange:e=>H(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:y&&(e=>{let t=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).forEach(e=>{let[n]=e,a=n.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.add(a)})}),Array.from(t).sort()})(y).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(i.C,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(c.Z,{title:t.original.model_group,children:(0,a.jsx)(o.zx,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>X(t.original),children:t.original.model_group})})})},size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.providers;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>{let{logo:t}=(0,b.dr)(e);return(0,a.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.mode;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(e=>{switch(null==e?void 0:e.toLowerCase()){case"chat":return"\uD83D\uDCAC";case"rerank":return"\uD83D\uDD04";case"embedding":return"\uD83D\uDCC4";default:return"\uD83E\uDD16"}})(n||"")}),(0,a.jsx)(o.xv,{children:n||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:ea(t.original.max_input_tokens)})},size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:ea(t.original.max_output_tokens)})},size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.input_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?en(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.output_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?en(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return ee(t)});return 0===n.length?(0,a.jsx)(o.xv,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(d.Z,{color:"blue",className:"text-xs",children:n[0]})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(d.Z,{color:"blue",className:"text-xs",children:n[0]}),(0,a.jsx)(c.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Features:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:120},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original;return(0,a.jsx)(o.xv,{className:"text-xs text-gray-600",children:es(n.rpm,n.tpm)})},size:150}],data:$,isLoading:M,table:Y,defaultSorting:[{id:"model_group",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(o.xv,{className:"text-sm text-gray-600",children:["Showing ",$.length," of ",(null==y?void 0:y.length)||0," models"]})})]})]}),(0,a.jsx)(p.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==W?void 0:W.model_group)||"Model Details"}),W&&(0,a.jsx)(c.Z,{title:"Copy model name",children:(0,a.jsx)(h.Z,{onClick:()=>Q(W.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:U,footer:null,onOk:()=>{V(!1),q(null)},onCancel:()=>{V(!1),q(null)},children:W&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Model Name:"}),(0,a.jsx)(o.xv,{children:W.model_group})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Mode:"}),(0,a.jsx)(o.xv,{children:W.mode||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Providers:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:W.providers.map(e=>{let{logo:t}=(0,b.dr)(e);return(0,a.jsx)(d.Z,{color:"blue",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),W.model_group.includes("*")&&(0,a.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(x.Z,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800",children:["For example, with ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:W.model_group}),", you can use any string (",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:W.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(t=W.max_input_tokens)||void 0===t?void 0:t.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(n=W.max_output_tokens)||void 0===n?void 0:n.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:W.input_cost_per_token?en(W.input_cost_per_token):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:W.output_cost_per_token?en(W.output_cost_per_token):"Not specified"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=et(W),t=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,a.jsx)(o.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,n)=>(0,a.jsx)(d.Z,{color:t[n%t.length],children:ee(e)},e))})()})]}),(W.tpm||W.rpm)&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[W.tpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,a.jsx)(o.xv,{children:W.tpm.toLocaleString()})]}),W.rpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,a.jsx)(o.xv,{children:W.rpm.toLocaleString()})]})]})]}),W.supported_openai_params&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:W.supported_openai_params.map(e=>(0,a.jsx)(d.Z,{color:"green",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:(0,f.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,_.vf)(W.mode||"chat"),selectedModel:W.model_group,selectedSdk:"openai"})})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{Q((0,f.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,_.vf)(W.mode||"chat"),selectedModel:W.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})}},69734:function(e,t,n){n.d(t,{F:function(){return o},f:function(){return l}});var a=n(57437),s=n(2265),r=n(19250);let i=(0,s.createContext)(void 0),o=()=>{let e=(0,s.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},l=e=>{let{children:t,accessToken:n}=e,[o,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{if(n)try{let t=(0,r.getProxyBaseUrl)(),a=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(a.ok){var e;let t=await a.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&l(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[n]),(0,a.jsx)(i.Provider,{value:{logoUrl:o,setLogoUrl:l},children:t})}}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/172-2755b782e3848de3.js b/litellm/proxy/_experimental/out/_next/static/chunks/172-25e8f67ccf021150.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/172-2755b782e3848de3.js rename to litellm/proxy/_experimental/out/_next/static/chunks/172-25e8f67ccf021150.js index 1a56d33e3e..28e153daca 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/172-2755b782e3848de3.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/172-25e8f67ccf021150.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[172],{57018:function(e,s,l){l.d(s,{Ct:function(){return t.Z},Dx:function(){return i.Z},Zb:function(){return a.Z},xv:function(){return n.Z},zx:function(){return r.Z}});var t=l(41649),r=l(20831),a=l(12514),n=l(84264),i=l(96761)},95704:function(e,s,l){l.d(s,{Dx:function(){return x.Z},RM:function(){return a.Z},SC:function(){return o.Z},Zb:function(){return t.Z},iA:function(){return r.Z},pj:function(){return n.Z},ss:function(){return i.Z},xs:function(){return c.Z},xv:function(){return d.Z}});var t=l(12514),r=l(21626),a=l(97214),n=l(28241),i=l(58834),c=l(69552),o=l(71876),d=l(84264),x=l(96761)},36172:function(e,s,l){l.d(s,{Z:function(){return D}});var t=l(57437),r=l(2265),a=l(99376),n=l(19250),i=l(8048),c=l(41649),o=l(20831),d=l(84264),x=l(89970),m=l(3810),u=l(23639),p=l(15424);let h=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),g=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),j=e=>"$".concat((1e6*e).toFixed(2)),b=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString(),v=function(e,s){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,r=l.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium text-sm",children:r.model_group}),(0,t.jsx)(x.Z,{title:"Copy model name",children:(0,t.jsx)(u.Z,{onClick:()=>s(r.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(d.Z,{className:"text-xs text-gray-600",children:r.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,s)=>{let l=e.original.providers.join(", "),t=s.original.providers.join(", ");return l.localeCompare(t)},cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(m.Z,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(d.Z,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:s}=e,l=s.original;return l.mode?(0,t.jsx)(c.Z,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(d.Z,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,s)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((s.original.max_input_tokens||0)+(s.original.max_output_tokens||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(d.Z,{className:"text-xs",children:[l.max_input_tokens?b(l.max_input_tokens):"-"," / ",l.max_output_tokens?b(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,s)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((s.original.input_cost_per_token||0)+(s.original.output_cost_per_token||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.Z,{className:"text-xs",children:l.input_cost_per_token?j(l.input_cost_per_token):"-"}),(0,t.jsx)(d.Z,{className:"text-xs text-gray-500",children:l.output_cost_per_token?j(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:e=>{let{row:s}=e,l=g(s.original),r=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(d.Z,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,s)=>(0,t.jsx)(c.Z,{color:r[s%r.length],size:"xs",children:h(e)},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,s)=>(!0===e.original.is_public_model_group?1:0)-(!0===s.original.is_public_model_group?1:0),cell:e=>{let{row:s}=e;return!0===s.original.is_public_model_group?(0,t.jsx)(c.Z,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(c.Z,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:s=>{let{row:l}=s,r=l.original;return(0,t.jsxs)(o.Z,{size:"xs",variant:"secondary",onClick:()=>e(r),icon:p.Z,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return l?r.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):r};var y=l(72162),N=l(91810),f=l(13634),_=l(42264),k=l(61994),w=l(73002),Z=l(91679),C=l(96761),S=l(12514),P=e=>{let{modelHubData:s,onFilteredDataChange:l,showFiltersCard:a=!0,className:n=""}=e,[i,c]=(0,r.useState)(""),[o,x]=(0,r.useState)(""),[m,u]=(0,r.useState)(""),[p,h]=(0,r.useState)(""),g=(0,r.useRef)([]),j=(0,r.useMemo)(()=>(null==s?void 0:s.filter(e=>{let s=e.model_group.toLowerCase().includes(i.toLowerCase()),l=""===o||e.providers.includes(o),t=""===m||e.mode===m,r=""===p||Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).some(e=>{let[s]=e;return s.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===p});return s&&l&&t&&r}))||[],[s,i,o,m,p]);(0,r.useEffect)(()=>{(j.length!==g.current.length||j.some((e,s)=>{var l;return e.model_group!==(null===(l=g.current[s])||void 0===l?void 0:l.model_group)}))&&(g.current=j,l(j))},[j,l]);let b=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:i,onChange:e=>c(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:o,onChange:e=>x(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.providers.forEach(e=>s.add(e))}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:m,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.mode&&s.add(e.mode)}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),s&&(e=>{let s=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).forEach(e=>{let[l]=e,t=l.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");s.add(t)})}),Array.from(s).sort()})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(i||o||m||p)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{c(""),x(""),u(""),h("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return a?(0,t.jsx)(S.Z,{className:"mb-6 ".concat(n),children:b}):(0,t.jsx)("div",{className:n,children:b})};let{Step:M}=N.default;var L=e=>{let{visible:s,onClose:l,accessToken:a,modelHubData:i,onSuccess:o}=e,[x,m]=(0,r.useState)(0),[u,p]=(0,r.useState)(new Set),[h,g]=(0,r.useState)([]),[j,b]=(0,r.useState)(!1),[v]=f.Z.useForm(),y=()=>{m(0),p(new Set),g([]),v.resetFields(),l()},S=(e,s)=>{let l=new Set(u);s?l.add(e):l.delete(e),p(l)},L=e=>{e?p(new Set(h.map(e=>e.model_group))):p(new Set)},A=(0,r.useCallback)(e=>{g(e)},[]);(0,r.useEffect)(()=>{s&&i.length>0&&(g(i),p(new Set(i.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[s,i]);let F=async()=>{if(0===u.size){_.ZP.error("Please select at least one model to make public");return}b(!0);try{let e=Array.from(u);await (0,n.makeModelGroupPublic)(a,e),_.ZP.success("Successfully made ".concat(e.length," model group(s) public!")),y(),o()}catch(e){console.error("Error making model groups public:",e),_.ZP.error("Failed to make model groups public. Please try again.")}finally{b(!1)}},U=()=>{let e=h.length>0&&h.every(e=>u.has(e.model_group)),s=u.size>0&&!e;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(C.Z,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(k.Z,{checked:e,indeterminate:s,onChange:e=>L(e.target.checked),disabled:0===h.length,children:["Select All ",h.length>0&&"(".concat(h.length,")")]})})]}),(0,t.jsx)(d.Z,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid API key to use these models."}),(0,t.jsx)(P,{modelHubData:i,onFilteredDataChange:A,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===h.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(d.Z,{children:"No models match the current filters."})}):h.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(k.Z,{checked:u.has(e.model_group),onChange:s=>S(e.model_group,s.target.checked)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(c.Z,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),u.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," selected"]})})]})},z=()=>(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(C.Z,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(d.Z,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(u).map(e=>{let s=i.find(s=>s.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e}),s&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:s.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," will be made public"]})})]});return(0,t.jsx)(Z.Z,{title:"Make Models Public",open:s,onCancel:y,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(f.Z,{form:v,layout:"vertical",children:[(0,t.jsxs)(N.default,{current:x,className:"mb-6",children:[(0,t.jsx)(M,{title:"Select Models"}),(0,t.jsx)(M,{title:"Confirm"})]}),(()=>{switch(x){case 0:return U();case 1:return z();default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(w.ZP,{onClick:0===x?y:()=>{1===x&&m(0)},children:0===x?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===x&&(0,t.jsx)(w.ZP,{onClick:()=>{if(0===x){if(0===u.size){_.ZP.error("Please select at least one model to make public");return}m(1)}},disabled:0===u.size,children:"Next"}),1===x&&(0,t.jsx)(w.ZP,{onClick:F,loading:j,children:"Make Public"})]})]})]})})},A=l(69870),F=l(57018),U=l(17906),z=l(78867),E=l(20347),D=e=>{var s,l;let{accessToken:c,publicPage:o,premiumUser:d,userRole:x}=e,[m,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[g,j]=(0,r.useState)(!0),[b,N]=(0,r.useState)(!1),[f,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),[S,M]=(0,r.useState)([]),[D,R]=(0,r.useState)(!1),H=(0,a.useRouter)(),O=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=async e=>{try{j(!0);let s=await (0,n.modelHubCall)(e);console.log("ModelHubData:",s),h(s.data),(0,n.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log("data: ".concat(JSON.stringify(e))),!0==e.field_value&&u(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{j(!1)}},s=async()=>{try{var e,s;j(!0);let l=await (0,n.modelHubPublicModelsCall)();console.log("ModelHubData:",l),console.log("First model structure:",l[0]),console.log("Model has model_group?",null===(e=l[0])||void 0===e?void 0:e.model_group),console.log("Model has providers?",null===(s=l[0])||void 0===s?void 0:s.providers),h(l),u(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{j(!1)}};c?e(c):o&&s()},[c,o]);let T=()=>{c&&R(!0)},I=()=>{N(!1),k(!1),C(null)},K=()=>{N(!1),k(!1),C(null)},Y=e=>{navigator.clipboard.writeText(e),_.ZP.success("Copied to clipboard!")},W=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),B=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),V=e=>"$".concat((1e6*e).toFixed(2)),q=(0,r.useCallback)(e=>{M(e)},[]);return(console.log("publicPage: ",o),console.log("publicPageAllowed: ",m),o&&m)?(0,t.jsx)(y.Z,{accessToken:c}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==o?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(F.Dx,{className:"text-center",children:"Model Hub"}),(0,E.tY)(x||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models public for developers to know what models are available on the proxy."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(F.xv,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(F.xv,{className:"mr-2",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")}),(0,t.jsx)("button",{onClick:()=>Y("".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(z.Z,{size:16,className:"text-gray-600"})})]}),!1==o&&(0,E.tY)(x||"")&&(0,t.jsx)(F.zx,{className:"ml-4",onClick:()=>T(),children:"Make Public"})]})]}),(0,E.tY)(x||"")&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(A.Z,{accessToken:c,userRole:x})}),(0,t.jsxs)(F.Zb,{children:[(0,t.jsx)(P,{modelHubData:p||[],onFilteredDataChange:q}),(0,t.jsx)(i.C,{columns:v(e=>{C(e),N(!0)},Y,o),data:S,isLoading:g,table:O,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(F.xv,{className:"text-sm text-gray-600",children:["Showing ",S.length," of ",(null==p?void 0:p.length)||0," models"]})})]}):(0,t.jsxs)(F.Zb,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(F.xv,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(Z.Z,{title:"Public Model Hub",width:600,visible:f,footer:null,onOk:I,onCancel:K,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(F.xv,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(F.xv,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(F.zx,{onClick:()=>{H.replace("/model_hub_table?key=".concat(c))},children:"See Page"})})]})}),(0,t.jsx)(Z.Z,{title:(null==w?void 0:w.model_group)||"Model Details",width:1e3,visible:b,footer:null,onOk:I,onCancel:K,children:w&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(F.xv,{children:w.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(F.xv,{children:w.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:w.providers.map(e=>(0,t.jsx)(F.Ct,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(F.xv,{children:(null===(s=w.max_input_tokens)||void 0===s?void 0:s.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(F.xv,{children:(null===(l=w.max_output_tokens)||void 0===l?void 0:l.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(F.xv,{children:w.input_cost_per_token?V(w.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(F.xv,{children:w.output_cost_per_token?V(w.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=B(w),s=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,t.jsx)(F.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,l)=>(0,t.jsx)(F.Ct,{color:s[l%s.length],children:W(e)},e))})()})]}),(w.tpm||w.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[w.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(F.xv,{children:w.tpm.toLocaleString()})]}),w.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(F.xv,{children:w.rpm.toLocaleString()})]})]})]}),w.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:w.supported_openai_params.map(e=>(0,t.jsx)(F.Ct,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(U.Z,{language:"python",className:"text-sm",children:'import openai\n\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="http://0.0.0.0:4000" # Your LiteLLM Proxy URL\n)\n\nresponse = client.chat.completions.create(\n model="'.concat(w.model_group,'",\n messages=[\n {\n "role": "user",\n "content": "Hello, how are you?"\n }\n ]\n)\n\nprint(response.choices[0].message.content)')})]})]})}),(0,t.jsx)(L,{visible:D,onClose:()=>R(!1),accessToken:c||"",modelHubData:p||[],onSuccess:()=>{c&&(async()=>{try{let e=await (0,n.modelHubCall)(c);h(e.data)}catch(e){console.error("Error refreshing model data:",e)}})()}})]})}},69870:function(e,s,l){var t=l(57437),r=l(2265),a=l(91679),n=l(42264),i=l(86462),c=l(47686),o=l(77355),d=l(93416),x=l(74998),m=l(20347),u=l(19250),p=l(95704);s.Z=e=>{let{accessToken:s,userRole:l}=e,[h,g]=(0,r.useState)([]),[j,b]=(0,r.useState)({url:"",displayName:""}),[v,y]=(0,r.useState)(null),[N,f]=(0,r.useState)(!1),[_,k]=(0,r.useState)(!0),w=async()=>{if(s)try{f(!0);let e=await (0,u.getPublicModelHubInfo)();if(e&&e.useful_links){let s=e.useful_links||{},l=Object.entries(s).map((e,s)=>{let[l,t]=e;return{id:"".concat(s,"-").concat(l),displayName:l,url:t}});g(l)}else g([])}catch(e){console.error("Error fetching useful links:",e),g([])}finally{f(!1)}};if((0,r.useEffect)(()=>{w()},[s]),!(0,m.tY)(l||""))return null;let Z=async e=>{if(!s)return!1;try{let l={};return e.forEach(e=>{l[e.displayName]=e.url}),await (0,u.updateUsefulLinksCall)(s,l),a.Z.success({title:"Links Saved Successfully",content:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)("p",{className:"text-gray-600 mb-4",children:"Your useful links have been saved and are now visible on the public model hub."}),(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-blue-800 mb-2 font-medium",children:"View your updated model hub:"}),(0,t.jsx)("a",{href:"".concat((0,u.getProxyBaseUrl)(),"/ui/model_hub_table"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-blue-600 hover:text-blue-800 underline text-sm font-medium",children:"Open Public Model Hub →"})]})]}),width:500,okText:"Close",maskClosable:!0,keyboard:!0}),!0}catch(e){return console.error("Error saving links:",e),n.ZP.error("Failed to save links - ".concat(e)),!1}},C=async()=>{if(!j.url||!j.displayName)return;try{new URL(j.url)}catch(e){n.ZP.error("Please enter a valid URL");return}if(h.some(e=>e.displayName===j.displayName)){n.ZP.error("A link with this display name already exists");return}let e=[...h,{id:"".concat(Date.now(),"-").concat(j.displayName),displayName:j.displayName,url:j.url}];await Z(e)&&(g(e),b({url:"",displayName:""}),n.ZP.success("Link added successfully"))},S=e=>{y({...e})},P=async()=>{if(!v)return;try{new URL(v.url)}catch(e){n.ZP.error("Please enter a valid URL");return}if(h.some(e=>e.id!==v.id&&e.displayName===v.displayName)){n.ZP.error("A link with this display name already exists");return}let e=h.map(e=>e.id===v.id?v:e);await Z(e)&&(g(e),y(null),n.ZP.success("Link updated successfully"))},M=()=>{y(null)},L=async e=>{let s=h.filter(s=>s.id!==e);await Z(s)&&(g(s),n.ZP.success("Link deleted successfully"))},A=e=>{window.open(e,"_blank")};return(0,t.jsxs)(p.Zb,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>k(!_),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(p.Dx,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:_?(0,t.jsx)(i.Z,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(c.Z,{className:"w-5 h-5 text-gray-500"})})]}),_&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(p.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"URL"}),(0,t.jsx)("input",{type:"text",value:j.url,onChange:e=>b({...j,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:j.displayName,onChange:e=>b({...j,displayName:e.target.value}),placeholder:"Friendly name",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:C,disabled:!j.url||!j.displayName,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(j.url&&j.displayName?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,t.jsx)(o.Z,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsx)(p.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Links"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(p.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(p.ss,{children:(0,t.jsxs)(p.SC,{children:[(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(p.RM,{children:[h.map(e=>(0,t.jsx)(p.SC,{className:"h-8",children:v&&v.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:v.displayName,onChange:e=>y({...v,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:v.url,onChange:e=>y({...v,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:P,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:M,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pj,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(p.pj,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(p.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>A(e.url),className:"text-xs bg-green-50 text-green-600 px-2 py-1 rounded hover:bg-green-100",children:"Use"}),(0,t.jsx)("button",{onClick:()=>S(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(d.Z,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>L(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(x.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===h.length&&(0,t.jsx)(p.SC,{children:(0,t.jsx)(p.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})}},20347:function(e,s,l){l.d(s,{LQ:function(){return a},ZL:function(){return t},lo:function(){return r},tY:function(){return n}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=["Internal User","Internal Viewer"],a=["Internal User","Admin"],n=e=>t.includes(e)}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[172],{57018:function(e,s,l){l.d(s,{Ct:function(){return t.Z},Dx:function(){return i.Z},Zb:function(){return a.Z},xv:function(){return n.Z},zx:function(){return r.Z}});var t=l(41649),r=l(20831),a=l(12514),n=l(84264),i=l(96761)},95704:function(e,s,l){l.d(s,{Dx:function(){return x.Z},RM:function(){return a.Z},SC:function(){return o.Z},Zb:function(){return t.Z},iA:function(){return r.Z},pj:function(){return n.Z},ss:function(){return i.Z},xs:function(){return c.Z},xv:function(){return d.Z}});var t=l(12514),r=l(21626),a=l(97214),n=l(28241),i=l(58834),c=l(69552),o=l(71876),d=l(84264),x=l(96761)},36172:function(e,s,l){l.d(s,{Z:function(){return D}});var t=l(57437),r=l(2265),a=l(99376),n=l(19250),i=l(8048),c=l(41649),o=l(20831),d=l(84264),x=l(89970),m=l(3810),u=l(23639),p=l(15424);let h=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),g=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),j=e=>"$".concat((1e6*e).toFixed(2)),b=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString(),v=function(e,s){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,r=l.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium text-sm",children:r.model_group}),(0,t.jsx)(x.Z,{title:"Copy model name",children:(0,t.jsx)(u.Z,{onClick:()=>s(r.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(d.Z,{className:"text-xs text-gray-600",children:r.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,s)=>{let l=e.original.providers.join(", "),t=s.original.providers.join(", ");return l.localeCompare(t)},cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(m.Z,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(d.Z,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:s}=e,l=s.original;return l.mode?(0,t.jsx)(c.Z,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(d.Z,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,s)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((s.original.max_input_tokens||0)+(s.original.max_output_tokens||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(d.Z,{className:"text-xs",children:[l.max_input_tokens?b(l.max_input_tokens):"-"," / ",l.max_output_tokens?b(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,s)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((s.original.input_cost_per_token||0)+(s.original.output_cost_per_token||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.Z,{className:"text-xs",children:l.input_cost_per_token?j(l.input_cost_per_token):"-"}),(0,t.jsx)(d.Z,{className:"text-xs text-gray-500",children:l.output_cost_per_token?j(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:e=>{let{row:s}=e,l=g(s.original),r=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(d.Z,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,s)=>(0,t.jsx)(c.Z,{color:r[s%r.length],size:"xs",children:h(e)},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,s)=>(!0===e.original.is_public_model_group?1:0)-(!0===s.original.is_public_model_group?1:0),cell:e=>{let{row:s}=e;return!0===s.original.is_public_model_group?(0,t.jsx)(c.Z,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(c.Z,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:s=>{let{row:l}=s,r=l.original;return(0,t.jsxs)(o.Z,{size:"xs",variant:"secondary",onClick:()=>e(r),icon:p.Z,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return l?r.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):r};var y=l(72162),N=l(91810),f=l(13634),_=l(42264),k=l(61994),w=l(73002),Z=l(82680),C=l(96761),S=l(12514),P=e=>{let{modelHubData:s,onFilteredDataChange:l,showFiltersCard:a=!0,className:n=""}=e,[i,c]=(0,r.useState)(""),[o,x]=(0,r.useState)(""),[m,u]=(0,r.useState)(""),[p,h]=(0,r.useState)(""),g=(0,r.useRef)([]),j=(0,r.useMemo)(()=>(null==s?void 0:s.filter(e=>{let s=e.model_group.toLowerCase().includes(i.toLowerCase()),l=""===o||e.providers.includes(o),t=""===m||e.mode===m,r=""===p||Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).some(e=>{let[s]=e;return s.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===p});return s&&l&&t&&r}))||[],[s,i,o,m,p]);(0,r.useEffect)(()=>{(j.length!==g.current.length||j.some((e,s)=>{var l;return e.model_group!==(null===(l=g.current[s])||void 0===l?void 0:l.model_group)}))&&(g.current=j,l(j))},[j,l]);let b=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:i,onChange:e=>c(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:o,onChange:e=>x(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.providers.forEach(e=>s.add(e))}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:m,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.mode&&s.add(e.mode)}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),s&&(e=>{let s=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).forEach(e=>{let[l]=e,t=l.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");s.add(t)})}),Array.from(s).sort()})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(i||o||m||p)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{c(""),x(""),u(""),h("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return a?(0,t.jsx)(S.Z,{className:"mb-6 ".concat(n),children:b}):(0,t.jsx)("div",{className:n,children:b})};let{Step:M}=N.default;var L=e=>{let{visible:s,onClose:l,accessToken:a,modelHubData:i,onSuccess:o}=e,[x,m]=(0,r.useState)(0),[u,p]=(0,r.useState)(new Set),[h,g]=(0,r.useState)([]),[j,b]=(0,r.useState)(!1),[v]=f.Z.useForm(),y=()=>{m(0),p(new Set),g([]),v.resetFields(),l()},S=(e,s)=>{let l=new Set(u);s?l.add(e):l.delete(e),p(l)},L=e=>{e?p(new Set(h.map(e=>e.model_group))):p(new Set)},A=(0,r.useCallback)(e=>{g(e)},[]);(0,r.useEffect)(()=>{s&&i.length>0&&(g(i),p(new Set(i.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[s,i]);let F=async()=>{if(0===u.size){_.ZP.error("Please select at least one model to make public");return}b(!0);try{let e=Array.from(u);await (0,n.makeModelGroupPublic)(a,e),_.ZP.success("Successfully made ".concat(e.length," model group(s) public!")),y(),o()}catch(e){console.error("Error making model groups public:",e),_.ZP.error("Failed to make model groups public. Please try again.")}finally{b(!1)}},U=()=>{let e=h.length>0&&h.every(e=>u.has(e.model_group)),s=u.size>0&&!e;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(C.Z,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(k.Z,{checked:e,indeterminate:s,onChange:e=>L(e.target.checked),disabled:0===h.length,children:["Select All ",h.length>0&&"(".concat(h.length,")")]})})]}),(0,t.jsx)(d.Z,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid API key to use these models."}),(0,t.jsx)(P,{modelHubData:i,onFilteredDataChange:A,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===h.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(d.Z,{children:"No models match the current filters."})}):h.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(k.Z,{checked:u.has(e.model_group),onChange:s=>S(e.model_group,s.target.checked)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(c.Z,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),u.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," selected"]})})]})},z=()=>(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(C.Z,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(d.Z,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(u).map(e=>{let s=i.find(s=>s.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e}),s&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:s.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," will be made public"]})})]});return(0,t.jsx)(Z.Z,{title:"Make Models Public",open:s,onCancel:y,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(f.Z,{form:v,layout:"vertical",children:[(0,t.jsxs)(N.default,{current:x,className:"mb-6",children:[(0,t.jsx)(M,{title:"Select Models"}),(0,t.jsx)(M,{title:"Confirm"})]}),(()=>{switch(x){case 0:return U();case 1:return z();default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(w.ZP,{onClick:0===x?y:()=>{1===x&&m(0)},children:0===x?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===x&&(0,t.jsx)(w.ZP,{onClick:()=>{if(0===x){if(0===u.size){_.ZP.error("Please select at least one model to make public");return}m(1)}},disabled:0===u.size,children:"Next"}),1===x&&(0,t.jsx)(w.ZP,{onClick:F,loading:j,children:"Make Public"})]})]})]})})},A=l(69870),F=l(57018),U=l(17906),z=l(78867),E=l(20347),D=e=>{var s,l;let{accessToken:c,publicPage:o,premiumUser:d,userRole:x}=e,[m,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[g,j]=(0,r.useState)(!0),[b,N]=(0,r.useState)(!1),[f,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),[S,M]=(0,r.useState)([]),[D,R]=(0,r.useState)(!1),H=(0,a.useRouter)(),O=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=async e=>{try{j(!0);let s=await (0,n.modelHubCall)(e);console.log("ModelHubData:",s),h(s.data),(0,n.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log("data: ".concat(JSON.stringify(e))),!0==e.field_value&&u(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{j(!1)}},s=async()=>{try{var e,s;j(!0);let l=await (0,n.modelHubPublicModelsCall)();console.log("ModelHubData:",l),console.log("First model structure:",l[0]),console.log("Model has model_group?",null===(e=l[0])||void 0===e?void 0:e.model_group),console.log("Model has providers?",null===(s=l[0])||void 0===s?void 0:s.providers),h(l),u(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{j(!1)}};c?e(c):o&&s()},[c,o]);let T=()=>{c&&R(!0)},I=()=>{N(!1),k(!1),C(null)},K=()=>{N(!1),k(!1),C(null)},Y=e=>{navigator.clipboard.writeText(e),_.ZP.success("Copied to clipboard!")},W=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),B=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),V=e=>"$".concat((1e6*e).toFixed(2)),q=(0,r.useCallback)(e=>{M(e)},[]);return(console.log("publicPage: ",o),console.log("publicPageAllowed: ",m),o&&m)?(0,t.jsx)(y.Z,{accessToken:c}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==o?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(F.Dx,{className:"text-center",children:"Model Hub"}),(0,E.tY)(x||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models public for developers to know what models are available on the proxy."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(F.xv,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(F.xv,{className:"mr-2",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")}),(0,t.jsx)("button",{onClick:()=>Y("".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(z.Z,{size:16,className:"text-gray-600"})})]}),!1==o&&(0,E.tY)(x||"")&&(0,t.jsx)(F.zx,{className:"ml-4",onClick:()=>T(),children:"Make Public"})]})]}),(0,E.tY)(x||"")&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(A.Z,{accessToken:c,userRole:x})}),(0,t.jsxs)(F.Zb,{children:[(0,t.jsx)(P,{modelHubData:p||[],onFilteredDataChange:q}),(0,t.jsx)(i.C,{columns:v(e=>{C(e),N(!0)},Y,o),data:S,isLoading:g,table:O,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(F.xv,{className:"text-sm text-gray-600",children:["Showing ",S.length," of ",(null==p?void 0:p.length)||0," models"]})})]}):(0,t.jsxs)(F.Zb,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(F.xv,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(Z.Z,{title:"Public Model Hub",width:600,visible:f,footer:null,onOk:I,onCancel:K,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(F.xv,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(F.xv,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(F.zx,{onClick:()=>{H.replace("/model_hub_table?key=".concat(c))},children:"See Page"})})]})}),(0,t.jsx)(Z.Z,{title:(null==w?void 0:w.model_group)||"Model Details",width:1e3,visible:b,footer:null,onOk:I,onCancel:K,children:w&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(F.xv,{children:w.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(F.xv,{children:w.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:w.providers.map(e=>(0,t.jsx)(F.Ct,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(F.xv,{children:(null===(s=w.max_input_tokens)||void 0===s?void 0:s.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(F.xv,{children:(null===(l=w.max_output_tokens)||void 0===l?void 0:l.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(F.xv,{children:w.input_cost_per_token?V(w.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(F.xv,{children:w.output_cost_per_token?V(w.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=B(w),s=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,t.jsx)(F.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,l)=>(0,t.jsx)(F.Ct,{color:s[l%s.length],children:W(e)},e))})()})]}),(w.tpm||w.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[w.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(F.xv,{children:w.tpm.toLocaleString()})]}),w.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(F.xv,{children:w.rpm.toLocaleString()})]})]})]}),w.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:w.supported_openai_params.map(e=>(0,t.jsx)(F.Ct,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(U.Z,{language:"python",className:"text-sm",children:'import openai\n\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="http://0.0.0.0:4000" # Your LiteLLM Proxy URL\n)\n\nresponse = client.chat.completions.create(\n model="'.concat(w.model_group,'",\n messages=[\n {\n "role": "user",\n "content": "Hello, how are you?"\n }\n ]\n)\n\nprint(response.choices[0].message.content)')})]})]})}),(0,t.jsx)(L,{visible:D,onClose:()=>R(!1),accessToken:c||"",modelHubData:p||[],onSuccess:()=>{c&&(async()=>{try{let e=await (0,n.modelHubCall)(c);h(e.data)}catch(e){console.error("Error refreshing model data:",e)}})()}})]})}},69870:function(e,s,l){var t=l(57437),r=l(2265),a=l(82680),n=l(42264),i=l(86462),c=l(47686),o=l(77355),d=l(93416),x=l(74998),m=l(20347),u=l(19250),p=l(95704);s.Z=e=>{let{accessToken:s,userRole:l}=e,[h,g]=(0,r.useState)([]),[j,b]=(0,r.useState)({url:"",displayName:""}),[v,y]=(0,r.useState)(null),[N,f]=(0,r.useState)(!1),[_,k]=(0,r.useState)(!0),w=async()=>{if(s)try{f(!0);let e=await (0,u.getPublicModelHubInfo)();if(e&&e.useful_links){let s=e.useful_links||{},l=Object.entries(s).map((e,s)=>{let[l,t]=e;return{id:"".concat(s,"-").concat(l),displayName:l,url:t}});g(l)}else g([])}catch(e){console.error("Error fetching useful links:",e),g([])}finally{f(!1)}};if((0,r.useEffect)(()=>{w()},[s]),!(0,m.tY)(l||""))return null;let Z=async e=>{if(!s)return!1;try{let l={};return e.forEach(e=>{l[e.displayName]=e.url}),await (0,u.updateUsefulLinksCall)(s,l),a.Z.success({title:"Links Saved Successfully",content:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)("p",{className:"text-gray-600 mb-4",children:"Your useful links have been saved and are now visible on the public model hub."}),(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-blue-800 mb-2 font-medium",children:"View your updated model hub:"}),(0,t.jsx)("a",{href:"".concat((0,u.getProxyBaseUrl)(),"/ui/model_hub_table"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-blue-600 hover:text-blue-800 underline text-sm font-medium",children:"Open Public Model Hub →"})]})]}),width:500,okText:"Close",maskClosable:!0,keyboard:!0}),!0}catch(e){return console.error("Error saving links:",e),n.ZP.error("Failed to save links - ".concat(e)),!1}},C=async()=>{if(!j.url||!j.displayName)return;try{new URL(j.url)}catch(e){n.ZP.error("Please enter a valid URL");return}if(h.some(e=>e.displayName===j.displayName)){n.ZP.error("A link with this display name already exists");return}let e=[...h,{id:"".concat(Date.now(),"-").concat(j.displayName),displayName:j.displayName,url:j.url}];await Z(e)&&(g(e),b({url:"",displayName:""}),n.ZP.success("Link added successfully"))},S=e=>{y({...e})},P=async()=>{if(!v)return;try{new URL(v.url)}catch(e){n.ZP.error("Please enter a valid URL");return}if(h.some(e=>e.id!==v.id&&e.displayName===v.displayName)){n.ZP.error("A link with this display name already exists");return}let e=h.map(e=>e.id===v.id?v:e);await Z(e)&&(g(e),y(null),n.ZP.success("Link updated successfully"))},M=()=>{y(null)},L=async e=>{let s=h.filter(s=>s.id!==e);await Z(s)&&(g(s),n.ZP.success("Link deleted successfully"))},A=e=>{window.open(e,"_blank")};return(0,t.jsxs)(p.Zb,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>k(!_),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(p.Dx,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:_?(0,t.jsx)(i.Z,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(c.Z,{className:"w-5 h-5 text-gray-500"})})]}),_&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(p.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"URL"}),(0,t.jsx)("input",{type:"text",value:j.url,onChange:e=>b({...j,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:j.displayName,onChange:e=>b({...j,displayName:e.target.value}),placeholder:"Friendly name",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:C,disabled:!j.url||!j.displayName,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(j.url&&j.displayName?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,t.jsx)(o.Z,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsx)(p.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Links"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(p.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(p.ss,{children:(0,t.jsxs)(p.SC,{children:[(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(p.RM,{children:[h.map(e=>(0,t.jsx)(p.SC,{className:"h-8",children:v&&v.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:v.displayName,onChange:e=>y({...v,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:v.url,onChange:e=>y({...v,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:P,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:M,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pj,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(p.pj,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(p.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>A(e.url),className:"text-xs bg-green-50 text-green-600 px-2 py-1 rounded hover:bg-green-100",children:"Use"}),(0,t.jsx)("button",{onClick:()=>S(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(d.Z,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>L(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(x.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===h.length&&(0,t.jsx)(p.SC,{children:(0,t.jsx)(p.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})}},20347:function(e,s,l){l.d(s,{LQ:function(){return a},ZL:function(){return t},lo:function(){return r},tY:function(){return n}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=["Internal User","Internal Viewer"],a=["Internal User","Admin"],n=e=>t.includes(e)}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/247-7557228b7131016b.js b/litellm/proxy/_experimental/out/_next/static/chunks/247-7557228b7131016b.js new file mode 100644 index 0000000000..fce6b84772 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/247-7557228b7131016b.js @@ -0,0 +1,12 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[247],{12660:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},88009:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},79276:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},37527:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},9775:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},11429:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},68208:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},83322:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},49634:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},83669:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},26430:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},5540:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},11894:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},44625:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},26349:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},62670:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z"}}]},name:"dollar",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},73879:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},29271:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},41169:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},11741:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},34310:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM472 744a40 40 0 1080 0 40 40 0 10-80 0zm16-104h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8z"}}]},name:"file-exclamation",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},50010:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},38434:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},10798:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},71282:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},92403:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},48231:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},62272:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},45246:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},16601:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},53508:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},99890:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},28595:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},34419:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},96473:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},89245:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},69993:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},78355:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},23907:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},55322:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},8881:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},71891:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},41361:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},58630:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},3632:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},35291:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},58747:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},75105:function(e,t,n){"use strict";n.d(t,{Z:function(){return et}});var r=n(5853),o=n(2265),i=n(47625),a=n(93765),l=n(87602),s=n(59221),c=n(86757),u=n.n(c),d=n(95645),f=n.n(d),p=n(77571),h=n.n(p),m=n(82559),g=n.n(m),v=n(21652),y=n.n(v),b=n(57165),x=n(81889),w=n(9841),k=n(58772),S=n(34067),E=n(16630),O=n(85355),C=n(82944),j=["layout","type","stroke","connectNulls","isRange","ref"];function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,j));return o.createElement(w.m,{clipPath:n?"url(#clipPath-".concat(r,")"):null},o.createElement(b.H,P({},(0,C.L6)(d,!0),{points:e,connectNulls:c,type:l,baseLine:t,layout:a,stroke:"none",className:"recharts-area-area"})),"none"!==s&&o.createElement(b.H,P({},(0,C.L6)(this.props,!1),{className:"recharts-area-curve",layout:a,type:l,connectNulls:c,fill:"none",points:e})),"none"!==s&&u&&o.createElement(b.H,P({},(0,C.L6)(this.props,!1),{className:"recharts-area-curve",layout:a,type:l,connectNulls:c,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var n=this,r=this.props,i=r.points,a=r.baseLine,l=r.isAnimationActive,c=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationId,p=this.state,m=p.prevPoints,v=p.prevBaseLine;return o.createElement(s.ZP,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"area-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var l=r.t;if(m){var s,c=m.length/i.length,u=i.map(function(e,t){var n=Math.floor(t*c);if(m[n]){var r=m[n],o=(0,E.k4)(r.x,e.x),i=(0,E.k4)(r.y,e.y);return T(T({},e),{},{x:o(l),y:i(l)})}return e});return s=(0,E.hj)(a)&&"number"==typeof a?(0,E.k4)(v,a)(l):h()(a)||g()(a)?(0,E.k4)(v,0)(l):a.map(function(e,t){var n=Math.floor(t*c);if(v[n]){var r=v[n],o=(0,E.k4)(r.x,e.x),i=(0,E.k4)(r.y,e.y);return T(T({},e),{},{x:o(l),y:i(l)})}return e}),n.renderAreaStatically(u,s,e,t)}return o.createElement(w.m,null,o.createElement("defs",null,o.createElement("clipPath",{id:"animationClipPath-".concat(t)},n.renderClipRect(l))),o.createElement(w.m,{clipPath:"url(#animationClipPath-".concat(t,")")},n.renderAreaStatically(i,a,e,t)))})}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,l=a.prevPoints,s=a.prevBaseLine,c=a.totalLength;return i&&r&&r.length&&(!l&&c>0||!y()(l,r)||!y()(s,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,i=t.points,a=t.className,s=t.top,c=t.left,u=t.xAxis,d=t.yAxis,f=t.width,p=t.height,m=t.isAnimationActive,g=t.id;if(n||!i||!i.length)return null;var v=this.state.isAnimationFinished,y=1===i.length,b=(0,l.Z)("recharts-area",a),x=u&&u.allowDataOverflow,S=d&&d.allowDataOverflow,E=x||S,O=h()(g)?this.id:g,j=null!==(e=(0,C.L6)(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},_=j.r,P=j.strokeWidth,N=((0,C.$k)(r)?r:{}).clipDot,T=void 0===N||N,A=2*(void 0===_?3:_)+(void 0===P?2:P);return o.createElement(w.m,{className:b},x||S?o.createElement("defs",null,o.createElement("clipPath",{id:"clipPath-".concat(O)},o.createElement("rect",{x:x?c:c-f/2,y:S?s:s-p/2,width:x?f:2*f,height:S?p:2*p})),!T&&o.createElement("clipPath",{id:"clipPath-dots-".concat(O)},o.createElement("rect",{x:c-A/2,y:s-A/2,width:f+A,height:p+A}))):null,y?null:this.renderArea(E,O),(r||y)&&this.renderDots(E,T,O),(!m||v)&&k.e.renderCallByParent(this.props,i))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],n&&A(a.prototype,n),r&&A(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(o.PureComponent);D(Z,"displayName","Area"),D(Z,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!S.x.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),D(Z,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,l=null!=a?a:i;if((0,E.hj)(l)&&"number"==typeof l)return l;var s="horizontal"===o?r:n,c=s.scale.domain();if("number"===s.type){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return"dataMin"===l?d:"dataMax"===l?u:u<0?u:Math.max(Math.min(c[0],c[1]),0)}return"dataMin"===l?c[0]:"dataMax"===l?c[1]:c[0]}),D(Z,"getComposedData",function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,l=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,h=n.layout,m=u&&u.length,g=Z.getBaseValue(n,r,o,i),v="horizontal"===h,y=!1,b=f.map(function(e,t){m?n=u[d+t]:Array.isArray(n=(0,O.F$)(e,c))?y=!0:n=[g,n];var n,r=null==n[1]||m&&null==(0,O.F$)(e,c);return v?{x:(0,O.Hv)({axis:o,ticks:a,bandSize:s,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:(0,O.Hv)({axis:i,ticks:l,bandSize:s,entry:e,index:t}),value:n,payload:e}});return t=m||y?b.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}}):v?i.scale(g):o.scale(g),T({points:b,baseLine:t,layout:h,isRange:y},p)}),D(Z,"renderDotItem",function(e,t){return o.isValidElement(e)?o.cloneElement(e,t):u()(e)?e(t):o.createElement(x.o,P({},t,{className:"recharts-area-dot"}))});var z=n(97059),B=n(62994),F=n(25311),H=(0,a.z)({chartName:"AreaChart",GraphicalChild:Z,axisComponents:[{axisType:"xAxis",AxisComp:z.K},{axisType:"yAxis",AxisComp:B.B}],formatAxisMap:F.t9}),q=n(56940),U=n(8147),W=n(22190),K=n(54061),$=n(65278),V=n(98593),X=n(69448),G=n(32644),Y=n(7084),Q=n(26898),J=n(97324),ee=n(1153);let et=o.forwardRef((e,t)=>{let{data:n=[],categories:a=[],index:l,stack:s=!1,colors:c=Q.s,valueFormatter:u=ee.Cj,startEndOnly:d=!1,showXAxis:f=!0,showYAxis:p=!0,yAxisWidth:h=56,intervalType:m="equidistantPreserveStart",showAnimation:g=!1,animationDuration:v=900,showTooltip:y=!0,showLegend:b=!0,showGridLines:w=!0,showGradient:k=!0,autoMinValue:S=!1,curveType:E="linear",minValue:O,maxValue:C,connectNulls:j=!1,allowDecimals:_=!0,noDataText:P,className:N,onValueChange:T,enableLegendSlider:A=!1,customTooltip:M,rotateLabelX:I,tickGap:R=5}=e,D=(0,r._T)(e,["data","categories","index","stack","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","showAnimation","animationDuration","showTooltip","showLegend","showGridLines","showGradient","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),L=(f||p)&&(!d||p)?20:0,[F,et]=(0,o.useState)(60),[en,er]=(0,o.useState)(void 0),[eo,ei]=(0,o.useState)(void 0),ea=(0,G.me)(a,c),el=(0,G.i4)(S,O,C),es=!!T;function ec(e){es&&(e===eo&&!en||(0,G.FB)(n,e)&&en&&en.dataKey===e?(ei(void 0),null==T||T(null)):(ei(e),null==T||T({eventType:"category",categoryClicked:e})),er(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,J.q)("w-full h-80",N)},D),o.createElement(i.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(H,{data:n,onClick:es&&(eo||en)?()=>{er(void 0),ei(void 0),null==T||T(null)}:void 0},w?o.createElement(q.q,{className:(0,J.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(z.K,{padding:{left:L,right:L},hide:!f,dataKey:l,tick:{transform:"translate(0, 6)"},ticks:d?[n[0][l],n[n.length-1][l]]:void 0,fill:"",stroke:"",className:(0,J.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),interval:d?"preserveStartEnd":m,tickLine:!1,axisLine:!1,minTickGap:R,angle:null==I?void 0:I.angle,dy:null==I?void 0:I.verticalShift,height:null==I?void 0:I.xAxisHeight}),o.createElement(B.B,{width:h,hide:!p,axisLine:!1,tickLine:!1,type:"number",domain:el,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,J.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:u,allowDecimals:_}),o.createElement(U.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:y?e=>{let{active:t,payload:n,label:r}=e;return M?o.createElement(M,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=ea.get(e.dataKey))&&void 0!==t?t:Y.fr.Gray})}),active:t,label:r}):o.createElement(V.ZP,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:ea})}:o.createElement(o.Fragment,null),position:{y:0}}),b?o.createElement(W.D,{verticalAlign:"top",height:F,content:e=>{let{payload:t}=e;return(0,$.Z)({payload:t},ea,et,eo,es?e=>ec(e):void 0,A)}}):null,a.map(e=>{var t,n;return o.createElement("defs",{key:e},k?o.createElement("linearGradient",{className:(0,ee.bM)(null!==(t=ea.get(e))&&void 0!==t?t:Y.fr.Gray,Q.K.text).textColor,id:ea.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},o.createElement("stop",{offset:"5%",stopColor:"currentColor",stopOpacity:en||eo&&eo!==e?.15:.4}),o.createElement("stop",{offset:"95%",stopColor:"currentColor",stopOpacity:0})):o.createElement("linearGradient",{className:(0,ee.bM)(null!==(n=ea.get(e))&&void 0!==n?n:Y.fr.Gray,Q.K.text).textColor,id:ea.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},o.createElement("stop",{stopColor:"currentColor",stopOpacity:en||eo&&eo!==e?.1:.3})))}),a.map(e=>{var t;return o.createElement(Z,{className:(0,ee.bM)(null!==(t=ea.get(e))&&void 0!==t?t:Y.fr.Gray,Q.K.text).strokeColor,strokeOpacity:en||eo&&eo!==e?.3:1,activeDot:e=>{var t;let{cx:r,cy:i,stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,dataKey:u}=e;return o.createElement(x.o,{className:(0,J.q)("stroke-tremor-background dark:stroke-dark-tremor-background",T?"cursor-pointer":"",(0,ee.bM)(null!==(t=ea.get(u))&&void 0!==t?t:Y.fr.Gray,Q.K.text).fillColor),cx:r,cy:i,r:5,fill:"",stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,onClick:(t,r)=>{r.stopPropagation(),es&&(e.index===(null==en?void 0:en.index)&&e.dataKey===(null==en?void 0:en.dataKey)||(0,G.FB)(n,e.dataKey)&&eo&&eo===e.dataKey?(ei(void 0),er(void 0),null==T||T(null)):(ei(e.dataKey),er({index:e.index,dataKey:e.dataKey}),null==T||T(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var r;let{stroke:i,strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,cx:c,cy:u,dataKey:d,index:f}=t;return(0,G.FB)(n,e)&&!(en||eo&&eo!==e)||(null==en?void 0:en.index)===f&&(null==en?void 0:en.dataKey)===e?o.createElement(x.o,{key:f,cx:c,cy:u,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,className:(0,J.q)("stroke-tremor-background dark:stroke-dark-tremor-background",T?"cursor-pointer":"",(0,ee.bM)(null!==(r=ea.get(d))&&void 0!==r?r:Y.fr.Gray,Q.K.text).fillColor)}):o.createElement(o.Fragment,{key:f})},key:e,name:e,type:E,dataKey:e,stroke:"",fill:"url(#".concat(ea.get(e),")"),strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:g,animationDuration:v,stackId:s?"a":void 0,connectNulls:j})}),T?a.map(e=>o.createElement(K.x,{className:(0,J.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:E,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:j,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;ec(n)}})):null):o.createElement(X.Z,{noDataText:P})))});et.displayName="AreaChart"},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(5853),o=n(7084),i=n(26898),a=n(97324),l=n(1153),s=n(2265),c=n(47625),u=n(93765),d=n(31699),f=n(97059),p=n(62994),h=n(25311),m=(0,u.z)({chartName:"BarChart",GraphicalChild:d.$,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:f.K},{axisType:"yAxis",AxisComp:p.B}],formatAxisMap:h.t9}),g=n(56940),v=n(8147),y=n(22190),b=n(65278),x=n(98593),w=n(69448),k=n(32644);let S=s.forwardRef((e,t)=>{let{data:n=[],categories:u=[],index:h,colors:S=i.s,valueFormatter:E=l.Cj,layout:O="horizontal",stack:C=!1,relative:j=!1,startEndOnly:_=!1,animationDuration:P=900,showAnimation:N=!1,showXAxis:T=!0,showYAxis:A=!0,yAxisWidth:M=56,intervalType:I="equidistantPreserveStart",showTooltip:R=!0,showLegend:D=!0,showGridLines:L=!0,autoMinValue:Z=!1,minValue:z,maxValue:B,allowDecimals:F=!0,noDataText:H,onValueChange:q,enableLegendSlider:U=!1,customTooltip:W,rotateLabelX:K,tickGap:$=5,className:V}=e,X=(0,r._T)(e,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","intervalType","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","noDataText","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap","className"]),G=T||A?20:0,[Y,Q]=(0,s.useState)(60),J=(0,k.me)(u,S),[ee,et]=s.useState(void 0),[en,er]=(0,s.useState)(void 0),eo=!!q;function ei(e,t,n){var r,o,i,a;n.stopPropagation(),q&&((0,k.vZ)(ee,Object.assign(Object.assign({},e.payload),{value:e.value}))?(er(void 0),et(void 0),null==q||q(null)):(er(null===(o=null===(r=e.tooltipPayload)||void 0===r?void 0:r[0])||void 0===o?void 0:o.dataKey),et(Object.assign(Object.assign({},e.payload),{value:e.value})),null==q||q(Object.assign({eventType:"bar",categoryClicked:null===(a=null===(i=e.tooltipPayload)||void 0===i?void 0:i[0])||void 0===a?void 0:a.dataKey},e.payload))))}let ea=(0,k.i4)(Z,z,B);return s.createElement("div",Object.assign({ref:t,className:(0,a.q)("w-full h-80",V)},X),s.createElement(c.h,{className:"h-full w-full"},(null==n?void 0:n.length)?s.createElement(m,{data:n,stackOffset:C?"sign":j?"expand":"none",layout:"vertical"===O?"vertical":"horizontal",onClick:eo&&(en||ee)?()=>{et(void 0),er(void 0),null==q||q(null)}:void 0},L?s.createElement(g.q,{className:(0,a.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:"vertical"!==O,vertical:"vertical"===O}):null,"vertical"!==O?s.createElement(f.K,{padding:{left:G,right:G},hide:!T,dataKey:h,interval:_?"preserveStartEnd":I,tick:{transform:"translate(0, 6)"},ticks:_?[n[0][h],n[n.length-1][h]]:void 0,fill:"",stroke:"",className:(0,a.q)("mt-4 text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,angle:null==K?void 0:K.angle,dy:null==K?void 0:K.verticalShift,height:null==K?void 0:K.xAxisHeight,minTickGap:$}):s.createElement(f.K,{hide:!T,type:"number",tick:{transform:"translate(-3, 0)"},domain:ea,fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,tickFormatter:E,minTickGap:$,allowDecimals:F,angle:null==K?void 0:K.angle,dy:null==K?void 0:K.verticalShift,height:null==K?void 0:K.xAxisHeight}),"vertical"!==O?s.createElement(p.B,{width:M,hide:!A,axisLine:!1,tickLine:!1,type:"number",domain:ea,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:j?e=>"".concat((100*e).toString()," %"):E,allowDecimals:F}):s.createElement(p.B,{width:M,hide:!A,dataKey:h,axisLine:!1,tickLine:!1,ticks:_?[n[0][h],n[n.length-1][h]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content")}),s.createElement(v.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:R?e=>{let{active:t,payload:n,label:r}=e;return W?s.createElement(W,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=J.get(e.dataKey))&&void 0!==t?t:o.fr.Gray})}),active:t,label:r}):s.createElement(x.ZP,{active:t,payload:n,label:r,valueFormatter:E,categoryColors:J})}:s.createElement(s.Fragment,null),position:{y:0}}),D?s.createElement(y.D,{verticalAlign:"top",height:Y,content:e=>{let{payload:t}=e;return(0,b.Z)({payload:t},J,Q,en,eo?e=>{eo&&(e!==en||ee?(er(e),null==q||q({eventType:"category",categoryClicked:e})):(er(void 0),null==q||q(null)),et(void 0))}:void 0,U)}}):null,u.map(e=>{var t;return s.createElement(d.$,{className:(0,a.q)((0,l.bM)(null!==(t=J.get(e))&&void 0!==t?t:o.fr.Gray,i.K.background).fillColor,q?"cursor-pointer":""),key:e,name:e,type:"linear",stackId:C||j?"a":void 0,dataKey:e,fill:"",isAnimationActive:N,animationDuration:P,shape:e=>((e,t,n,r)=>{let{fillOpacity:o,name:i,payload:a,value:l}=e,{x:c,width:u,y:d,height:f}=e;return"horizontal"===r&&f<0?(d+=f,f=Math.abs(f)):"vertical"===r&&u<0&&(c+=u,u=Math.abs(u)),s.createElement("rect",{x:c,y:d,width:u,height:f,opacity:t||n&&n!==i?(0,k.vZ)(t,Object.assign(Object.assign({},a),{value:l}))?o:.3:o})})(e,ee,en,O),onClick:ei})})):s.createElement(w.Z,{noDataText:H})))});S.displayName="BarChart"},14042:function(e,t,n){"use strict";n.d(t,{Z:function(){return ez}});var r=n(5853),o=n(7084),i=n(26898),a=n(97324),l=n(1153),s=n(2265),c=n(60474),u=n(47625),d=n(93765),f=n(86757),p=n.n(f),h=n(9841),m=n(81889),g=n(87602),v=n(82944),y=["points","className","baseLinePoints","connectNulls"];function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){k(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),k(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t},E=function(e,t){var n=S(e);t&&(n=[n.reduce(function(e,t){return[].concat(x(e),x(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},O=function(e,t,n){var r=E(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(E(t.reverse(),n).slice(1))},C=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,o=e.connectNulls,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,y);if(!t||!t.length)return null;var a=(0,g.Z)("recharts-polygon",n);if(r&&r.length){var l=i.stroke&&"none"!==i.stroke,c=O(t,r,o);return s.createElement("g",{className:a},s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"Z"===c.slice(-1)?i.fill:"none",stroke:"none",d:c})),l?s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"none",d:E(t,o)})):null,l?s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"none",d:E(r,o)})):null)}var u=E(t,o);return s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"Z"===u.slice(-1)?i.fill:"none",className:a,d:u}))},j=n(58811),_=n(41637),P=n(39206);function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(){return(T=Object.assign?Object.assign.bind():function(e){for(var t=1;t1e-5?"outer"===t?"start":"end":n<-.00001?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,o=e.axisLine,i=e.axisLineType,a=M(M({},(0,v.L6)(this.props,!1)),{},{fill:"none"},(0,v.L6)(o,!1));if("circle"===i)return s.createElement(m.o,T({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r:r}));var l=this.props.ticks.map(function(e){return(0,P.op)(t,n,r,e.coordinate)});return s.createElement(C,T({className:"recharts-polar-angle-axis-line"},a,{points:l}))}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,o=t.tickLine,a=t.tickFormatter,l=t.stroke,c=(0,v.L6)(this.props,!1),u=(0,v.L6)(r,!1),d=M(M({},c),{},{fill:"none"},(0,v.L6)(o,!1)),f=n.map(function(t,n){var f=e.getTickLineCoord(t),p=M(M(M({textAnchor:e.getTickTextAnchor(t)},c),{},{stroke:"none",fill:l},u),{},{index:n,payload:t,x:f.x2,y:f.y2});return s.createElement(h.m,T({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(t.coordinate)},(0,_.bw)(e.props,t,n)),o&&s.createElement("line",T({className:"recharts-polar-angle-axis-tick-line"},d,f)),r&&i.renderTickItem(r,p,a?a(t.value,n):t.value))});return s.createElement(h.m,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return!(n<=0)&&t&&t.length?s.createElement(h.m,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks()):null}}],r=[{key:"renderTickItem",value:function(e,t,n){return s.isValidElement(e)?s.cloneElement(e,t):p()(e)?e(t):s.createElement(j.x,T({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}],n&&I(i.prototype,n),r&&I(i,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(s.PureComponent);L(B,"displayName","PolarAngleAxis"),L(B,"axisType","angleAxis"),L(B,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var F=n(35802),H=n.n(F),q=n(37891),U=n.n(q),W=n(26680),K=["cx","cy","angle","ticks","axisLine"],$=["ticks","tick","angle","tickFormatter","stroke"];function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(){return(X=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function J(e,t){for(var n=0;n0?el()(e,"paddingAngle",0):0;if(n){var l=(0,eg.k4)(n.endAngle-n.startAngle,e.endAngle-e.startAngle),s=eS(eS({},e),{},{startAngle:i+a,endAngle:i+l(r)+a});o.push(s),i=s.endAngle}else{var c=e.endAngle,d=e.startAngle,f=(0,eg.k4)(0,c-d)(r),p=eS(eS({},e),{},{startAngle:i+a,endAngle:i+f+a});o.push(p),i=p.endAngle}}),s.createElement(h.m,null,e.renderSectorsStatically(o))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return n&&t&&t.length&&(!r||!ec()(r,t))?this.renderSectorsWithAnimation():this.renderSectorsStatically(t)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,o=t.className,i=t.label,a=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.isAnimationActive,f=this.state.isAnimationFinished;if(n||!r||!r.length||!(0,eg.hj)(a)||!(0,eg.hj)(l)||!(0,eg.hj)(c)||!(0,eg.hj)(u))return null;var p=(0,g.Z)("recharts-pie",o);return s.createElement(h.m,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),i&&this.renderLabels(r),W._.renderCallByParent(this.props,null,!1),(!d||f)&&ep.e.renderCallByParent(this.props,r,!1))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e=360?x:x-1)*u,k=i.reduce(function(e,t){var n=(0,ev.F$)(t,b,0);return e+((0,eg.hj)(n)?n:0)},0);return k>0&&(t=i.map(function(e,t){var r,o=(0,ev.F$)(e,b,0),i=(0,ev.F$)(e,f,t),a=((0,eg.hj)(o)?o:0)/k,c=(r=t?n.endAngle+(0,eg.uY)(v)*u*(0!==o?1:0):s)+(0,eg.uY)(v)*((0!==o?m:0)+a*w),d=(r+c)/2,p=(g.innerRadius+g.outerRadius)/2,y=[{name:i,value:o,payload:e,dataKey:b,type:h}],x=(0,P.op)(g.cx,g.cy,p,d);return n=eS(eS(eS({percent:a,cornerRadius:l,name:i,tooltipPayload:y,midAngle:d,middleRadius:p,tooltipPosition:x},e),g),{},{value:(0,ev.F$)(e,b),startAngle:r,endAngle:c,payload:e,paddingAngle:(0,eg.uY)(v)*u})})),eS(eS({},g),{},{sectors:t,data:i})});var eT=(0,d.z)({chartName:"PieChart",GraphicalChild:eN,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:B},{axisType:"radiusAxis",AxisComp:eo}],formatAxisMap:P.t9,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),eA=n(8147),eM=n(69448),eI=n(98593);let eR=e=>{let{active:t,payload:n,valueFormatter:r}=e;if(t&&(null==n?void 0:n[0])){let e=null==n?void 0:n[0];return s.createElement(eI.$B,null,s.createElement("div",{className:(0,a.q)("px-4 py-2")},s.createElement(eI.zX,{value:r(e.value),name:e.name,color:e.payload.color})))}return null},eD=(e,t)=>e.map((e,n)=>{let r=ne||t((0,l.vP)(n.map(e=>e[r]))),eZ=e=>{let{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a,className:l}=e;return s.createElement("g",null,s.createElement(c.L,{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a,className:l,fill:"",opacity:.3,style:{outline:"none"}}))},ez=s.forwardRef((e,t)=>{let{data:n=[],category:c="value",index:d="name",colors:f=i.s,variant:p="donut",valueFormatter:h=l.Cj,label:m,showLabel:g=!0,animationDuration:v=900,showAnimation:y=!1,showTooltip:b=!0,noDataText:x,onValueChange:w,customTooltip:k,className:S}=e,E=(0,r._T)(e,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","noDataText","onValueChange","customTooltip","className"]),O="donut"==p,C=eL(m,h,n,c),[j,_]=s.useState(void 0),P=!!w;return(0,s.useEffect)(()=>{let e=document.querySelectorAll(".recharts-pie-sector");e&&e.forEach(e=>{e.setAttribute("style","outline: none")})},[j]),s.createElement("div",Object.assign({ref:t,className:(0,a.q)("w-full h-40",S)},E),s.createElement(u.h,{className:"h-full w-full"},(null==n?void 0:n.length)?s.createElement(eT,{onClick:P&&j?()=>{_(void 0),null==w||w(null)}:void 0,margin:{top:0,left:0,right:0,bottom:0}},g&&O?s.createElement("text",{className:(0,a.q)("fill-tremor-content-emphasis","dark:fill-dark-tremor-content-emphasis"),x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle"},C):null,s.createElement(eN,{className:(0,a.q)("stroke-tremor-background dark:stroke-dark-tremor-background",w?"cursor-pointer":"cursor-default"),data:eD(n,f),cx:"50%",cy:"50%",startAngle:90,endAngle:-270,innerRadius:O?"75%":"0%",outerRadius:"100%",stroke:"",strokeLinejoin:"round",dataKey:c,nameKey:d,isAnimationActive:y,animationDuration:v,onClick:function(e,t,n){n.stopPropagation(),P&&(j===t?(_(void 0),null==w||w(null)):(_(t),null==w||w(Object.assign({eventType:"slice"},e.payload.payload))))},activeIndex:j,inactiveShape:eZ,style:{outline:"none"}}),s.createElement(eA.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,content:b?e=>{var t;let{active:n,payload:r}=e;return k?s.createElement(k,{payload:null==r?void 0:r.map(e=>{var t,n,i;return Object.assign(Object.assign({},e),{color:null!==(i=null===(n=null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.payload)||void 0===n?void 0:n.color)&&void 0!==i?i:o.fr.Gray})}),active:n,label:null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.name}):s.createElement(eR,{active:n,payload:r,valueFormatter:h})}:s.createElement(s.Fragment,null)})):s.createElement(eM.Z,{noDataText:x})))});ez.displayName="DonutChart"},59664:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(5853),o=n(2265),i=n(47625),a=n(93765),l=n(54061),s=n(97059),c=n(62994),u=n(25311),d=(0,a.z)({chartName:"LineChart",GraphicalChild:l.x,axisComponents:[{axisType:"xAxis",AxisComp:s.K},{axisType:"yAxis",AxisComp:c.B}],formatAxisMap:u.t9}),f=n(56940),p=n(8147),h=n(22190),m=n(81889),g=n(65278),v=n(98593),y=n(69448),b=n(32644),x=n(7084),w=n(26898),k=n(97324),S=n(1153);let E=o.forwardRef((e,t)=>{let{data:n=[],categories:a=[],index:u,colors:E=w.s,valueFormatter:O=S.Cj,startEndOnly:C=!1,showXAxis:j=!0,showYAxis:_=!0,yAxisWidth:P=56,intervalType:N="equidistantPreserveStart",animationDuration:T=900,showAnimation:A=!1,showTooltip:M=!0,showLegend:I=!0,showGridLines:R=!0,autoMinValue:D=!1,curveType:L="linear",minValue:Z,maxValue:z,connectNulls:B=!1,allowDecimals:F=!0,noDataText:H,className:q,onValueChange:U,enableLegendSlider:W=!1,customTooltip:K,rotateLabelX:$,tickGap:V=5}=e,X=(0,r._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),G=j||_?20:0,[Y,Q]=(0,o.useState)(60),[J,ee]=(0,o.useState)(void 0),[et,en]=(0,o.useState)(void 0),er=(0,b.me)(a,E),eo=(0,b.i4)(D,Z,z),ei=!!U;function ea(e){ei&&(e===et&&!J||(0,b.FB)(n,e)&&J&&J.dataKey===e?(en(void 0),null==U||U(null)):(en(e),null==U||U({eventType:"category",categoryClicked:e})),ee(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,k.q)("w-full h-80",q)},X),o.createElement(i.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(d,{data:n,onClick:ei&&(et||J)?()=>{ee(void 0),en(void 0),null==U||U(null)}:void 0},R?o.createElement(f.q,{className:(0,k.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(s.K,{padding:{left:G,right:G},hide:!j,dataKey:u,interval:C?"preserveStartEnd":N,tick:{transform:"translate(0, 6)"},ticks:C?[n[0][u],n[n.length-1][u]]:void 0,fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:V,angle:null==$?void 0:$.angle,dy:null==$?void 0:$.verticalShift,height:null==$?void 0:$.xAxisHeight}),o.createElement(c.B,{width:P,hide:!_,axisLine:!1,tickLine:!1,type:"number",domain:eo,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:O,allowDecimals:F}),o.createElement(p.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:M?e=>{let{active:t,payload:n,label:r}=e;return K?o.createElement(K,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=er.get(e.dataKey))&&void 0!==t?t:x.fr.Gray})}),active:t,label:r}):o.createElement(v.ZP,{active:t,payload:n,label:r,valueFormatter:O,categoryColors:er})}:o.createElement(o.Fragment,null),position:{y:0}}),I?o.createElement(h.D,{verticalAlign:"top",height:Y,content:e=>{let{payload:t}=e;return(0,g.Z)({payload:t},er,Q,et,ei?e=>ea(e):void 0,W)}}):null,a.map(e=>{var t;return o.createElement(l.x,{className:(0,k.q)((0,S.bM)(null!==(t=er.get(e))&&void 0!==t?t:x.fr.Gray,w.K.text).strokeColor),strokeOpacity:J||et&&et!==e?.3:1,activeDot:e=>{var t;let{cx:r,cy:i,stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,dataKey:u}=e;return o.createElement(m.o,{className:(0,k.q)("stroke-tremor-background dark:stroke-dark-tremor-background",U?"cursor-pointer":"",(0,S.bM)(null!==(t=er.get(u))&&void 0!==t?t:x.fr.Gray,w.K.text).fillColor),cx:r,cy:i,r:5,fill:"",stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,onClick:(t,r)=>{r.stopPropagation(),ei&&(e.index===(null==J?void 0:J.index)&&e.dataKey===(null==J?void 0:J.dataKey)||(0,b.FB)(n,e.dataKey)&&et&&et===e.dataKey?(en(void 0),ee(void 0),null==U||U(null)):(en(e.dataKey),ee({index:e.index,dataKey:e.dataKey}),null==U||U(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var r;let{stroke:i,strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,cx:c,cy:u,dataKey:d,index:f}=t;return(0,b.FB)(n,e)&&!(J||et&&et!==e)||(null==J?void 0:J.index)===f&&(null==J?void 0:J.dataKey)===e?o.createElement(m.o,{key:f,cx:c,cy:u,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,className:(0,k.q)("stroke-tremor-background dark:stroke-dark-tremor-background",U?"cursor-pointer":"",(0,S.bM)(null!==(r=er.get(d))&&void 0!==r?r:x.fr.Gray,w.K.text).fillColor)}):o.createElement(o.Fragment,{key:f})},key:e,name:e,type:L,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:A,animationDuration:T,connectNulls:B})}),U?a.map(e=>o.createElement(l.x,{className:(0,k.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:L,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:B,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;ea(n)}})):null):o.createElement(y.Z,{noDataText:H})))});E.displayName="LineChart"},65278:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(2265);let o=(e,t)=>{let[n,o]=(0,r.useState)(t);(0,r.useEffect)(()=>{let t=()=>{o(window.innerWidth),e()};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e,n])};var i=n(5853),a=n(26898),l=n(97324),s=n(1153);let c=e=>{var t=(0,i._T)(e,[]);return r.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.createElement("path",{d:"M8 12L14 6V18L8 12Z"}))},u=e=>{var t=(0,i._T)(e,[]);return r.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.createElement("path",{d:"M16 12L10 18V6L16 12Z"}))},d=(0,s.fn)("Legend"),f=e=>{let{name:t,color:n,onClick:o,activeLegend:i}=e,c=!!o;return r.createElement("li",{className:(0,l.q)(d("legendItem"),"group inline-flex items-center px-2 py-0.5 rounded-tremor-small transition whitespace-nowrap",c?"cursor-pointer":"cursor-default","text-tremor-content",c?"hover:bg-tremor-background-subtle":"","dark:text-dark-tremor-content",c?"dark:hover:bg-dark-tremor-background-subtle":""),onClick:e=>{e.stopPropagation(),null==o||o(t,n)}},r.createElement("svg",{className:(0,l.q)("flex-none h-2 w-2 mr-1.5",(0,s.bM)(n,a.K.text).textColor,i&&i!==t?"opacity-40":"opacity-100"),fill:"currentColor",viewBox:"0 0 8 8"},r.createElement("circle",{cx:4,cy:4,r:4})),r.createElement("p",{className:(0,l.q)("whitespace-nowrap truncate text-tremor-default","text-tremor-content",c?"group-hover:text-tremor-content-emphasis":"","dark:text-dark-tremor-content",i&&i!==t?"opacity-40":"opacity-100",c?"dark:group-hover:text-dark-tremor-content-emphasis":"")},t))},p=e=>{let{icon:t,onClick:n,disabled:o}=e,[i,a]=r.useState(!1),s=r.useRef(null);return r.useEffect(()=>(i?s.current=setInterval(()=>{null==n||n()},300):clearInterval(s.current),()=>clearInterval(s.current)),[i,n]),(0,r.useEffect)(()=>{o&&(clearInterval(s.current),a(!1))},[o]),r.createElement("button",{type:"button",className:(0,l.q)(d("legendSliderButton"),"w-5 group inline-flex items-center truncate rounded-tremor-small transition",o?"cursor-not-allowed":"cursor-pointer",o?"text-tremor-content-subtle":"text-tremor-content hover:text-tremor-content-emphasis hover:bg-tremor-background-subtle",o?"dark:text-dark-tremor-subtle":"dark:text-dark-tremor dark:hover:text-tremor-content-emphasis dark:hover:bg-dark-tremor-background-subtle"),disabled:o,onClick:e=>{e.stopPropagation(),null==n||n()},onMouseDown:e=>{e.stopPropagation(),a(!0)},onMouseUp:e=>{e.stopPropagation(),a(!1)}},r.createElement(t,{className:"w-full"}))},h=r.forwardRef((e,t)=>{var n,o;let{categories:s,colors:h=a.s,className:m,onClickLegendItem:g,activeLegend:v,enableLegendSlider:y=!1}=e,b=(0,i._T)(e,["categories","colors","className","onClickLegendItem","activeLegend","enableLegendSlider"]),x=r.useRef(null),[w,k]=r.useState(null),[S,E]=r.useState(null),O=r.useRef(null),C=(0,r.useCallback)(()=>{let e=null==x?void 0:x.current;e&&k({left:e.scrollLeft>0,right:e.scrollWidth-e.clientWidth>e.scrollLeft})},[k]),j=(0,r.useCallback)(e=>{var t;let n=null==x?void 0:x.current,r=null!==(t=null==n?void 0:n.clientWidth)&&void 0!==t?t:0;n&&y&&(n.scrollTo({left:"left"===e?n.scrollLeft-r:n.scrollLeft+r,behavior:"smooth"}),setTimeout(()=>{C()},400))},[y,C]);r.useEffect(()=>{let e=e=>{"ArrowLeft"===e?j("left"):"ArrowRight"===e&&j("right")};return S?(e(S),O.current=setInterval(()=>{e(S)},300)):clearInterval(O.current),()=>clearInterval(O.current)},[S,j]);let _=e=>{e.stopPropagation(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),E(e.key))},P=e=>{e.stopPropagation(),E(null)};return r.useEffect(()=>{let e=null==x?void 0:x.current;return y&&(C(),null==e||e.addEventListener("keydown",_),null==e||e.addEventListener("keyup",P)),()=>{null==e||e.removeEventListener("keydown",_),null==e||e.removeEventListener("keyup",P)}},[C,y]),r.createElement("ol",Object.assign({ref:t,className:(0,l.q)(d("root"),"relative overflow-hidden",m)},b),r.createElement("div",{ref:x,tabIndex:0,className:(0,l.q)("h-full flex",y?(null==w?void 0:w.right)||(null==w?void 0:w.left)?"pl-4 pr-12 items-center overflow-auto snap-mandatory [&::-webkit-scrollbar]:hidden [scrollbar-width:none]":"":"flex-wrap")},s.map((e,t)=>r.createElement(f,{key:"item-".concat(t),name:e,color:h[t],onClick:g,activeLegend:v}))),y&&((null==w?void 0:w.right)||(null==w?void 0:w.left))?r.createElement(r.Fragment,null,r.createElement("div",{className:(0,l.q)("from-tremor-background","dark:from-dark-tremor-background","absolute top-0 bottom-0 left-0 w-4 bg-gradient-to-r to-transparent pointer-events-none")}),r.createElement("div",{className:(0,l.q)("to-tremor-background","dark:to-dark-tremor-background","absolute top-0 bottom-0 right-10 w-4 bg-gradient-to-r from-transparent pointer-events-none")}),r.createElement("div",{className:(0,l.q)("bg-tremor-background","dark:bg-dark-tremor-background","absolute flex top-0 pr-1 bottom-0 right-0 items-center justify-center h-full")},r.createElement(p,{icon:c,onClick:()=>{E(null),j("left")},disabled:!(null==w?void 0:w.left)}),r.createElement(p,{icon:u,onClick:()=>{E(null),j("right")},disabled:!(null==w?void 0:w.right)}))):null)});h.displayName="Legend";let m=(e,t,n,i,a,l)=>{let{payload:s}=e,c=(0,r.useRef)(null);o(()=>{var e,t;n((t=null===(e=c.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)});let u=s.filter(e=>"none"!==e.type);return r.createElement("div",{ref:c,className:"flex items-center justify-end"},r.createElement(h,{categories:u.map(e=>e.value),colors:u.map(e=>t.get(e.value)),onClickLegendItem:a,activeLegend:i,enableLegendSlider:l}))}},98593:function(e,t,n){"use strict";n.d(t,{$B:function(){return s},ZP:function(){return u},zX:function(){return c}});var r=n(2265),o=n(7084),i=n(26898),a=n(97324),l=n(1153);let s=e=>{let{children:t}=e;return r.createElement("div",{className:(0,a.q)("rounded-tremor-default text-tremor-default border","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border")},t)},c=e=>{let{value:t,name:n,color:o}=e;return r.createElement("div",{className:"flex items-center justify-between space-x-8"},r.createElement("div",{className:"flex items-center space-x-2"},r.createElement("span",{className:(0,a.q)("shrink-0 rounded-tremor-full border-2 h-3 w-3","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",(0,l.bM)(o,i.K.background).bgColor)}),r.createElement("p",{className:(0,a.q)("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),r.createElement("p",{className:(0,a.q)("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t))},u=e=>{let{active:t,payload:n,label:i,categoryColors:l,valueFormatter:u}=e;if(t&&n){let e=n.filter(e=>"none"!==e.type);return r.createElement(s,null,r.createElement("div",{className:(0,a.q)("border-tremor-border border-b px-4 py-2","dark:border-dark-tremor-border")},r.createElement("p",{className:(0,a.q)("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},i)),r.createElement("div",{className:(0,a.q)("px-4 py-2 space-y-1")},e.map((e,t)=>{var n;let{value:i,name:a}=e;return r.createElement(c,{key:"id-".concat(t),value:u(i),name:a,color:null!==(n=l.get(a))&&void 0!==n?n:o.fr.Blue})})))}return null}},69448:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(97324),o=n(2265),i=n(5853);let a=(0,n(1153).fn)("Flex"),l={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},s={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},c={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},u=o.forwardRef((e,t)=>{let{flexDirection:n="row",justifyContent:u="between",alignItems:d="center",children:f,className:p}=e,h=(0,i._T)(e,["flexDirection","justifyContent","alignItems","children","className"]);return o.createElement("div",Object.assign({ref:t,className:(0,r.q)(a("root"),"flex w-full",c[n],l[u],s[d],p)},h),f)});u.displayName="Flex";var d=n(84264);let f=e=>{let{noDataText:t="No data"}=e;return o.createElement(u,{alignItems:"center",justifyContent:"center",className:(0,r.q)("w-full h-full border border-dashed rounded-tremor-default","border-tremor-border","dark:border-dark-tremor-border")},o.createElement(d.Z,{className:(0,r.q)("text-tremor-content","dark:text-dark-tremor-content")},t))}},32644:function(e,t,n){"use strict";n.d(t,{FB:function(){return i},i4:function(){return o},me:function(){return r},vZ:function(){return function e(t,n){if(t===n)return!0;if("object"!=typeof t||"object"!=typeof n||null===t||null===n)return!1;let r=Object.keys(t),o=Object.keys(n);if(r.length!==o.length)return!1;for(let i of r)if(!o.includes(i)||!e(t[i],n[i]))return!1;return!0}}});let r=(e,t)=>{let n=new Map;return e.forEach((e,r)=>{n.set(e,t[r])}),n},o=(e,t,n)=>[e?"auto":null!=t?t:0,null!=n?n:"auto"];function i(e,t){let n=[];for(let r of e)if(Object.prototype.hasOwnProperty.call(r,t)&&(n.push(r[t]),n.length>1))return!1;return!0}},47323:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(5853),o=n(2265),i=n(1526),a=n(7084),l=n(97324),s=n(1153),c=n(26898);let u={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},f={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.bM)(t,c.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.q)((0,s.bM)(t,c.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},h=(0,s.fn)("Icon"),m=o.forwardRef((e,t)=>{let{icon:n,variant:c="simple",tooltip:m,size:g=a.u8.SM,color:v,className:y}=e,b=(0,r._T)(e,["icon","variant","tooltip","size","color","className"]),x=p(c,v),{tooltipProps:w,getReferenceProps:k}=(0,i.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([t,w.refs.setReference]),className:(0,l.q)(h("root"),"inline-flex flex-shrink-0 items-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,f[c].rounded,f[c].border,f[c].shadow,f[c].ring,u[g].paddingX,u[g].paddingY,y)},k,b),o.createElement(i.Z,Object.assign({text:m},w)),o.createElement(n,{className:(0,l.q)(h("icon"),"shrink-0",d[g].height,d[g].width)}))});m.displayName="Icon"},53003:function(e,t,n){"use strict";let r,o,i;n.d(t,{Z:function(){return nF}});var a,l,s,c,u=n(5853),d=n(2265),f=n(54887),p=n(13323),h=n(64518),m=n(96822),g=n(40293);function v(){for(var e=arguments.length,t=Array(e),n=0;n(0,g.r)(...t),[...t])}var y=n(72238),b=n(93689);let x=(0,d.createContext)(!1);var w=n(61424),k=n(27847);let S=d.Fragment,E=d.Fragment,O=(0,d.createContext)(null),C=(0,d.createContext)(null);Object.assign((0,k.yV)(function(e,t){var n;let r,o,i=(0,d.useRef)(null),a=(0,b.T)((0,b.h)(e=>{i.current=e}),t),l=v(i),s=function(e){let t=(0,d.useContext)(x),n=(0,d.useContext)(O),r=v(e),[o,i]=(0,d.useState)(()=>{if(!t&&null!==n||w.O.isServer)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)});return(0,d.useEffect)(()=>{null!==o&&(null!=r&&r.body.contains(o)||null==r||r.body.appendChild(o))},[o,r]),(0,d.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),o}(i),[c]=(0,d.useState)(()=>{var e;return w.O.isServer?null:null!=(e=null==l?void 0:l.createElement("div"))?e:null}),u=(0,d.useContext)(C),g=(0,y.H)();return(0,h.e)(()=>{!s||!c||s.contains(c)||(c.setAttribute("data-headlessui-portal",""),s.appendChild(c))},[s,c]),(0,h.e)(()=>{if(c&&u)return u.register(c)},[u,c]),n=()=>{var e;s&&c&&(c instanceof Node&&s.contains(c)&&s.removeChild(c),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))},r=(0,p.z)(n),o=(0,d.useRef)(!1),(0,d.useEffect)(()=>(o.current=!1,()=>{o.current=!0,(0,m.Y)(()=>{o.current&&r()})}),[r]),g&&s&&c?(0,f.createPortal)((0,k.sY)({ourProps:{ref:a},theirProps:e,defaultTag:S,name:"Portal"}),c):null}),{Group:(0,k.yV)(function(e,t){let{target:n,...r}=e,o={ref:(0,b.T)(t)};return d.createElement(O.Provider,{value:n},(0,k.sY)({ourProps:o,theirProps:r,defaultTag:E,name:"Popover.Group"}))})});var j=n(31948),_=n(17684),P=n(98505),N=n(80004),T=n(38198),A=n(3141),M=((r=M||{})[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r);function I(){let e=(0,d.useRef)(0);return(0,A.s)("keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}var R=n(37863),D=n(47634),L=n(37105),Z=n(24536),z=n(37388),B=((o=B||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o),F=((i=F||{})[i.TogglePopover=0]="TogglePopover",i[i.ClosePopover=1]="ClosePopover",i[i.SetButton=2]="SetButton",i[i.SetButtonId=3]="SetButtonId",i[i.SetPanel=4]="SetPanel",i[i.SetPanelId=5]="SetPanelId",i);let H={0:e=>{let t={...e,popoverState:(0,Z.E)(e.popoverState,{0:1,1:0})};return 0===t.popoverState&&(t.__demoMode=!1),t},1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},q=(0,d.createContext)(null);function U(e){let t=(0,d.useContext)(q);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,U),t}return t}q.displayName="PopoverContext";let W=(0,d.createContext)(null);function K(e){let t=(0,d.useContext)(W);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return t}W.displayName="PopoverAPIContext";let $=(0,d.createContext)(null);function V(){return(0,d.useContext)($)}$.displayName="PopoverGroupContext";let X=(0,d.createContext)(null);function G(e,t){return(0,Z.E)(t.type,H,e,t)}X.displayName="PopoverPanelContext";let Y=k.AN.RenderStrategy|k.AN.Static,Q=k.AN.RenderStrategy|k.AN.Static,J=Object.assign((0,k.yV)(function(e,t){var n,r,o,i;let a,l,s,c,u,f;let{__demoMode:h=!1,...m}=e,g=(0,d.useRef)(null),y=(0,b.T)(t,(0,b.h)(e=>{g.current=e})),x=(0,d.useRef)([]),w=(0,d.useReducer)(G,{__demoMode:h,popoverState:h?0:1,buttons:x,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:(0,d.createRef)(),afterPanelSentinel:(0,d.createRef)()}),[{popoverState:S,button:E,buttonId:O,panel:_,panelId:N,beforePanelSentinel:A,afterPanelSentinel:M},I]=w,D=v(null!=(n=g.current)?n:E),z=(0,d.useMemo)(()=>{if(!E||!_)return!1;for(let e of document.querySelectorAll("body > *"))if(Number(null==e?void 0:e.contains(E))^Number(null==e?void 0:e.contains(_)))return!0;let e=(0,L.GO)(),t=e.indexOf(E),n=(t+e.length-1)%e.length,r=(t+1)%e.length,o=e[n],i=e[r];return!_.contains(o)&&!_.contains(i)},[E,_]),B=(0,j.E)(O),F=(0,j.E)(N),H=(0,d.useMemo)(()=>({buttonId:B,panelId:F,close:()=>I({type:1})}),[B,F,I]),U=V(),K=null==U?void 0:U.registerPopover,$=(0,p.z)(()=>{var e;return null!=(e=null==U?void 0:U.isFocusWithinPopoverGroup())?e:(null==D?void 0:D.activeElement)&&((null==E?void 0:E.contains(D.activeElement))||(null==_?void 0:_.contains(D.activeElement)))});(0,d.useEffect)(()=>null==K?void 0:K(H),[K,H]);let[Y,Q]=(a=(0,d.useContext)(C),l=(0,d.useRef)([]),s=(0,p.z)(e=>(l.current.push(e),a&&a.register(e),()=>c(e))),c=(0,p.z)(e=>{let t=l.current.indexOf(e);-1!==t&&l.current.splice(t,1),a&&a.unregister(e)}),u=(0,d.useMemo)(()=>({register:s,unregister:c,portals:l}),[s,c,l]),[l,(0,d.useMemo)(()=>function(e){let{children:t}=e;return d.createElement(C.Provider,{value:u},t)},[u])]),J=function(){var e;let{defaultContainers:t=[],portals:n,mainTreeNodeRef:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=(0,d.useRef)(null!=(e=null==r?void 0:r.current)?e:null),i=v(o),a=(0,p.z)(()=>{var e,r,a;let l=[];for(let e of t)null!==e&&(e instanceof HTMLElement?l.push(e):"current"in e&&e.current instanceof HTMLElement&&l.push(e.current));if(null!=n&&n.current)for(let e of n.current)l.push(e);for(let t of null!=(e=null==i?void 0:i.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(o.current)||t.contains(null==(a=null==(r=o.current)?void 0:r.getRootNode())?void 0:a.host)||l.some(e=>t.contains(e))||l.push(t));return l});return{resolveContainers:a,contains:(0,p.z)(e=>a().some(t=>t.contains(e))),mainTreeNodeRef:o,MainTreeNode:(0,d.useMemo)(()=>function(){return null!=r?null:d.createElement(T._,{features:T.A.Hidden,ref:o})},[o,r])}}({mainTreeNodeRef:null==U?void 0:U.mainTreeNodeRef,portals:Y,defaultContainers:[E,_]});r=null==D?void 0:D.defaultView,o="focus",i=e=>{var t,n,r,o;e.target!==window&&e.target instanceof HTMLElement&&0===S&&($()||E&&_&&(J.contains(e.target)||null!=(n=null==(t=A.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(o=null==(r=M.current)?void 0:r.contains)&&o.call(r,e.target)||I({type:1})))},f=(0,j.E)(i),(0,d.useEffect)(()=>{function e(e){f.current(e)}return(r=null!=r?r:window).addEventListener(o,e,!0),()=>r.removeEventListener(o,e,!0)},[r,o,!0]),(0,P.O)(J.resolveContainers,(e,t)=>{I({type:1}),(0,L.sP)(t,L.tJ.Loose)||(e.preventDefault(),null==E||E.focus())},0===S);let ee=(0,p.z)(e=>{I({type:1});let t=e?e instanceof HTMLElement?e:"current"in e&&e.current instanceof HTMLElement?e.current:E:E;null==t||t.focus()}),et=(0,d.useMemo)(()=>({close:ee,isPortalled:z}),[ee,z]),en=(0,d.useMemo)(()=>({open:0===S,close:ee}),[S,ee]);return d.createElement(X.Provider,{value:null},d.createElement(q.Provider,{value:w},d.createElement(W.Provider,{value:et},d.createElement(R.up,{value:(0,Z.E)(S,{0:R.ZM.Open,1:R.ZM.Closed})},d.createElement(Q,null,(0,k.sY)({ourProps:{ref:y},theirProps:m,slot:en,defaultTag:"div",name:"Popover"}),d.createElement(J.MainTreeNode,null))))))}),{Button:(0,k.yV)(function(e,t){let n=(0,_.M)(),{id:r="headlessui-popover-button-".concat(n),...o}=e,[i,a]=U("Popover.Button"),{isPortalled:l}=K("Popover.Button"),s=(0,d.useRef)(null),c="headlessui-focus-sentinel-".concat((0,_.M)()),u=V(),f=null==u?void 0:u.closeOthers,h=null!==(0,d.useContext)(X);(0,d.useEffect)(()=>{if(!h)return a({type:3,buttonId:r}),()=>{a({type:3,buttonId:null})}},[h,r,a]);let[m]=(0,d.useState)(()=>Symbol()),g=(0,b.T)(s,t,h?null:e=>{if(e)i.buttons.current.push(m);else{let e=i.buttons.current.indexOf(m);-1!==e&&i.buttons.current.splice(e,1)}i.buttons.current.length>1&&console.warn("You are already using a but only 1 is supported."),e&&a({type:2,button:e})}),y=(0,b.T)(s,t),x=v(s),w=(0,p.z)(e=>{var t,n,r;if(h){if(1===i.popoverState)return;switch(e.key){case z.R.Space:case z.R.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),a({type:1}),null==(r=i.button)||r.focus()}}else switch(e.key){case z.R.Space:case z.R.Enter:e.preventDefault(),e.stopPropagation(),1===i.popoverState&&(null==f||f(i.buttonId)),a({type:0});break;case z.R.Escape:if(0!==i.popoverState)return null==f?void 0:f(i.buttonId);if(!s.current||null!=x&&x.activeElement&&!s.current.contains(x.activeElement))return;e.preventDefault(),e.stopPropagation(),a({type:1})}}),S=(0,p.z)(e=>{h||e.key===z.R.Space&&e.preventDefault()}),E=(0,p.z)(t=>{var n,r;(0,D.P)(t.currentTarget)||e.disabled||(h?(a({type:1}),null==(n=i.button)||n.focus()):(t.preventDefault(),t.stopPropagation(),1===i.popoverState&&(null==f||f(i.buttonId)),a({type:0}),null==(r=i.button)||r.focus()))}),O=(0,p.z)(e=>{e.preventDefault(),e.stopPropagation()}),C=0===i.popoverState,j=(0,d.useMemo)(()=>({open:C}),[C]),P=(0,N.f)(e,s),A=h?{ref:y,type:P,onKeyDown:w,onClick:E}:{ref:g,id:i.buttonId,type:P,"aria-expanded":0===i.popoverState,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:w,onKeyUp:S,onClick:E,onMouseDown:O},R=I(),B=(0,p.z)(()=>{let e=i.panel;e&&(0,Z.E)(R.current,{[M.Forwards]:()=>(0,L.jA)(e,L.TO.First),[M.Backwards]:()=>(0,L.jA)(e,L.TO.Last)})===L.fE.Error&&(0,L.jA)((0,L.GO)().filter(e=>"true"!==e.dataset.headlessuiFocusGuard),(0,Z.E)(R.current,{[M.Forwards]:L.TO.Next,[M.Backwards]:L.TO.Previous}),{relativeTo:i.button})});return d.createElement(d.Fragment,null,(0,k.sY)({ourProps:A,theirProps:o,slot:j,defaultTag:"button",name:"Popover.Button"}),C&&!h&&l&&d.createElement(T._,{id:c,features:T.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:B}))}),Overlay:(0,k.yV)(function(e,t){let n=(0,_.M)(),{id:r="headlessui-popover-overlay-".concat(n),...o}=e,[{popoverState:i},a]=U("Popover.Overlay"),l=(0,b.T)(t),s=(0,R.oJ)(),c=null!==s?(s&R.ZM.Open)===R.ZM.Open:0===i,u=(0,p.z)(e=>{if((0,D.P)(e.currentTarget))return e.preventDefault();a({type:1})}),f=(0,d.useMemo)(()=>({open:0===i}),[i]);return(0,k.sY)({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:f,defaultTag:"div",features:Y,visible:c,name:"Popover.Overlay"})}),Panel:(0,k.yV)(function(e,t){let n=(0,_.M)(),{id:r="headlessui-popover-panel-".concat(n),focus:o=!1,...i}=e,[a,l]=U("Popover.Panel"),{close:s,isPortalled:c}=K("Popover.Panel"),u="headlessui-focus-sentinel-before-".concat((0,_.M)()),f="headlessui-focus-sentinel-after-".concat((0,_.M)()),m=(0,d.useRef)(null),g=(0,b.T)(m,t,e=>{l({type:4,panel:e})}),y=v(m),x=(0,k.Y2)();(0,h.e)(()=>(l({type:5,panelId:r}),()=>{l({type:5,panelId:null})}),[r,l]);let w=(0,R.oJ)(),S=null!==w?(w&R.ZM.Open)===R.ZM.Open:0===a.popoverState,E=(0,p.z)(e=>{var t;if(e.key===z.R.Escape){if(0!==a.popoverState||!m.current||null!=y&&y.activeElement&&!m.current.contains(y.activeElement))return;e.preventDefault(),e.stopPropagation(),l({type:1}),null==(t=a.button)||t.focus()}});(0,d.useEffect)(()=>{var t;e.static||1===a.popoverState&&(null==(t=e.unmount)||t)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),(0,d.useEffect)(()=>{if(a.__demoMode||!o||0!==a.popoverState||!m.current)return;let e=null==y?void 0:y.activeElement;m.current.contains(e)||(0,L.jA)(m.current,L.TO.First)},[a.__demoMode,o,m,a.popoverState]);let O=(0,d.useMemo)(()=>({open:0===a.popoverState,close:s}),[a,s]),C={ref:g,id:r,onKeyDown:E,onBlur:o&&0===a.popoverState?e=>{var t,n,r,o,i;let s=e.relatedTarget;s&&m.current&&(null!=(t=m.current)&&t.contains(s)||(l({type:1}),(null!=(r=null==(n=a.beforePanelSentinel.current)?void 0:n.contains)&&r.call(n,s)||null!=(i=null==(o=a.afterPanelSentinel.current)?void 0:o.contains)&&i.call(o,s))&&s.focus({preventScroll:!0})))}:void 0,tabIndex:-1},j=I(),P=(0,p.z)(()=>{let e=m.current;e&&(0,Z.E)(j.current,{[M.Forwards]:()=>{var t;(0,L.jA)(e,L.TO.First)===L.fE.Error&&(null==(t=a.afterPanelSentinel.current)||t.focus())},[M.Backwards]:()=>{var e;null==(e=a.button)||e.focus({preventScroll:!0})}})}),N=(0,p.z)(()=>{let e=m.current;e&&(0,Z.E)(j.current,{[M.Forwards]:()=>{var e;if(!a.button)return;let t=(0,L.GO)(),n=t.indexOf(a.button),r=t.slice(0,n+1),o=[...t.slice(n+1),...r];for(let t of o.slice())if("true"===t.dataset.headlessuiFocusGuard||null!=(e=a.panel)&&e.contains(t)){let e=o.indexOf(t);-1!==e&&o.splice(e,1)}(0,L.jA)(o,L.TO.First,{sorted:!1})},[M.Backwards]:()=>{var t;(0,L.jA)(e,L.TO.Previous)===L.fE.Error&&(null==(t=a.button)||t.focus())}})});return d.createElement(X.Provider,{value:r},S&&c&&d.createElement(T._,{id:u,ref:a.beforePanelSentinel,features:T.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:P}),(0,k.sY)({mergeRefs:x,ourProps:C,theirProps:i,slot:O,defaultTag:"div",features:Q,visible:S,name:"Popover.Panel"}),S&&c&&d.createElement(T._,{id:f,ref:a.afterPanelSentinel,features:T.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N}))}),Group:(0,k.yV)(function(e,t){let n;let r=(0,d.useRef)(null),o=(0,b.T)(r,t),[i,a]=(0,d.useState)([]),l={mainTreeNodeRef:n=(0,d.useRef)(null),MainTreeNode:(0,d.useMemo)(()=>function(){return d.createElement(T._,{features:T.A.Hidden,ref:n})},[n])},s=(0,p.z)(e=>{a(t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t})}),c=(0,p.z)(e=>(a(t=>[...t,e]),()=>s(e))),u=(0,p.z)(()=>{var e;let t=(0,g.r)(r);if(!t)return!1;let n=t.activeElement;return!!(null!=(e=r.current)&&e.contains(n))||i.some(e=>{var r,o;return(null==(r=t.getElementById(e.buttonId.current))?void 0:r.contains(n))||(null==(o=t.getElementById(e.panelId.current))?void 0:o.contains(n))})}),f=(0,p.z)(e=>{for(let t of i)t.buttonId.current!==e&&t.close()}),h=(0,d.useMemo)(()=>({registerPopover:c,unregisterPopover:s,isFocusWithinPopoverGroup:u,closeOthers:f,mainTreeNodeRef:l.mainTreeNodeRef}),[c,s,u,f,l.mainTreeNodeRef]),m=(0,d.useMemo)(()=>({}),[]);return d.createElement($.Provider,{value:h},(0,k.sY)({ourProps:{ref:o},theirProps:e,slot:m,defaultTag:"div",name:"Popover.Group"}),d.createElement(l.MainTreeNode,null))})});var ee=n(33044),et=n(28517);let en=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),d.createElement("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))};var er=n(4537),eo=n(99735),ei=n(7656);function ea(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return t.setHours(0,0,0,0),t}function el(){return ea(Date.now())}function es(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return t.setDate(1),t.setHours(0,0,0,0),t}var ec=n(97324),eu=n(96398),ed=n(41154);function ef(e){var t,n;if((0,ei.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==(0,ed.Z)(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach(function(e){var t=(0,eo.Z)(e);(void 0===n||nt||isNaN(t.getDate()))&&(n=t)}),n||new Date(NaN)}var eh=n(25721),em=n(47869);function eg(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,eh.Z)(e,-n)}var ev=n(55463);function ey(e,t){if((0,ei.Z)(2,arguments),!t||"object"!==(0,ed.Z)(t))return new Date(NaN);var n=t.years?(0,em.Z)(t.years):0,r=t.months?(0,em.Z)(t.months):0,o=t.weeks?(0,em.Z)(t.weeks):0,i=t.days?(0,em.Z)(t.days):0,a=t.hours?(0,em.Z)(t.hours):0,l=t.minutes?(0,em.Z)(t.minutes):0,s=t.seconds?(0,em.Z)(t.seconds):0;return new Date(eg(function(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,ev.Z)(e,-n)}(e,r+12*n),i+7*o).getTime()-1e3*(s+60*(l+60*a)))}function eb(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ex(e){return(0,ei.Z)(1,arguments),e instanceof Date||"object"===(0,ed.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}function ew(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getUTCDay();return t.setUTCDate(t.getUTCDate()-((n<1?7:0)+n-1)),t.setUTCHours(0,0,0,0),t}function ek(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=ew(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=ew(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}var eS={};function eE(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:eS.weekStartsOn)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getUTCDay();return d.setUTCDate(d.getUTCDate()-((f=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var h=eE(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var g=eE(m,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=g.getTime()?d:d-1}function eC(e,t){for(var n=Math.abs(e).toString();n.length0?n:1-n;return eC("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):eC(n+1,2)},d:function(e,t){return eC(e.getUTCDate(),t.length)},h:function(e,t){return eC(e.getUTCHours()%12||12,t.length)},H:function(e,t){return eC(e.getUTCHours(),t.length)},m:function(e,t){return eC(e.getUTCMinutes(),t.length)},s:function(e,t){return eC(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length;return eC(Math.floor(e.getUTCMilliseconds()*Math.pow(10,n-3)),t.length)}},e_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function eP(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+(t||"")+eC(i,2)}function eN(e,t){return e%60==0?(e>0?"-":"+")+eC(Math.abs(e)/60,2):eT(e,t)}function eT(e,t){var n=Math.abs(e);return(e>0?"-":"+")+eC(Math.floor(n/60),2)+(t||"")+eC(n%60,2)}var eA={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return ej.y(e,t)},Y:function(e,t,n,r){var o=eO(e,r),i=o>0?o:1-o;return"YY"===t?eC(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):eC(i,t.length)},R:function(e,t){return eC(ek(e),t.length)},u:function(e,t){return eC(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return eC(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return eC(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return ej.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return eC(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){(0,ei.Z)(1,arguments);var n=(0,eo.Z)(e);return Math.round((eE(n,t).getTime()-(function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:eS.firstWeekContainsDate)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=eO(e,t),f=new Date(0);return f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0),eE(f,t)})(n,t).getTime())/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):eC(o,t.length)},I:function(e,t,n){var r=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return Math.round((ew(t).getTime()-(function(e){(0,ei.Z)(1,arguments);var t=ek(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),ew(n)})(t).getTime())/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):eC(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ej.d(e,t)},D:function(e,t,n){var r=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((n-t.getTime())/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):eC(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return eC(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return eC(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return eC(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?e_.noon:0===o?e_.midnight:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?e_.evening:o>=12?e_.afternoon:o>=4?e_.morning:e_.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ej.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ej.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):eC(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):eC(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ej.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ej.s(e,t)},S:function(e,t){return ej.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return eN(o);case"XXXX":case"XX":return eT(o);default:return eT(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return eN(o);case"xxxx":case"xx":return eT(o);default:return eT(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eP(o,":");default:return"GMT"+eT(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eP(o,":");default:return"GMT"+eT(o,":")}},t:function(e,t,n,r){return eC(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return eC((r._originalDate||e).getTime(),t.length)}},eM=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},eI=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},eR={p:eI,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return eM(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",eM(o,t)).replace("{{time}}",eI(i,t))}};function eD(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var eL=["D","DD"],eZ=["YY","YYYY"];function ez(e,t,n){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var eB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eF(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var eH={date:eF({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eF({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eF({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eU(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function eW(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?function(e,t){for(var n=0;n0?"in "+r:r+" ago":r},formatLong:eH,formatRelative:function(e,t,n,r){return eq[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:eU({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eU({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:eU({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eU({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eU({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(a.matchPattern);if(!n)return null;var r=n[0],o=e.match(a.parsePattern);if(!o)return null;var i=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:eW({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:eW({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:eW({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:eW({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:eW({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},e$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eV=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eX=/^'([^]*?)'?$/,eG=/''/g,eY=/[a-zA-Z]/;function eQ(e,t,n){(0,ei.Z)(2,arguments);var r,o,i,a,l,s,c,u,d,f,p,h,m,g,v,y,b,x,w=String(t),k=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:eS.locale)&&void 0!==r?r:eK,S=(0,em.Z)(null!==(i=null!==(a=null!==(l=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n?void 0:null===(c=n.locale)||void 0===c?void 0:null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:eS.firstWeekContainsDate)&&void 0!==a?a:null===(d=eS.locale)||void 0===d?void 0:null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(S>=1&&S<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=(0,em.Z)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n?void 0:null===(v=n.locale)||void 0===v?void 0:null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:eS.weekStartsOn)&&void 0!==h?h:null===(b=eS.locale)||void 0===b?void 0:null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(E>=0&&E<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw RangeError("locale must contain localize property");if(!k.formatLong)throw RangeError("locale must contain formatLong property");var O=(0,eo.Z)(e);if(!function(e){return(0,ei.Z)(1,arguments),(!!ex(e)||"number"==typeof e)&&!isNaN(Number((0,eo.Z)(e)))}(O))throw RangeError("Invalid time value");var C=eD(O),j=function(e,t){return(0,ei.Z)(2,arguments),function(e,t){return(0,ei.Z)(2,arguments),new Date((0,eo.Z)(e).getTime()+(0,em.Z)(t))}(e,-(0,em.Z)(t))}(O,C),_={firstWeekContainsDate:S,weekStartsOn:E,locale:k,_originalDate:O};return w.match(eV).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,eR[t])(e,k.formatLong):e}).join("").match(e$).map(function(r){if("''"===r)return"'";var o,i=r[0];if("'"===i)return(o=r.match(eX))?o[1].replace(eG,"'"):r;var a=eA[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||-1===eZ.indexOf(r)||ez(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||-1===eL.indexOf(r)||ez(r,t,String(e)),a(j,r,k.localize,_);if(i.match(eY))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r}).join("")}var eJ=n(1153);let e0=(0,eJ.fn)("DateRangePicker"),e1=(e,t,n,r)=>{var o;if(n&&(e=null===(o=r.get(n))||void 0===o?void 0:o.from),e)return ea(e&&!t?e:ef([e,t]))},e2=(e,t,n,r)=>{var o,i;if(n&&(e=ea(null!==(i=null===(o=r.get(n))||void 0===o?void 0:o.to)&&void 0!==i?i:el())),e)return ea(e&&!t?e:ep([e,t]))},e4=[{value:"tdy",text:"Today",from:el()},{value:"w",text:"Last 7 days",from:ey(el(),{days:7})},{value:"t",text:"Last 30 days",from:ey(el(),{days:30})},{value:"m",text:"Month to Date",from:es(el())},{value:"y",text:"Year to Date",from:eb(el())}],e6=(e,t,n,r)=>{let o=(null==n?void 0:n.code)||"en-US";if(!e&&!t)return"";if(e&&!t)return r?eQ(e,r):e.toLocaleDateString(o,{year:"numeric",month:"short",day:"numeric"});if(e&&t){if(function(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()===r.getTime()}(e,t))return r?eQ(e,r):e.toLocaleDateString(o,{year:"numeric",month:"short",day:"numeric"});if(e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())return r?"".concat(eQ(e,r)," - ").concat(eQ(t,r)):"".concat(e.toLocaleDateString(o,{month:"short",day:"numeric"})," - \n ").concat(t.getDate(),", ").concat(t.getFullYear());{if(r)return"".concat(eQ(e,r)," - ").concat(eQ(t,r));let n={year:"numeric",month:"short",day:"numeric"};return"".concat(e.toLocaleDateString(o,n)," - \n ").concat(t.toLocaleDateString(o,n))}}return""};function e3(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function e8(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,em.Z)(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var l=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,l)),n}function e5(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,em.Z)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function e7(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function e9(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function te(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getDay();return d.setDate(d.getDate()-((fr.getTime()}function ti(e,t){(0,ei.Z)(2,arguments);var n=ea(e),r=ea(t);return Math.round((n.getTime()-eD(n)-(r.getTime()-eD(r)))/864e5)}function ta(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,eh.Z)(e,7*n)}function tl(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,ev.Z)(e,12*n)}function ts(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:eS.weekStartsOn)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getDay();return d.setDate(d.getDate()+((fe7(l,a)&&(a=(0,ev.Z)(l,-1*((void 0===c?1:c)-1))),s&&0>e7(a,s)&&(a=s),u=es(a),f=t.month,h=(p=(0,d.useState)(u))[0],m=[void 0===f?h:f,p[1]])[0],v=m[1],[g,function(e){if(!t.disableNavigation){var n,r=es(e);v(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]),x=b[0],w=b[1],k=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=es(e),i=e7(es((0,ev.Z)(o,r)),o),a=[],l=0;l=e7(i,n)))return(0,ev.Z)(i,-(r?void 0===o?1:o:1))}}(x,y),O=function(e){return k.some(function(t){return e9(e,t)})};return th.jsx(tP.Provider,{value:{currentMonth:x,displayMonths:k,goToMonth:w,goToDate:function(e,t){O(e)||(t&&te(e,t)?w((0,ev.Z)(e,1+-1*y.numberOfMonths)):w(e))},previousMonth:E,nextMonth:S,isDateDisplayed:O},children:e.children})}function tT(){var e=(0,d.useContext)(tP);if(!e)throw Error("useNavigation must be used within a NavigationProvider");return e}function tA(e){var t,n=tS(),r=n.classNames,o=n.styles,i=n.components,a=tT().goToMonth,l=function(t){a((0,ev.Z)(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:tE,c=th.jsx(s,{id:e.id,displayMonth:e.displayMonth});return th.jsxs("div",{className:r.caption_dropdowns,style:o.caption_dropdowns,children:[th.jsx("div",{className:r.vhidden,children:c}),th.jsx(tj,{onChange:l,displayMonth:e.displayMonth}),th.jsx(t_,{onChange:l,displayMonth:e.displayMonth})]})}function tM(e){return th.jsx("svg",tu({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:th.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function tI(e){return th.jsx("svg",tu({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:th.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var tR=(0,d.forwardRef)(function(e,t){var n=tS(),r=n.classNames,o=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var a=i.join(" "),l=tu(tu({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),th.jsx("button",tu({},e,{ref:t,type:"button",className:a,style:l}))});function tD(e){var t,n,r=tS(),o=r.dir,i=r.locale,a=r.classNames,l=r.styles,s=r.labels,c=s.labelPrevious,u=s.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return th.jsx(th.Fragment,{});var f=c(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),h=u(e.nextMonth,{locale:i}),m=[a.nav_button,a.nav_button_next].join(" "),g=null!==(t=null==d?void 0:d.IconRight)&&void 0!==t?t:tI,v=null!==(n=null==d?void 0:d.IconLeft)&&void 0!==n?n:tM;return th.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&th.jsx(tR,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?th.jsx(g,{className:a.nav_icon,style:l.nav_icon}):th.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&th.jsx(tR,{name:"next-month","aria-label":h,className:m,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?th.jsx(v,{className:a.nav_icon,style:l.nav_icon}):th.jsx(g,{className:a.nav_icon,style:l.nav_icon})})]})}function tL(e){var t=tS().numberOfMonths,n=tT(),r=n.previousMonth,o=n.nextMonth,i=n.goToMonth,a=n.displayMonths,l=a.findIndex(function(t){return e9(e.displayMonth,t)}),s=0===l,c=l===a.length-1;return th.jsx(tD,{displayMonth:e.displayMonth,hideNext:t>1&&(s||!c),hidePrevious:t>1&&(c||!s),nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&i(r)},onNextClick:function(){o&&i(o)}})}function tZ(e){var t,n,r=tS(),o=r.classNames,i=r.disableNavigation,a=r.styles,l=r.captionLayout,s=r.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:tE;return n=i?th.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?th.jsx(tA,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?th.jsxs(th.Fragment,{children:[th.jsx(tA,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),th.jsx(tL,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):th.jsxs(th.Fragment,{children:[th.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),th.jsx(tL,{displayMonth:e.displayMonth,id:e.id})]}),th.jsx("div",{className:o.caption,style:a.caption,children:n})}function tz(e){var t=tS(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?th.jsx("tfoot",{className:o,style:r.tfoot,children:th.jsx("tr",{children:th.jsx("td",{colSpan:8,children:n})})}):th.jsx(th.Fragment,{})}function tB(){var e=tS(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,n){for(var r=n?tn(new Date):tt(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=(0,eh.Z)(r,i);o.push(a)}return o}(o,i,a);return th.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&th.jsx("td",{style:n.head_cell,className:t.head_cell}),c.map(function(e,r){return th.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},r)})]})}function tF(){var e,t=tS(),n=t.classNames,r=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:tB;return th.jsx("thead",{style:r.head,className:n.head,children:th.jsx(i,{})})}function tH(e){var t=tS(),n=t.locale,r=t.formatters.formatDay;return th.jsx(th.Fragment,{children:r(e.date,{locale:n})})}var tq=(0,d.createContext)(void 0);function tU(e){return tm(e.initialProps)?th.jsx(tW,{initialProps:e.initialProps,children:e.children}):th.jsx(tq.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}function tW(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,a={disabled:[]};return r&&a.disabled.push(function(e){var t=i&&r.length>i-1,n=r.some(function(t){return tr(t,e)});return!!(t&&!n)}),th.jsx(tq.Provider,{value:{selected:r,onDayClick:function(e,n,a){if(null===(l=t.onDayClick)||void 0===l||l.call(t,e,n,a),(!n.selected||!o||(null==r?void 0:r.length)!==o)&&(n.selected||!i||(null==r?void 0:r.length)!==i)){var l,s,c=r?td([],r,!0):[];if(n.selected){var u=c.findIndex(function(t){return tr(e,t)});c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,n,a)}},modifiers:a},children:n})}function tK(){var e=(0,d.useContext)(tq);if(!e)throw Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var t$=(0,d.createContext)(void 0);function tV(e){return tg(e.initialProps)?th.jsx(tX,{initialProps:e.initialProps,children:e.children}):th.jsx(t$.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}function tX(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],tr(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:eg(i,l-1),before:(0,eh.Z)(i,l-1)}),i&&a&&c.disabled.push({after:i,before:(0,eh.Z)(i,l-1)}),!i&&a&&c.disabled.push({after:eg(a,l-1),before:(0,eh.Z)(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:(0,eh.Z)(i,-s+1)}),c.disabled.push({after:(0,eh.Z)(i,s-1)})),i&&a){var u=s-(ti(a,i)+1);c.disabled.push({before:eg(i,u)}),c.disabled.push({after:(0,eh.Z)(a,u)})}!i&&a&&(c.disabled.push({before:(0,eh.Z)(a,-s+1)}),c.disabled.push({after:(0,eh.Z)(a,s-1)}))}return th.jsx(t$.Provider,{value:{selected:r,onDayClick:function(e,n,o){null===(s=t.onDayClick)||void 0===s||s.call(t,e,n,o);var i,a,l,s,c,u=(a=(i=r||{}).from,l=i.to,a&&l?tr(l,e)&&tr(a,e)?void 0:tr(l,e)?{from:l,to:void 0}:tr(a,e)?void 0:to(a,e)?{from:e,to:l}:{from:a,to:e}:l?to(e,l)?{from:l,to:e}:{from:e,to:l}:a?te(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0});null===(c=t.onSelect)||void 0===c||c.call(t,u,e,n,o)},modifiers:c},children:n})}function tG(){var e=(0,d.useContext)(t$);if(!e)throw Error("useSelectRange must be used within a SelectRangeProvider");return e}function tY(e){return Array.isArray(e)?td([],e,!0):void 0!==e?[e]:[]}(l=c||(c={})).Outside="outside",l.Disabled="disabled",l.Selected="selected",l.Hidden="hidden",l.Today="today",l.RangeStart="range_start",l.RangeEnd="range_end",l.RangeMiddle="range_middle";var tQ=c.Selected,tJ=c.Disabled,t0=c.Hidden,t1=c.Today,t2=c.RangeEnd,t4=c.RangeMiddle,t6=c.RangeStart,t3=c.Outside,t8=(0,d.createContext)(void 0);function t5(e){var t,n,r,o=tS(),i=tK(),a=tG(),l=((t={})[tQ]=tY(o.selected),t[tJ]=tY(o.disabled),t[t0]=tY(o.hidden),t[t1]=[o.today],t[t2]=[],t[t4]=[],t[t6]=[],t[t3]=[],o.fromDate&&t[tJ].push({before:o.fromDate}),o.toDate&&t[tJ].push({after:o.toDate}),tm(o)?t[tJ]=t[tJ].concat(i.modifiers[tJ]):tg(o)&&(t[tJ]=t[tJ].concat(a.modifiers[tJ]),t[t6]=a.modifiers[t6],t[t4]=a.modifiers[t4],t[t2]=a.modifiers[t2]),t),s=(n=o.modifiers,r={},Object.entries(n).forEach(function(e){var t=e[0],n=e[1];r[t]=tY(n)}),r),c=tu(tu({},l),s);return th.jsx(t8.Provider,{value:c,children:e.children})}function t7(){var e=(0,d.useContext)(t8);if(!e)throw Error("useModifiers must be used within a ModifiersProvider");return e}function t9(e,t,n){var r=Object.keys(t).reduce(function(n,r){return t[r].some(function(t){if("boolean"==typeof t)return t;if(ex(t))return tr(e,t);if(Array.isArray(t)&&t.every(ex))return t.includes(e);if(t&&"object"==typeof t&&"from"in t)return r=t.from,o=t.to,r&&o?(0>ti(o,r)&&(r=(n=[o,r])[0],o=n[1]),ti(e,r)>=0&&ti(o,e)>=0):o?tr(o,e):!!r&&tr(r,e);if(t&&"object"==typeof t&&"dayOfWeek"in t)return t.dayOfWeek.includes(e.getDay());if(t&&"object"==typeof t&&"before"in t&&"after"in t){var n,r,o,i=ti(t.before,e),a=ti(t.after,e),l=i>0,s=a<0;return to(t.before,t.after)?s&&l:l||s}return t&&"object"==typeof t&&"after"in t?ti(e,t.after)>0:t&&"object"==typeof t&&"before"in t?ti(t.before,e)>0:"function"==typeof t&&t(e)})&&n.push(r),n},[]),o={};return r.forEach(function(e){return o[e]=!0}),n&&!e9(e,n)&&(o.outside=!0),o}var ne=(0,d.createContext)(void 0);function nt(e){var t=tT(),n=t7(),r=(0,d.useState)(),o=r[0],i=r[1],a=(0,d.useState)(),l=a[0],s=a[1],c=function(e,t){for(var n,r,o=es(e[0]),i=e3(e[e.length-1]),a=o;a<=i;){var l=t9(a,t);if(!(!l.disabled&&!l.hidden)){a=(0,eh.Z)(a,1);continue}if(l.selected)return a;l.today&&!r&&(r=a),n||(n=a),a=(0,eh.Z)(a,1)}return r||n}(t.displayMonths,n),u=(null!=o?o:l&&t.isDateDisplayed(l))?l:c,f=function(e){i(e)},p=tS(),h=function(e,r){if(o){var i=function e(t,n){var r=n.moveBy,o=n.direction,i=n.context,a=n.modifiers,l=n.retry,s=void 0===l?{count:0,lastFocused:t}:l,c=i.weekStartsOn,u=i.fromDate,d=i.toDate,f=i.locale,p=({day:eh.Z,week:ta,month:ev.Z,year:tl,startOfWeek:function(e){return i.ISOWeek?tn(e):tt(e,{locale:f,weekStartsOn:c})},endOfWeek:function(e){return i.ISOWeek?tc(e):ts(e,{locale:f,weekStartsOn:c})}})[r](t,"after"===o?1:-1);"before"===o&&u?p=ef([u,p]):"after"===o&&d&&(p=ep([d,p]));var h=!0;if(a){var m=t9(p,a);h=!m.disabled&&!m.hidden}return h?p:s.count>365?s.lastFocused:e(p,{moveBy:r,direction:o,context:i,modifiers:a,retry:tu(tu({},s),{count:s.count+1})})}(o,{moveBy:e,direction:r,context:p,modifiers:n});tr(o,i)||(t.goToDate(i,o),f(i))}};return th.jsx(ne.Provider,{value:{focusedDay:o,focusTarget:u,blur:function(){s(o),i(void 0)},focus:f,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}},children:e.children})}function nn(){var e=(0,d.useContext)(ne);if(!e)throw Error("useFocusContext must be used within a FocusProvider");return e}var nr=(0,d.createContext)(void 0);function no(e){return tv(e.initialProps)?th.jsx(ni,{initialProps:e.initialProps,children:e.children}):th.jsx(nr.Provider,{value:{selected:void 0},children:e.children})}function ni(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var o,i,a;if(null===(o=t.onDayClick)||void 0===o||o.call(t,e,n,r),n.selected&&!t.required){null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,n,r);return}null===(a=t.onSelect)||void 0===a||a.call(t,e,e,n,r)}};return th.jsx(nr.Provider,{value:r,children:n})}function na(){var e=(0,d.useContext)(nr);if(!e)throw Error("useSelectSingle must be used within a SelectSingleProvider");return e}function nl(e){var t,n,r,o,i,a,l,s,u,f,p,h,m,g,v,y,b,x,w,k,S,E,O,C,j,_,P,N,T,A,M,I,R,D,L,Z,z,B,F,H,q,U,W=(0,d.useRef)(null),K=(t=e.date,n=e.displayMonth,a=tS(),l=nn(),s=t9(t,t7(),n),u=tS(),f=na(),p=tK(),h=tG(),g=(m=nn()).focusDayAfter,v=m.focusDayBefore,y=m.focusWeekAfter,b=m.focusWeekBefore,x=m.blur,w=m.focus,k=m.focusMonthBefore,S=m.focusMonthAfter,E=m.focusYearBefore,O=m.focusYearAfter,C=m.focusStartOfWeek,j=m.focusEndOfWeek,_={onClick:function(e){var n,r,o,i;tv(u)?null===(n=f.onDayClick)||void 0===n||n.call(f,t,s,e):tm(u)?null===(r=p.onDayClick)||void 0===r||r.call(p,t,s,e):tg(u)?null===(o=h.onDayClick)||void 0===o||o.call(h,t,s,e):null===(i=u.onDayClick)||void 0===i||i.call(u,t,s,e)},onFocus:function(e){var n;w(t),null===(n=u.onDayFocus)||void 0===n||n.call(u,t,s,e)},onBlur:function(e){var n;x(),null===(n=u.onDayBlur)||void 0===n||n.call(u,t,s,e)},onKeyDown:function(e){var n;switch(e.key){case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===u.dir?g():v();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===u.dir?v():g();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),y();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),b();break;case"PageUp":e.preventDefault(),e.stopPropagation(),e.shiftKey?E():k();break;case"PageDown":e.preventDefault(),e.stopPropagation(),e.shiftKey?O():S();break;case"Home":e.preventDefault(),e.stopPropagation(),C();break;case"End":e.preventDefault(),e.stopPropagation(),j()}null===(n=u.onDayKeyDown)||void 0===n||n.call(u,t,s,e)},onKeyUp:function(e){var n;null===(n=u.onDayKeyUp)||void 0===n||n.call(u,t,s,e)},onMouseEnter:function(e){var n;null===(n=u.onDayMouseEnter)||void 0===n||n.call(u,t,s,e)},onMouseLeave:function(e){var n;null===(n=u.onDayMouseLeave)||void 0===n||n.call(u,t,s,e)},onPointerEnter:function(e){var n;null===(n=u.onDayPointerEnter)||void 0===n||n.call(u,t,s,e)},onPointerLeave:function(e){var n;null===(n=u.onDayPointerLeave)||void 0===n||n.call(u,t,s,e)},onTouchCancel:function(e){var n;null===(n=u.onDayTouchCancel)||void 0===n||n.call(u,t,s,e)},onTouchEnd:function(e){var n;null===(n=u.onDayTouchEnd)||void 0===n||n.call(u,t,s,e)},onTouchMove:function(e){var n;null===(n=u.onDayTouchMove)||void 0===n||n.call(u,t,s,e)},onTouchStart:function(e){var n;null===(n=u.onDayTouchStart)||void 0===n||n.call(u,t,s,e)}},P=tS(),N=na(),T=tK(),A=tG(),M=tv(P)?N.selected:tm(P)?T.selected:tg(P)?A.selected:void 0,I=!!(a.onDayClick||"default"!==a.mode),(0,d.useEffect)(function(){var e;!s.outside&&l.focusedDay&&I&&tr(l.focusedDay,t)&&(null===(e=W.current)||void 0===e||e.focus())},[l.focusedDay,t,W,I,s.outside]),D=(R=[a.classNames.day],Object.keys(s).forEach(function(e){var t=a.modifiersClassNames[e];if(t)R.push(t);else if(Object.values(c).includes(e)){var n=a.classNames["day_".concat(e)];n&&R.push(n)}}),R).join(" "),L=tu({},a.styles.day),Object.keys(s).forEach(function(e){var t;L=tu(tu({},L),null===(t=a.modifiersStyles)||void 0===t?void 0:t[e])}),Z=L,z=!!(s.outside&&!a.showOutsideDays||s.hidden),B=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:tH,F={style:Z,className:D,children:th.jsx(B,{date:t,displayMonth:n,activeModifiers:s}),role:"gridcell"},H=l.focusTarget&&tr(l.focusTarget,t)&&!s.outside,q=l.focusedDay&&tr(l.focusedDay,t),U=tu(tu(tu({},F),((r={disabled:s.disabled,role:"gridcell"})["aria-selected"]=s.selected,r.tabIndex=q||H?0:-1,r)),_),{isButton:I,isHidden:z,activeModifiers:s,selectedDays:M,buttonProps:U,divProps:F});return K.isHidden?th.jsx("div",{role:"gridcell"}):K.isButton?th.jsx(tR,tu({name:"day",ref:W},K.buttonProps)):th.jsx("div",tu({},K.divProps))}function ns(e){var t=e.number,n=e.dates,r=tS(),o=r.onWeekNumberClick,i=r.styles,a=r.classNames,l=r.locale,s=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return th.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return th.jsx(tR,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,n,e)},children:c})}function nc(e){var t,n,r,o=tS(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:nl,u=null!==(n=null==s?void 0:s.WeekNumber)&&void 0!==n?n:ns;return l&&(r=th.jsx("td",{className:a.cell,style:i.cell,children:th.jsx(u,{number:e.weekNumber,dates:e.dates})})),th.jsxs("tr",{className:a.row,style:i.row,children:[r,e.dates.map(function(t){return th.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:th.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return(0,ei.Z)(1,arguments),Math.floor(function(e){return(0,ei.Z)(1,arguments),(0,eo.Z)(e).getTime()}(e)/1e3)}(t))})]})}function nu(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?tc(t):ts(t,n),o=(null==n?void 0:n.ISOWeek)?tn(e):tt(e,n),i=ti(r,o),a=[],l=0;l<=i;l++)a.push((0,eh.Z)(o,l));return a.reduce(function(e,t){var r=(null==n?void 0:n.ISOWeek)?function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return Math.round((tn(t).getTime()-(function(e){(0,ei.Z)(1,arguments);var t=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=tn(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=tn(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),tn(n)})(t).getTime())/6048e5)+1}(t):function(e,t){(0,ei.Z)(1,arguments);var n=(0,eo.Z)(e);return Math.round((tt(n,t).getTime()-(function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:eS.firstWeekContainsDate)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,eo.Z)(e),d=u.getFullYear(),f=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:eS.firstWeekContainsDate)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(d+1,0,f),p.setHours(0,0,0,0);var h=tt(p,t),m=new Date(0);m.setFullYear(d,0,f),m.setHours(0,0,0,0);var g=tt(m,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=g.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(d,0,u),f.setHours(0,0,0,0),tt(f,t)})(n,t).getTime())/6048e5)+1}(t,n),o=e.find(function(e){return e.weekNumber===r});return o?o.dates.push(t):e.push({weekNumber:r,dates:[t]}),e},[])}function nd(e){var t,n,r,o=tS(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,p=o.ISOWeek,h=function(e,t){var n=nu(es(e),e3(e),t);if(null==t?void 0:t.useFixedWeeks){var r=function(e,t){return(0,ei.Z)(1,arguments),function(e,t,n){(0,ei.Z)(2,arguments);var r=tt(e,n),o=tt(t,n);return Math.round((r.getTime()-eD(r)-(o.getTime()-eD(o)))/6048e5)}(function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),es(e),t)+1}(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=ta(i,6-r),l=nu(ta(i,1),a,t);n.push.apply(n,l)}}return n}(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),m=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:tF,g=null!==(n=null==u?void 0:u.Row)&&void 0!==n?n:nc,v=null!==(r=null==u?void 0:u.Footer)&&void 0!==r?r:tz;return th.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&th.jsx(m,{}),th.jsx("tbody",{className:a.tbody,style:l.tbody,children:h.map(function(t){return th.jsx(g,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),th.jsx(v,{displayMonth:e.displayMonth})]})}var nf="undefined"!=typeof window&&window.document&&window.document.createElement?d.useLayoutEffect:d.useEffect,np=!1,nh=0;function nm(){return"react-day-picker-".concat(++nh)}function ng(e){var t,n,r,o,i,a,l,s,c=tS(),u=c.dir,f=c.classNames,p=c.styles,h=c.components,m=tT().displayMonths,g=(r=null!=(t=c.id?"".concat(c.id,"-").concat(e.displayIndex):void 0)?t:np?nm():null,i=(o=(0,d.useState)(r))[0],a=o[1],nf(function(){null===i&&a(nm())},[]),(0,d.useEffect)(function(){!1===np&&(np=!0)},[]),null!==(n=null!=t?t:i)&&void 0!==n?n:void 0),v=c.id?"".concat(c.id,"-grid-").concat(e.displayIndex):void 0,y=[f.month],b=p.month,x=0===e.displayIndex,w=e.displayIndex===m.length-1,k=!x&&!w;"rtl"===u&&(w=(l=[x,w])[0],x=l[1]),x&&(y.push(f.caption_start),b=tu(tu({},b),p.caption_start)),w&&(y.push(f.caption_end),b=tu(tu({},b),p.caption_end)),k&&(y.push(f.caption_between),b=tu(tu({},b),p.caption_between));var S=null!==(s=null==h?void 0:h.Caption)&&void 0!==s?s:tZ;return th.jsxs("div",{className:y.join(" "),style:b,children:[th.jsx(S,{id:g,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),th.jsx(nd,{id:v,"aria-labelledby":g,displayMonth:e.displayMonth})]},e.displayIndex)}function nv(e){var t=tS(),n=t.classNames,r=t.styles;return th.jsx("div",{className:n.months,style:r.months,children:e.children})}function ny(e){var t,n,r=e.initialProps,o=tS(),i=nn(),a=tT(),l=(0,d.useState)(!1),s=l[0],c=l[1];(0,d.useEffect)(function(){o.initialFocus&&i.focusTarget&&(s||(i.focus(i.focusTarget),c(!0)))},[o.initialFocus,s,i.focus,i.focusTarget,i]);var u=[o.classNames.root,o.className];o.numberOfMonths>1&&u.push(o.classNames.multiple_months),o.showWeekNumber&&u.push(o.classNames.with_weeknumber);var f=tu(tu({},o.styles.root),o.style),p=Object.keys(r).filter(function(e){return e.startsWith("data-")}).reduce(function(e,t){var n;return tu(tu({},e),((n={})[t]=r[t],n))},{}),h=null!==(n=null===(t=r.components)||void 0===t?void 0:t.Months)&&void 0!==n?n:nv;return th.jsx("div",tu({className:u.join(" "),style:f,dir:o.dir,id:o.id,nonce:r.nonce,title:r.title,lang:r.lang},p,{children:th.jsx(h,{children:a.displayMonths.map(function(e,t){return th.jsx(ng,{displayIndex:t,displayMonth:e},t)})})}))}function nb(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(e,["children"]);return th.jsx(tk,{initialProps:n,children:th.jsx(tN,{children:th.jsx(no,{initialProps:n,children:th.jsx(tU,{initialProps:n,children:th.jsx(tV,{initialProps:n,children:th.jsx(t5,{children:th.jsx(nt,{children:t})})})})})})})}function nx(e){return th.jsx(nb,tu({},e,{children:th.jsx(ny,{initialProps:e})}))}let nw=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"}))},nk=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"}))},nS=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"}))},nE=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"}))};var nO=n(84264);n(41649);var nC=n(1526),nj=n(7084),n_=n(26898);let nP={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-1",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-1.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-lg"},xl:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-xl"}},nN={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},nT={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},nA={[nj.wu.Increase]:{bgColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.text).textColor},[nj.wu.ModerateIncrease]:{bgColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.text).textColor},[nj.wu.Decrease]:{bgColor:(0,eJ.bM)(nj.fr.Rose,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Rose,n_.K.text).textColor},[nj.wu.ModerateDecrease]:{bgColor:(0,eJ.bM)(nj.fr.Rose,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Rose,n_.K.text).textColor},[nj.wu.Unchanged]:{bgColor:(0,eJ.bM)(nj.fr.Orange,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Orange,n_.K.text).textColor}},nM={[nj.wu.Increase]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z"}))},[nj.wu.ModerateIncrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z"}))},[nj.wu.Decrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z"}))},[nj.wu.ModerateDecrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M14.5895 16.0032L5.98291 7.39664L7.39712 5.98242L16.0037 14.589V7.00324H18.0037V18.0032H7.00373V16.0032H14.5895Z"}))},[nj.wu.Unchanged]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z"}))}},nI=(0,eJ.fn)("BadgeDelta");d.forwardRef((e,t)=>{let{deltaType:n=nj.wu.Increase,isIncreasePositive:r=!0,size:o=nj.u8.SM,tooltip:i,children:a,className:l}=e,s=(0,u._T)(e,["deltaType","isIncreasePositive","size","tooltip","children","className"]),c=nM[n],f=(0,eJ.Fo)(n,r),p=a?nN:nP,{tooltipProps:h,getReferenceProps:m}=(0,nC.l)();return d.createElement("span",Object.assign({ref:(0,eJ.lq)([t,h.refs.setReference]),className:(0,ec.q)(nI("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full bg-opacity-20 dark:bg-opacity-25",nA[f].bgColor,nA[f].textColor,p[o].paddingX,p[o].paddingY,p[o].fontSize,l)},m,s),d.createElement(nC.Z,Object.assign({text:i},h)),d.createElement(c,{className:(0,ec.q)(nI("icon"),"shrink-0",a?(0,ec.q)("-ml-1 mr-1.5"):nT[o].height,nT[o].width)}),a?d.createElement("p",{className:(0,ec.q)(nI("text"),"text-sm whitespace-nowrap")},a):null)}).displayName="BadgeDelta";var nR=n(47323);let nD=e=>{var{onClick:t,icon:n}=e,r=(0,u._T)(e,["onClick","icon"]);return d.createElement("button",Object.assign({type:"button",className:(0,ec.q)("flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle select-none dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content")},r),d.createElement(nR.Z,{onClick:t,icon:n,variant:"simple",color:"slate",size:"sm"}))};function nL(e){var{mode:t,defaultMonth:n,selected:r,onSelect:o,locale:i,disabled:a,enableYearNavigation:l,classNames:s,weekStartsOn:c=0}=e,f=(0,u._T)(e,["mode","defaultMonth","selected","onSelect","locale","disabled","enableYearNavigation","classNames","weekStartsOn"]);return d.createElement(nx,Object.assign({showOutsideDays:!0,mode:t,defaultMonth:n,selected:r,onSelect:o,locale:i,disabled:a,weekStartsOn:c,classNames:Object.assign({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-2 relative items-center",caption_label:"text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium",nav:"space-x-1 flex items-center",nav_button:"flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content",nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"w-9 font-normal text-center text-tremor-content-subtle dark:text-dark-tremor-content-subtle",row:"flex w-full mt-0.5",cell:"text-center p-0 relative focus-within:relative text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",day:"h-9 w-9 p-0 hover:bg-tremor-background-subtle dark:hover:bg-dark-tremor-background-subtle outline-tremor-brand dark:outline-dark-tremor-brand rounded-tremor-default",day_today:"font-bold",day_selected:"aria-selected:bg-tremor-background-emphasis aria-selected:text-tremor-content-inverted dark:aria-selected:bg-dark-tremor-background-emphasis dark:aria-selected:text-dark-tremor-content-inverted ",day_disabled:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle disabled:hover:bg-transparent",day_outside:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle"},s),components:{IconLeft:e=>{var t=(0,u._T)(e,[]);return d.createElement(nw,Object.assign({className:"h-4 w-4"},t))},IconRight:e=>{var t=(0,u._T)(e,[]);return d.createElement(nk,Object.assign({className:"h-4 w-4"},t))},Caption:e=>{var t=(0,u._T)(e,[]);let{goToMonth:n,nextMonth:r,previousMonth:o,currentMonth:a}=tT();return d.createElement("div",{className:"flex justify-between items-center"},d.createElement("div",{className:"flex items-center space-x-1"},l&&d.createElement(nD,{onClick:()=>a&&n(tl(a,-1)),icon:nS}),d.createElement(nD,{onClick:()=>o&&n(o),icon:nw})),d.createElement(nO.Z,{className:"text-tremor-default tabular-nums capitalize text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium"},eQ(t.displayMonth,"LLLL yyy",{locale:i})),d.createElement("div",{className:"flex items-center space-x-1"},d.createElement(nD,{onClick:()=>r&&n(r),icon:nk}),l&&d.createElement(nD,{onClick:()=>a&&n(tl(a,1)),icon:nE})))}}},f))}nL.displayName="DateRangePicker",n(27281);var nZ=n(57365),nz=n(44140);let nB=el(),nF=d.forwardRef((e,t)=>{var n,r;let{value:o,defaultValue:i,onValueChange:a,enableSelect:l=!0,minDate:s,maxDate:c,placeholder:f="Select range",selectPlaceholder:p="Select range",disabled:h=!1,locale:m=eK,enableClear:g=!0,displayFormat:v,children:y,className:b,enableYearNavigation:x=!1,weekStartsOn:w=0,disabledDates:k}=e,S=(0,u._T)(e,["value","defaultValue","onValueChange","enableSelect","minDate","maxDate","placeholder","selectPlaceholder","disabled","locale","enableClear","displayFormat","children","className","enableYearNavigation","weekStartsOn","disabledDates"]),[E,O]=(0,nz.Z)(i,o),[C,j]=(0,d.useState)(!1),[_,P]=(0,d.useState)(!1),N=(0,d.useMemo)(()=>{let e=[];return s&&e.push({before:s}),c&&e.push({after:c}),[...e,...null!=k?k:[]]},[s,c,k]),T=(0,d.useMemo)(()=>{let e=new Map;return y?d.Children.forEach(y,t=>{var n;e.set(t.props.value,{text:null!==(n=(0,eu.qg)(t))&&void 0!==n?n:t.props.value,from:t.props.from,to:t.props.to})}):e4.forEach(t=>{e.set(t.value,{text:t.text,from:t.from,to:nB})}),e},[y]),A=(0,d.useMemo)(()=>{if(y)return(0,eu.sl)(y);let e=new Map;return e4.forEach(t=>e.set(t.value,t.text)),e},[y]),M=(null==E?void 0:E.selectValue)||"",I=e1(null==E?void 0:E.from,s,M,T),R=e2(null==E?void 0:E.to,c,M,T),D=I||R?e6(I,R,m,v):f,L=es(null!==(r=null!==(n=null!=R?R:I)&&void 0!==n?n:c)&&void 0!==r?r:nB),Z=g&&!h;return d.createElement("div",Object.assign({ref:t,className:(0,ec.q)("w-full min-w-[10rem] relative flex justify-between text-tremor-default max-w-sm shadow-tremor-input dark:shadow-dark-tremor-input rounded-tremor-default",b)},S),d.createElement(J,{as:"div",className:(0,ec.q)("w-full",l?"rounded-l-tremor-default":"rounded-tremor-default",C&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10")},d.createElement("div",{className:"relative w-full"},d.createElement(J.Button,{onFocus:()=>j(!0),onBlur:()=>j(!1),disabled:h,className:(0,ec.q)("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-l-tremor-default flex flex-nowrap border pl-3 py-2","rounded-l-tremor-default border-tremor-border text-tremor-content-emphasis focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",l?"rounded-l-tremor-default":"rounded-tremor-default",Z?"pr-8":"pr-4",(0,eu.um)((0,eu.Uh)(I||R),h))},d.createElement(en,{className:(0,ec.q)(e0("calendarIcon"),"flex-none shrink-0 h-5 w-5 -ml-0.5 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle"),"aria-hidden":"true"}),d.createElement("p",{className:"truncate"},D)),Z&&I?d.createElement("button",{type:"button",className:(0,ec.q)("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100 mr-4"),onClick:e=>{e.preventDefault(),null==a||a({}),O({})}},d.createElement(er.Z,{className:(0,ec.q)(e0("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null),d.createElement(ee.u,{className:"absolute z-10 min-w-min left-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},d.createElement(J.Panel,{focus:!0,className:(0,ec.q)("divide-y overflow-y-auto outline-none rounded-tremor-default p-3 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},d.createElement(nL,Object.assign({mode:"range",showOutsideDays:!0,defaultMonth:L,selected:{from:I,to:R},onSelect:e=>{null==a||a({from:null==e?void 0:e.from,to:null==e?void 0:e.to}),O({from:null==e?void 0:e.from,to:null==e?void 0:e.to})},locale:m,disabled:N,enableYearNavigation:x,classNames:{day_range_middle:(0,ec.q)("!rounded-none aria-selected:!bg-tremor-background-subtle aria-selected:dark:!bg-dark-tremor-background-subtle aria-selected:!text-tremor-content aria-selected:dark:!bg-dark-tremor-background-subtle"),day_range_start:"rounded-r-none rounded-l-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted",day_range_end:"rounded-l-none rounded-r-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted"},weekStartsOn:w},e))))),l&&d.createElement(et.R,{as:"div",className:(0,ec.q)("w-48 -ml-px rounded-r-tremor-default",_&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10"),value:M,onChange:e=>{let{from:t,to:n}=T.get(e),r=null!=n?n:nB;null==a||a({from:t,to:r,selectValue:e}),O({from:t,to:r,selectValue:e})},disabled:h},e=>{var t;let{value:n}=e;return d.createElement(d.Fragment,null,d.createElement(et.R.Button,{onFocus:()=>P(!0),onBlur:()=>P(!1),className:(0,ec.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-r-tremor-default transition duration-100 border px-4 py-2","border-tremor-border shadow-tremor-input text-tremor-content-emphasis focus:border-tremor-brand-subtle","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle",(0,eu.um)((0,eu.Uh)(n),h))},n&&null!==(t=A.get(n))&&void 0!==t?t:p),d.createElement(ee.u,{className:"absolute z-10 w-full inset-x-0 right-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},d.createElement(et.R.Options,{className:(0,ec.q)("divide-y overflow-y-auto outline-none border my-1","shadow-tremor-dropdown bg-tremor-background border-tremor-border divide-tremor-border rounded-tremor-default","dark:shadow-dark-tremor-dropdown dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border")},null!=y?y:e4.map(e=>d.createElement(nZ.Z,{key:e.value,value:e.value},e.text)))))}))});nF.displayName="DateRangePicker"},92414:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(5853),o=n(2265);n(42698),n(64016),n(8710);var i=n(33232),a=n(44140),l=n(58747);let s=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"}))};var c=n(4537),u=n(28517),d=n(33044);let f=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t),o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};var p=n(97324),h=n(1153),m=n(96398);let g=(0,h.fn)("MultiSelect"),v=o.forwardRef((e,t)=>{let{defaultValue:n,value:h,onValueChange:v,placeholder:y="Select...",placeholderSearch:b="Search",disabled:x=!1,icon:w,children:k,className:S}=e,E=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className"]),[O,C]=(0,a.Z)(n,h),{reactElementChildren:j,optionsAvailable:_}=(0,o.useMemo)(()=>{let e=o.Children.toArray(k).filter(o.isValidElement);return{reactElementChildren:e,optionsAvailable:(0,m.n0)("",e)}},[k]),[P,N]=(0,o.useState)(""),T=(null!=O?O:[]).length>0,A=(0,o.useMemo)(()=>P?(0,m.n0)(P,j):_,[P,j,_]),M=()=>{N("")};return o.createElement(u.R,Object.assign({as:"div",ref:t,defaultValue:O,value:O,onChange:e=>{null==v||v(e),C(e)},disabled:x,className:(0,p.q)("w-full min-w-[10rem] relative text-tremor-default",S)},E,{multiple:!0}),e=>{let{value:t}=e;return o.createElement(o.Fragment,null,o.createElement(u.R.Button,{className:(0,p.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-1.5","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",w?"pl-11 -ml-0.5":"pl-3",(0,m.um)(t.length>0,x))},w&&o.createElement("span",{className:(0,p.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(w,{className:(0,p.q)(g("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("div",{className:"h-6 flex items-center"},t.length>0?o.createElement("div",{className:"flex flex-nowrap overflow-x-scroll [&::-webkit-scrollbar]:hidden [scrollbar-width:none] gap-x-1 mr-5 -ml-1.5 relative"},_.filter(e=>t.includes(e.props.value)).map((e,n)=>{var r;return o.createElement("div",{key:n,className:(0,p.q)("max-w-[100px] lg:max-w-[200px] flex justify-center items-center pl-2 pr-1.5 py-1 font-medium","rounded-tremor-small","bg-tremor-background-muted dark:bg-dark-tremor-background-muted","bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle","text-tremor-content-default dark:text-dark-tremor-content-default","text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis")},o.createElement("div",{className:"text-xs truncate "},null!==(r=e.props.children)&&void 0!==r?r:e.props.value),o.createElement("div",{onClick:n=>{n.preventDefault();let r=t.filter(t=>t!==e.props.value);null==v||v(r),C(r)}},o.createElement(f,{className:(0,p.q)(g("clearIconItem"),"cursor-pointer rounded-tremor-full w-3.5 h-3.5 ml-2","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle dark:hover:text-tremor-content")})))})):o.createElement("span",null,y)),o.createElement("span",{className:(0,p.q)("absolute inset-y-0 right-0 flex items-center mr-2.5")},o.createElement(l.Z,{className:(0,p.q)(g("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),T&&!x?o.createElement("button",{type:"button",className:(0,p.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),C([]),null==v||v([])}},o.createElement(c.Z,{className:(0,p.q)(g("clearIconAllItems"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,o.createElement(d.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(u.R.Options,{className:(0,p.q)("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},o.createElement("div",{className:(0,p.q)("flex items-center w-full px-2.5","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted")},o.createElement("span",null,o.createElement(s,{className:(0,p.q)("flex-none w-4 h-4 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:b,className:(0,p.q)("w-full focus:outline-none focus:ring-none bg-transparent text-tremor-default py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onKeyDown:e=>{"Space"===e.code&&""!==e.target.value&&e.stopPropagation()},onChange:e=>N(e.target.value),value:P})),o.createElement(i.Z.Provider,Object.assign({},{onBlur:{handleResetSearch:M}},{value:{selectedValue:t}}),A))))})});v.displayName="MultiSelect"},46030:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853);n(42698),n(64016),n(8710);var o=n(33232),i=n(2265),a=n(97324),l=n(1153),s=n(28517);let c=(0,l.fn)("MultiSelectItem"),u=i.forwardRef((e,t)=>{let{value:n,className:u,children:d}=e,f=(0,r._T)(e,["value","className","children"]),{selectedValue:p}=(0,i.useContext)(o.Z),h=(0,l.NZ)(n,p);return i.createElement(s.R.Option,Object.assign({className:(0,a.q)(c("root"),"flex justify-start items-center cursor-default text-tremor-default p-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",u),ref:t,key:n,value:n},f),i.createElement("input",{type:"checkbox",className:(0,a.q)(c("checkbox"),"flex-none focus:ring-none focus:outline-none cursor-pointer mr-2.5","accent-tremor-brand","dark:accent-dark-tremor-brand"),checked:h,readOnly:!0}),i.createElement("span",{className:"whitespace-nowrap truncate"},null!=d?d:n))});u.displayName="MultiSelectItem"},30150:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M12 4v16m8-8H4"}))},a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M20 12H4"}))};var l=n(97324),s=n(1153),c=n(69262);let u="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",f=o.forwardRef((e,t)=>{let{onSubmit:n,enableStepper:f=!0,disabled:p,onValueChange:h,onChange:m}=e,g=(0,r._T)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),v=(0,o.useRef)(null),[y,b]=o.useState(!1),x=o.useCallback(()=>{b(!0)},[]),w=o.useCallback(()=>{b(!1)},[]),[k,S]=o.useState(!1),E=o.useCallback(()=>{S(!0)},[]),O=o.useCallback(()=>{S(!1)},[]);return o.createElement(c.Z,Object.assign({type:"number",ref:(0,s.lq)([v,t]),disabled:p,makeInputClassName:(0,s.fn)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null===(t=v.current)||void 0===t?void 0:t.value;null==n||n(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&x(),"ArrowUp"===e.key&&E()},onKeyUp:e=>{"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&O()},onChange:e=>{p||(null==h||h(parseFloat(e.target.value)),null==m||m(e))},stepper:f?o.createElement("div",{className:(0,l.q)("flex justify-center align-middle")},o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null===(e=v.current)||void 0===e||e.stepDown(),null===(t=v.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,l.q)(!p&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(a,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null===(e=v.current)||void 0===e||e.stepUp(),null===(t=v.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,l.q)(!p&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(i,{"data-testid":"step-up",className:(k?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},g))});f.displayName="NumberInput"},27281:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(5853),o=n(2265),i=n(58747),a=n(4537),l=n(97324),s=n(1153),c=n(96398),u=n(28517),d=n(33044),f=n(44140);let p=(0,s.fn)("Select"),h=o.forwardRef((e,t)=>{let{defaultValue:n,value:s,onValueChange:h,placeholder:m="Select...",disabled:g=!1,icon:v,enableClear:y=!0,children:b,className:x}=e,w=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","children","className"]),[k,S]=(0,f.Z)(n,s),E=(0,o.useMemo)(()=>{let e=o.Children.toArray(b).filter(o.isValidElement);return(0,c.sl)(e)},[b]);return o.createElement(u.R,Object.assign({as:"div",ref:t,defaultValue:k,value:k,onChange:e=>{null==h||h(e),S(e)},disabled:g,className:(0,l.q)("w-full min-w-[10rem] relative text-tremor-default",x)},w),e=>{var t;let{value:n}=e;return o.createElement(o.Fragment,null,o.createElement(u.R.Button,{className:(0,l.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,c.um)((0,c.Uh)(n),g))},v&&o.createElement("span",{className:(0,l.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(v,{className:(0,l.q)(p("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("span",{className:"w-[90%] block truncate"},n&&null!==(t=E.get(n))&&void 0!==t?t:m),o.createElement("span",{className:(0,l.q)("absolute inset-y-0 right-0 flex items-center mr-3")},o.createElement(i.Z,{className:(0,l.q)(p("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),y&&k?o.createElement("button",{type:"button",className:(0,l.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),S(""),null==h||h("")}},o.createElement(a.Z,{className:(0,l.q)(p("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,o.createElement(d.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(u.R.Options,{className:(0,l.q)("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},b)))})});h.displayName="Select"},57365:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(2265),i=n(28517),a=n(97324);let l=(0,n(1153).fn)("SelectItem"),s=o.forwardRef((e,t)=>{let{value:n,icon:s,className:c,children:u}=e,d=(0,r._T)(e,["value","icon","className","children"]);return o.createElement(i.R.Option,Object.assign({className:(0,a.q)(l("root"),"flex justify-start items-center cursor-default text-tremor-default px-2.5 py-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",c),ref:t,key:n,value:n},d),s&&o.createElement(s,{className:(0,a.q)(l("icon"),"flex-none w-5 h-5 mr-1.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}),o.createElement("span",{className:"whitespace-nowrap truncate"},null!=u?u:n))});s.displayName="SelectItem"},92858:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(5853),o=n(2265),i=n(62963),a=n(90945),l=n(13323),s=n(17684),c=n(80004),u=n(93689),d=n(38198),f=n(47634),p=n(56314),h=n(27847),m=n(64518);let g=(0,o.createContext)(null),v=Object.assign((0,h.yV)(function(e,t){let n=(0,s.M)(),{id:r="headlessui-description-".concat(n),...i}=e,a=function e(){let t=(0,o.useContext)(g);if(null===t){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),l=(0,u.T)(t);(0,m.e)(()=>a.register(r),[r,a.register]);let c={ref:l,...a.props,id:r};return(0,h.sY)({ourProps:c,theirProps:i,slot:a.slot||{},defaultTag:"p",name:a.name||"Description"})}),{});var y=n(37388);let b=(0,o.createContext)(null),x=Object.assign((0,h.yV)(function(e,t){let n=(0,s.M)(),{id:r="headlessui-label-".concat(n),passive:i=!1,...a}=e,l=function e(){let t=(0,o.useContext)(b);if(null===t){let t=Error("You used a