Skip to content

# 🚀 OpenRouter Fixed v1.1.1 - Major Update with Vision Support

Pre-release
Pre-release

Choose a tag to compare

@brouwerict brouwerict released this 27 Aug 15:14
· 18 commits to main since this release

🚀 OpenRouter Fixed v1.1.0 - Major Update with Vision Support

We're excited to announce the initial release of OpenRouter Fixed, a comprehensive solution that not only resolves all known issues with Home Assistant's official OpenRouter integration but also introduces powerful new vision capabilities for image analysis!

🎯 What This Release Solves

This integration addresses the critical compatibility and functionality issues that have been affecting Home Assistant users with the official OpenRouter integration since version 2025.8.0.


✨ NEW FEATURES

📷 Complete Image Analysis Support

The headline feature everyone has been waiting for!

  • Camera Snapshot Analysis: Analyze doorbell cameras, security feeds, parking lots, and more
  • Vision Model Integration: Full support for Claude-3, GPT-4 Vision, and Gemini Pro Vision
  • Multi-Format Support: JPEG, PNG, WebP, and other common image formats
  • Base64 Encoding: Automatic conversion for OpenRouter API compatibility
  • Structured Data Output: Get JSON responses for object detection, counting, classification

🤖 Vision Models Supported

  • anthropic/claude-3-haiku - Fast & cost-effective for camera analysis
  • anthropic/claude-3-sonnet - Best balance of quality and performance
  • anthropic/claude-3-opus - Highest quality analysis
  • openai/gpt-4-vision-preview - OpenAI's vision model
  • google/gemini-pro-vision - Google's multimodal AI

🔧 Smart Error Handling

  • Vision model validation with helpful error messages
  • Graceful fallback when images can't be processed
  • Clear guidance for choosing compatible models

🐛 CRITICAL FIXES RESOLVED

1. OpenAI Library Compatibility (#150165)

Issue: ImportError: cannot import name 'ResponseFormatJSONSchema'

  • Root Cause: Version conflicts with Extended OpenAI Conversation and other integrations
  • Solution: Flexible version requirements + fallback implementations
  • Result: Works alongside any OpenAI-based integration

2. Model Parsing Errors (#149905)

Issue: 'audio' is not a valid Modality and architecture parsing failures

  • Root Cause: New OpenRouter model types not supported by python-open-router library
  • Solution: Safe parsing with direct API fallback + individual model skipping
  • Result: All OpenRouter models load successfully

3. AI Tasks API Failures (#150294)

Issue: "Error talking to API" for all AI task operations

  • Root Cause: Multiple compatibility and parsing issues combined
  • Solution: Comprehensive error handling + better API communication
  • Result: AI tasks work reliably with all supported models

🏗️ TECHNICAL IMPROVEMENTS

Robust Architecture

  • Flexible Dependencies: openai>=1.99.5,<2.0.0 prevents version conflicts
  • Safe Model Loading: Direct API calls when library parsing fails
  • Non-blocking Errors: Individual model failures don't crash the integration
  • Enhanced Logging: Better debugging information for troubleshooting

Vision Implementation

  • Multi-part Messages: Text + image content in single API calls
  • Image Processing Pipeline: Automatic base64 conversion and validation
  • Format Detection: Smart handling of different image sources
  • Error Recovery: Graceful degradation when image processing fails

🚀 REAL-WORLD USE CASES

Security & Monitoring

# Doorbell visitor identification
- service: ai_task.generate_data
  data:
    prompt: "Who is at the door? Person, delivery, package, or other?"
    attachments: ["/tmp/doorbell_snapshot.jpg"]
    
# Security camera alerts  
- service: ai_task.generate_data
  data:
    prompt: "Analyze this security footage for unusual activity"
    attachments: ["/config/www/security_cam.jpg"]
    structure:
      person_detected: bool
      activity_type: str
      confidence_level: str

Smart Home Automation

# Parking spot availability
- service: ai_task.generate_data
  data:
    prompt: "Count available parking spaces"
    attachments: ["/tmp/parking_lot.jpg"]
    
# Garden monitoring
- service: ai_task.generate_data  
  data:
    prompt: "Check plant health and watering needs"
    attachments: ["/config/www/garden_cam.jpg"]

📦 INSTALLATION & SETUP

Via HACS (Recommended)

  1. Add custom repository: https://github.com/brouwerict/open_router_fixed
  2. Install "OpenRouter Fixed" integration
  3. Restart Home Assistant
  4. Add integration with your OpenRouter API key
  5. Configure AI tasks with vision models for image analysis

Model Selection Tips

  • Quick camera checks: Use Claude-3-Haiku (fast, cheap)
  • Detailed analysis: Use Claude-3-Sonnet (best balance)
  • Critical applications: Use Claude-3-Opus (highest accuracy)

🔄 MIGRATION FROM OFFICIAL INTEGRATION

This integration runs alongside the official OpenRouter integration without conflicts. You can:

  1. Keep your existing setup running
  2. Install OpenRouter Fixed as additional integration
  3. Test with vision features
  4. Migrate automations when ready
  5. Remove official integration if desired

No data loss or configuration migration required!


🤝 COMMUNITY IMPACT

This release addresses the most requested features and critical issues reported by the Home Assistant community:

  • 846+ active installations affected by the original issues
  • Multiple GitHub issues resolved with single integration
  • New vision capabilities unlock countless automation possibilities
  • Backward compatible - existing automations continue working

🛠️ TECHNICAL SPECIFICATIONS

  • Home Assistant: 2025.8.0+ required
  • Dependencies: openai>=1.99.5,<2.0.0, python-open-router>=0.3.1
  • Platforms: AI Task, Conversation
  • Image Formats: JPEG, PNG, WebP, GIF
  • Max Image Size: Limited by OpenRouter API (typically 20MB)
  • Supported Features: Text generation, Structured output, Vision analysis, Tool calling

🔮 WHAT'S NEXT

We're actively monitoring for:

  • New OpenRouter model releases
  • Additional vision capabilities
  • Performance optimizations
  • Community feature requests

💡 GET STARTED TODAY

Ready to supercharge your Home Assistant with AI vision?

  1. Install via HACS: https://github.com/brouwerict/open_router_fixed
  2. Get API key at OpenRouter.ai
  3. Choose vision model (recommend Claude-3-Haiku for testing)
  4. Try camera snapshot with your first AI task
  5. Share your automations with the community!

Questions or issues? Open a GitHub issue - we're here to help!

Enjoy your new AI vision superpowers! 🤖👁️