diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 77dee5b3077..682742a5af9 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -3909,7 +3909,7 @@
"mode": "chat",
"supports_function_calling": true
},
- "vertex_ai/codestral@2405": {
+ "vertex_ai/codestral@2501": {
"max_tokens": 128000,
"max_input_tokens": 128000,
"max_output_tokens": 128000,
diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html
deleted file mode 100644
index e7ad7d8920a..00000000000
--- a/litellm/proxy/_experimental/out/404.html
+++ /dev/null
@@ -1 +0,0 @@
-
404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/model_hub.html b/litellm/proxy/_experimental/out/model_hub.html
deleted file mode 100644
index 6544b3951b7..00000000000
--- a/litellm/proxy/_experimental/out/model_hub.html
+++ /dev/null
@@ -1 +0,0 @@
-LiteLLM Dashboard
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html
deleted file mode 100644
index 211a1f0bbd1..00000000000
--- a/litellm/proxy/_experimental/out/onboarding.html
+++ /dev/null
@@ -1 +0,0 @@
-LiteLLM Dashboard
\ No newline at end of file
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 03592f8e7ec..a215ba9c663 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -425,7 +425,6 @@ async def proxy_startup_event(app: FastAPI):
import json
init_verbose_loggers()
-
### LOAD MASTER KEY ###
# check if master key set in environment - load from there
master_key = get_secret("LITELLM_MASTER_KEY", None) # type: ignore
@@ -691,12 +690,18 @@ try:
@app.middleware("http")
async def redirect_ui_middleware(request: Request, call_next):
if request.url.path.startswith("/ui"):
- new_path = request.url.path.replace("/ui", f"{server_root_path}/ui", 1)
- return RedirectResponse(new_path)
+ new_url = str(request.url).replace("/ui", f"{server_root_path}/ui", 1)
+ return RedirectResponse(new_url)
return await call_next(request)
except Exception:
pass
+# current_dir = os.path.dirname(os.path.abspath(__file__))
+# ui_path = os.path.join(current_dir, "_experimental", "out")
+# # Mount this test directory instead
+# app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui")
+
+
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
diff --git a/litellm/utils.py b/litellm/utils.py
index 9e5e8c8cba9..443bfb5afd6 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -1725,7 +1725,7 @@ def _format_type(props, indent):
def token_counter(
model="",
- custom_tokenizer: Optional[dict] = None,
+ custom_tokenizer: Optional[Union[dict, SelectTokenizerResponse]] = None,
text: Optional[Union[str, List[str]]] = None,
messages: Optional[List] = None,
count_response_tokens: Optional[bool] = False,