Metadata-Version: 2.4
Name: langextract-openrouter
Version: 0.1.1
Summary: LangExtract provider plugin for openrouter
License: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langextract>=1.0.0
Requires-Dist: openai>=1.101.0
Dynamic: license-file

        # LangExtract openrouter Provider

A provider plugin for LangExtract that supports openrouter models.

## Installation

From source:
```bash
pip install -e .
```

From PyPI:
```bash
pip install langextract-openrouter
```

## Supported Model IDs

- `openrouter*`: Models matching pattern ^openrouter
- `openrouter/google/gemini-2.5-flash`
- `openrouter/openai/gpt-4.1`
- ...

## Environment Variables

- `OPENROUTER_API_KEY`: API key for authentication

## Usage

```python
import langextract as lx

result = lx.extract(
    text="Your document here",
    model_id="openrouter/openai/gpt-4.1", # for example
    prompt_description="Extract entities",
    examples=[...]
)
```

## Development

1. Install in development mode: `pip install -e .`
2. Run tests: `python test_plugin.py`
3. Build package: `python -m build`
4. Publish to PyPI: `twine upload dist/*`

## License

Apache License 2.0
