Skip to content

Releases

Public package releases map to:

  1. a git tag and commit
  2. built sdist/wheel artifacts
  3. PyPI publication (Trusted Publishing preferred)
  4. docs updates on this site

Release announcements and security advisories are posted on KazenAI News (RSS).

On PyPI today: kazenai 1.2.6, kazenai-finops 1.2.6, kazen-event-schema 0.6.6. kazenai-finops 1.2.6 installs kazenai 1.2.6 or later. To upgrade an existing install, run pip install "kazenai-finops[openai]==1.2.6". Do not use any release before 1.2.0 for Control: every one from 1.0.1 to 1.1.3 lets some OpenAI calls on a monitored client skip the budget check, and hosted Agent FinOps refuses the check path they use.

A customer ID Agent FinOps refuses is reported as what it is, an over-limit refusal says what the call could have cost, and LiteLLM gateway calls that name no run each get their own run. kazenai and kazenai-finops both move to 1.2.6 (kazenai-finops 1.2.2 to 1.2.5 were never published).

  • Fixed: a customer or feature ID that Agent FinOps doesn’t accept raises InvalidAttribution with the reason, for example “business_subject_ref has characters that aren’t allowed: space”. Up to 1.2.5 it raised BudgetUnavailable: Pre-call reservation HTTP 400, which read like an outage. InvalidAttribution subclasses BudgetUnavailable, so existing handlers still catch it, and the call never runs whatever the fail-open setting. See which IDs are accepted.
  • Fixed: with the LiteLLM gateway, a call whose metadata names no run_id is its own run. 1.2.2 to 1.2.5 filed every such call under one run called “None”.
  • Changed: an over-limit BudgetExceeded says what the call could cost and what was left, for example “this call can cost up to $0.010834 and $0.010000 is left”. The hold is the call’s worst case; a lower max_tokens lowers it (see Reservation).
  • kazenai-finops 1.2.6 also carries the loop-guard change from kazenai 1.2.3 and exports LoopDetected and InvalidAttribution.
Terminal window
python -m pip install "kazenai-finops[openai]==1.2.6"

Short text requests reserve close to what they cost, so a small budget is no longer filled by holds. The spending limit is never weaker: every hold is still an upper bound. Only kazenai moves; kazenai-finops 1.2.1 already installs it.

  • Changed: before a call, the SDK assumed at least 2,000 input tokens, so a short prompt on a cheap model reserved several times its cost. A plain-text request is now priced from its size, which already bounds its tokens. A request with images, audio, files, tools, tool calls, a stored conversation or prompt, or extra_body keeps the 2,000-token floor, because its size doesn’t bound its tokens.
  • Changed: request settings that never reach the model as text (n, temperature, service_tier, user, metadata and similar) no longer count as input.
Terminal window
python -m pip install "kazenai[openai]==1.2.5"

One request to Agent FinOps before each call instead of two, and the settle after the call no longer holds up the response. The spending limit is exactly as strict. Only kazenai moves; kazenai-finops 1.2.1 already installs it.

  • Start on admit: when Agent FinOps offers it, the reserve records that the call may start, and the SDK sends no provider_started. Older Agent FinOps keeps the separate request.
  • Behaviour change: the settle after a call is journaled, then sent in the background. Agent FinOps holds the reserved amount until it lands. KAZENAI_SETTLE_IN_BACKGROUND=0 keeps the inline send; serverless handlers call kazenai.spine.guard.drain_settlements() before returning.
  • A reserve whose answer never arrives is released in the background (admission_abandoned) instead of waiting for recovery.
  • Concurrent first calls share one capabilities fetch.
Terminal window
python -m pip install "kazenai[openai]==1.2.4"

The loop guard records by default instead of refusing calls. Only kazenai moves; kazenai-finops 1.2.1 already installs it.

  • Changed: monitor() no longer refuses a call because it looks like a loop. Up to 1.2.2 it raised LoopDetected, which refused ordinary traffic under every limit: the same question from two customers, a long shared system prompt, an agent’s tools list from its third call, a long chat, content sent as a list of parts, and an app’s own retry. Now a repeat writes a finops.loop.anomaly event ("reason": "repeated_request") and the call goes ahead.
  • New: monitor(..., loop_guard="block") keeps the old refusal and now records it; loop_guard="off" skips the check. See Repeated requests.
  • Changed: the loop guard keeps its history per customer, so two customers sending the same prompt through one client are never a loop. Calls that name no customer share one history per client.
  • Import: LoopDetected comes from kazenai: from kazenai import LoopDetected.
  • Fixed: async Anthropic clients never ran the loop guard. They now follow loop_guard like the other paths.
Terminal window
python -m pip install "kazenai[openai]==1.2.3"

Fixes for the LiteLLM gateway callback and for how streams price cache tokens. kazenai-finops stays at 1.2.1, which already accepts this version.

  • A streamed call through the callback now settles when the stream ends, if the provider finished it and reported usage. Otherwise it stays pending.
  • The callback sends the customer, so per-customer limits apply to calls through it. KAZENAI_REQUIRE_CUSTOMER_ID=1 refuses a call that names no customer.
  • The hold covers what the call can cost. The callback adds an output limit when a chat or Responses request has none, and lowers one above the model’s bound.
  • Cache reads and writes bill at their own rates, 1-hour writes included. A LiteLLM cache hit settles at $0, and a non-first-party endpoint gets the same uplift as monitor().
  • A settlement that failed to send is resent by later traffic, and calls to Agent FinOps no longer hold up the proxy’s event loop.
  • A streamed OpenAI call through monitor() bills cached tokens at the cached rate. It used to bill them at the full input rate, so it recorded too much, never too little.
Terminal window
python -m pip install "kazenai[openai]==1.2.2"
Package Version Notes
kazenai 1.2.1 monitor(..., require_customer_id=True); a paused organization’s refusal names the pause; a reservation that gets no answer is sent once more; Python 3.13 and 3.14
kazenai-finops 1.2.1 Requires kazenai[server]>=1.2.1,<2.0; exports use_attribution, AttributionConflict, AttributionContext and CustomerIdRequired
Terminal window
python -m pip install "kazenai-finops[openai]==1.2.1"
  • New: monitor(..., require_customer_id=True) refuses a call that names no customer ID. It raises CustomerIdRequired before it reserves budget or reaches the provider. Off by default (Attribution).
  • New: from kazenai_finops import use_attribution works.
  • Fixed: a call refused because the organization is paused said “budget exhausted”. BudgetExceeded (and GatewayAdmissionDenied on the LiteLLM gateway path) now gives the reason from the decision receipt.
  • Fixed: a reservation that got no answer (a timeout, a refused or dropped connection, or a 502/503/504) failed the call at once. It is now sent once more with the same idempotency key, so it is never reserved twice. A refusal (402) is not retried.
  • Changed: KAZENAI_FINOPS_RESERVE_TIMEOUT_S defaults to 2 s (was 0.8 s). With both attempts, a call waits at most about 4 s for an Agent FinOps that never answers (Configuration).
  • Compatibility: Python 3.10–3.14. The CrewAI adapter needs 3.10–3.13, because CrewAI 1.15 doesn’t install on 3.14 yet.

1.2.0 stays supported. Upgrading changes three things by default: the paused-organization message, the one retry and the 2 s timeout. require_customer_id is off until you turn it on.

Package Version Notes
kazenai 1.2.0 Control by default when Agent FinOps is configured; OpenAI Responses API (create, parse, stream); CrewAI 1.15.26; the request gate that closes the budget-check bypass
kazenai-finops 1.2.0 Requires kazenai[server]>=1.2.0,<2.0; provider extras openai>=1.40,<3, anthropic>=0.39,<1
kazen-event-schema 0.6.6 Removes event types and helpers from earlier KazenAI products; the events the SDKs and Agent FinOps use are unchanged
Terminal window
python -m pip install "kazenai-finops[openai]==1.2.0"

