litellm/litellm-proxy-extras/litellm_proxy_extras/migrations
joshua-berri 906fa7ed28
feat(accounting): add opt-in SpendLogs ledger (#49856)
* feat(accounting): add opt-in SpendLogs ledger delivery

* fix(accounting): preserve missing organization daily spend parity

* fix(accounting): preserve ledger receipts when replaying migration

* fix(accounting): preserve callback windows and tune ledger batches

* fix(accounting): preserve window charges and bound ledger statements

* test(accounting): verify budget callback registration order

* test(accounting): verify captured charges after repeated startup

* feat(accounting): store durable payloads independently of spend logs

* fix(accounting): preserve first delivery and trace ledger writes

* fix(accounting): keep SDK imports independent of proxy tracing

* fix(accounting): honor log retention during batch takeover

* test(accounting): cover retained batch alerts and invalid settings

* test(accounting): verify downgrade command against pending work

* fix(accounting): drain retries without starving fresh deliveries

* test(accounting): cover delivery projection, metrics and window key reads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(accounting): read delivery metrics without the shared registry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): charge a leftover $0 batch row when its claim fails

A failed batch claim buffers the retrieve's row and reports it charged. At flush the
row conflicted with the pre-upgrade $0 SpendLogs row, so its delivery was rolled back
and the charge never reached the spend tables. The flush now takes that row over in the
same transaction and keeps the delivery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): trace the batch takeover at flush as a SpendLogs update

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): keep local spend logs when SPEND_LOGS_URL has no export client

The export client is never created, so main always writes SpendLogs to the proxy's own
database even with SPEND_LOGS_URL set. The ledger skipped local rows whenever the URL was
set, which dropped those request logs. It now treats a flush as an export only when the
client exists, and batch claims write local rows as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): keep every request's charge when its log row is shared, evicted or rejected

- Key non-batch deliveries on a per-request delivery_id so a reused client call id is still
  charged once per request, while buffer replays stay deduplicated
- Persist the redacted api_key instead of an opaque bearer token
- Keep the accounting payload when the spend-log queue evicts a row or Postgres rejects it
- Strip NUL from payloads and skip non-text tags so projection never parks a paid request

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): isolate a raw-SQL spend log row Postgres rejects instead of requeueing the batch

A rejected row on the ledger insert path raises RawQueryError, which the exact DataError check missed, so the whole batch was requeued every flush. Data and integrity SQLSTATE classes now bisect like before, while missing tables and deadlocks keep retrying

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): keep charging a request whose tag is too long for the daily tag index

A tag past Postgres's btree entry limit failed the DailyTagSpend upsert, and on the ledger path that rolled back the request's key, team and user charges with it. Such tags are now left out of the daily tag rollup only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): store only guardrail billing fields in the accounting payload

The ledger payload copied whole guardrail records, including responses and match details, into LiteLLM_SpendLogDelivery even when spend logs were disabled. It now keeps the id, name, usage and cost fields the projection reads. NUL stripping reuses safe_json_structure instead of a recursive walk

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(proxy): move spend payload stamping out of update_database

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(proxy): restore the modules the import-layering guard evicts

The guard popped litellm.proxy.utils from sys.modules for good, so later tests on the same xdist worker patched a fresh module while calling functions bound to the old one, and spend queue tests failed depending on scheduling

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(proxy): keep update_database's payload stamping on its own local

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(accounting): type guardrail entries and use a public key redaction helper

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): keep charging requests whose end-user id is too long for an index

An oversized end-user id failed the SpendLogs insert with SQLSTATE 54000, which was requeued forever, and failed the end-user upsert in the delivery, which parked the key and team charge with it. Class 54 rows are now isolated like other rejected rows, and such ids are left out of the end-user rollups only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(proxy): type the spend log queue snapshot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): leave out any projected row Postgres cannot index or store

Caller-supplied ids and counters, such as a long tag or end-user id or an out-of-range compression count, failed the delivery transaction and rolled back the request's key, team and user charges. One check in project() now drops only the row that cannot be stored, replacing the per-field cutoffs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): keep the guardrail fields compression savings are counted from

