Metadata-Version: 2.5
Name: langchain-revana
Version: 0.1.0
Summary: LangChain integration for Revana: Claude, Gemini, DeepSeek and other chat models through one OpenAI-compatible API key.
Project-URL: Homepage, https://revana.si
Project-URL: Documentation, https://github.com/Aribk7/langchain-revana#readme
Project-URL: Repository, https://github.com/Aribk7/langchain-revana
Project-URL: Model list, https://api.revana.si/v1/models
Author-email: Revana <hello@revana.si>
License-Expression: MIT
License-File: LICENSE
Keywords: chat,claude,deepseek,gemini,langchain,llm,openai-compatible,revana
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: langchain-core>=1.0
Requires-Dist: langchain-openai>=1.0
Description-Content-Type: text/markdown

# langchain-revana

LangChain integration for [Revana](https://revana.si): Claude, Gemini, DeepSeek and other text models from several labs behind one API key, through Revana's OpenAI-compatible Chat Completions endpoint. Each request is routed to the cheapest working provider.

## Install

```bash
pip install -U langchain-revana
export REVANA_API_KEY="sr_live_..."   # create one at https://revana.si/dashboard
```

## Chat model

```python
from langchain_revana import ChatRevana

llm = ChatRevana(model="claude-haiku-5-5", max_tokens=256)

print(llm.invoke("Explain what an API gateway does in one sentence.").content)

for chunk in llm.stream("Count from 1 to 5."):
    print(chunk.content, end="")
```

`ChatRevana` supports everything `ChatOpenAI` does that the chosen model supports: streaming, async, tool calling (`bind_tools`), and structured output.

```python
from langchain_core.tools import tool

@tool
def get_weather(city: str) -> str:
    """Get the weather for a city."""
    return "sunny"

msg = llm.bind_tools([get_weather]).invoke("What's the weather in Paris?")
print(msg.tool_calls)
```

## Models

Model IDs and live per-token prices: https://api.revana.si/v1/models (text models have `"kind": "text"`; no key needed to list them).

Revana also serves image, video and music models (Seedance 2.5, Veo 3.1, Kling, Nano Banana Pro and more) through its generations API; see https://revana.si/docs and the [`revana`](https://pypi.org/project/revana/) Python SDK.

## Configuration

| Argument | Default |
|---|---|
| `model` | required |
| `api_key` | `REVANA_API_KEY` |
| `base_url` | `https://api.revana.si/v1` (or `REVANA_API_BASE`) |

## License

MIT
