Skip to main content

LLM orchestrator - route prompts to any model via litellm

Project description

orcx

LLM orchestrator - route prompts to any model via litellm.

Alpha - Core functionality works, API may change.

Why orcx?

  • 100+ providers via litellm - OpenRouter, OpenAI, Anthropic, Google, etc.
  • Agent presets - Save model + system prompt + parameters as reusable configs
  • OpenRouter routing - Control quantization, provider selection, sorting
  • Cost tracking - See what each request costs
  • Simple - Just route prompts, not a full agent framework

Install

uv tool install orcx
# or
pip install orcx

Quick Start

# Set your API key
export OPENROUTER_API_KEY=sk-or-...

# Run a prompt
orcx run -m openrouter/deepseek/deepseek-v3.2 "hello"

# With file context
orcx run -m openrouter/deepseek/deepseek-v3.2 -f code.py "review this"

# Show cost
orcx run -m openrouter/deepseek/deepseek-v3.2 "hello" --cost

Usage

# Direct model (provider/model format)
orcx run -m openrouter/deepseek/deepseek-v3.2 "hello"

# Using model alias (if configured)
orcx run -m deepseek "hello"

# Using agent preset
orcx run -a reviewer "review this code"

# With file context
orcx run -a reviewer -f src/main.py "review this"

# Multiple files
orcx run -m deepseek -f code.py -f tests.py "explain the tests"

# Pipe from stdin
cat code.py | orcx run -a reviewer "review this"

# JSON output (includes usage/cost)
orcx run -m deepseek "hello" --json

# Custom system prompt
orcx run -m deepseek -s "You are a pirate" "greet me"

Configuration

Config location: ~/.config/orcx/

config.yaml

# Default model (used when no -m or -a specified)
default_model: openrouter/deepseek/deepseek-v3.2

# Model aliases for shorthand
aliases:
  deepseek: deepseek/deepseek-v3.2
  sonnet: anthropic/claude-4.5-sonnet

# API keys (env vars take precedence)
keys:
  openrouter: sk-or-...

agents.yaml

agents:
  fast:
    model: openrouter/deepseek/deepseek-v3.2
    description: Fast, cheap reasoning
    temperature: 0.7
    max_tokens: 4096

  reviewer:
    model: anthropic/claude-4.5-sonnet
    system_prompt: You are a code reviewer. Be concise and actionable.

  # With OpenRouter provider preferences
  quality:
    model: openrouter/deepseek/deepseek-v3.2
    provider_prefs:
      min_bits: 8 # fp8+ only (excludes fp4)
      ignore: [DeepInfra] # blacklist providers
      prefer: [Together] # soft preference
      sort: throughput # or: price, latency

Provider Preferences

OpenRouter-specific routing options:

Option Type Description
min_bits int Minimum quantization (8 = fp8+)
quantizations list Explicit whitelist: [fp8, fp16, bf16]
exclude_quants list Blacklist: [fp4, int4]
ignore list Blacklist providers
only list Whitelist providers (strict)
prefer list Soft preference (tries first, falls back)
order list Explicit order
sort str "price", "throughput", "latency"

Commands

orcx run "prompt"        # Run prompt (uses default model/agent)
orcx run -m MODEL "..."  # Use specific model or alias
orcx run -a AGENT "..."  # Use agent preset
orcx agents              # List configured agents
orcx models              # List common models
orcx --version           # Show version
orcx --debug             # Show full tracebacks on error

CLI Options

Option Short Description
--model -m Model or alias to use
--agent -a Agent preset to use
--system -s System prompt
--context Context to prepend
--file -f Files to include (repeatable)
--no-stream Disable streaming output
--cost Show cost after response
--json -j Output as JSON

Environment Variables

API keys loaded from env vars (take precedence over config file):

  • OPENROUTER_API_KEY
  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • DEEPSEEK_API_KEY
  • GOOGLE_API_KEY
  • MISTRAL_API_KEY
  • GROQ_API_KEY
  • TOGETHER_API_KEY

Model Format

Models use provider/model-name format. See your provider's docs for available models:

License

MIT

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

orcx-0.0.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

orcx-0.0.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file orcx-0.0.1.tar.gz.

File metadata

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

File hashes

Hashes for orcx-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7b20baf3e223cc1084b06c705f9fcb6a59a7f15729eecdc0c6a9d6f673566b3f
MD5 3a11a3a4f5e1f7d2f6932b95cb73408f
BLAKE2b-256 59f6a1d2fb7021f436e60b4dcded14d59e91e51d19ad73d836e723e50693e758

See more details on using hashes here.

Provenance

The following attestation bundles were made for orcx-0.0.1.tar.gz:

Publisher: release.yml on nijaru/orcx

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

File details

Details for the file orcx-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: orcx-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for orcx-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa3abf4c5c9c6c7023e65ddc5660221886e9a67b27003daa21b1dc222854407c
MD5 69254ecd95869fd495f8a834a0664d6b
BLAKE2b-256 b8650194c6e75ef7140d23d66fa91f671e9dcc58651c39e49daaaabc832c2e17

See more details on using hashes here.

Provenance

The following attestation bundles were made for orcx-0.0.1-py3-none-any.whl:

Publisher: release.yml on nijaru/orcx

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