{"version":1,"type":"story","url":"https://digestai.news/story/openai-and-anthropic-add-spending-limit-features-to-their-sdks","json":"https://digestai.news/story/openai-and-anthropic-add-spending-limit-features-to-their-sdks.json","markdown":"https://digestai.news/story/openai-and-anthropic-add-spending-limit-features-to-their-sdks.md","slug":"openai-and-anthropic-add-spending-limit-features-to-their-sdks","headline":"OpenAI and Anthropic add spending limit features to their SDKs","summary":"OpenAI released a new **SpendControl** type in the *openai‑python* SDK version **v3.30.0** on **October 14 2026**. The type lets developers set a per‑session spending cap expressed in USD cents, with a minimum of 1 and a maximum of 4,503,599,627,370,495 cents. The default is unlimited, and removing the limit does not reset the amount already recorded.\n\nAnthropic introduced a read‑only **BetaSpendLimitUsageTierScope** in *anthropic‑sdk‑python* version **v1.15.0** on **October 15 2026**. It reports the monthly spend cap that the organization’s usage tier or a manually raised cap provides, expressed as a decimal string of cents (e.g., \"50000\" for $500). Only Claude Enterprise organizations can write limits; Console users can only read them.\n\nBoth SDKs note that the limits are **best‑effort** or informational and do not guarantee that a session will stop when the cap is hit. Developers are advised to treat the values as guidelines and implement their own monitoring if they need hard stop behavior.","keyPoints":["OpenAI added SpendControl to openai‑python v3.30.0 (Oct 14 2026) for per‑session USD‑cent limits","Anthropic added read‑only BetaSpendLimitUsageTierScope to anthropic‑sdk‑python v1.15.0 (Oct 15 2026) exposing monthly caps","Neither SDK guarantees a session will stop when the configured limit is reached"],"whyItMatters":"Spending limits give developers a tool to curb unexpected AI agent costs, but the lack of guaranteed enforcement means teams must add their own safeguards to avoid budget overruns.","category":{"slug":"agents","name":"Agents & Tools","url":"https://digestai.news/category/agents"},"entities":{"companies":["OpenAI","Anthropic"],"models":["Claude"],"people":[]},"firstPublishedAt":"2026-10-17T00:49:00Z","updatedAt":"2026-10-17T00:49:00Z","sourceCount":1,"hasPrimarySource":false,"sources":[{"outlet":"note.com","title":"Limits to stop AI overspending were added to OpenAI and Claude SDKs in the same week","url":"https://note.com/ai_arai_ally/n/neb17bb67bf77?hl=en","publishedAt":"2026-10-17T00:49:00Z","type":"press","primary":false,"lead":true}],"sourceNotes":null,"discussions":[],"thread":null,"cite":{"text":"Digest AI, \"OpenAI and Anthropic add spending limit features to their SDKs\", 17 October 2026, https://digestai.news/story/openai-and-anthropic-add-spending-limit-features-to-their-sdks","publisher":"Digest AI","title":"OpenAI and Anthropic add spending limit features to their SDKs","datePublished":"2026-10-17T00:49:00Z","url":"https://digestai.news/story/openai-and-anthropic-add-spending-limit-features-to-their-sdks"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}