Skip to content

AkuchiS/roost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roost

All your AI models, working under one roof.

License: MIT Python 3.8+ Dependencies: zero Tests: 19 passing Pure stdlib CI

Website · Install · Use · How it works · Providers


You pay for Claude, ChatGPT, Gemini, Perplexity, and run a local model or two — and you switch between them by hand. roost is a small, local gateway that takes one prompt and routes it to the model that's actually good at it (Claude for code/security, OpenAI for creative, Gemini for analysis/multimodal, Perplexity for live search/fact-check, local for private/offline), and adds the two things a single model can't do:

  • Consensus — ask several models the same question and get one synthesized answer plus an agreement signal.
  • Cross-model fact-check — verify a claim across models and get a majority verdict + confidence + dissent.

It's the open, honest alternative to the "unified AI gateway" apps: local-first, BYO keys, $0, pure Python standard library (no dependencies), MIT. Point any OpenAI-compatible client at it and it just routes.

Install

pipx install roost-ai        # or: pip install roost-ai
pipx install "git+https://github.com/AkuchiS/roost"

Use

roost init                       # write ~/.roost/config.json
export OPENAI_API_KEY=…           # BYOK — keys come from the environment, never stored
export ANTHROPIC_API_KEY=…        # add as many as you like; a local Ollama needs no key
roost providers                  # which models/families are active (and why not)
roost status                     # the roof: families under one roof + health

roost route "audit this code for SQL injection"      # → routed to Claude
roost route "what's the latest on the Mars mission"  # → routed to Perplexity
roost consensus "what caused the 2008 crash" --k 3   # ask 3 families, synthesize
roost factcheck "the Great Wall is visible from space"

Run it as a gateway any OpenAI client can call:

roost serve                      # http://127.0.0.1:8899/v1
# then, from any tool:
#   base_url = http://127.0.0.1:8899/v1
#   model    = "roost"           # auto-route per prompt  (or a concrete model to force it)

How it works

profiles.py   task classify + capability scoring  ─┐
health.py     per-family latency + error tracking  ─┼─►  engine.route / consensus / fact_check
providers.py  OpenAI-compatible + Anthropic client ─┤        ─►  CLI · /v1 server
config.py     provider registry (BYOK, env keys)   ─┘

Every prompt is classified into task tokens; each active family is scored by capability + health; the best one runs it. Honest by design: a family is only "available" when a real key/endpoint backs it, and a provider failure returns an error — never a fabricated answer.

Providers

Any OpenAI-compatible endpoint works via "kind": "openai" (OpenAI, Ollama, OpenRouter, Groq, DeepSeek, Together, Google's OpenAI endpoint, a private gateway); Claude uses "kind": "anthropic". Add providers by editing ~/.roost/config.json:

{ "name": "openrouter", "kind": "openai",
  "base_url": "https://openrouter.ai/api/v1",
  "api_key": "env:OPENROUTER_API_KEY",
  "models": ["anthropic/claude-opus-4-8", "google/gemini-2.5-pro"] }

Why roost

roost typical "AI gateway" app
Where it runs your machine someone's cloud
Your keys BYO, env-only, never stored uploaded to their server
Cost $0 subscription
Dependencies none (pure stdlib) a tree of them
Failure honesty errors are errors often a plausible-looking fake
Source MIT, all of it closed

License

MIT. Built by AkuchiS. Not affiliated with any AI provider.

About

All your AI models, working under one roof — a small, local, zero-dependency gateway that routes each prompt to the model that is good at it, plus cross-model consensus and fact-check. Local-first, BYO keys, $0, MIT.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors