-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Litellm dev 02 19 2026 p2 #21871
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
Merged
krrishdholakia
merged 6 commits into
litellm_dev_02_21_2026_p4
from
litellm_dev_02_19_2026_p2
Feb 22, 2026
Merged
Litellm dev 02 19 2026 p2 #21871
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5a15a9d
feat(ui/): new guardrails monitor 'demo
krrishdholakia fa35422
fix: ui updates
krrishdholakia 9ea62fa
style(ui/): fix styling
krrishdholakia 9947963
feat: enable running ai monitor on individual guardrails
krrishdholakia 1eada9b
feat: add backend logic for guardrail monitoring
krrishdholakia 6fc81c5
Merge branch 'litellm_dev_02_21_2026_p4' into litellm_dev_02_19_2026_p2
krrishdholakia 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
2 changes: 0 additions & 2 deletions
2
...m-proxy-extras/litellm_proxy_extras/migrations/20260214124140_baseline_diff/migration.sql
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
...m-proxy-extras/litellm_proxy_extras/migrations/20260219181415_baseline_diff/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,60 @@ | ||
| -- CreateTable | ||
| CREATE TABLE "LiteLLM_DailyGuardrailMetrics" ( | ||
| "guardrail_id" TEXT NOT NULL, | ||
| "date" TEXT NOT NULL, | ||
| "requests_evaluated" BIGINT NOT NULL DEFAULT 0, | ||
| "passed_count" BIGINT NOT NULL DEFAULT 0, | ||
| "blocked_count" BIGINT NOT NULL DEFAULT 0, | ||
| "flagged_count" BIGINT NOT NULL DEFAULT 0, | ||
| "avg_score" DOUBLE PRECISION, | ||
| "avg_latency_ms" DOUBLE PRECISION, | ||
| "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "updated_at" TIMESTAMP(3) NOT NULL, | ||
|
|
||
| CONSTRAINT "LiteLLM_DailyGuardrailMetrics_pkey" PRIMARY KEY ("guardrail_id","date") | ||
| ); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "LiteLLM_DailyPolicyMetrics" ( | ||
| "policy_id" TEXT NOT NULL, | ||
| "date" TEXT NOT NULL, | ||
| "requests_evaluated" BIGINT NOT NULL DEFAULT 0, | ||
| "passed_count" BIGINT NOT NULL DEFAULT 0, | ||
| "blocked_count" BIGINT NOT NULL DEFAULT 0, | ||
| "flagged_count" BIGINT NOT NULL DEFAULT 0, | ||
| "avg_score" DOUBLE PRECISION, | ||
| "avg_latency_ms" DOUBLE PRECISION, | ||
| "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "updated_at" TIMESTAMP(3) NOT NULL, | ||
|
|
||
| CONSTRAINT "LiteLLM_DailyPolicyMetrics_pkey" PRIMARY KEY ("policy_id","date") | ||
| ); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "LiteLLM_SpendLogGuardrailIndex" ( | ||
| "request_id" TEXT NOT NULL, | ||
| "guardrail_id" TEXT NOT NULL, | ||
| "policy_id" TEXT, | ||
| "start_time" TIMESTAMP(3) NOT NULL, | ||
|
|
||
| CONSTRAINT "LiteLLM_SpendLogGuardrailIndex_pkey" PRIMARY KEY ("request_id","guardrail_id") | ||
| ); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "LiteLLM_DailyGuardrailMetrics_date_idx" ON "LiteLLM_DailyGuardrailMetrics"("date"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "LiteLLM_DailyGuardrailMetrics_guardrail_id_idx" ON "LiteLLM_DailyGuardrailMetrics"("guardrail_id"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "LiteLLM_DailyPolicyMetrics_date_idx" ON "LiteLLM_DailyPolicyMetrics"("date"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "LiteLLM_DailyPolicyMetrics_policy_id_idx" ON "LiteLLM_DailyPolicyMetrics"("policy_id"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "LiteLLM_SpendLogGuardrailIndex_guardrail_id_start_time_idx" ON "LiteLLM_SpendLogGuardrailIndex"("guardrail_id", "start_time"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "LiteLLM_SpendLogGuardrailIndex_policy_id_start_time_idx" ON "LiteLLM_SpendLogGuardrailIndex"("policy_id", "start_time"); | ||
|
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silently overwrites existing
metadatakeyIf
request_datahas neither"metadata"nor"litellm_metadata"but has some other structure that already usesmetadatalater in the pipeline, this unconditionally setsrequest_data["metadata"] = {}, which could overwrite a falsy-but-present value (e.g.None,0,False,""). The previous code logged a warning, which was safer for diagnosing unexpected states. Consider checkingrequest_data.get("metadata") is Noneor usingsetdefaultto avoid accidental overwrites: