Skip to content

Releases: Hemanth-stack/unitcause-python

v0.2.0 — Enforcement Engine & Framework Integrations

24 Feb 15:32

Choose a tag to compare

What's New

Enforcement Engine

  • Configurable enforcement — warn / throttle / kill actions per policy
  • Dual loop detection — exact hash match + pattern cycle detection
  • Auto-throttle — SDK auto-sleeps when server responds with throttle
  • on_kill callback — react when sessions are killed
  • SessionKilledError — new exception for killed sessions

Framework Integrations

  • LangChainUnitCauseCallbackHandler + async variant
  • CrewAIunitcause_step_callback() factory + event listener
  • AutoGenUnitCauseHook with attach() (v0.2 + AG2 v0.4)

Built-in Cost Estimation

  • 60+ model pricing table (OpenAI, Anthropic, Google, Meta, Mistral, Cohere)
  • register_pricing() for custom models

Install

pip install unitcause==0.2.0
pip install unitcause[langchain]  # with LangChain support
pip install unitcause[all]        # all integrations

See CHANGELOG.md for full details.