mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 13:52:09 +03:00
OmniRoute is an intelligent API gateway that unifies 20+ AI providers behind a single OpenAI-compatible endpoint. Features include intelligent routing with 6 strategies, multi-format translation (OpenAI/Claude/Gemini/Responses API), circuit breakers, semantic caching, combo fallback chains, real-time health monitoring, and a full dashboard with provider management, analytics, and CLI tool integration. Key highlights: - 20+ providers (Claude Code, Codex, Gemini CLI, GitHub Copilot, iFlow, Qwen, Kiro, etc.) - 6 routing strategies (Fill First, Round Robin, P2C, Random, Least Used, Cost Optimized) - Export/Import database backup with full archive support - Translator Playground with 4 modes (Playground, Chat Tester, Test Bench, Live Monitor) - 100% TypeScript across src/ and open-sse/ - Docker support with multi-stage builds - Comprehensive documentation and 9 dashboard screenshots
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import chalk from "chalk";
|
|
import ora from "ora";
|
|
|
|
/**
|
|
* UI Helper Functions
|
|
*/
|
|
|
|
export function success(message) {
|
|
console.log(chalk.green(`\n✓ ${message}\n`));
|
|
}
|
|
|
|
export function error(message) {
|
|
console.log(chalk.red(`\n✗ ${message}\n`));
|
|
}
|
|
|
|
export function info(message) {
|
|
console.log(chalk.blue(`\n${message}\n`));
|
|
}
|
|
|
|
export function warn(message) {
|
|
console.log(chalk.yellow(`\n⚠ ${message}\n`));
|
|
}
|
|
|
|
export function gray(message) {
|
|
console.log(chalk.gray(message));
|
|
}
|
|
|
|
export function spinner(text) {
|
|
return ora(text);
|
|
}
|
|
|
|
export function printSection(title) {
|
|
console.log(chalk.blue(`\n${title}\n`));
|
|
}
|
|
|
|
export function printKeyValue(key, value, isSuccess = false) {
|
|
const color = isSuccess ? chalk.green : chalk.gray;
|
|
console.log(color(` ${key}: ${value}`));
|
|
}
|
|
|
|
export function printList(items, isSuccess = false) {
|
|
const symbol = isSuccess ? "✓" : "✗";
|
|
const color = isSuccess ? chalk.green : chalk.gray;
|
|
items.forEach((item) => {
|
|
console.log(color(` ${symbol} ${item}`));
|
|
});
|
|
}
|