A local proxy that provides a singular OpenAI compatible API for all your AI services. Try it out with your Jetbrains IDE
Project description
demuxai
EXPERIMENTAL: this is a work-in-progress, and for local usage. Not for production!
A lightweight proxy that provides a singular OpenAI compatible API for all your AI services.
- Aggregates upstream APIs' models and prefixes them with a provider ID
- The provider ID is used to route the request to the upstream provider
- Before sending the request upstream, the provider ID is stripped from the request
Named after a demultiplexer, takes one input and distributes it to one or more outputs.
Background
I wanted an API proxy that I could configure in my Jetbrains IDE, but not limit me to that provider for all settings. For example, I use a local Ollama model for instant completion, and other providers for chat or agentic tasks. Additionally, there are many free tiers available, so this abstraction layer can implement more advanced routing behaviors to take full advantage of free offerings, without interruption.
Features
Supports the following providers:
- Ollama
- Ollama Cloud
- Github Models
- Mistral AI (and Codestral)
- Fireworks AI Serverless
Currently, demuxai has the following capabilities:
- Legacy completion endpoint
- Chat completion
- FIM completion
- Embedding generation
- Streaming responses
Planned
The following features are planned:
- Timing statistics (WIP)
- Token statistics (WIP)
- Complete most of the API spec
- Completion ID routing back to the original provider
- Round-robin and failover providers
- Consensus providers to summarize responses from multiple upstream providers
- Split providers that route to upstream providers based off content type (i.e. python vs JS)
- Configuration like routedns
Alternatives
Running
Create a config.yml (see config.spec.yml) and run demuxai in the directory of that file, or pass its path as -c /path/to/config.yml. Run demuxai -h to see help information.
demuxai -c /path/to/config.yml
Example config
Export your API keys in environment variables with the names specified in each ${...}. Remove any providers you don't use.
demuxai:
listen: '127.0.0.1'
port: 6041
cache_seconds: 3600
timeout_seconds: 300
providers:
ollama:
type: ollama
name: Local Ollama
description: Local Ollama for testing
mistral:
type: mistralai
name: Mistral AI
api_key: ${MISTRAL_API_KEY}
exclude_models:
- voxtral-*
- mistral-ocr-*
- mistral-moderation-*
codestral:
type: codestral
name: Codestral from Mistral AI
api_key: ${CODESTRAL_API_KEY}
github:
type: github
name: GitHub Models
api_key: ${GITHUB_TOKEN}
fireworks:
type: fireworks
name: Fireworks AI Serverless
api_key: ${FIREWORKS_API_KEY}
exclude_models:
- accounts/fireworks/models/flux*
AI Disclosure
LLMs were used in the development of this project, mostly for brainstorming and bootstrapping code, particularly tests. The contribution proportion is roughly 80 / 20, human and AI code respectively.
License
MIT :: Copyright 2026 Blaine Jester
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file demuxai-0.0.2-py3-none-any.whl.
File metadata
- Download URL: demuxai-0.0.2-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc88fd486cece66e294a75950ed69020995347a46578a74d18b6c094ace6277c
|
|
| MD5 |
3d9c1b99a659682d21068e2576a9ea8b
|
|
| BLAKE2b-256 |
2222c90fa407dfb75d47c4d814e6f866de448a44b8da0ca9814b8850ea7b8ec8
|
Provenance
The following attestation bundles were made for demuxai-0.0.2-py3-none-any.whl:
Publisher:
release.yml on bjester/demuxai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
demuxai-0.0.2-py3-none-any.whl -
Subject digest:
fc88fd486cece66e294a75950ed69020995347a46578a74d18b6c094ace6277c - Sigstore transparency entry: 976805917
- Sigstore integration time:
-
Permalink:
bjester/demuxai@13d96e7d095034b0c29a8281745660b4883d7049 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/bjester
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@13d96e7d095034b0c29a8281745660b4883d7049 -
Trigger Event:
release
-
Statement type: