github chriskoch/ngx-renamer v1.2.0
v1.2.0 - Structured Outputs

latest releases: v1.4.0, v1.2.3, v1.2.2...
3 months ago

What's New in v1.2.0

Added

  • Structured Outputs for All LLM Providers: Implemented JSON schema-based structured outputs
    • Ollama provider now uses format parameter with JSON schema
    • OpenAI provider now uses response_format with json_schema
    • Ensures reliable title extraction without prompt engineering
    • Auto-truncates titles exceeding 127 characters for Paperless NGX compatibility
    • Comprehensive error handling for malformed JSON responses
    • 28 new unit tests covering JSON parsing, truncation, and edge cases
    • Cross-provider consistency tests ensure identical behavior
  • Testing Guide: Created TESTING_STRUCTURED_OUTPUTS.md
    • Comprehensive guide for verifying structured outputs work correctly
    • Troubleshooting steps for common issues
    • Alternative format approaches for Ollama if needed
    • Manual testing procedures for both providers

Changed

  • Improved Response Parsing: Both providers now parse structured JSON responses
    • Ollama: Added _parse_structured_response() method
    • OpenAI: Added _parse_structured_response() method
    • Consistent error messages guide users when models don't support structured outputs
  • Updated default Ollama model to gemma3:latest

Fixed

  • JSON Schema maxLength: Corrected from 128 to 127 characters
    • Now matches Paperless NGX's actual title limit
    • Prevents models from generating titles that get truncated post-generation
    • Schema properly constrains models to the real limit

Removed

  • Simplified Prompts: Removed redundant "Output only the title text, nothing else" instruction
    • JSON schema now enforces output format automatically
    • Cleaner, more focused prompts

Full Changelog: v1.1.0...v1.2.0

Don't miss a new ngx-renamer release

NewReleases is sending notifications on new releases.