ruby_decision_model
Dependency-free Ruby gem with one client for decision models: Jev via TypeSafe or OpenRouter, OpenAI, Clef, pplx-decider and more.
Overview
ruby_decision_model is a Ruby gem that gives decision models one interface. A Client with a provider behind it sends typed questions about a state and returns calibrated probabilities; questions and answers keep the same shape whichever provider serves them. OpenRouter is the default (model typesafe/jev-1.13), and native providers cover TypeSafe (Jev via /v1/systemone, default jev-latest), OpenAI (gpt-6-luna), Cloudflare (Clef), Perplexity (pplx-decider) and Databricks (ai_decide). Any server speaking the System One API, such as Ollama or the autojev server, works through a generic provider.
Client.new reads the environment: TYPESAFE_API_KEY selects TypeSafe, then OPENROUTER_API_KEY, then SYSTEM_ONE_BASE_URL; general credentials like OPENAI_API_KEY never pick a provider on their own. Switching vendors is a configuration change, model aliases map across providers, and request IDs and usage (input tokens, cost) are exposed. There are no runtime dependencies beyond the standard library.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this urgent? | — |
| Score | How severe is this issue? | cosmetic · minor · major · critical |
How it works
- Add the gem and set a provider key
- Build questions with Questions.noul/choice/score
- client.ask(state:, questions:)
- Read typed answers and usage
Strengths
- One API across many decision-model vendors
- No runtime dependencies
- Safe provider selection from environment
Caveats
- Provider feature differences (e.g. noul mapped to predicate on OpenAI)
Getting started
gem "ruby_decision_model", then RubyDecisionModel::Client.new.ask(state: ..., questions: ...).At a glance
- Type
- Library
- Status
- beta
- Language
- Ruby
- Runtime
- Ruby gem
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Ruby ecosystem: client for decision models such as Jev, so Ruby applications can put typed questions directly to the model.
yibie/awesome-jevA Ruby decision-model client for Jev through TypeSafe’s native API or OpenRouter.
logicrw/awesome-jev-projectsRuby client for decision models such as Typesafe Jev.
wh000wh000/awesome-jev-liveRuby client with standard-library transport for TypeSafe and OpenRouter decision endpoints.
cobanov/awesome-jevRuby client for decision models such as Typesafe Jev.
hellogumbo/awesome-jevRuby gem with one client for decision models behind several providers: TypeSafe's Jev, OpenRouter (the default), OpenAI, Cloudflare Clef, Perplexity and any `/v1/systemone` server.
MrJev/awesome-jev
Frequently asked questions
Which providers are supported?
OpenRouter (default), TypeSafe, OpenAI, Cloudflare, Perplexity, Databricks and any System One server.
How is the provider chosen?
From RUBY_DECISION_MODEL_PROVIDER or, failing that, TYPESAFE_API_KEY, OPENROUTER_API_KEY or SYSTEM_ONE_BASE_URL.
Does it have dependencies?
No runtime dependencies beyond the standard library.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython