v2.43.2

spider-rs/spiderv2.43.2Feb 2, 2026by j-mendez

AI Summary

Added JSON Schema support for structured extraction in RemoteMultimodalEngine with the new ExtractionSchema struct and strict mode enforcement.

Key Highlights

  • ExtractionSchema struct with name, description, schema, and strict fields
  • JSON Schema definition support for structured data extraction
  • Strict mode enforcement for reliable outputs
  • Native JSON schema enforcement for automation

New Features

  • ExtractionSchema struct for defining extraction schemas
  • JSON Schema definition support
  • Strict mode enforcement option
  • Integration with RemoteMultimodalConfigs

Full Release Notes

## New Feature: Extraction Schema Support

Add JSON Schema support for structured extraction in `RemoteMultimodalEngine`.

### `ExtractionSchema` Struct

```rust
pub struct ExtractionSchema {
    pub name: String,           // Schema name (e.g., "products")
    pub description: Option<String>,  // What to extract
    pub schema: String,         // JSON Schema definition
    pub strict: bool,           // Enforce strict adherence
}
```

### Example Usage

```rust
use spider::features::automation::{RemoteMultimodalConfigs, ExtractionSchema};

let schema = ExtractionSchema::new_with_description(
    "products",
    "Extract product information",
    r#"{
        "type": "object",
        "properties": {
            "products": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "name": { "type": "string" },
                        "price": { "type": "number" }
                    },
                    "required": ["name", "price"]
                }
            }
        }
    }"#,
).with_strict(true);

let mm = RemoteMultimodalConfigs::new("http://localhost:11434/v1/chat/completions", "model")
    .with_extra_ai_data(true)
    .with_extraction_schema(Some(schema));
```

**Full Changelog**: https://github.com/spider-rs/spider/compare/v2.43.1...v2.43.2