经 AI Skill Hub 精选评估,LLM网关 获评「推荐使用」。已获得 1.2k 颗 GitHub Star,这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
一款开源AI工具,帮助您管理和分析来自多个LLM提供商的请求,提高效率和准确性。
LLM网关 是一款基于 TypeScript 开发的开源工具,专注于 ai、ai-gateway、analytics 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
一款开源AI工具,帮助您管理和分析来自多个LLM提供商的请求,提高效率和准确性。
LLM网关 是一款基于 TypeScript 开发的开源工具,专注于 ai、ai-gateway、analytics 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g llmgateway # 方式二:npx 直接运行(无需安装) npx llmgateway --help # 方式三:项目依赖安装 npm install llmgateway # 方式四:从源码运行 git clone https://github.com/theopenco/llmgateway cd llmgateway npm install npm start
# 命令行使用
llmgateway --help
# 基本用法
llmgateway [options] <input>
# Node.js 代码中使用
const llmgateway = require('llmgateway');
const result = await llmgateway.run(options);
console.log(result);
# llmgateway 配置说明 # 查看配置选项 llmgateway --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export LLMGATEWAY_CONFIG="/path/to/config.yml"
LLM Gateway is an open-source API gateway for Large Language Models (LLMs). It acts as a middleware between your applications and various LLM providers, allowing you to:
For enterprise licensing, please contact us at contact@llmgateway.io
You can use LLM Gateway in two ways:
Use Docker-managed volumes for the unified image. Do not bind-mount a host directory directly to /var/lib/postgresql/data, because PostgreSQL initialization inside the container needs to set permissions on that directory and that can fail depending on the host filesystem and ownership.
export LLM_GATEWAY_SECRET="$(openssl rand -base64 32 | tr -d '\n')"
export GATEWAY_API_KEY_HASH_SECRET="$(openssl rand -base64 32 | tr -d '\n')"
./scripts/run-unified-container.sh
If you prefer a one-off docker run, use named volumes instead of ~/some-host-dir:
docker volume create llmgateway_postgres
docker volume create llmgateway_redis
docker run -d \
--name llmgateway \
--restart unless-stopped \
-p 3002:3002 \
-p 3003:3003 \
-p 3005:3005 \
-p 3006:3006 \
-p 4001:4001 \
-p 4002:4002 \
-v llmgateway_postgres:/var/lib/postgresql/data \
-v llmgateway_redis:/var/lib/redis \
-e AUTH_SECRET="$LLM_GATEWAY_SECRET" \
-e GATEWAY_API_KEY_HASH_SECRET="$GATEWAY_API_KEY_HASH_SECRET" \
ghcr.io/theopenco/llmgateway-unified:latest
pnpm i && pnpm run setup
This will install all dependencies, start Docker services, sync the database schema, and seed initial data.
Note for WSL2 users: Ensure Docker Desktop is running with WSL integration enabled.
pnpm dev
3. Build for production:
pnpm build
curl -X POST https://api.llmgateway.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}'
该工具提供了一个统一的LLM请求管理和分析平台,易于使用和扩展,但仍需要进一步优化和完善。
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
AI Skill Hub 点评:LLM网关 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | llmgateway |
| Topics | aiai-gatewayanalytics |
| GitHub | https://github.com/theopenco/llmgateway |
| License | NOASSERTION |
| 语言 | TypeScript |
收录时间:2026-05-24 · 更新时间:2026-05-24 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。