Every supported surface is covered by tests that use the official OpenAI and Anthropic SDK objects with simulated provider responses and real KazenAI services. OpenAI Chat Completions and Anthropic Messages, plus the LiteLLM, LangChain and LangGraph paths, are also verified against the live OpenAI and Anthropic APIs (2026-10-12), and the Responses API on 2026-10-13 (gpt-6-luna, gpt-6.1-sol). Not supported: OpenAI Realtime/WebSocket, Anthropic beta Messages, Bedrock/Vertex wrappers, AutoGen. Full list: Supported surfaces.

Upgrade notes for 1.2.0 (Configuration):

  • Setting KAZENAI_FINOPS_URL selects the Control lifecycle: each guarded call reserves in Agent FinOps before dispatch and settles after it, and a call is refused when Agent FinOps cannot be reached. KAZENAI_PROFILE=legacy is deprecated and refused by hosted Agent FinOps.
  • monitor() refuses to start under Control without KAZENAI_TIER_MISMATCH_MULTIPLIER (PricingConfigError) or with a provider client built with retries (UnsupportedModeError; use max_retries=0).
  • Paid OpenAI endpoints outside Control (embeddings, images, audio, batches, fine-tuning) are refused on a monitored client unless named in allow_unmetered.

What’s new in 1.2.0:

  • Security — on every earlier release, responses.parse, raw-response wrappers cached before monitor(), legacy completions.create, Realtime, and any method saved before monitor() reached OpenAI without a budget check. 1.2.0 guards or refuses each of them, checks extra_body like top-level arguments, and quarantines settlement records Agent FinOps rejects for good or that were journaled for another FinOps URL.
  • OpenAI Responses API — responses.create, responses.parse and responses.stream, sync and async, streaming and non-streaming, with function tools (OpenAI guide). Background mode, server-side conversation state and built-in tools are refused before dispatch.
  • CrewAI 1.15.26 certified — kickoff, native akickoff and kickoff_async, live-verified on OpenAI and Anthropic, including a two-provider crew on one Agent FinOps budget (Frameworks). A budget denial stops the crew instead of being retried.
  • Pause an organization (hosted Agent FinOps) — an admin pause refuses every new reservation for the organization until it is resumed; calls already admitted still settle (Configuration).
  • Shadow mode (hosted Agent FinOps) — set a limit to shadow and it never blocks: each call’s receipt records what enforcement would have decided, and a shadow report groups the would-deny calls by customer, workflow, feature or limit. Shadow decisions use an enforced-world ledger, so they predict enforcement for the same traffic. Switch to enforce when ready (Shadow mode). Shadow mode is set on the limit; the SDK needs 1.2.0 and the Control settings above.
  • Signed live price catalog — SDKs connected to Agent FinOps verify and cache the signed price catalog it serves; the bundled snapshot is the floor.
  • Tier-mismatch breaker — when a provider bills a call at a service tier KazenAI did not request, further admissions for that organization, provider and model are refused (BudgetExceeded) until an operator settles it.
  • Hosted service changes — users accept the current Terms of Service and Privacy Policy before using the dashboards (API keys are not affected), and everyone signs in again once. SSO is invitation-only. Retention defaults to a dry run: nothing is deleted until an admin picks delete or export_then_delete. Budget negotiation is removed. Run receipts show a cost as settled only when Agent FinOps settled it, and as reported otherwise.

1.1.3 is a documentation and packaging release with no behaviour change: clearer docs, and slimmer source distributions on PyPI.

What’s new in 1.1.2:

  • One budget for a multi-model workflow — SharedBudget shares one local cap across several monitor() clients (Frameworks & multi-model workflows).
  • LangChain ChatAnthropic — bind_monitored_chat_anthropic, alongside bind_monitored_chat_openai; LangGraph graphs declare every provider client.
  • Accurate costs — one verified price table; streamed calls priced on input and output separately; LangChain non-streaming calls now recorded.
  • Unpriced models are blocked before dispatch by default (UnknownModelError).
  • Provider refusals settle at $0 instead of holding budget as pending.
  • Ordinary API keys work with the SDK for their own organization.
Package Version Notes
kazenai / kazenai-finops 1.1.1 Sync OpenAI/Anthropic, streaming and non-streaming; bounded provider extras
kazen-event-schema 0.6.3

Changelog links: