LiteLLM based proxy for Arato Logs
Use this LiteLLM proxy to send logs data to an Arato monitoring endpoint. All LLM calls going through the proxy will be logged in Arato.
Quick Start
Using uvx (Recommended)
Since this package is not yet published to PyPI, you can use uvx with the local wheel:
# First, build the package
uv build
# Run directly without installation using the local wheel
uvx --from ./dist/arato_proxy-*.whl arato-proxy
# Or with custom configuration
uvx --from ./dist/arato_proxy-*.whl arato-proxy --config custom.yaml --port 8080
Using uv/pip (Development Install)
# Install from source in development mode
uv pip install -e .
# Or install from the built wheel
uv pip install ./dist/arato_proxy-*.whl
# Then run
arato-proxy
Publishing to PyPI (For Maintainers)
To publish a new version to PyPI, you have two options:
Option 1: GitHub Release (Recommended)
- Create a GitHub release with a tag like
v0.3.0 - This automatically triggers the release workflow
Option 2: Manual Workflow Dispatch
- Go to Actions → "Build and Publish to PyPI" → "Run workflow"
- Choose version bump type:
patch: 0.2.0 → 0.2.1minor: 0.2.0 → 0.3.0major: 0.2.0 → 1.0.0- Or specify exact version like
0.5.0
The GitHub Actions workflow will:
- Extract/calculate the version from the git tag or bump type
- Update the version in
pyproject.toml - Create a new tag (for manual dispatch)
- Build the package
- Publish to PyPI using trusted publishing
Once published to PyPI, users will be able to run:
# After publishing to PyPI
uvx arato-proxy
pip install arato-proxy
GitHub Actions
This repository includes automated workflows:
- Test: Runs tests on Python 3.8-3.12 for all PRs and pushes
- Release: Automatically publishes to PyPI when a GitHub release is created or manually triggered
- Version is automatically extracted from the git tag
- Supports automatic version bumping
- No manual version management needed
Setup
Environment Variables
You need to setup environment variables with the following keys:
OPENAI_API_KEY="sk-..."
ARATO_API_URL="https://api.arato.ai/..."
ARATO_API_KEY="ar-..."
You can create a .env file or set them in your environment:
# Generate template .env file
arato-proxy --init-env
Configuration
The proxy uses a YAML configuration file (config.yaml). You can generate a template:
# Generate template config.yaml
arato-proxy --init-config
CLI Usage
The arato-proxy command provides several options:
# Show help
arato-proxy --help
# Start with default settings
arato-proxy
# Start with custom configuration
arato-proxy --config custom.yaml --port 8080
# Generate template files
arato-proxy --init-config # Creates config.yaml
arato-proxy --init-env # Creates .env
Known Issue: Callback Loading
Currently, the Arato callback functionality has a compatibility issue when running via uvx. The proxy will start and work with basic LiteLLM functionality, but the Arato-specific logging callbacks may not load properly in packaged environments. This is being investigated.
For now, you can use the proxy for basic LiteLLM functionality, and the callback issue will be resolved in a future update.
Required Environment Variables
ARATO_API_URL- URL of the Arato API endpointARATO_API_KEY- API key for authenticationOPENAI_API_KEY- OpenAI API key for the proxy
Development
From Source
git clone https://github.com/AratoAi/litellm-proxy
cd litellm
python3 -m venv .venv
source .venv/bin/activate
uv pip install -e .
Running Tests
python -m pytest test_custom_callbacks.py -v
Building the Package
uv build
Installing in Development Mode
uv pip install -e .
Example usage with n8n
In n8n, create a new OpenAI integration and set the base URL to point to your LiteLLM endpoint
Metadata
Release files for arato-proxy 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arato_proxy-0.3.1.tar.gz | 64.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arato_proxy-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.9 kB
Release files / arato_proxy-0.3.1.tar.gz
| Download URL | arato_proxy-0.3.1.tar.gz |
|---|---|
| Size | 64.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df35a8ca21e5e2f269ca729edb76eb96f3156922febdb26e4dad0cbeb846a897
|
|
BLAKE2b-256 checksum How to use checksums |
ad687e17df688c3a697d1a0bb4cf2bec182d0a408717bc017f1eb74294d0271a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2025.
Transparency logRelease files / arato_proxy-0.3.1-py3-none-any.whl
| Download URL | arato_proxy-0.3.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28468aba743d3508c71fbf4fd464852c799bb9fff47443de63f580923c3ec67d
|
|
BLAKE2b-256 checksum How to use checksums |
f2aaba6125465ed4fc937c3fd52e797749ff90c710b1f7ed2b8eebf165fcba2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2025.
Transparency log