π Announcement: AI Refinery SDK 1.31.1 Released β‘οΈ
We're excited to announce the release of AI Refinery SDK Version 1.31.1!
This version introduces powerful new APIs for Governance, Prompt Compression, and Document Analysis, along with Studio enhancements for data source management and a more transparent chat experience.
π₯ What's New
ποΈ Governance API (Beta-release)
- New
client.governancesub-client for managing organizations, users, roles, workspaces, projects, and API keys with built-in RBAC. - Full CRUD operations for organizations, projects, memberships, and API keys.
- Support for private models (BYOM) via the governance client.
- Please reach out for access to the beta release and documentation if you're interested in testing and providing feedback!
ποΈ Compression API
- New
client.compression.compress()method for prompt compression using LLMLingua-2. - Reduces prompt length while preserving semantic meaning β lower token costs with minimal quality impact.
- Supports single text and batch compression, configurable rate, target tokens, and force-preserve tokens.
- Available in both sync (
AIRefinery) and async (AsyncAIRefinery) clients.
π Document Analysis API
- New Document Analysis endpoints for PaddleX-powered layout detection, text detection, and OCR.
layout_detection()β Detects 17 document element types (text, tables, figures, headers, equations, etc.).text_detection()β Locates text regions in document images.ocr()β Full OCR pipeline with multi-language support (English, Chinese, Japanese, Korean, Arabic, and more).- Integrated into the Knowledge API documentation under
client.knowledge.
π Studio
π Data Source Management
- Upload, preview, and delete data sources directly from both the Visual and Code editors, expanding control over content used by your agents.
π¬ Chat Experience
- Added a thinking state indicator for clearer feedback while responses are being generated.
- Improved error display for more informative and user-friendly messaging.
π Bug Fixes & Cleanup
- Several fixes for layout consistency across editors.
- Platform stability improvements.
π Proxy Support (On-Prem Deployment)
Relevant for on-prem deployments, this update primarily addresses aiohttp proxy issues. Once you have pulled the v1.31.1 image, set the following environment variables to enable proxy support:
AIREFINERY_HTTP_TRUST_ENV=1
HTTPS_PROXY=http://<proxy-host>:<port>
HTTP_PROXY=http://<proxy-host>:<port> # optional
NO_PROXY=.internal.corp,127.0.0.1,localhost # optional
β Compatibility
- SDK versions β€ 1.30.x continue to work with existing endpoint configurations.
- The new
compressionandgovernancesub-clients are additive β no breaking changes to existing APIs. - Applications using
AIR_BASE_URLto override the endpoint are unaffected.