diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d21dfd6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Kagamine Rin & Ryan Neef + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/litellm_dashboard.py b/litellm_dashboard.py index 64dc3f6..c1c11c0 100644 --- a/litellm_dashboard.py +++ b/litellm_dashboard.py @@ -207,11 +207,17 @@ class Tools: model_lines = [] for model_name in sorted(model_totals, key=lambda k: model_totals[k]["spend"], reverse=True): mt = model_totals[model_name] + # Strip provider prefix and abbreviate long model names for table readability display = model_name.replace("gemini/", "") if model_name.startswith("gemini/") else model_name + # Abbreviate known long names + display = display.replace("3.1-pro-preview-customtools", "3.1-pro-ct") + display = display.replace("3.1-flash-image-preview", "3.1-flash-img") + display = display.replace("3.1-flash-lite-preview", "3.1-flash-lite") + display = display.replace("3-flash-preview", "3-flash-prev") model_lines.append( - f" {display:30s} ${mt['spend']:8.2f} | " + f" {display:20s} ${mt['spend']:7.2f} | " f"{mt['requests']:3d} ok, {mt['failed']:d} fail | " - f"{mt['total']:>12,} tokens" + f"{mt['total']:>10,} tokens" ) # Assemble report @@ -226,7 +232,7 @@ class Tools: lines.append(f"Cache Created: {cache_created:,} tokens") lines.append("") lines.append("By Model:") - lines.append(f' {"Model":30s} {"Spend":>9s} | {"Requests":>14s} | {"Tokens":>12s}') + lines.append(f' {"Model":20s} {"Spend":>7s} | {"Requests":>14s} | {"Tokens":>10s}') lines.extend(model_lines) lines.append("") lines.append("By Date:")