Vortex: cache-aware model selection

Automatic model selection based on task suitability, cache reuse, and estimated cost.

Vortex selects a model for each user turn based on the task and its estimated cost. It compares a strong baseline with a lower-cost candidate.

In development. Vortex is a local prototype. The hosted API does not accept munito/vortex yet.

How it works

  • Check whether each model supports the request and suits the task.
  • Compare input, cached input, expected output, and decision costs.
  • Switch only when the expected saving exceeds a configured margin.

Vortex keeps the selected model through the turn's tool calls, then reassesses on the next user turn. Uncertain suitability selects the strong baseline. Generation errors return to the caller without an automatic retry.

Why cache matters

A cheaper model must process any history that its own cache cannot reuse. For a small task in a long conversation, a stronger model with a warm cache can therefore cost less.

A switch transfers no cache state. Returning to a model can reuse its unchanged prefix before expiry. See Prompt caching for cache behavior and usage fields.

Current support

The prototype supports streaming Chat Completions, stateless Responses, and Messages, with caller-managed function tools. Image input works across all three APIs. Chat Completions also accepts audio and video when the configured model supports them. Send the complete conversation history with each request.