Skip to main content

LlamaIndex LLMs Integration: TrustedRouter

TrustedRouter is an OpenAI-compatible LLM router that serves many models behind one endpoint through an open-source, verifiable attested gateway. It does not log prompts or outputs by default.

This package provides a TrustedRouter LLM class for LlamaIndex, implemented as a thin OpenAILike subclass.

Installation

pip install llama-index-llms-trustedrouter

Usage

Set your API key:

export TRUSTEDROUTER_API_KEY=***
from llama_index.llms.trustedrouter import TrustedRouter

llm = TrustedRouter(model="trustedrouter/zdr")

resp = llm.complete("Who is Paul Graham?")
print(resp)

Streaming and chat work like any other OpenAI-like LLM:

from llama_index.core.llms import ChatMessage

resp = llm.chat([ChatMessage(role="user", content="Tell me a joke")])
print(resp)

for chunk in llm.stream_complete("Count to five"):
    print(chunk.delta, end="")

Configuration

Argument Environment variable Default
api_key TRUSTEDROUTER_API_KEY required
api_base TRUSTEDROUTER_API_BASE https://api.trustedrouter.com/v1
model trustedrouter/zdr

Explicit constructor arguments take precedence over environment variables.

Models

Model routes include trustedrouter/auto, trustedrouter/zdr (zero data retention), and trustedrouter/confidential, plus individually addressable models. See the live catalog at https://trustedrouter.com/v1/models.

Why a separate repository

LlamaIndex no longer accepts new integration packages in its main repository; new integrations are maintained in their own repositories and published to PyPI independently. This package follows that guidance, and the import path is unchanged from any in-tree integration.

License

MIT

Metadata

Release files for llama-index-llms-trustedrouter 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-llms-trustedrouter 0.1.0
File Size Uploaded
llama_index_llms_trustedrouter-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-llms-trustedrouter 0.1.0
File Interpreter ABI Platform
llama_index_llms_trustedrouter-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / llama_index_llms_trustedrouter-0.1.0.tar.gz

Download URL llama_index_llms_trustedrouter-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4394a9158cbf22944ed7e2ec712af7f7b9014595e96be15e5b9b50ade64de094
BLAKE2b-256 checksum
How to use checksums
0b85403e9fa1f09f410a090d97cc9e90b57a79f616230145ecfd998b7cb6cefd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 8, 2026.

Transparency log

Release files / llama_index_llms_trustedrouter-0.1.0-py3-none-any.whl

Download URL llama_index_llms_trustedrouter-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5c21950d8b9694f411435fa262945738fcf7e8a6d6ee70ef324fa9f6f7eac27
BLAKE2b-256 checksum
How to use checksums
0546fdfb6b2c3f463cea299bb4d4cd6170346c386134b2e71656ba990b534de3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page