Skip to main content

coreason-arbitrage

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coreason_arbitrage-0.3.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coreason_arbitrage-0.3.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file coreason_arbitrage-0.3.0.tar.gz.

File metadata

  • Download URL: coreason_arbitrage-0.3.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coreason_arbitrage-0.3.0.tar.gz
Algorithm Hash digest
SHA256 92dd0d6a0eee476233799578a176fb37e8f742fc1701adbf9b5b71872105872c
MD5 8c5b73977b062ce7d20d889054eac8dd
BLAKE2b-256 9e8283750dc7a8cad770ee976438671a26c25205d07236d9d58156382b661b52

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_arbitrage-0.3.0.tar.gz:

Publisher: publish.yml on CoReason-AI/coreason-arbitrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coreason_arbitrage-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coreason_arbitrage-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 566cfc8cec3bebafa687579c7085abbc01d08d36d1a9a7de2bc037f96926470a
MD5 7303256944cd2cd79e8288fb99e7bd95
BLAKE2b-256 5e108ed0b77b76697859fa35d1d3373aec8b55828ca54398dec85f655e1b7b4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_arbitrage-0.3.0-py3-none-any.whl:

Publisher: publish.yml on CoReason-AI/coreason-arbitrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page