KazenAI
Releasesecuritybudgets

KazenAI 1.2.0: a security fix, the OpenAI Responses API, CrewAI and shadow mode

1.2.0 closes a budget-check bypass in earlier releases, adds the OpenAI Responses API and certified CrewAI support, and lets a spending limit run in shadow mode before it enforces.

kazenai 1.2.0 and kazenai-finops 1.2.0 are on PyPI (2026-10-28), and 1.2.1 followed on 2026-10-31. Upgrade to the latest:

python -m pip install --upgrade "kazenai-finops[openai]==1.2.1"

1.2.1 adds monitor(..., require_customer_id=True), which refuses a call that names no customer before it reaches the provider, and sends a reservation that got no answer once more; see the release notes.

Upgrade notes

  • Setting KAZENAI_FINOPS_URL now selects the Control lifecycle by default: every guarded call reserves against your limits in Agent FinOps before it is sent, settles after it returns, and is refused if Agent FinOps can’t be reached.
  • Under Control, monitor() won’t start without KAZENAI_TIER_MISMATCH_MULTIPLIER or with a provider client built with retries. Set the multiplier and build clients with max_retries=0. See Configuration.
  • Paid OpenAI endpoints outside Control (embeddings, images, batches and others) are refused on a monitored client unless you name them in allow_unmetered.

Security fix: upgrade from any earlier version

On a client wrapped with monitor(), some OpenAI calls reached the provider with no budget check, including responses.parse, raw-response wrappers cached before monitor(), legacy completions.create, and methods saved before monitor(). 1.2.0 guards or refuses every one of them before dispatch. kazenai and kazenai-finops 1.0.1 through 1.1.3 are yanked on PyPI. Details and the full list are in the security advisory (GitHub advisory GHSA-2x2g-x54j-cj3m).

OpenAI Responses API

responses.create, responses.parse and responses.stream, sync and async, streaming and non-streaming, with function tools. Budget is reserved before dispatch and settled from the usage the provider reports. Calls whose cost can’t be bounded before they run (background mode, server-side conversation state, built-in tools such as web search) are refused before dispatch.

CrewAI 1.15.26, certified

wrap_crew(...) covers kickoff, akickoff and kickoff_async with native OpenAI and Anthropic LLMs, including a two-provider crew on one budget. A budget denial stops the crew instead of being retried.

Shadow mode (hosted Agent FinOps)

A spending limit can now run in shadow mode: it never blocks, and every call’s receipt records what enforcement would have decided. The shadow report groups the calls a limit would have denied by customer, workflow, feature or limit. When the results look right, switch the limit to enforce.

Shadow decisions use an enforced-world ledger that counts only calls enforcement would have admitted, so they predict enforcement for the same traffic. In our concurrency test, 50 agents raced one customer’s $5.00 budget at $0.25 a call: in shadow mode all 50 ran and 30 were marked would-deny, exactly the 30 that enforce mode denies. The shadow mode guide explains the two ledgers behind that result.

Shadow mode doesn’t change outage behaviour (a monitored call still fails closed if Agent FinOps is unreachable), and local SDK budgets always enforce. The mode is set on the limit in Agent FinOps.

Supported today

OpenAI Chat Completions and Responses, Anthropic Messages, sync and async, streaming and non-streaming; LangChain, LangGraph, LiteLLM and CrewAI, each verified against the live provider APIs (for LiteLLM gateway-owned accounting, streamed-call settlement is not yet verified). Not supported: OpenAI Realtime, Bedrock/Vertex wrappers, AutoGen. Full list: supported surfaces.

Questions or a security report: [email protected].