Metadata-Version: 2.4
Name: smallermodels
Version: 0.1.0
Summary: Observe and optimize supported inference clients with SmallerModels.
Project-URL: Documentation, https://smallermodels.com/docs.html
Project-URL: Homepage, https://smallermodels.com
Author: SmallerModels
License-Expression: MIT
License-File: LICENSE
Keywords: anthropic,inference,llm,observability,openai
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25
Description-Content-Type: text/markdown

# smallermodels

Observe existing Python LLM calls with SmallerModels without changing the calls themselves. Initialize once before constructing your provider clients:

```sh
pip install smallermodels
```

```python
import os
import smallermodels

smallermodels.init(api_key=os.environ["SMALLERMODELS_API_KEY"])
```

Existing OpenAI, Anthropic, Azure OpenAI, and configured OpenAI-compatible calls made through HTTPX continue normally. The SDK records metadata such as provider, model, latency, result status, and callsite. Prompt and response content is not captured.

For OpenAI-compatible providers on another origin:

```python
smallermodels.init(
    api_key=os.environ["SMALLERMODELS_API_KEY"],
    additional_origins=[
        {"origin": "https://inference.example.com", "provider": "openai-compatible"}
    ],
)
```

See the [SmallerModels documentation](https://smallermodels.com/docs.html) for the complete setup flow.

