Amux banner
isboyjc isboyjc

Amux

AI community

Description

Bidirectional LLM API adapter with IR pattern. Seamlessly convert between OpenAI, Anthropic, DeepSeek, and more. TypeScript, zero deps | 基于 IR 模式的双向 LLM API 适配器,无缝转换 OpenAI、Anthropic、DeepSeek 等多个提供商。TypeScript类型支持、零依赖。

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Amux

Bidirectional LLM API Adapter - A unified infrastructure for converting between different LLM provider APIs

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/) [![pnpm](https://img.shields.io/badge/pnpm-8.15-orange)](https://pnpm.io/)

🌟 Features

  • 🔄 Bidirectional Conversion: Convert between any LLM provider API formats
  • 🎯 Type-Safe: Full TypeScript support with comprehensive type definitions
  • 🔌 Extensible: Easy to add custom adapters for new providers
  • ⚡ Zero Dependencies: Core package has zero runtime dependencies
  • 🧪 Well-Tested: High test coverage with comprehensive test suites
  • 📦 Tree-Shakable: Optimized for modern bundlers
  • 🚀 8 Official Adapters: OpenAI, Anthropic, DeepSeek, Moonshot, Zhipu, Qwen, Gemini, MiniMax

🚀 Quick Start

Installation

# Install core package and adapters you need
pnpm add @amux.ai/llm-bridge @amux.ai/adapter-openai @amux.ai/adapter-anthropic

Basic Usage

import { createBridge } from '@amux.ai/llm-bridge'
import { openaiAdapter } from '@amux.ai/adapter-openai'
import { anthropicAdapter } from '@amux.ai/adapter-anthropic'

// Create a bridge: OpenAI format in → Anthropic API out
const bridge = createBridge({
  inbound: openaiAdapter,
  outbound: anthropicAdapter,
  config: {
    apiKey: process.env.ANTHROPIC_API_KEY,
    baseURL: 'https://api.anthropic.com'
  }
})

// Send OpenAI-format request, get OpenAI-format response
// But actually calls Claude API under the hood
const response = await bridge.chat({
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'Hello!' }]
})

console.log(response.choices[0].message.content)

📦 Packages

Package Description Version Status
@amux.ai/llm-bridge Core IR and a