mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-28 11:09:29 +00:00
a75e75ae1a
* 1. add v3 classify 2. add new classifix for masking 3. support same id for the conversation for pre and post working with duplicates * clean code, remove some debug and run tests * update liter errors * improvment for Code Organization, httpx Error Handling Specificity, Logging Improvements and Type * transfer test test_lasso_guard_config to the new location * Fix type hints and linting errors in lasso.py - Add type: ignore for httpx module when None - Fix return type issues in _handle_classification and _handle_masking - Ensure masked_messages is not None before passing to _apply_masking_to_model_response - Convert LassoResponse to dict for _log_masking_applied call * feat(lasso): Upgrade to Lasso API v3 and fix ULID generation - Update Lasso API endpoints from v2 to v3 (/gateway/v3/classify) - Update masking endpoints from v1 to v3 (/gateway/v3/classifix) - Fix ULID generation: use ulid.new() instead of ULID() constructor - Resolve MemoryView error that occurred with incorrect ULID usage Tested with real proxy server and verified: - Malicious content (jailbreak) properly blocked - Safe content passes through guardrail - PII detection and masking works correctly - No ULID generation errors * docs(lasso): Add ulid-py>=1.1.0 dependency prerequisite Add Prerequisites section documenting the required ulid-py package (version 1.1.0 or higher) for Lasso guardrail conversation tracking. * update docs with the right api_key format