Jev directory
CommunityJev Repos & SDKs
VibeSort
Proof-of-concept Ruby gem that sorts arrays by calling an AI model instead of a sorting algorithm. Supports OpenAI, Anthropic, Gemini, Groq, SpaceXAI Grok, OpenRouter, and TypeSafe's Jev decision model, inferring the provider from the API key prefix.
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 23, 2026
Highlights
- Ruby gem that sorts arrays by asking an AI model rather than running a sorting algorithm.
- Supports OpenAI Chat Completions, Anthropic Messages, Google Gemini, Groq, SpaceXAI Grok, and OpenRouter APIs.
- A TypeSafe Jev (System One) provider sorts any Ruby objects through four strategies without rewriting the data.
- Provider is inferred from the API key prefix when the provider: option is omitted.
- Requires Ruby 3.0+ and Faraday; MIT licensed; described as a proof-of-concept, not for production.
Questions about this entry
Short answers drawn from the linked project or page.
Add gem "vibe-sort" to your Gemfile and run bundle install, or run gem install vibe-sort directly. Ruby 3.0 or newer (MRI) and Bundler 2.0+ are required, along with an API key for at least one supported provider.
The OpenAI Chat Completions API, the Anthropic Messages API, the Google Gemini API, and the OpenAI-compatible Groq, SpaceXAI (xAI), and OpenRouter APIs, plus TypeSafe's Jev decision model (System One).
It infers the provider from the API key's prefix, so a key from OpenAI, Anthropic, Gemini, Groq, SpaceXAI, or OpenRouter works without passing provider:. For Jev, pass provider: :jev with a TYPESAFE_API_KEY.
It returns a hash with success:, sorted_array:, and error: keys, not an Array. Check result[:success] before reading result[:sorted_array], and raise result[:error] when the call fails.
With the default providers the input must be a non-empty array of numbers and/or strings. For other objects or sort_by behavior, use a TypeSafe Jev client and call sort(items, by: "criterion", order: :asc) or sort_with_metadata.
No. The gem describes itself as a proof-of-concept and educational project. Traditional sorting algorithms are more efficient, reliable, and cost-effective, and every sort becomes a paid network call with no guaranteed result.
It is MIT licensed and has zero dependencies beyond Faraday. Internet connectivity is required because each sort performs a remote API call, and the provider is detected from the API key format.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.