litellm/litellm-proxy-extras/litellm_proxy_extras/migrations
tin-berri 9e3a8df6c0
feat(spend): add net auto-router savings to the cost-optimization dashboard (#35521)
* feat(spend): add net auto-router savings to the cost-optimization dashboard

The dashboard credited compression and prompt caching but said nothing about the
optimization that picks the model, so the driver with the largest lever on a bill
was the one an operator could not see.

Savings are the counterfactual: without a router a deployment runs one model, and
it has to be one that can carry the hardest request, so the baseline is the
priciest model in the router's hardest configured tier. A cheap tier is a choice
the router made, not a ceiling it was bounded by. `auto_router_savings_baseline_model`
overrides it for operators who would genuinely have run something else. Both are
provider-qualified before pricing, because a bare name can resolve to a different
vendor's rates or to nothing at all, and a deployment is priced by its `base_model`
where it has one, which is how Azure deployments are priced everywhere else.

Both arms price the request's real usage through `generic_cost_per_token` rather
than re-deriving per-token arithmetic, so tiered rates, ephemeral cache-write tiers
and regional uplifts stay consistent with what was actually billed. `prompt_tokens`
already includes the cache buckets, so charging them again at the input rate would
price the same tokens twice.

Cache state is what makes this hard. The baseline serves every turn, so whether it
had the prompt cached is whether the conversation was already underway. On a
continuing conversation it wrote the prompt earlier and would only read it now, so
this request's write is what switching cost and counts against the saving. On a
first turn nothing was cached for any model, the baseline would have written the
same prompt, and both arms carry the write at their own rates. Charging the write
to both cases understates a first turn to a few percent of its value, and because
the write premium is fixed by prompt size while the saving grows with completion
length, it can render a profitable route as a loss.

That shape is read off the conversation rather than remembered: a second human ask
means an earlier turn was served. No cache, no session id, and no dependence on a
caller sending a session header. It cannot see a switch on a turn the router did
not classify, and it reads a few-shot prompt's synthetic turns as prior
conversation; both err toward charging the write, which under-claims.

The baseline and the shape ride on the existing `routing_decision` record, which is
already carried from the router to the spend log, already classified for redaction,
and already written-or-cleared per attempt. A fallback that re-enters the hook
therefore cannot leave either fact behind to be attributed to a deployment that
never routed, and no new metadata key crosses the trust boundary.

The result is signed. Whether a switch pays off is a race between the rate gap and
the cache-write cost, and a narrow gap loses; flooring at zero would hide exactly
the routing behaviour an operator needs to see. The donut plots only drivers that
saved, while the card and range total keep the sign.

Savings accrue into a new `autorouter_savings_spend` column on the six daily rollup
tables, declared `NotRequired` because rows queued by a pod on the previous release
carry no such key. It is summed by the rollup merge the cross-pod Redis drain also
runs, and carried through the aggregation query, the per-row accumulation and the
response model, so the dashboard reads a value the API actually sends. Tests
enumerate the drivers from the response model itself and assert each is summed,
accumulated, carried and totalled, so one added later cannot be half-wired.

* fix(spend): let the baseline pay for a continuing turn's own growth

`_baseline_usage` moved every cache-creation token into the baseline's read bucket
whenever the conversation was underway. That is right for a switch, where the
baseline never left the model it was on and really would only read, but wrong for a
turn that stayed put: the prompt grew, and the tokens written are that growth. They
are new to every model, so the baseline would have paid to write them too. Forgiving
it that write made the counterfactual cheaper than it was and shrank the reported
saving on ordinary steady-state traffic, by about 2% per turn.

The selected arm was never involved; it has always been priced on the real usage.
The error sat entirely on the baseline.

The condition is that the request read more than it wrote, not that it read anything.
A switch onto a model already holding a small prefix of this prompt still writes most
of it, and that write is the switch's own cost; keying off a nonzero read would have
handed such a request the full rate gap, turning +$0.0056 into +$0.1177. Comparing
the two buckets separates a warm continuation, which reads far more than it writes,
from a cold arrival, which does the reverse, and it leaves the existing invariant
intact: a request reading 0 and one reading 1 both still land in the same place.

* fix(spend): price each arm under the key litellm billed it, and see agent turns

Two ways the savings number read the wrong thing, both from identifying a model by
its name when the name is not what it costs.

The counterfactual was ranked and priced on the public rate for the model a
deployment names. A deployment may not be charged that rate: the router registers
its configured prices under the deployment's own id and deliberately keeps them off
the shared model-name key so deployments sharing a backend model do not pollute each
other. So a hardest-tier deployment configured above its public rate lost the
ranking to a cheaper candidate, and once chosen was priced at a rate nobody pays.
Which key prices a deployment is now `_select_model_name_for_cost_calc`'s decision,
the resolver the real request is billed through, rather than a second rule here that
would have to re-learn that per-second and tiered overrides count, that a partial
override still counts, and that a deployment configured at zero is priced at zero
rather than treated as unpriced.

The arm being subtracted had the same fault and a sharper edge. It priced the spend
log's `model`, which on Azure is the deployment name, absent from the cost map, so
the whole driver silently read zero for that traffic. It no longer re-derives
anything: `model_map_information.model_map_key` is what litellm actually billed the
request under, recorded at request time by that same resolver with `base_model` and
custom pricing already applied.

Separately, the conversation-shape discriminator counted human asks, and an agent
loop can run twenty turns on one of them. Its tool traffic rides `tool_result`
blocks on user turns that flatten to empty text, and `tool` roles that are never
read, so a long agentic conversation looked like its own first turn and was handed
the arithmetic that leaves the cache write on both arms. That is the one direction
this must never fail in, because it inflates. An assistant turn is the direct
evidence that something answered earlier, and it is blind to how the tool plumbing
is spelled on either surface.

* fix(spend): give the cost-key resolver both inputs the selected arm needs

The served model was resolved through one input at a time, and each choice broke the
half the other fixed.

`model_map_key` is the served model already resolved through `base_model`, which is
the only way an Azure deployment name reaches the cost map at all; without it the
selected arm priced a name absent from the map, returned nothing, and the whole
driver silently read zero for that traffic. But it is built without
`router_model_id`, so it never carries a deployment's own price overrides, and a
custom-priced deployment was compared at its public rate while the baseline used the
real override. On a deployment configured well above its public rate that inverted
the answer outright: a route that lost $21.88 reported saving $0.10.

`_select_model_name_for_cost_calc` takes both, so it gets both. Which key prices a
deployment stays its decision rather than a rule restated here.

* fix(spend): same model is only the same cost when it is the same deployment

The short-circuit compared resolved model identity, so two deployments of one model
collapsed to "no switch" and reported zero. They are not the same cost: a deployment
can carry a negotiated rate, and routing from the dear one to the list-price one is a
real saving the dashboard reported as $0.00 against a true $21.93.

Both arms now carry the key litellm prices them under, so the comparison is between
deployments rather than between names.

* refactor(spend): price from resolved rates, not from a name we keep re-resolving

Four review rounds landed on one mechanism: which identifier prices a deployment.
base_model, then the deployment id, then cache-only overrides. Each round added a
clause to a resolution rule that should not exist, and a wrong primitive fails once
per input shape, so each shape arrived as its own finding.

`Router.get_deployment_model_info` already owns this. It merges a deployment's
configured prices over the built-in map, folds in `base_model` defaults for
deployments whose name is not a model, and falls back to the model name when nothing
is overridden. Every shape hand-rolled here (cache-only, partial, per-second, Azure)
was that function re-implemented badly.

`generic_cost_per_token` now accepts already-resolved rates instead of demanding a
name it looks up itself, which is what forced the name-bending in the first place.
Both arms resolve through the owner and pass what they got: the counterfactual by the
deployment the router would have used, the served request by the deployment that
served it. The invented cost-key resolver is gone, and `Baseline` carries a
deployment id rather than a key we chose on litellm's behalf.

Net 64 insertions against 79 deletions.

* test(spend): follow _most_expensive onto the router that prices its candidates

Ranking moved through `Router.get_deployment_model_info`, since what a deployment
costs is the router's answer to give; these four cases were still calling the old
free-function signature.

* fix(spend): rank baseline candidates by what a request costs, not by two rates

"Most expensive" was decided by comparing output rate then input rate. That is a
property of a rate, not of a request: a deployment dearer per output token can be
cheaper per cached token, so the comparison ordered cache-heavy traffic backwards and
recorded the wrong counterfactual.

Candidates are now costed on one reference request through the same engine the
savings themselves use, which leaves cache read and write rates, tiered tables and
every other billing dimension to that engine rather than to another rule restated
here. The reference request is cache-heavy because auto-routed traffic is.

* fix(spend): pick the baseline against the request that ran, not a stand-in for one

Ranking happened in the pre-routing hook, where the request has not executed yet, so
candidates were costed against a hard-coded reference workload: 20k prompt, 19k of it
cached, 1k out. Which candidate is dearest depends on that mix, so a pooled hardest
tier holding a deployment with non-proportional configured rates could be ranked for
a request nothing like the one served.

The mix is known on the spend path, so the ranking belongs there. The routing
decision now carries the tier's candidates rather than a winner already chosen, and
the baseline is resolved against the usage that actually happened. The reference
workload is gone; nothing here assumes a traffic shape any more.

The router is passed in rather than imported from `proxy_server` inside the
computation, so the savings stay a pure function of their arguments and the caller
owns where the router comes from. That also makes the spend path testable without a
running proxy, which the previous shape was not.

* refactor(spend): measure savings against one configured model, not a derived one

The counterfactual was derived per request: enumerate the hardest tier's
deployments, resolve each one's effective pricing, price them all, take the dearest.
That machinery produced a review finding per input shape it had not anticipated,
and every answer it gave was one an operator could have stated in a line of config.

So they state it. `litellm_settings.autorouter_savings_baseline_model` names the
model the traffic would have run on without a router, for every auto-router on the
proxy, and unset means the driver is off rather than a model nobody named being
guessed at. `savings_baseline.py` and its tests are deleted outright, along with the
tier enumeration, the candidate list on the routing decision, and the per-deployment
override that shadowed it.

Cache-state handling is untouched: the baseline is still priced on this request's own
read and write split, so a switch still pays for re-warming the cache and a first
turn still charges the write to both arms.

45 insertions against 482 deletions.

* refactor(router): compute the conversation shape once and pass it down

`_classify_and_route` re-derived it from the messages the hook had already resolved,
so an ordinary routed request walked the turn list twice for one boolean. The hook
computes it and hands it over, which is also where the affinity-hit path already got
it from.

Also moves `_get_llm_router` below the imports it sat among.

* fix(router): drop the dead conversation_continuing parameter off the hook

It was added to `async_pre_routing_hook` by mistake and immediately overwritten by
the value the hook computes, so it never did anything. It also widened a signature
every pre-routing strategy shares with the protocol in `types/router.py`, leaving
this one router diverged from `AutoRouter` and the interface for no reason.

Also records why an unreadable request counts as continuing: no messages is no
evidence a turn was served, so it pays the cache write and under-claims rather than
being handed a first turn's larger saving on nothing.

* fix(spend): charge a baseline its input rate for cache buckets it cannot price

A model with no cache_creation_input_token_cost, which is every OpenAI, Azure and Gemini entry, resolved that rate to 0.0 and carried the whole written prompt for free, so a first turn routed onto a cheaper model reported a loss. Same hole on cache reads. Those tokens are plain input on such a model, so they move into the text bucket.

* refactor(spend): build the daily upsert payloads in one shot

`common_data` and `update_data` were constructed and then appended to: `request_id`
conditionally for tag rows, `endpoint` unconditionally a few lines later. A dict that
grows after its literal cannot be reasoned about by reading the literal, which is the
whole point of building it at once.

The conditional key resolves to a spreadable value before either payload, so both are
single expressions and the tag branch appears once instead of twice.

Not wrapped in MappingProxyType, though it was suggested: these go straight to
prisma, whose query builder branches on `isinstance(value, dict)` to tell a nested
node from a scalar. A mappingproxy is a Mapping but not a dict, so it falls through
to the serializer and raises `TypeError: Type <class 'mappingproxy'> not
serializable` inside the batch upsert, where the surrounding except would log it and
leave the rollups silently unwritten.

* fix(spend): keep the one-shot upsert payloads under the type-discipline budget

Building both payloads as single literals traded a mutation for two dict literals,
and LIT002 counts construction rather than mutation, so the change the review asked
for is the one the gate charges for.

The empty branch is the avoidable half: it is the same value every time, so it moves
to a module constant built once instead of a literal per transaction, and it is a
read-only mapping so none of the call sites that spread it can fill it in later.
2026-08-04 03:10:37 +00:00
..
20260108_add_user_email_lower_idx fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250326162113_baseline fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250326171002_add_daily_user_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250327180120_add_api_requests_to_daily_user_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250329084805_new_cron_job_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250331215456_track_success_and_failed_requests_daily_agg_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250411215431_add_managed_file_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250412081753_team_member_permissions fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250415151647_add_cache_read_write_tokens_daily_spend_transactions fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250415191926_add_daily_team_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250416115320_add_tag_table_to_db fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250416151339_drop_tag_uniqueness_requirement fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250416185146_add_allowed_routes_litellm_verification_token fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250425182129_add_session_id fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250430193429_add_managed_vector_stores fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250507161526_add_mcp_table_to_db fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250507161527_add_health_check_fields_to_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250507184818_add_mcp_key_team_permission_mgmt fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250508072103_add_status_to_spendlogs fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250509141545_use_big_int_for_daily_spend_tables build: use big int for daily spend tables 2025-05-09 14:16:18 -07:00
20250510142544_add_session_id_index_spend_logs fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250514142245_add_guardrails_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250522223020_managed_object_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250526154401_allow_null_entity_id build(ui/): Allow empty values in daily agg table + reintroduce 'unassigned' teams in spend tracking 2025-05-26 22:03:34 -07:00
20250528185438_add_vector_stores_to_object_permissions fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250603210143_cascade_budget_changes fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250618225828_add_health_check_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250625145206_cascade_budget_and_loosen_managed_file_json fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250625213625_add_status_to_managed_object_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250707212517_add_mcp_info_column_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250707230009_add_mcp_namespaced_tool_name fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250711220620_add_stdio_mcp fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250718125714_add_litellm_params_to_vector_stores fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250802162330_prompt_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250806095134_rename_alias_to_server_name_mcp_table added new migration files (#13345) 2025-08-06 13:12:39 -07:00
20250918083359_drop_spec_version_column_from_mcp_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20250926194702_unnamed_migration fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251003165142_add_allowed_tools_to_mcp fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251003190954_extra_headers_to_mcp_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251006143948_add_mcp_tool_permissions fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251011084309_add_tag_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251023141814_add_search_tool_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251031181430_add_cache_config_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251101131415_add_managed_vector_store_index_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251103072422_add_static_headers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251104220043_add_credentials_to_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251113000000_add_project_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251113000001_add_project_fields fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251114173537_add_request_id_to_daily_tag_spend fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251114180624_Add_org_usage_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251114182247_agents_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251119131227_add_prompt_versioning fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251122125322_Add organization_id to spend logs fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251204124859_add_end_user_spend_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251204142718_add_agent_permissions [Feat] Agent Access Control - Enforce Allowed agents by key, team + add agent access groups on backend (#17502) 2025-12-04 16:31:00 -08:00
20251209112246_add_ui_settings_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251210125210_add_storage_backend_to_managed_files Add support for target_storage param 2025-12-11 15:08:17 +05:30
20251210205007_add_daily_agent_spend_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251211100212_schema_sync [Fix] CI/CD – Clean Up Performance PR Changes & others (#17838) 2025-12-11 12:50:03 -08:00
20251219110931_add_deleted_keys_and_deleted_teams_tables fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20251220144550_schema_update fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260102131258_add_metadata_urls_to_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260105151539_add_allow_all_keys_to_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260106155622_add_endpoint_to_daily_activity_tables fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260107111013_add_router_settings_to_keys_teams fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260116142756_update_deleted_keys_teams_table_routing_settings fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260123131407_add_policy_tables_and_policies_field fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260131150814_add_team_user_to_vector_stores fix: Make vector stores migration idempotent (#21325) 2026-02-16 18:36:36 -08:00
20260203120000_add_deprecated_verification_token_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260205091235_allow_team_guardrail_config fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260205144610_add_soft_budget_to_team_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260207093506_add_available_on_public_internet_to_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260207110613_add_soft_budget_to_deleted_teams_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260209085821_add_verificationtoken_indexes fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260212103349_adjust_tags_policy_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260212143306_add_access_group_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260213105436_add_managed_vector_store_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260213170952_access_group_change_to_model_name fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260214094754_schema_sync fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260214163027_add_pipeline_to_policy_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260214185341_object_permissions_for_end_users fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260218231534_add_last_active_to_key_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260219105005_add_project_id_to_deleted_keys fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260219181415_baseline_diff fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260220124742_add_spec_path_to_mcp_servers fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260220153844_add_composite_index_aggregate_tables fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260221000000_ensure_project_id_verification_token fix(migrations): add ensure_project_id migration + bump litellm-proxy-extras to 0.4.46 (#21800) 2026-02-21 12:15:21 -08:00
20260221183800_add_policy_versioning fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260222000000_add_batch_processed_to_managed_object_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260224201417_spend_logs_request_duration fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260224203854_add_agent_object_permissions_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260226000000_add_blocked_tools_to_object_permission fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260226120000_add_spend_log_tool_index fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260226202727_add_agent_id_to_delete_keys fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260228000000_add_claude_code_plugin_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260228100000_add_spend_logs_composite_index fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260228110000_mcp_default_public_internet_true [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
20260228170127_support_team_based_guardrails fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260303000000_update_tool_table_policies fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260304175016_add_spend_to_agent_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260305000000_add_agent_headers feat(agents): add Prisma migration for agent header columns 2026-03-05 14:28:36 +05:30
20260305000000_add_rate_limits_to_agents fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260306175056_add_configs_override_table fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260306233848_schema_sync fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260309000000_add_mcp_approval_status feat(mcp): BYOM — non-admin MCP server submission + admin review workflow (#23205) 2026-03-10 13:58:59 -07:00
20260309000001_add_mcp_source_url feat(mcp): BYOM — non-admin MCP server submission + admin review workflow (#23205) 2026-03-10 13:58:59 -07:00
20260312124619_schema_sync fix: prisma migrate deploy failures on pre-existing instances (#23655) 2026-03-14 16:54:21 -07:00
20260318140652_add_index_to_team_table Add IF NOT EXISTS to index creation in migration 2026-03-19 09:22:10 +01:00
20260319000000_restore_mcp_approval_fields fix(schema): restore MCP server fields dropped by schema_sync migration 2026-03-19 10:55:17 +07:00
20260321000000_add_mcp_toolsets Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00
20260331000000_add_prompt_environment_and_created_by Litellm ishaan april1 try2 (#25110) 2026-04-03 14:57:44 -07:00
20260401000000_add_budget_limits feat: multiple concurrent budget windows per API key and team (#24883) (#25109) 2026-04-06 14:02:04 -07:00
20260401000000_add_team_member_model_scope feat(teams): per-member model scope + team default_team_member_models (#24950) 2026-04-06 13:48:43 -07:00
20260414140000_add_mcp_server_instructions feat(mcp): gateway InitializeResult.instructions from upstream or YAML 2026-04-14 14:19:31 +03:00
20260415120000_health_check_latest_per_model_index Added concurrent index creation. Added necessary disclaimers to index creation. 2026-04-15 22:52:47 +00:00
20260418000000_add_adaptive_router_tables fix(adaptive_router): 3 P1 review defects 2026-04-20 15:22:18 -07:00
20260421120000_add_memory_table feat(proxy): add /v1/memory CRUD endpoints (#26218) 2026-04-24 18:38:07 -07:00
20260421135425_add_team_membership_total_spend fix: harden /key/update authorization checks (#27878) 2026-05-14 04:16:04 +00:00
20260429120000_search_tools_on_object_permission Add migration script 2026-04-29 12:30:10 +05:30
20260429161855_workflow_runs_tables feat(proxy): durable agent workflow run tracking via /v1/workflows/runs (#26793) 2026-04-29 17:12:18 -07:00
20260501195714_managed_resource_team_owner fix(proxy): normalize managed resource team owner field 2026-05-04 17:05:50 -07:00
20260513120000_add_delegate_auth_to_upstream_to_mcp_servers feat(mcp): add delegate_auth_to_upstream flag for PKCE passthrough (#27834) 2026-05-13 12:06:13 -07:00
20260514120000_add_blocked_to_proxy_model_table Litellm oss staging (#28161) 2026-05-18 16:27:44 -07:00
20260520120000_add_mcp_env_vars feat(mcp): per-server env vars with global + per-user scopes (#28917) 2026-06-05 20:15:11 -07:00
20260526120000_add_oauth_passthrough_to_mcp_servers [internal copy of #28008] Support MCP OAuth passthrough and issuer-scoped JWT auth (#28356) 2026-06-02 12:22:04 -07:00
20260604120000_add_oauth2_flow_to_mcp_servers fix(proxy): persist oauth2_flow on MCP server registration (#29690) 2026-06-05 18:52:52 +05:30
20260605182307_add_timeout_to_mcp_server_table Litellm oss staging 050626 (#29774) 2026-06-05 13:51:51 -07:00
20260626120000_add_mcp_tool_search_enabled feat(mcp): add mcp_tool_search virtual tools for large tool catalogs (#31777) 2026-06-30 20:03:59 -07:00
20260629000000_add_max_concurrent_requests_to_mcp_server_table feat(mcp): bound outbound tool-call concurrency per MCP server (#31641) 2026-07-02 15:33:44 -07:00
20260630120000_add_token_exchange_to_mcp_servers feat(mcp): support oauth2_token_exchange auth type via REST API and dashboard (#31772) 2026-07-07 15:26:12 -07:00
20260630190000_add_budget_fallbacks_to_litellm_verification_token feat(proxy): add key-level budget_fallbacks to reroute requests when a per-model budget is exceeded (#31783) 2026-07-03 12:20:12 -07:00
20260703120000_add_token_exchange_profile_to_mcp_servers feat(mcp): let users select the entra_obo token_exchange profile in the UI and API (#32144) 2026-07-07 16:39:20 -07:00
20260710000000_add_dcr_bridge_to_mcp_server_table feat(mcp): add dcr_bridge column and plumbing for client-forwarded auth modes 2026-07-10 00:14:45 -07:00
20260713230852_add_key_type_to_litellm_verification_token fix(keys): persist key_type so the UI shows correct key scope instead of "All Proxy Models" (#33115) 2026-07-13 18:08:43 -07:00
20260715000000_add_issuer_to_mcp_server_table feat(mcp): issuer-anchored OAuth discovery (RFC 8414 §3.3) as the trust anchor 2026-07-15 16:59:01 -07:00
20260717000000_add_compression_saved_tokens feat(spend): track prompt compression saved tokens in daily spend aggregates (#33810) 2026-07-18 17:47:54 -07:00
20260717000000_add_mcp_server_oauth_client_table fix(mcp): persist config.yaml DCR clients in a server-scoped store 2026-07-17 19:42:32 -07:00
20260718000000_add_savings_spend feat(spend): track prompt compression saved tokens in daily spend aggregates (#33810) 2026-07-18 17:47:54 -07:00
20260721000000_add_sso_identity_assertion feat(mcp): store the enterprise IdP identity assertion at SSO login for EMA egress 2026-07-21 14:54:37 -07:00
20260724000000_add_spend_log_tool_index_start_time_idx fix(proxy): cap tool spend window at 30 days and bound every SpendLogs read 2026-07-24 17:24:24 -07:00
20260725000000_add_daily_tool_spend fix(proxy): roll up tool spend daily instead of scanning SpendLogs 2026-07-25 21:52:58 -07:00
20260731000000_add_autorouter_savings_spend feat(spend): add net auto-router savings to the cost-optimization dashboard (#35521) 2026-08-04 03:10:37 +00:00
migration_lock.toml install prisma migration files - connects litellm proxy to litellm's prisma migration files (#9637) 2025-03-29 15:27:09 -07:00