Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: 567-labs/instructor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.11.1
Choose a base ref
...
head repository: 567-labs/instructor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.11.2
Choose a head ref
  • 20 commits
  • 8 files changed
  • 4 contributors

Commits on Aug 2, 2025

  1. Configuration menu
    Copy the full SHA
    8bbdc44 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f8e9826 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ce7d9c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    daa7d8e View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2025

  1. Configuration menu
    Copy the full SHA
    3a99980 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    199e5d7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f6d1fb6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    72b8424 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2025

  1. Configuration menu
    Copy the full SHA
    f0af294 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2025

  1. test: update gemini model from 1.5-flash-latest to 2.5-flash

    Replace outdated gemini-1.5-flash-latest with gemini-2.5-flash in multimodal content tests to use the latest available model version.
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    jxnl and claude committed Aug 27, 2025
    Configuration menu
    Copy the full SHA
    496df12 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a67f47a View commit details
    Browse the repository at this point in the history
  3. feat: add automated bi-weekly scheduled releases

    This workflow automatically creates releases every 2 weeks if:
    - All tests pass (linting, type checking, core tests)
    - There are changes since the last release
    - Final verification tests pass after version bump
    
    Features:
    - Smart version bumping based on commit messages
    - Comprehensive test coverage before release
    - Auto-generated changelog from commit history
    - Manual trigger option for testing
    - Detailed logging and failure notifications
    - Skips release if no meaningful changes
    
    The workflow runs every Monday at 9 AM UTC and only proceeds
    if all safety checks pass.
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    jxnl and claude committed Aug 27, 2025
    Configuration menu
    Copy the full SHA
    922c0ea View commit details
    Browse the repository at this point in the history
  4. fix: correct GitHub Actions YAML syntax for scheduled releases

    Fixed boolean default value and secrets access pattern in workflow configuration.
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    jxnl and claude committed Aug 27, 2025
    Configuration menu
    Copy the full SHA
    2497156 View commit details
    Browse the repository at this point in the history
  5. feat: add dry run mode and improve LLM test handling

    - Added dry_run input for testing workflow without pushing
    - Made LLM tests non-blocking with better error handling
    - Added dry run summary output for testing
    - Improved robustness of test execution
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    jxnl and claude committed Aug 27, 2025
    Configuration menu
    Copy the full SHA
    da24f61 View commit details
    Browse the repository at this point in the history
  6. feat: Add automated bi-weekly scheduled releases (#1787)

    ## πŸš€ Automated Bi-weekly Releases
    
    This PR adds a GitHub Actions workflow that automatically creates
    releases every 2 weeks with comprehensive safety checks.
    
    ## ✨ Features
    
    ### πŸ›‘οΈ Safety First
    - **All tests must pass** before any release (linting, type checking,
    core tests)
    - **Smart version bumping** based on conventional commit messages
    - **Final verification** tests run after version bump
    - **Skips empty releases** - won't create releases with no meaningful
    changes
    
    ### πŸ”§ Smart Automation
    - **Cron schedule**: Every Monday at 9 AM UTC (bi-weekly)
    - **Manual trigger**: Can be run manually for testing
    - **Dry run mode**: Test the workflow without actually pushing changes
    - **Non-blocking LLM tests**: Runs provider tests if API keys available
    
    ### πŸ“Š Version Management
    - **Patch bump**: For bug fixes and chores (`fix:`, `chore:`)
    - **Minor bump**: For new features (`feat:`) or breaking changes
    (`BREAKING`)
    - **Auto-generated changelog**: Based on commit history since last
    release
    
    ### πŸ” Testing Strategy
    - Core tests (no API calls required)
    - Linting with Ruff
    - Type checking with PyRight  
    - Optional LLM provider tests (if secrets available)
    - Post-bump verification tests
    
    ## 🎯 Workflow Logic
    
    ```mermaid
    graph TD
        A[Scheduled Trigger] --> B[Install Dependencies]
        B --> C[Run Linting]
        C --> D[Run Type Checking] 
        D --> E[Run Core Tests]
        E --> F[Run LLM Tests*]
        F --> G[Check for Changes]
        G --> H{Has Changes?}
        H -->|No| I[Skip Release]
        H -->|Yes| J[Determine Version Bump]
        J --> K[Update Version]
        K --> L[Update Lockfile]
        L --> M[Final Test Run]
        M --> N[Generate Changelog]
        N --> O[Create Commit & Tag]
        O --> P{Dry Run?}
        P -->|Yes| Q[Show Summary]
        P -->|No| R[Push to GitHub]
        R --> S[Create GitHub Release]
    ```
    
    ## πŸ§ͺ Testing
    
    You can test this workflow with:
    
    ```bash
    # Dry run (no changes pushed)
    gh workflow run scheduled-release.yml -f dry_run=true
    
    # Skip LLM tests for faster testing  
    gh workflow run scheduled-release.yml -f skip_tests=true -f dry_run=true
    ```
    
    ## πŸ“‹ Checklist
    
    - [x] Comprehensive test coverage
    - [x] Smart version bumping logic
    - [x] Error handling and logging
    - [x] Dry run mode for testing
    - [x] Auto-generated changelogs
    - [x] Non-blocking LLM tests
    - [x] Skip logic for empty releases
    - [x] Detailed workflow summaries
    
    ## πŸ”— Configuration
    
    The workflow will need these repository secrets for full functionality:
    - `OPENAI_API_KEY` (optional - for LLM tests)
    - `ANTHROPIC_API_KEY` (optional - for LLM tests)
    - `PYPI_TOKEN` (optional - for automatic PyPI publishing)
    
    ## πŸ“ˆ Benefits
    
    1. **Consistent releases** - No more manual version management
    2. **Quality assurance** - All tests must pass before release
    3. **Zero surprises** - Only releases when there are actual changes
    4. **Full transparency** - Detailed logs and summaries
    5. **Easy testing** - Dry run mode for validation
    
    ---
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    <!-- ELLIPSIS_HIDDEN -->
    
    ----
    
    > [!IMPORTANT]
    > Adds a GitHub Actions workflow for automated bi-weekly releases with
    comprehensive safety checks and smart version management.
    > 
    >   - **Workflow**:
    > - Adds `scheduled-release.yml` for automated bi-weekly releases via
    GitHub Actions.
    >     - Triggers every 2 weeks on Monday at 9 AM UTC or manually.
    >     - Includes dry run mode and optional LLM tests.
    >   - **Safety Checks**:
    > - Requires all tests (linting, type checking, core tests) to pass
    before release.
    >     - Skips release if no meaningful changes are detected.
    >   - **Version Management**:
    > - Smart version bumping based on commit messages (`patch` for `fix:`,
    `chore:`, `minor` for `feat:`, `BREAKING`).
    >     - Auto-generates changelog from commit history.
    >   - **Testing**:
    >     - Core tests run without API calls.
    >     - Optional LLM tests if API keys are available.
    >     - Final verification tests after version bump.
    >   - **Misc**:
    >     - Generates detailed workflow summaries and logs.
    >     - Provides error notifications on failure.
    > 
    > <sup>This description was created by </sup>[<img alt="Ellipsis"
    src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=567-labs%2Finstructor&utm_source=github&utm_medium=referral)<sup>
    for da24f61. You can
    [customize](https://app.ellipsis.dev/567-labs/settings/summaries) this
    summary. It will automatically update as commits are pushed.</sup>
    
    <!-- ELLIPSIS_HIDDEN -->
    jxnl authored Aug 27, 2025
    Configuration menu
    Copy the full SHA
    2669593 View commit details
    Browse the repository at this point in the history
  7. feat: enhance GCS multimodal support with configurable timeout and st…

    …andardized errors
    
    ## Improvements Made:
    - **Configurable timeout**: All `from_gs_url()` methods now accept optional `timeout` parameter (default: 30s)
    - **Standardized error messages**: Unified error format across Image, Audio, and PDF classes
    - **Enhanced documentation**: Added comprehensive GCS examples and usage notes for all media types
    
    ## Changes:
    - `Image.from_gs_url()`: Added timeout parameter, standardized error message
    - `Audio.from_gs_url()`: Added timeout parameter (error message was already correct)
    - `PDF.from_gs_url()`: Added timeout parameter (error message was already correct)
    - Updated multimodal.md with GCS examples for all three media types
    - Added method tables showing GCS support across providers
    
    ## Testing:
    - All existing tests pass (48/49, 1 skipped)
    - GCS functionality verified for all media types
    - Timeout parameter tested and working correctly
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    jxnl and claude committed Aug 27, 2025
    Configuration menu
    Copy the full SHA
    d3f8046 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8e57e9c View commit details
    Browse the repository at this point in the history
  9. feat: Enhanced Google Cloud Storage Support for Multimodal Classes (#…

    …1788)
    
    ## πŸš€ **Enhanced Google Cloud Storage (GCS) Support for Multimodal
    Classes**
    
    This PR adds comprehensive Google Cloud Storage support to the
    instructor library's multimodal functionality with significant
    enhancements over the basic implementation.
    
    ### ✨ **Key Features**
    
    #### πŸ”§ **Configurable Timeout Support**
    - All `from_gs_url()` methods now accept optional `timeout` parameter
    - Default: 30 seconds (configurable per request)
    - **Usage**: `Image.from_gs_url("gs://bucket/image.jpg", timeout=60)`
    
    #### πŸ“ **Standardized Error Messages**
    - Unified error format across all media types
    - Clear, user-friendly messages: "Failed to access GCS {type} (must be
    publicly readable)"
    - Consistent error handling patterns
    
    #### πŸ“š **Complete Documentation**
    - Added comprehensive GCS examples for **all three media types** (Image,
    Audio, PDF)
    - Updated method support tables showing GCS availability across
    providers
    - Added usage notes about public accessibility requirements
    - Copy-paste ready examples for all providers
    
    ### 🎯 **What's Implemented**
    
    #### **Image Class**
    - βœ… `Image.from_gs_url(url, timeout=30)` - Load images from GCS
    - βœ… `Image.from_url()` - Automatically handles GCS URLs
    - βœ… `Image.autodetect()` - Recognizes GCS URLs
    - βœ… Provider support: OpenAI, Anthropic, Google GenAI
    
    #### **Audio Class**  
    - βœ… `Audio.from_gs_url(url, timeout=30)` - Load audio from GCS
    - βœ… `Audio.from_url()` - Automatically handles GCS URLs
    - βœ… `Audio.autodetect()` - Recognizes GCS URLs
    - βœ… Provider support: OpenAI, Google GenAI
    - ❓ Anthropic: Correctly shows "not supported" (API limitation)
    
    #### **PDF Class**
    - βœ… `PDF.from_gs_url(url, timeout=30)` - Load PDFs from GCS  
    - βœ… `PDF.from_url()` - Automatically handles GCS URLs
    - βœ… `PDF.autodetect()` - Recognizes GCS URLs
    - βœ… Provider support: OpenAI, Anthropic, Google GenAI, Mistral
    
    #### **Enhanced Message Processing**
    - βœ… `autodetect_images=True` now supports all media types including GCS
    URLs
    - βœ… New `autodetect_media()` function for unified media detection
    - βœ… PDF support added to message conversion pipeline
    
    ### πŸ“Š **Testing Status**
    
    - βœ… **48/49 tests passing** (1 unrelated skip)
    - βœ… **All GCS functionality verified** for Image, Audio, PDF
    - βœ… **Timeout parameter tested** and working correctly  
    - βœ… **Pre-commit hooks passed** (linting & formatting)
    - βœ… **Backward compatibility maintained**
    
    ### πŸ” **Security & Reliability**
    
    - **Public Access Only**: Only supports publicly accessible GCS objects
    - **Proper URL Validation**: Validates GCS URL format before processing
    - **Timeout Protection**: Configurable timeouts prevent hanging requests
    - **Error Handling**: Comprehensive error messages for debugging
    
    ### πŸ“– **Usage Examples**
    
    #### **Basic GCS Usage**
    ```python
    from instructor.processing.multimodal import Image, Audio, PDF
    
    # Load from GCS with default timeout (30s)
    image = Image.from_gs_url("gs://my-bucket/image.jpg")
    audio = Audio.from_gs_url("gs://my-bucket/audio.wav")  
    pdf = PDF.from_gs_url("gs://my-bucket/document.pdf")
    
    # Load with custom timeout
    image = Image.from_gs_url("gs://my-bucket/large-image.jpg", timeout=60)
    ```
    
    #### **Automatic Detection**
    ```python
    import instructor
    
    client = instructor.from_provider("openai/gpt-4.1-mini")
    
    # Automatic GCS detection with autodetect_images=True
    response = client.chat.completions.create(
        response_model=MyModel,
        autodetect_images=True,  # Now detects GCS URLs automatically
        messages=[{
            "role": "user", 
            "content": ["Analyze this:", "gs://my-bucket/document.pdf"]
        }]
    )
    ```
    
    ### πŸ”„ **Relationship to Existing Work**
    
    This PR enhances and supersedes the basic GCS implementation in PR #1763
    by adding:
    - Configurable timeouts (addresses hanging request concerns)
    - Standardized error messages (eliminates inconsistencies)  
    - Complete documentation coverage (all media types documented)
    - Enhanced testing coverage
    
    ### πŸ›  **Technical Details**
    
    - **URL Conversion**: `gs://bucket/path` β†’
    `https://storage.googleapis.com/bucket/path`
    - **Content Encoding**: All content is base64-encoded for API
    compatibility
    - **MIME Type Detection**: Proper Content-Type header validation
    - **Provider Compatibility**: Works seamlessly across all supported
    providers
    
    ### πŸ“‹ **Migration Path**
    
    This implementation is fully backward compatible. Existing code will
    continue to work unchanged, and users can gradually adopt the new
    timeout parameters and enhanced features.
    
    ---
    
    **Ready for review!** This implementation provides production-ready GCS
    support with comprehensive documentation, testing, and error handling.
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    <!-- ELLIPSIS_HIDDEN -->
    
    ----
    
    > [!IMPORTANT]
    > Enhances Google Cloud Storage support for Image, Audio, and PDF
    classes with new methods, error handling, and documentation updates in
    the instructor library.
    > 
    >   - **Behavior**:
    > - Adds `from_gs_url()` method to `Image`, `Audio`, and `PDF` classes
    in `multimodal.py` for loading from GCS with optional `timeout`
    parameter (default 30s).
    > - Enhances `autodetect()` and `autodetect_safely()` methods to
    recognize GCS URLs.
    > - Implements `autodetect_media()` function for unified media
    detection.
    >   - **Error Handling**:
    > - Standardizes error messages for GCS access failures across media
    types.
    >     - Validates GCS URL format and ensures public accessibility.
    >   - **Documentation**:
    > - Updates `multimodal.md` with GCS usage examples for Image, Audio,
    and PDF classes.
    >     - Adds notes on public accessibility requirements for GCS URLs.
    >   - **Testing**:
    > - Adds tests for `from_gs_url()` methods and `autodetect_media()` in
    `test_multimodal.py`.
    >     - Verifies GCS functionality and timeout parameter handling.
    >   - **Misc**:
    >     - Maintains backward compatibility with existing code.
    > - Updates method support tables in documentation to reflect GCS
    support.
    > 
    > <sup>This description was created by </sup>[<img alt="Ellipsis"
    src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=567-labs%2Finstructor&utm_source=github&utm_medium=referral)<sup>
    for d3f8046. You can
    [customize](https://app.ellipsis.dev/567-labs/settings/summaries) this
    summary. It will automatically update as commits are pushed.</sup>
    
    <!-- ELLIPSIS_HIDDEN -->
    jxnl authored Aug 27, 2025
    Configuration menu
    Copy the full SHA
    8728751 View commit details
    Browse the repository at this point in the history
  10. fix(exceptions): restore backwards compatibility for instructor.excep…

    …tions imports
    
    This commit addresses a breaking change introduced in v1.11.0 where the
    backward compatibility module `instructor/exceptions.py` was removed,
    causing imports like `from instructor.exceptions import InstructorRetryException`
    to fail.
    
    Changes:
    - Restore instructor/exceptions.py with proper re-exports from instructor.core.exceptions
    - Add deprecation warnings to guide users to the new import path
    - Bump version to 1.11.2 (patch version for backwards compatibility fix)
    
    The deprecated import path will continue to work but will show a
    deprecation warning directing users to import from instructor.core instead.
    
    Fixes: Breaking change from v1.11.0 removal of backwards compatibility files
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    jxnl and claude committed Aug 27, 2025
    Configuration menu
    Copy the full SHA
    ff9d88f View commit details
    Browse the repository at this point in the history
  11. fix(exceptions): restore backwards compatibility for instructor.excep…

    …tions imports (#1789)
    
    ## Summary
    - Restore backwards compatibility for `instructor.exceptions` imports
    that broke in v1.11.0
    - Add deprecation warnings to guide users to new import path
    `instructor.core`
    - Bump version to 1.11.2 (patch version for backwards compatibility fix)
    
    ## Problem
    Version 1.11.0 introduced a breaking change by removing the backwards
    compatibility module `instructor/exceptions.py`. This caused imports
    like `from instructor.exceptions import InstructorRetryException` to
    fail, breaking downstream applications without warning.
    
    ## Solution
    - Recreated `instructor/exceptions.py` with proper re-exports from
    `instructor.core.exceptions`
    - Added deprecation warnings to guide users to the recommended import
    path
    - Used proper semantic versioning (patch bump) for a backwards
    compatibility fix
    
    ## Test plan
    - [x] Test that old import path works: `from instructor.exceptions
    import InstructorRetryException`
    - [x] Test that new import path still works: `from instructor.core
    import InstructorRetryException`
    - [x] Verify deprecation warning is shown when using old import path
    - [x] Run linting and type checking
    - [x] Version bump to 1.11.2
    
    πŸ€– Generated with [Claude Code](https://claude.ai/code)
    <!-- ELLIPSIS_HIDDEN -->
    
    ----
    
    > [!IMPORTANT]
    > Restores backwards compatibility for `instructor.exceptions` imports
    with deprecation warnings and bumps version to 1.11.2.
    > 
    >   - **Behavior**:
    > - Reintroduces `instructor/exceptions.py` to restore backwards
    compatibility for imports like `from instructor.exceptions import
    InstructorRetryException`.
    > - Adds deprecation warning in `instructor/exceptions.py` to guide
    users to `instructor.core`.
    >   - **Versioning**:
    > - Bumps version to 1.11.2 in `pyproject.toml` and `uv.lock` for
    backwards compatibility fix.
    > 
    > <sup>This description was created by </sup>[<img alt="Ellipsis"
    src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=567-labs%2Finstructor&utm_source=github&utm_medium=referral)<sup>
    for ff9d88f. You can
    [customize](https://app.ellipsis.dev/567-labs/settings/summaries) this
    summary. It will automatically update as commits are pushed.</sup>
    
    <!-- ELLIPSIS_HIDDEN -->
    jxnl authored Aug 27, 2025
    Configuration menu
    Copy the full SHA
    f178806 View commit details
    Browse the repository at this point in the history
Loading