﻿# LiteLLM fixes customer member budget selection by using the existing API field

Verify load, change and clear against the stored budget_id, preserving unrelated override settings; frontend success alone cannot certify the member’s effective budget.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-agent-litellm-member-budget-form-contract-roundtrip/
Language: en

LiteLLM v1.111.0-dev.2, released as a prerelease on November 13, fixes a dashboard form that read and submitted an unsupported customer-member template field. The backend already expected budget_id. The correction restores the stored selection and saving behavior; the meaningful acceptance result is a persisted budget relationship after reload, including deliberate clearing, rather than a successful-looking selection widget.

## Begin with a member that already has a template

Seed a synthetic member with a known template through the existing management API, then open settings without saving anything. Compare the visible selection with the returned budget_id. The original failure displayed no template despite a stored relationship. Starting from an empty member can miss that defect completely. Keep template names distinct and inspect the identifier too, since a matching display label can conceal a wrongly loaded record.

## Saving must round-trip through the server

Select a second synthetic template and capture the submitted field name. Reload from the server and compare both API response and visible selection. The PR changes the form to the existing contract rather than changing the backend to accept the erroneous name. A toast or updated local state is insufficient evidence because optimistic rendering can show the intended value even when the server rejects an unsupported field.

## Clearing is not a reset of every override

Give the member a separate override and expiry, then choose No template and save. Verify that the template relationship clears while the unrelated values survive, as described by the regression flow. Distinguish a deliberate empty selection from a missing field in an unchanged form. Those meanings can differ under a PATCH contract, so compare the exact payload and final state rather than assuming that every absent value means delete.

## Type checks and behavior support different conclusions

The implementation also repairs a dashboard build/typecheck mismatch. Keep that validation alongside the management round-trip rather than treating either as a replacement for the other. Static agreement catches contract drift, while persisted behavior demonstrates the intended customer setting. A useful adoption record contains an existing assignment, a changed assignment, a cleared assignment and unchanged override fields, without describing this narrow repair as a new backend budget feature.

## Sources

- [LiteLLM v1.111.0-dev.2 prerelease notes](https://github.com/BerriAI/litellm/releases/tag/v1.111.0-dev.2)
- [LiteLLM implementation and review #51523](https://github.com/BerriAI/litellm/pull/51523)

## Related reading

- [LiteLLM budgets: periods, shared limits and overrun tests](/journal/litellm-budget-reset/)
- [LiteLLM virtual keys: separate access for each application](/journal/litellm-virtual-key-scopes/)
