Skip to content

Changelog Entry for v1.3.0

Choose a tag to compare

@devemree devemree released this 31 Oct 13:28
· 76 commits to main since this release

[1.3.0] - 2025-10-31

🎉 Major Features

  • 🔌 Multi-Backend LLM Support: Choose your preferred LLM backend

    • Ollama: Local, privacy-first, 100+ models
    • LM Studio: Fast local inference with easy GUI
    • Google Gemini: Powerful cloud models (gemini-2.5-flash)
    • Unified API across all backends
    • Seamless switching between backends
  • 🏗️ Factory Pattern Architecture: Clean, extensible design

    • LLMClientFactory: Central backend management
    • BaseLLMClient: Abstract interface for all backends
    • Easy to add new backends in the future
    • Follows SOLID principles
  • 🔍 Auto-Detection: Automatically find available LLM service

    • auto_detect_backend=True parameter
    • Checks Ollama → LM Studio → other local services
    • No manual configuration needed
    • Perfect for cross-platform apps

🆕 New Components

  • BaseLLMClient: Abstract base class for all LLM backends
  • LLMClientFactory: Factory pattern for backend creation
  • OllamaClient (refactored): Now inherits from BaseLLMClient
  • LMStudioClient: OpenAI-compatible local inference
  • GeminiClient: Google Gemini API integration
  • clients/ package: Organized backend implementations

✨ New MemAgent Parameters

MemAgent(
    backend='ollama',           # NEW: Backend selection
    base_url='...',            # NEW: Custom backend URL
    api_key='...',             # NEW: API key for cloud backends
    auto_detect_backend=True,  # NEW: Auto-detect available backend
    **llm_kwargs                # NEW: Backend-specific parameters
)

📚 New Examples

  • 11_lmstudio_example.py: Using LM Studio backend
  • 12_gemini_example.py: Using Google Gemini API
  • 13_multi_backend_comparison.py: Compare backend performance
  • 14_auto_detect_backend.py: Auto-detection feature

📖 New Documentation

  • MULTI_BACKEND_GUIDE.md: Comprehensive 428-line guide
    • Setup instructions for each backend
    • Configuration examples
    • Migration guide from v1.2.0
    • Troubleshooting tips

🔄 Changed

  • MemAgent: Now supports multiple backends (backward compatible)
  • Examples: All simplified for clarity (50-70% shorter)
  • Package structure: Better organized with clients/ subdirectory
  • Version: Updated to 1.3.0 across all files

⚡ Improved

  • Backward Compatibility: All v1.2.0 code still works
  • Error Messages: Backend-specific troubleshooting
  • Connection Checks: Improved availability detection
  • Code Quality: Clean architecture, SOLID principles

🧪 Testing

  • 16+ new tests for multi-backend support
  • Factory pattern tests
  • Backend availability checks
  • MemAgent integration tests
  • Auto-detection tests

🎯 Use Cases

Local Development: Use LM Studio for fast iteration
Privacy-Critical: Use Ollama for 100% local processing
Production: Use Gemini for scale and reliability
Cross-Platform: Auto-detect for universal compatibility

📊 Comparison

Feature Ollama LM Studio Gemini
Type Local Local Cloud
Setup CLI GUI API Key
Speed Medium Fast Very Fast
Privacy 100% 100% Limited
Cost Free Free Paid
Models 100+ 50+ 3+

🚀 Migration from v1.2.0

Old Code (still works):

agent = MemAgent(model="granite4:tiny-h")

New Code (recommended):

# Explicit backend
agent = MemAgent(backend='ollama', model="granite4:tiny-h")

# Or use different backend
agent = MemAgent(backend='lmstudio', model='local-model')

# Or cloud
agent = MemAgent(backend='gemini', model='gemini-2.5-flash', api_key='...')

🔧 Breaking Changes

None! All v1.2.0 code remains fully compatible.

📦 Installation

# Standard installation
pip install mem-llm

# Upgrade
pip install -U mem-llm

🙏 Credits

  • Built on top of solid v1.2.0 foundation
  • Inspired by community feedback for multi-backend support
  • Tested extensively with Ollama, LM Studio, and Gemini