Slimming the guardrail records dropped the provider and the tokens_saved figure that Headroom compression savings are read from, and dropped a bare-dict record entirely. The payload now keeps both while still leaving out guardrail content

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): cap projected counters so daily totals cannot overflow

Counters such as a caller-supplied compression count fit one by one but overflowed the bigint daily total once summed across requests, rolling back the key, team and user charges in the same transaction. Each counter is now capped at 2^40, far below any total that could overflow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): let a buffered batch charge take over its zero-cost receipt

A batch charge queued after a failed lookup hit the $0 receipt an earlier poll left behind, and ON CONFLICT dropped it. The buffered insert now runs the same receipt takeover as a live retrieve

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): read a rescued batch row's spend from its accounting payload

Rows rescued from an overflowing queue keep only the accounting payload, so the buffered takeover never saw their positive spend and left the $0 receipt uncharged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): read budget windows through the delivery transaction

Window seed and existing-row reads used a separate connection while the delivery transaction held one, so with a one-connection pool they waited on their own transaction until it timed out. Inside an enclosing transaction they now share its connection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): retry a transient failure while keeping a dropped row's charge

The rescue swallowed every error, so a database blip right after a row was rejected lost the unpaid charge. Only a rejected row is still logged and skipped, anything else propagates so the flush retries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(accounting): give delivery projection payloads their charged entities

project() now reads entities only from accounting_entities, so the hand-built
delivery payloads carry them like real stored payloads do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(accounting): own ledger rows by their payload and key batches on the batch id

Drop the accounting_path stamp and its SpendLogs column. A buffered row that
carries an accounting payload is ledger owned, one without it is legacy, and
spend counters get a plain windows_from_ledger flag. Window seeding tells
applied ledger rows apart by their delivery row.

A ledger batch is plain transaction A keyed by the batch id, so a repeated
completed retrieve conflicts and charges nothing. A $0 retrieve records no
delivery, a batch a legacy retrieve already charged is not charged again, and
the legacy batch path is unchanged from main apart from refusing a batch the
ledger already owns. Batch takeover and its delta bookkeeping are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(accounting): drop a projection test duplicated while rebasing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(accounting): drop previous_payload now that deliveries are never replaced

Batch takeover was the only writer of previous_payload, so the worker applies
each delivery's payload as stored and the column leaves the migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(accounting): drop the ledger downgrade checklist script

The use_spend_logs_ledger flag is the rollback path, so a separate downgrade
gate is no longer needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): name the window seed reads so their Prisma span resolves

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(accounting): remove the unused accounting event types and protocols

types.py, protocols.py and measurements.py were left from the old event
scaffolding. Nothing outside the package imports them, so they go with their
tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): park only deliveries whose own data fails

A delivery that keeps failing on a database outage, lock timeout or deadlock
stays pending and retries with capped backoff, so a recovered database applies
it. Only a data error or an invalid payload parks the isolated row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): isolate a spend log row the insert statement rejects

The raw SpendLogs insert validates columns and JSON before Postgres sees the
row, so a row that fails there is now bisected out and dropped alone while its
charge is kept, instead of failing and replaying the whole flush.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): carry a job's model window on every completed poll in ledger mode

The ledger keeps the poll whose delivery claims the job, which need not be the
poll that won the limiter's in-memory charge. Every completed poll now carries
the job's window, so the delivery that lands always has it, while the live
model budget is still charged once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(accounting): leave model-budget windows on the existing window writer

Model-budget windows are written by the model budget limiter rather than
derived from a request's spend, so they stay on main's window queue like live
budget counters do. This drops window capture from the accounting payload,
the deferred limiter registration and the job-window capture, and the ledger
keeps owning key and team budget windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): keep a delivery pending when the database is unreachable

Prisma reports a can't reach database server outage as a DataError, so the
worker now checks for an unavailable database before treating a data error
as the delivery's own fault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): isolate only rows the raw insert cannot encode

