Skip to content

Releases: a23one/llmshield

LLMShield v2.1.0 - Enhanced Provider Support and PII Allowlist

Choose a tag to compare

@AdityaDedhia AdityaDedhia released this 05 Mar 04:45

This release adds three new LLM providers and an allowlist API for fine-grained PII control.

View this release on PyPI.

New Providers

  • Google GenAI - Full support for Gemini models, including function calls and tool results
  • Cohere - Support for Cohere chat API with tool call uncloaking
  • xAI - Support for xAI/Grok SDK response formats

New Features

  • Allowlist API - Exclude specific terms from PII detection via LLMShield(allowlist=["Alexa"]) or per-call with shield.ask(allowlist=["Acme"])
  • Python 3.14 Support - Tested and verified across Python 3.12, 3.13, and 3.14

Improvements

  • Test Suite Overhaul - Deduplicated and added parameterised tests across all modules.
  • CI Modernisation - Upgraded all workflows to uv for development.

LLMShield v2.0.0 - New API and Improved Accuracy

Choose a tag to compare

@AdityaDedhia AdityaDedhia released this 04 Feb 18:37

This release makes major improvements to reducing false positives across all entity classes and introduces a more flexible chaining API.

View this release on PyPI.

Improvements

  • Reduced False Positives - Overhaul of detection logic to prevent cloaking common words
  • Opt-In Concept Detection - CONCEPT detection now disabled by default for technical acronyms
  • Chaining API - New without_* methods for specific PII configuration
  • Scalable Caching - Default max_cache_size increased to 10,000 message turns
  • State-Preserving Chaining - Methods preserve configurations instead of resetting them

LLMShield v1.0.0 - Initial Production Release

Choose a tag to compare

@AdityaDedhia AdityaDedhia released this 03 Jul 01:09

We're excited to announce the first stable release of LLMShield, a production-ready, zero-dependency Python library for protecting sensitive information in LLM interactions.

View this release on PyPI.

Key Features

Core Functionality

  • Zero Dependencies - Pure Python implementation requiring no external packages
  • Universal LLM Compatibility - Works with OpenAI, Anthropic, xAI, and any OpenAI-compatible provider
  • Automatic PII Detection - Multi-layered detection system for 9 entity types
  • Streaming Support - Real-time processing for streaming LLM responses
  • Conversation Memory - Maintains entity consistency across multi-turn conversations
  • Selective Protection - Fine-grained control over which entity types to protect

Entity Detection Types

  • PERSON - Names and titles (John Doe, Dr. Smith)
  • ORGANISATION - Companies and institutions (Microsoft, NHS)
  • EMAIL - Email addresses with validation
  • PHONE - International phone number formats
  • CREDIT_CARD - Credit card numbers with Luhn validation
  • PLACE - Locations and addresses
  • URL - Web addresses
  • IP_ADDRESS - IPv4 addresses
  • CONCEPT - Uppercase technical terms (API, SQL)

Provider Support

Full support includes text chat completions, image inputs (for supported models), structured outputs, and tool calling.

  • OpenAI - Full support
  • Anthropic - Full support
  • xAI Grok - Full support
  • OpenAI-Compatible - Full support
  • Google - Unsupported
  • Cohere - Unsupported

Advanced Features

  • LRU Cache System - Configurable caching for optimal performance
  • Custom Delimiters - Flexible placeholder formatting
  • Tool Call Protection - Automatic PII protection in function/tool calls
  • High Performance - O(1) entity lookups, 99.9% faster initialization
  • Thread-Safe - Singleton pattern with proper locking
  • Comprehensive Testing - 98.42% code coverage with 707 tests