-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
feat(spend): add net auto-router savings to the cost-optimization dashboard #35402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
tin-berri
wants to merge
24
commits into
litellm_internal_staging
from
litellm_lit5046_autorouter_savings
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e30b7f2
feat(spend): add net auto-router savings to the cost-optimization das…
tin-berri 4897f6e
fix(spend): price auto-router savings through litellm's cost engine a…
tin-berri 0b9c503
test(spend): cover the savings fail-open paths
tin-berri eca16fa
refactor(spend): trim savings docstrings to what the code cannot say
tin-berri db15ef3
fix(spend): charge the cold-cache write to the model switch that caus…
tin-berri c46e96a
fix(spend): compare and price auto-router models as resolved identities
tin-berri 59d66e4
feat(spend): derive the savings baseline from the router's own candid…
tin-berri e2ffae8
fix(ui): say what the auto-router savings are measured against
tin-berri 6843ad0
fix(router): price baseline candidates under the provider their deplo…
tin-berri 52ca688
refactor(spend): let the types carry the facts the tests already assert
tin-berri c507283
fix(router): keep the savings baseline out of the outbound provider r…
tin-berri e12415a
fix(router): derive the savings baseline per call instead of caching it
tin-berri e9b4f95
fix(ui): stop the savings legend and tab control moving between tabs
tin-berri 669fd84
fix(ui): keep the savings header one shape across both tabs
tin-berri f66687b
fix(ui): lay the savings header out with the card's own slots
tin-berri d539fa6
fix(spend): charge the cold-cache write on the request that actually …
tin-berri 68c56fe
feat(spend): give the complexity router a savings baseline from its h…
tin-berri 11c6688
fix(router): price baseline candidates by base_model, not the deploym…
tin-berri 6cf689d
chore: drop the built dashboard bundle from this branch
tin-berri 5457640
chore: restore the built dashboard bundle to the branch point
tin-berri d0b59af
fix(spend): price the baseline on the whole request, not just its cac…
tin-berri bfe3413
docs(ui): say on the card that a cold first turn is undercounted
tin-berri 10a2a29
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
tin-berri 5410306
style: bring the savings changes under the strict and type-discipline…
tin-berri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...litellm_proxy_extras/migrations/20260731000000_add_autorouter_savings_spend/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| -- AlterTable | ||
| ALTER TABLE "LiteLLM_DailyUserSpend" ADD COLUMN IF NOT EXISTS "autorouter_savings_spend" DOUBLE PRECISION NOT NULL DEFAULT 0.0; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "LiteLLM_DailyOrganizationSpend" ADD COLUMN IF NOT EXISTS "autorouter_savings_spend" DOUBLE PRECISION NOT NULL DEFAULT 0.0; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "LiteLLM_DailyEndUserSpend" ADD COLUMN IF NOT EXISTS "autorouter_savings_spend" DOUBLE PRECISION NOT NULL DEFAULT 0.0; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "LiteLLM_DailyAgentSpend" ADD COLUMN IF NOT EXISTS "autorouter_savings_spend" DOUBLE PRECISION NOT NULL DEFAULT 0.0; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "LiteLLM_DailyTeamSpend" ADD COLUMN IF NOT EXISTS "autorouter_savings_spend" DOUBLE PRECISION NOT NULL DEFAULT 0.0; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "LiteLLM_DailyTagSpend" ADD COLUMN IF NOT EXISTS "autorouter_savings_spend" DOUBLE PRECISION NOT NULL DEFAULT 0.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.