MULTIMODAL ROUTER — OPEN SOURCE (MIT)
Gives a text-only model
eyes, ears and a
filing cabinet.
Multimodal is a configuration tax. Everyone wants it, nobody wants to pay for it. Your client sends one model name — but images need a vision model, audio needs an omni model, and text should stay on the cheap model. Every workaround has a catch: paying vision prices for JSON, splitting providers and breaking conversations, or hardcoding routing into your application.
funcroute is a small C router that sits between your client and your model providers. It inspects the request body, picks the right upstream by content type, rewrites the model field, forwards the request, and translates the answer back. Your client never finds out a different model answered.
Attachments travel inline as base64 data URLs. funcroute never opens a file and accepts no multipart uploads — the bytes come off the stream. The router also trims conversation history to fit your configured budget without ever dropping a message that carries an attachment.
The router picks the specialist for the most restrictive content kind in the request, ordered audio > file > image, on the grounds that whatever gets picked has to be able to read everything in the body. The omni model reads images and PDFs too, so it can take an image and a voice memo at once.
The useful part of that table is the routing column, not the latency. Every audio-bearing row went to a different vendor than every text-only row, and the client asked for the same model name throughout.
One model name
Your client sends one URL and one model name. funcroute rewrites the model field per request — the client never knows a different model answered.
~4,000 lines of C
Five pkg-config dependencies, no vendored code. One binary, no runtime. Starts in milliseconds. Read it all in a sitting.
OpenAI + Ollama
Speaks both dialects. Translates between them transparently. No matter which client you use, funcroute handles the conversion.
Conversation trimming
Trims history to fit budget without dropping a message that carries an attachment. Tool call groups are kept atomic.
No dependencies
Not an inference engine, not a proxy for your whole stack, not a load balancer. It does one thing: route by content type.
MIT licensed
Free and open source. Build it, ship it, embed it. One JSON config file. No dashboards, no services, no DSL.
Both route model traffic, but they answer different questions. funcroute looks at what is attached to a request — image, audio, file — and picks a specialist model that can read it. Sokka looks at what the request is asking and applies task classification, complexity estimation, and cost/latency/quality policy.
They compose. Run funcroute behind Sokka and a request gets both content-aware model selection and full routing policy. funcroute is the open-source edge router; Sokka is the commercial control plane.
funcroute is MIT-licensed and available on GitHub. Build from source with make — the only dependencies are libcurl, libjq, and a few standard system libraries.
funcroute is not an inference engine, a load balancer, or a way to make an expensive model cheap. It does not do prompt rewriting, semantic routing, caching, budgets, retries, or load balancing across keys. It does one thing: pick an upstream by content type. For the grown-up features, consider running funcroute behind LiteLLM, Portkey, or Sokka. funcroute is a personal tool that turned out to be reliable enough to publish — not a product for every team.