Skip to main content

oriora-c2

Use Oriora's model-routing decision in any OpenAI-style agent — without your key or prompts ever leaving your machine.

oriora-c2 runs a tiny local proxy on 127.0.0.1. Your agent points at it; before each call it asks Oriora's /api/select "which model is best for this task?", then dispatches the call directly to the vendor on your own key. Only the routing decision (task type + your candidate models) crosses to Oriora — never the key, the prompt, or the response.

This is for off-the-shelf agents (Cursor, Aider, Continue, the raw openai SDK, LangChain ChatOpenAI, …) that can't easily insert a "ask Oriora first" step. Writing your own code? You don't need this — call /api/select directly (or pip install oriora and use model_select()).

Install

pip install oriora-c2     # Python 3.10–3.13

Python 3.14 isn't supported yet — a dependency (litellm's pinned orjson) has no 3.14 build. On 3.14 the install succeeds but the tool exits with this exact guidance: create the venv with python3.13 -m venv and install there.

Run

oriora-c2 init                       # scaffolds config.yaml + .env.oriora-c2.example
# set your keys:
export ORIORA_API_KEY=sk_oriora_...  # the decision call only
export DEEPSEEK_API_KEY=...          # your own vendor keys (the actual call runs on these, locally)
export MINIMAX_API_KEY=...
oriora-c2 serve                      # local proxy on http://127.0.0.1:4000

Point any OpenAI client at it:

from openai import OpenAI
c = OpenAI(base_url="http://127.0.0.1:4000/v1", api_key="anything")
c.chat.completions.create(model="oriora-auto", messages=[{"role":"user","content":"…"}])
# task type is auto-detected locally (free); or force it: model="oriora-auto:coding" (or :coding_hard)

Reasoning models behave vendor-native through the proxy. The proxy never touches the response, so models like deepseek-v4-pro return their reasoning_content raw — and a tiny max_tokens budget can be consumed by reasoning before any answer text appears. Budget max_tokens generously (or pick non-reasoning candidates) for short-answer use.

How it works

  1. Agent → http://127.0.0.1:4000 (model="oriora-auto"). Prompt never leaves your box.
  2. The pre-call hook classifies the task locally (free regex rules + overshoot-biased difficulty escalation to *_hard, no LLM) → calls POST /api/select {task_type, models} — the one Oriora touch ($0.001/decision).
  3. It rewrites data["model"] to the recommended model.
  4. LiteLLM dispatches direct to the vendor on your local key; the stream flows vendor → you.

Privacy / c2 invariant: the proxy is customer-hosted (127.0.0.1). Only {task_type, model candidates} reach Oriora. If a third party ever hosted this, it would no longer be c2.

Fail-open: if /api/select is slow (>ORIORA_SELECT_TIMEOUT_S, default 2.5s) or down, the hook falls back to ORIORA_FALLBACK_MODEL so your agent is never blocked.

Configuration (env)

Var Purpose
ORIORA_API_KEY Oriora key for the decision call (required)
DEEPSEEK_API_KEY, MINIMAX_API_KEY, … your own vendor keys (the call runs on these)
ORIORA_CANDIDATES comma-sep catalog ids you hold keys for (sent to /api/select)
ORIORA_FALLBACK_MODEL model used if the decision call fails (default deepseek-v4-flash)
ORIORA_SELECT_TIMEOUT_S decision-call budget before fail-open (default 2.5)

Add a vendor = add its key + a model_list entry in config.yaml + its catalog id to ORIORA_CANDIDATES. v1 ships configured for DeepSeek + MiniMax (OpenAI-format).

MIT © Orioralabs OÜ · https://orioralabs.com

Metadata

Release files for oriora-c2 0.1.5

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

Source distribution (sdist)

Source distribution for oriora-c2 0.1.5
File Size Uploaded Provenance Actions
oriora_c2-0.1.5.tar.gz 11.5 kB Without provenance Details for oriora_c2-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oriora-c2 0.1.5
File Interpreter ABI Platform Actions
oriora_c2-0.1.5-py3-none-any.whl Python 3 none any Details for oriora_c2-0.1.5-py3-none-any.whl

Total release size: 25.4 kB

Release files / oriora_c2-0.1.5.tar.gz

Download URL oriora_c2-0.1.5.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8d47b54a0cd12faf8c1de6dbff44d4b9f3b7868cac909bdb5a44f55e22209e49
BLAKE2b-256 checksum
How to use checksums
9c6d855b2483f0eb7795b9dd1d45a0ce245b0c0476a18588a8b09a7924a29952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / oriora_c2-0.1.5-py3-none-any.whl

Download URL oriora_c2-0.1.5-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bad27377e01b15e5c10d649a5c412b4687ad0c2ecf985ce4c2fc3721ece056d2
BLAKE2b-256 checksum
How to use checksums
ad3393a9cf2ab0c69175b1c7cd84b7ba65e2c68da2cd6529e73e8f1504b1273e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for oriora-c2 0.1.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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