Swiss AI Hub v0.291.6
Pre-release
Pre-release
Changed
- 🚀 Enhanced LLM Guard Performance: Switched agent description and few-shot guards to use asynchronous structured
prediction, improving responsiveness and concurrency with Large Language Models. - ⚡️ Improved Concurrency for Reranking Nodes: Blocking reranking operations are now offloaded to a separate thread
usingasyncio.to_thread, preventing event loop starvation and boosting application performance. - 📄 Refined Error Logging: Updated
MineruLoaderand Redis request hooks to uselogger.exception, ensuring
comprehensive exception details are automatically included in logs for better debugging. - 🛠️ Corrected OpenTelemetry HTTPX Instrumentation: Ensured asynchronous HTTPX request and response hooks are
properly defined as coroutine functions, enabling full observability for async HTTP communications.
Refactor
- 🧹 Optimized Dispatcher Event Handling: The
_build_event_kwargsmethod in agent and process dispatchers, as well
as the base dispatcher, has been made synchronous, streamlining event argument construction. - 🔄 Standardized Access Rule Prefixes: Consolidated
aihub.adminandaihub.useraccess rule prefixes into
dedicated constants, enhancing maintainability and clarity across authentication logic. - 🔑 Centralized Authentication Error Messages: Moved common error messages in the authentication handler to
constants, improving consistency and simplifying future updates. - ☁️ Standardized S3 Service Error Messages: Consolidated error messages for S3 anonymous file access service
operations into constants, improving consistency and maintainability. - ⚙️ Refined SonarQube Configuration: Added specific ignore rules to
sonar-project.propertiesto suppress
python:S1192(duplicated string literals) warnings for known-good patterns, such as lazy imports and MongoDB query
syntax, reducing false positives in code quality scans. - 📝 Improved RPC Success Attribute Handling: Standardized the
rpc.successattribute for NATS requester tracing
using a dedicated constant. - 📚 Improved Test Mock Clarity: Added
noqacomments to asynchronous mock methods in authentication utilities and
Milvus vector store tests to explicitly state why they remain async for testing purposes, improving code clarity for
linters. - 🧹 Minor Python Idiom Improvements: Updated set creation from
set(generator_expression)to{comprehension}in
base_eventanddispatchable_workflowfor more idiomatic Python.