mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-18 12:17:48 +00:00
Editing a model in the Admin UI (e.g. to change credential) unconditionally included input_cost_per_token: 0 and output_cost_per_token: 0 in the PATCH payload, overriding built-in pricing from model_prices_and_context_window.json. Guard cost fields with form.isFieldTouched so they are only sent when the user explicitly modifies them. Intentional $0 cost (for budget bypass) still works because the guard checks touched + non-null, not non-zero.