Partially updates a gateway policy. Only fields present in
the request body are applied; absent fields are left
unchanged. policy_type is immutable — to change a
policy’s type, delete it and create a new one.
config if supplied must match the policy’s type:
{"window": ..., "limit_usd": ...}{"version": 1, "detect": {...}}
Mismatched shapes are rejected with 400.default_spend_cap cascade: editing a default_spend_cap
updates the config/action/enabled/priority on every
attached child policy so the template stays the source of
truth across rollouts.
Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
Policy ID
OK
CurrentSpendUSD is the spend in the policy's current window. Set for any spend_cap policy regardless of enabled state — disabled policies still surface usage so users can see what would have been counted. Nil for non-spend_cap policies or when the spend lookup failed.
ParentPolicyID is set on materialized children of a default_spend_cap to the default's id, and cleared (NULL) only when an admin Create with the same matchers takes over the materialized row. Update on a child preserves the link; Delete on the parent cascade-soft-deletes every child rather than detaching them.