v0.1.2: Smart API Key Handling & CLI Enhancements
🚀 Major Improvements
🔐 Smart API Key Handling
- Multi-key authentication - automatically tries all relevant environment variables
- Better error classification - distinguishes auth errors from model requirement errors
- Intelligent fallback - stops trying keys when model is required, not auth
🛠️ CLI Enhancements
--versionflag for easy version checking- Single-source versioning from pyproject.toml (no more version duplication!)
- Better error messages for OpenRouter and similar APIs
🐛 Bug Fixes
- Fixed empty response handling for APIs returning 204 No Content
- Resolved authentication issues with OpenRouter requiring model specification
- Improved API detection logic for edge cases
📦 Installation
pip install llm-chatifier==0.1.2🔧 Usage Examples
# Check version
llm-chatifier --version
# OpenRouter with automatic key detection and model requirement handling
llm-chatifier openrouter.ai -m gpt-4
# Verbose mode to see key detection process
llm-chatifier api.openai.com -v🎯 What's Fixed
- OpenRouter authentication now works correctly
- Multiple API keys are tried automatically
- Better distinction between "needs auth" vs "needs model" errors
- More robust handling of empty API responses
View on PyPI