Metadata-Version: 2.5
Name: langchain-straitly
Version: 0.1.0
Summary: LangChain chat model for Straitly, an OpenAI-compatible AI gateway
Project-URL: Homepage, https://straitly.ai
Project-URL: Documentation, https://straitly.ai/docs/quickstart
Project-URL: Models, https://straitly.ai/models
Author: Straitly
License-Expression: MIT
License-File: LICENSE
Keywords: ai-gateway,chat,langchain,llm,openai-compatible,straitly
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <4.0,>=3.10
Requires-Dist: langchain-core<2.0.0,>=1.0.0
Requires-Dist: langchain-openai<2.0.0,>=1.0.0
Description-Content-Type: text/markdown

# langchain-straitly

LangChain chat model for [Straitly](https://straitly.ai).

Straitly is an AI gateway for startups: one OpenAI-compatible API key for 150+ models including Claude, GPT, Gemini,
Grok and DeepSeek.

## Install

```bash
pip install -U langchain-straitly
export STRAITLY_API_KEY="your-api-key"
```

## Use

```python
from langchain_straitly import ChatStraitly

model = ChatStraitly(model="deepseek/deepseek-v4-1-flash", temperature=0)
print(model.invoke("Say hello in one sentence.").content)

for chunk in model.stream("Write one line about rain."):
    print(chunk.text, end="")
```

Pick any model id from https://straitly.ai/models (JSON: https://straitly.ai/api/catalog). Tool calling and
structured output use the same methods as `ChatOpenAI` (`bind_tools`, `with_structured_output`); support depends on
the model.

| Setting | Env var | Default |
| :-- | :-- | :-- |
| API key | `STRAITLY_API_KEY` | none, required |
| Base URL | `STRAITLY_API_BASE` | `https://api.straitly.ai/v1` |

`OPENAI_API_KEY` is never read, so an OpenAI key is never sent to Straitly.

Docs: https://straitly.ai/docs/quickstart. Contact: https://straitly.ai/contact.