Catching every ValueError also swallowed unexpected insert errors that main
re-raises. The raw insert now raises RejectedSpendLogRow for an unknown column
or non-JSON value, and only that is isolated as a rejected row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accounting): store zero savings when caller data makes them uncomputable

A huge caller-supplied tokens_saved overflowed the savings math inside
build_accounting_payload, which dropped the request's charge in ledger mode.
Savings that cannot be computed are now recorded as zero and the charge lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 17:49:15 -08:00
..
20260108_add_user_email_lower_idx
20250326162113_baseline
20250326171002_add_daily_user_table
20250327180120_add_api_requests_to_daily_user_table
20250329084805_new_cron_job_table
20250331215456_track_success_and_failed_requests_daily_agg_table
20250411215431_add_managed_file_table
20250412081753_team_member_permissions
20250415151647_add_cache_read_write_tokens_daily_spend_transactions
20250415191926_add_daily_team_table
20250416115320_add_tag_table_to_db
20250416151339_drop_tag_uniqueness_requirement
20250416185146_add_allowed_routes_litellm_verification_token
20250425182129_add_session_id
20250430193429_add_managed_vector_stores
20250507161526_add_mcp_table_to_db
20250507161527_add_health_check_fields_to_mcp_servers
20250507184818_add_mcp_key_team_permission_mgmt
20250508072103_add_status_to_spendlogs
20250509141545_use_big_int_for_daily_spend_tables
20250510142544_add_session_id_index_spend_logs
20250514142245_add_guardrails_table
20250522223020_managed_object_table
20250526154401_allow_null_entity_id
20250528185438_add_vector_stores_to_object_permissions
20250603210143_cascade_budget_changes
20250618225828_add_health_check_table
20250625145206_cascade_budget_and_loosen_managed_file_json
20250625213625_add_status_to_managed_object_table
20250707212517_add_mcp_info_column_mcp_servers
20250707230009_add_mcp_namespaced_tool_name
20250711220620_add_stdio_mcp
20250718125714_add_litellm_params_to_vector_stores
20250802162330_prompt_table
20250806095134_rename_alias_to_server_name_mcp_table
20250918083359_drop_spec_version_column_from_mcp_table
20250926194702_unnamed_migration
20251003165142_add_allowed_tools_to_mcp
20251003190954_extra_headers_to_mcp_table
20251006143948_add_mcp_tool_permissions
20251011084309_add_tag_table
20251023141814_add_search_tool_table
20251031181430_add_cache_config_table
20251101131415_add_managed_vector_store_index_table
20251103072422_add_static_headers
20251104220043_add_credentials_to_mcp_servers
20251113000000_add_project_table
20251113000001_add_project_fields
20251114173537_add_request_id_to_daily_tag_spend
20251114180624_Add_org_usage_table
20251114182247_agents_table
20251119131227_add_prompt_versioning
20251122125322_Add organization_id to spend logs
20251204124859_add_end_user_spend_table
20251204142718_add_agent_permissions
20251209112246_add_ui_settings_table
20251210125210_add_storage_backend_to_managed_files
20251210205007_add_daily_agent_spend_table
20251211100212_schema_sync
20251219110931_add_deleted_keys_and_deleted_teams_tables
20251220144550_schema_update
20260102131258_add_metadata_urls_to_mcp_servers
20260105151539_add_allow_all_keys_to_mcp_servers
20260106155622_add_endpoint_to_daily_activity_tables
20260107111013_add_router_settings_to_keys_teams
20260116142756_update_deleted_keys_teams_table_routing_settings
20260123131407_add_policy_tables_and_policies_field
20260131150814_add_team_user_to_vector_stores
20260203120000_add_deprecated_verification_token_table
20260205091235_allow_team_guardrail_config
20260205144610_add_soft_budget_to_team_table
20260207093506_add_available_on_public_internet_to_mcp_servers
20260207110613_add_soft_budget_to_deleted_teams_table
20260209085821_add_verificationtoken_indexes
20260212103349_adjust_tags_policy_table
20260212143306_add_access_group_table
20260213105436_add_managed_vector_store_table
20260213170952_access_group_change_to_model_name
20260214094754_schema_sync
20260214163027_add_pipeline_to_policy_table
20260214185341_object_permissions_for_end_users
20260218231534_add_last_active_to_key_table
20260219105005_add_project_id_to_deleted_keys
20260219181415_baseline_diff
20260220124742_add_spec_path_to_mcp_servers
20260220153844_add_composite_index_aggregate_tables
20260221000000_ensure_project_id_verification_token
20260221183800_add_policy_versioning
20260222000000_add_batch_processed_to_managed_object_table
20260224201417_spend_logs_request_duration
20260224203854_add_agent_object_permissions_table
20260226000000_add_blocked_tools_to_object_permission
20260226120000_add_spend_log_tool_index
20260226202727_add_agent_id_to_delete_keys
20260228000000_add_claude_code_plugin_table
20260228100000_add_spend_logs_composite_index
20260228110000_mcp_default_public_internet_true
20260228170127_support_team_based_guardrails
20260303000000_update_tool_table_policies
20260304175016_add_spend_to_agent_table
20260305000000_add_agent_headers
20260305000000_add_rate_limits_to_agents
20260306175056_add_configs_override_table
20260306233848_schema_sync
20260309000000_add_mcp_approval_status
20260309000001_add_mcp_source_url
20260312124619_schema_sync
20260318140652_add_index_to_team_table
20260319000000_restore_mcp_approval_fields
20260321000000_add_mcp_toolsets
20260331000000_add_prompt_environment_and_created_by
20260401000000_add_budget_limits
20260401000000_add_team_member_model_scope
20260414140000_add_mcp_server_instructions
20260415120000_health_check_latest_per_model_index
20260418000000_add_adaptive_router_tables
20260421120000_add_memory_table
20260421135425_add_team_membership_total_spend
20260429120000_search_tools_on_object_permission
20260429161855_workflow_runs_tables
20260501195714_managed_resource_team_owner
20260513120000_add_delegate_auth_to_upstream_to_mcp_servers
20260514120000_add_blocked_to_proxy_model_table
20260520120000_add_mcp_env_vars
20260526120000_add_oauth_passthrough_to_mcp_servers
20260604120000_add_oauth2_flow_to_mcp_servers
20260605182307_add_timeout_to_mcp_server_table
20260626120000_add_mcp_tool_search_enabled
20260629000000_add_max_concurrent_requests_to_mcp_server_table
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
20260713010000_add_ptu_columns_to_daily_team_spend feat(ptu): configure provisioned-throughput flat cost on a model deployment (#35341) 2026-08-10 09:51:16 -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
20260717000000_cascade_delete_jwt_key_mapping_on_token_delete fix(jwt): cascade-delete JWT key mappings when their virtual key is deleted 2026-09-09 15:39:21 -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
20260729000000_add_reload_tracking_to_litellm_config fix(proxy): persist periodic reload schedule state so status survives restarts and fires without store_model_in_db (#35165) 2026-08-04 15:42:57 -07:00
20260730000000_add_api_key_and_request_tags_to_managed_object_table fix(batches): keep batch state in sync on a poll without claiming attribution (#34456) 2026-08-08 16:01:47 -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
20260803000000_add_daily_gateway_requests feat(sgr): make the gateway middleware the source of truth for successful requests (#35717) 2026-08-05 12:40:47 -07:00
20260804162853_add_budget_window_spend_table chore(migrations): drop the generated comment from the budget window spend migration 2026-08-29 16:17:14 -07:00
20260805000000_add_autorouter_session_rollup feat(spend): rebuild the auto-router benchmarks backend as a per-session rollup (#35910) 2026-08-05 20:06:32 +00:00
20260807000000_add_autorouter_session_tier_turns feat(auto-router): track turns per complexity tier (LIT-5302) (#36209) 2026-08-07 17:03:34 -07:00
20260810000000_add_verificationtoken_settings_updated_at fix(proxy): add config_updated_at audit timestamp for virtual keys (#36488) 2026-08-11 11:02:57 -07:00
20260811172448_add_shadow_eval feat: pre-adoption shadow eval for the auto-router (blind pairwise judge, derived state) (#36587) 2026-08-13 13:15:45 -07:00
20260813180408_add_shadow_eval_direction feat(shadow_eval): add reverse-direction shadow eval jobs (#36865) 2026-08-14 17:05:55 -07:00
20260814000000_add_proxy_worker_heartbeat feat(proxy): auto-suppress the no-Redis banner for confirmed single-worker deployments 2026-08-14 17:11:05 -07:00
20260817000000_shadow_eval_multi_key feat(auto-router)!: scope shadow eval jobs to multiple keys (#37251) 2026-08-19 14:02:15 -07:00
20260817143646_add_daily_guardrail_usage_units perf(guardrails): aggregate usage units in one sorted pass 2026-08-17 17:19:05 -07:00
20260818000000_add_spend_log_timestamps feat(spend-logs): add lifecycle timestamps 2026-08-18 14:16:08 -07:00
20260818224500_add_shadow_eval_stopped_by feat(auto-router)!: scope shadow eval jobs to multiple keys (#37251) 2026-08-19 14:02:15 -07:00
20260819000000_shadow_eval_max_budget feat(shadow_eval)!: gate the per-key budget on dollar spend instead of turns (#37555) 2026-08-20 14:55:21 -07:00
20260823000000_add_spend_logs_api_key_starttime_index fix(proxy-extras): build the SpendLogs indexes in the migration job instead of in migrations (#43948) 2026-10-01 14:12:22 -07:00
20260824000000_add_gateway_injected_caching_savings_spend feat(spend): report prompt caching savings as total and gateway-attributed (#38134) 2026-08-28 00:19:06 -07:00
20260828000000_shadow_eval_cost_comparison feat(shadow_eval): measure both arms' cost so a job reports what the router would have saved (#38631) 2026-08-28 15:13:19 -07:00
20260829000000_add_model_access_group_budget_table feat(budgets): add model access group budget table and shared types 2026-08-29 12:13:55 -07:00
20260831000000_shadow_eval_typed_targets feat(shadow_eval): target teams and users so JWT-auth traffic can be evaluated (#39015) 2026-08-31 16:37:38 -07:00
20260831120000_add_litellm_call_id_spend_logs fix(spend-logs): authorize request_id lookups over distinct owners, build call id index concurrently 2026-09-01 10:20:29 -07:00
20260831120001_spend_logs_litellm_call_id_index fix(proxy-extras): build the SpendLogs indexes in the migration job instead of in migrations (#43948) 2026-10-01 14:12:22 -07:00
20260901000000_shadow_eval_multi_router feat(shadow_eval): compare several auto-routers on one job's sampled traffic (#39028) 2026-08-31 21:31:08 -07:00
20260901000001_add_guardrail_usage_units_cost feat(guardrails): store untracked units on the rollup row instead of nulling cost 2026-09-04 14:38:08 -07:00
20260903230000_add_org_id_to_managed_object_table feat(batches): snapshot the creating key's org on the managed object row 2026-09-03 18:36:05 -04:00
20260904000000_shadow_eval_model_scope feat(shadow_eval): scope a job to model groups, ANDed with its key, team, and user targets (#39828) 2026-09-04 20:50:46 -07:00
20260905120000_add_per_server_oauth_discovery_to_mcp_servers feat(mcp): add opt-in per-server oauth relay discovery (#39936) 2026-09-05 18:04:35 -07:00
20260907000000_add_autorouter_classifier_cost feat(ui): itemize auto-router classification spend (#40168) 2026-09-07 16:29:19 -07:00
20260910000000_add_autorouter_session_baseline_models feat(auto-router): show routed model and savings in Claude Code and Codex (#40330) 2026-09-11 12:52:42 -07:00
20260910000000_skills_on_object_permission feat(proxy): granular key/team access control for Claude Code marketplace plugins (#40518) 2026-09-10 14:26:09 -07:00
20260913000000_add_tpd_limit fix(proxy): add tpd_limit to deleted token table and fix CI fixtures 2026-09-13 10:31:35 +00:00
20260915000000_add_autorouter_savings_estimate_coverage fix(proxy): estimate auto-router baseline costs from durable cache history 2026-09-19 12:44:47 -07:00
20260915000000_add_background_interaction_settlement feat(interactions): durable cross-pod settlement for background interaction billing (#41955) 2026-10-02 21:08:38 -07:00
20260915000000_add_daily_global_spend feat(proxy): carry response time metrics through LiteLLM_DailyGlobalSpend 2026-09-16 01:58:37 +00:00
20260915000000_add_daily_response_time feat(ui): show average response time per model in usage model activity 2026-09-15 22:16:12 +00:00
20260915000000_scope_jwt_key_mapping_by_issuer fix(jwt-auth): scope JWT key mappings by issuer to prevent cross-issuer collisions 2026-09-15 21:02:17 +00:00
20260915010000_add_autorouter_baseline_state fix(proxy): estimate auto-router baseline costs from durable cache history 2026-09-19 12:44:47 -07:00
20260916000000_add_key_total_spend feat(proxy): expose lifetime total_spend on virtual keys 2026-09-16 09:42:20 +00:00
20260917000000_add_agent_access_group_ids feat(agents): attach access groups to agents and enforce them for models, MCP servers and agent calls 2026-09-17 19:24:14 +00:00
20260917000000_add_budget_temp_increase feat(proxy): temporary budget increase for team members 2026-09-17 17:33:50 +00:00
20260917055603_add_policy_attachment_priority fix(policy_engine): make priority migration idempotent 2026-09-17 06:12:42 +00:00
20260918000000_add_managed_file_content_table feat(batches): run hosted_vllm batches inside LiteLLM 2026-09-19 01:47:43 -07:00
20260919000000_add_autorouter_user_session_rollup feat(ui): add internal-user savings and auto-router usage 2026-09-19 17:01:36 -07:00
20260920041500_add_policy_attachment_is_default feat(policy_engine): add default fallback policy attachments 2026-09-20 08:39:03 +00:00
20260921000000_add_password_reset_columns feat(auth): breached password detection, self-service change-password and forced password reset 2026-09-21 18:48:35 +00:00
20260921190000_agent_identity feat(agents): add identity storage and validation contracts (#43720) 2026-09-29 17:59:21 -07:00
20260923000000_add_agent_kill_switch feat(agents): add optional per-agent kill switch webhook (#42841) 2026-09-24 18:26:50 -05:00
20260923000000_add_mcp_catalog_revision_trigger fix(mcp): keep worker MCP configurations consistent via a catalog revision (#42568) 2026-10-06 18:21:29 -07:00
20260925000000_add_mcp_pinned_tools feat(mcp): scan and pin upstream tool descriptions (#43283) 2026-09-28 18:38:49 -07:00
20260928000000_add_daily_model_usage feat: add model leaderboard page (#43649) 2026-09-28 19:40:04 -07:00
20260930000000_add_end_user_models feat(proxy): limit which models an end user can call (#43904) 2026-10-05 21:58:03 +00:00
20260930000000_agent_engine feat(lens): analyze agent activity with a separate worker (#43889) 2026-09-30 22:42:09 +00:00
20261001000000_lens_run_history feat(lens): investigate sampled traces and retain batch results (#43942) 2026-09-30 22:30:04 -07:00
20261001100000_rename_lens refactor(lens)!: rename internal engine code and API (#44034) 2026-10-01 11:02:14 -07:00
20261001200000_add_autorouter_daily_spend fix(auto-router): count usage savings by selected UTC request day (#44115) 2026-10-02 11:57:42 -07:00
20261002220000_lens_worker_scope_index fix(lens): run investigations with configured wildcard models (#44233) 2026-10-02 14:20:59 -07:00
20261003000000_add_managed_file_flat_ids_gin_index fix(vector_stores): return managed file ids from vector store file list (#43800) 2026-10-02 21:28:50 -07:00
20261005000000_add_mcp_server_rpm feat(mcp): rate limit all MCP operations and add server-level rpm (#44600) 2026-10-07 16:30:52 -07:00
20261005230000_lens_trace_findings_indexes fix(lens): show investigation findings for agent traces (#44696) 2026-10-05 16:27:54 -07:00
20261005230100_lens_current_findings_index fix(lens): show investigation findings for agent traces (#44696) 2026-10-05 16:27:54 -07:00
20261006000000_lens_review_checkpoints fix(lens): reuse trace reviews and consolidate findings across runs (#44778) 2026-10-06 12:09:56 -07:00
20261006000100_lens_datasets feat(lens): add datasets built from real traces (#44765) 2026-10-06 23:04:43 +00:00
20261007000000_lens_review_fk_on_update_cascade fix(ci): stop deferred pydantic builds leaking caller locals and add the missing Lens FK migration (#44981) 2026-10-06 23:20:54 -07:00
20261007000100_lens_ingestion_keys feat(lens): isolate ingestion and investigations in a Rust service (#45148) 2026-10-07 17:18:58 -07:00
20261007120000_add_autorouter_daily_tokens feat(ui): add auto-router usage and savings table (#45152) 2026-10-07 15:04:07 -07:00
20261008000000_lens_due_at perf(lens): claim worker jobs from an indexed due queue instead of scanning every lens (#45095) 2026-10-07 12:24:01 -07:00
20261008000100_lens_due_at_index perf(lens): claim worker jobs from an indexed due queue instead of scanning every lens (#45095) 2026-10-07 12:24:01 -07:00
20261008000200_lens_trace_signals feat(lens): flag traces with global System 1 signals (#45094) 2026-10-07 13:27:22 -07:00
20261008010000_add_daily_gateway_failed_requests feat(proxy): track failed requests by HTTP status and caller (#45244) 2026-10-09 14:27:56 -07:00
20261008120000_add_daily_request_errors feat(proxy): track failed requests by HTTP status and caller (#45244) 2026-10-09 14:27:56 -07:00
20261008120000_user_provider_credentials feat(github_copilot): per-user GitHub OAuth connections for Copilot credentials (#45241) 2026-10-09 15:19:07 -07:00
20261009000000_add_credential_display_name feat(credentials): add display_name and make credential_name immutable on PATCH (#43148) 2026-10-08 23:49:56 -07:00
20261009000100_telemetry_reports fix(proxy-extras): bound telemetry_reports migration lock waits with SET LOCAL lock_timeout (#46386) 2026-10-13 22:59:19 -07:00
20261013000000_access_group_mcp_tool_permissions feat(access-groups): per-server MCP tool permissions on access groups (#46300) 2026-10-14 14:50:55 -07:00
20261013000000_add_access_group_skill_names feat(access-groups): grant Claude Code skills through access groups (#46294) 2026-10-14 23:18:50 +00:00
20261015000000_managed_object_end_user_id fix(responses): bill a background response once, on the first read or poll that sees it finished (#45703) 2026-10-15 11:00:14 -07:00
20261015120000_add_environment_variables_revision_trigger fix(proxy): unset DB environment variables removed from the row on every worker by row revision (#46709) 2026-10-17 03:51:05 +00:00
20261016000000_background_interaction_settlement_settled_at_index fix(interactions): keep background interaction bills through crashes, late restarts, and deployment keys (#45743) 2026-10-16 12:00:08 +00:00
20261021000000_managed_file_created_by_created_at_index fix(files)!: scope provider and model file lists to the caller's managed files under require_managed_files (#47682) 2026-10-28 13:42:22 -07:00
20261027000000_add_accounting_ledger_tables feat(accounting): add accounting contracts, PricingSnapshot and ledger schema (LIT-10193) (#48862) 2026-10-28 14:39:25 -07:00
20261028000000_subscription_accounts feat(usage): show subscription-covered providers and account fees separately (#44772) 2026-10-30 03:58:36 -07:00
20261103010000_spendlogs_accounting_delivery feat(accounting): add opt-in SpendLogs ledger (#49856) 2026-11-04 17:49:15 -08:00
20261104000000_skill_zip_upload feat(skills): upload local skill ZIPs from the dashboard (#50008) 2026-11-04 00:56:40 -08:00
migration_lock.toml