dabao-yi

dabao-yi / model-flux

Public

ModelFlux: OpenAI-compatible model traffic router with health-aware key-pool scheduling and failover

13
0
85% credibility
Found May 27, 2026 at 13 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

ModelFlux is a smart traffic router for AI services that provides one unified entry point for all your AI-powered tools. Instead of managing multiple API keys and connections separately, you connect everything to ModelFlux, which intelligently routes requests to the right AI service, balances load across your accounts, and automatically handles failures by switching to backup accounts. It includes a beautiful web dashboard where you can manage your AI service accounts, set up model name shortcuts, and monitor everything in real-time. The project works great with tools like Codex, CLIProxyAPI, sub2api, and any OpenAI-compatible application.

How It Works

1
πŸ’‘ You need to use multiple AI services

You're using Codex, CLIProxyAPI, or another tool that needs AI capabilities, but managing different accounts and API keys is getting complicated.

2
πŸ”§ You install ModelFlux

You download and set up ModelFlux on your computer or server. It runs quietly in the background, ready to help manage your AI traffic.

3
πŸ”‘ You connect your AI service accounts

In the friendly web dashboard, you add your API keys for the AI services you want to use - like DeepSeek, MiMo, or OpenAI. Everything stays on your own machine.

4
πŸ—ΊοΈ You set up your model routes

You create simple shortcuts for model names - like saying 'when I ask for gpt-5.5, actually use mimo-v2-pro'. The dashboard shows you exactly how requests will flow.

5
You connect your existing tools
πŸ’»
Apps on your computer

You enter the local address (127.0.0.1:19090) and your access key into Codex, CPA, or any OpenAI-compatible tool

πŸ“¦
Apps running in containers

You use the service name (model-flux:19090) so containers can find ModelFlux on the same network

6
πŸš€ Everything starts working

Your requests flow through ModelFlux to the AI services. If one account has issues, ModelFlux automatically switches to another and keeps your work going.

✨ You have one reliable AI endpoint

All your AI tools now use a single, stable entry point. ModelFlux handles the routing, balances the load, and recovers from problems automatically - you just focus on your work.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 13 to 13 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is model-flux?

ModelFlux is an OpenAI-compatible API router that sits between your clients and multiple AI providers, intelligently managing which API keys get used. When you're running a setup with Codex, sub2api, or similar front proxies, this tool gives you one stable entry point while handling the messy work of API key rotation, failover, and health monitoring behind the scenes. It speaks the OpenAI Responses and Chat Completions APIs, so it integrates with standard tools without requiring code changes. The React admin console lets you configure provider pools, set model aliases like mapping "gpt-5.5" to a specific Mimo model, and monitor which keys are healthy or cooling down after rate limits.

Why is it gaining traction?

The standout feature is the health-aware scheduling. ModelFlux tracks each API key's state -- rate limited, auth error, insufficient balance, temporary failure -- and automatically routes around failures. When a key cools down, it probes it and brings it back online without manual intervention. This means fewer "all keys failed" errors for end users. The model alias system and protocol adapters also solve real headaches: you can rename models client-side and the router handles the protocol differences between providers like Mimo and DeepSeek.

Who should use this?

DevOps engineers managing multi-provider setups where reliability matters. If you're running Codex, CLIProxyAPI, or sub2api with multiple upstream accounts and getting intermittent failures, this reduces operational firefighting. Also useful for developers who want a single OpenAI-compatible endpoint that survives provider outages without code changes.

Verdict

ModelFlux solves a real operational problem with solid architecture, comprehensive documentation, and a functional admin console. At 13 stars it's early-stage but the test coverage, Docker setup, and Chinese/English docs suggest a project with clear direction. The credibility score of 0.85 indicates decent code quality and documentation. Try it if you need automated failover for AI API traffic; stick with simpler proxy-only setups if your providers are already reliable.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.