Skip to main content

coreason-arbitrage

The "Traffic Controller" / The Smart Switch for CoReason-AI.

Organization License: Prosperity 3.0 Build Status Code Style: Ruff Documentation

Installation

pip install coreason-arbitrage

Features

  • Intelligent Routing: Cascading model strategy to select the right model for the right task (Tier 1, Tier 2, Tier 3).
  • Server Mode: Run as a containerized microservice to act as a centralized traffic controller.
  • Cost Optimization: Prevents "Token Burn" by routing simpler tasks to cheaper models and using Economy Mode.
  • Resiliency: Circuit Breaker mechanism to failover to backup providers during outages.
  • Provider Agnosticism: Decoupled from specific vendors, avoiding lock-in.
  • FinOps: Real-time cost tracking and logging.

See Product Requirements for more details.

Usage

For detailed instructions on using coreason-arbitrage as a library or a microservice, please refer to the Usage Guide.

Quick Start (Library)

from coreason_arbitrage.engine import ArbitrageEngine

# Initialize the engine (Singleton)
engine = ArbitrageEngine()

# Get a smart client capable of handling the request
client = engine.get_client()

# Use the client to create a completion
response = client.chat.completions.create(
    messages=[{"role": "user", "content": "Explain quantum computing in simple terms."}],
)

print(response.choices[0].message.content)

Quick Start (Server)

docker run -p 8000:8000 coreason/arbitrage:v0.3.0

Metadata

Release files for coreason-arbitrage 0.3.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 coreason-arbitrage 0.3.0
File Size Uploaded
coreason_arbitrage-0.3.0.tar.gz 17.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coreason-arbitrage 0.3.0
File Interpreter ABI Platform
coreason_arbitrage-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.5 kB

Release files / coreason_arbitrage-0.3.0.tar.gz

Download URL coreason_arbitrage-0.3.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
92dd0d6a0eee476233799578a176fb37e8f742fc1701adbf9b5b71872105872c
BLAKE2b-256 checksum
How to use checksums
9e8283750dc7a8cad770ee976438671a26c25205d07236d9d58156382b661b52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 30, 2026.

Transparency log

Release files / coreason_arbitrage-0.3.0-py3-none-any.whl

Download URL coreason_arbitrage-0.3.0-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
566cfc8cec3bebafa687579c7085abbc01d08d36d1a9a7de2bc037f96926470a
BLAKE2b-256 checksum
How to use checksums
5e108ed0b77b76697859fa35d1d3373aec8b55828ca54398dec85f655e1b7b4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

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