AI Skill Hub 推荐使用:模型大师 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
模型大师 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
模型大师 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install model-maestro
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install model-maestro
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/skymoonsun/model-maestro
cd model-maestro
pip install -e .
# 验证安装
python -c "import model_maestro; print('安装成功')"
# 命令行使用
model-maestro --help
# 基本用法
model-maestro input_file -o output_file
# Python 代码中调用
import model_maestro
# 示例
result = model_maestro.process("input")
print(result)
# model-maestro 配置文件示例(config.yml) app: name: "model-maestro" debug: false log_level: "INFO" # 运行时指定配置文件 model-maestro --config config.yml # 或通过环境变量配置 export MODEL_MAESTRO_API_KEY="your-key" export MODEL_MAESTRO_OUTPUT_DIR="./output"
<p align="center"> <img src="docs/assets/cover.png" alt="Model Maestro" width="720" /> </p>
<p align="center"> <strong>Config-driven Unified LLM Gateway</strong> </p>
<p align="center"> Route, load-balance and manage Ollama, OpenAI and other LLM providers through a single authenticated API. Model Maestro gives you user-based access control, model mapping, token usage tracking, health-checked node pooling and a modern Next.js admin dashboard — all wired to PostgreSQL + Redis. </p>
<p align="center"> <img src="https://img.shields.io/badge/Python-3.11-blue?logo=python&logoColor=white" /> <img src="https://img.shields.io/badge/FastAPI-0.109.0-009688?logo=fastapi&logoColor=white" /> <img src="https://img.shields.io/badge/Uvicorn-0.27.0-000000?logo=uvicorn&logoColor=white" /> <img src="https://img.shields.io/badge/PostgreSQL-15-336791?logo=postgresql&logoColor=white" /> <img src="https://img.shields.io/badge/Redis-7-DC382D?logo=redis&logoColor=white" /> <img src="https://img.shields.io/badge/Next.js-16.1.6-000000?logo=next.js&logoColor=white" /> <img src="https://img.shields.io/badge/React-19.2.3-61DAFB?logo=react&logoColor=black" /> <img src="https://img.shields.io/badge/Tailwind_CSS-v4-06B6D4?logo=tailwindcss&logoColor=white" /> <img src="https://img.shields.io/badge/Docker-2496ED?logo=docker&logoColor=white" /> </a> </p>
<p align="center"> <a href="#quick-start"><strong>Quick Start</strong></a> · <a href="#features"><strong>Features</strong></a> · <a href="#architecture"><strong>Architecture</strong></a> · <a href="#api-reference"><strong>API</strong></a> · <a href="#admin-panel"><strong>Admin Panel</strong></a> </p>
---
gpt-oss:120b) to real names (gpt-oss:120b-cloud) via PostgreSQL with JSON-file caching.node:trmix:kimi-k2.6:latest routes directly to the node with code trmix.Authorization: Bearer header forwarding.cursor node type. Automatically routes OpenAI-compatible requests to Cursor's backend (StandardAgents proxy or Cursor directly) with health checks and model discovery./api/show) and max_model_len from vLLM (/v1/models) directly from the admin UI./api/chat, /api/generate and /v1/chat/completions./v1/chat/completions, /v1/completions, /v1/embeddings and /v1/models endpoints./api/generate, /api/chat, /api/embeddings, /api/tags, /api/show, /api/copy, /api/delete, /api/pull, /api/push, /api/create./grafana/assistant/*) for Grafana-native AI features.<tool_calls><invoke>, <CallMcpTool>, <tool_call name="...">) to OpenAI tool_calls format in streaming and non-streaming responses. Kimi/Moonshot <|tool_calls_section_begin|> format also supported.---
---
---
1. Add the official Antigravity OAuth credentials to .env:
GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=http://localhost:3000/admin/oauth/callback
2. Restart the container: docker compose restart maestro 3. In the admin panel, create a node with Node Type = antigravity 4. Click Google Auth on the node detail page and sign in 5. Click Sync Models to fetch available models
1. Create a node with Node Type = bedrock 2. Set Base URL to your AWS region endpoint, e.g. https://bedrock-runtime.us-east-1.amazonaws.com 3. Add AWS credentials in the node detail page: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY 4. Click Sync Models to fetch available foundation models
1. Go to Settings in the admin panel 2. Under Tunnel, select your provider: - Cloudflare (Quick): leave hostname empty — a random URL is generated automatically - Cloudflare (Named): fill hostname (e.g. api.example.com), api_token, account_id and optionally zone_id - ngrok: fill api_token with your ngrok auth token 3. Click Start 4. The public URL will appear in the public_url field once the tunnel is active
Add to ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"brave": {
"enabled": true,
"config": {
"webSearch": {
"apiKey": "<maestro-jwt-token>"
}
}
}
}
}
}
Use the patcher script to automatically redirect OpenClaw's Brave URL to your Maestro instance.
For the complete setup guide (including cron configuration, manual testing, and backend proxy options), see docs/OPENCLAW_BRAVE_SEARCH.md.
---
Requires Docker & Docker Compose.
```bash
Force routing to Antigravity via node prefix:
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-d '{"model": "node:antigravity:gemini-3-flash", "messages": [{"role":"user","content":"Hello"}]}'
Or use model mappings to route transparently.
Force routing to Bedrock via node prefix:
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-d '{"model": "node:bedrock:us.anthropic.claude-3-5-sonnet-20241022-v2:0", "messages": [{"role":"user","content":"Hello"}]}'
Or use model mappings to route transparently.
cp .env.example .env
Copy .env.example to .env and set:
```env
curl -X POST http://localhost:8000/admin/tunnel/start \ -H "Authorization: Bearer $ADMIN_TOKEN"
curl -X POST http://localhost:8000/admin/nodes \ -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "main", "base_url": "http://localhost:11434", "priority": 100, "code": "trmix", "node_type": "ollama" }'
curl -X POST http://localhost:8000/admin/tunnel/start \ -H "Authorization: Bearer $ADMIN_TOKEN"
curl http://localhost:8000/admin/tunnel/config \ -H "Authorization: Bearer $ADMIN_TOKEN"
curl -X PUT http://localhost:8000/admin/tunnel/config \ -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "provider": "cloudflare", "api_token": "your-cloudflare-api-token", "account_id": "your-account-id", "hostname": "api.example.com" }'
**Model Groups**
bash
curl http://localhost:8000/grafana/assistant/config \ -H "Authorization: Bearer $TOKEN"
curl -X POST http://localhost:8000/grafana/assistant/config \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"model": "gpt-oss:120b", "temperature": 0.7}'
docker compose -f docker-compose.dev.yml up --build -d
ADMIN_TOKEN=change-this-for-production
```bash
For the complete API reference with all request/response examples, see docs/API.md.
| Method | Endpoint | Description |
|---|---|---|
POST | /api/chat | Chat completions (Ollama format) |
POST | /api/generate | Text generation |
POST | /api/embeddings | Generate embeddings |
GET | /api/tags | List available models |
POST | /api/show | Show model info |
POST | /api/copy | Copy model |
DELETE | /api/delete | Delete model |
POST | /api/pull | Pull model |
POST | /api/push | Push model |
POST | /api/create | Create model from Modelfile |
POST | /v1/completions | OpenAI-compatible completions |
POST | /v1/embeddings | OpenAI-compatible embeddings |
GET | /res/v1/web/search | Brave Search-compatible web search |
Example — Chat
curl -X POST http://localhost:8000/api/chat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss:120b",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
Example — Streaming Chat
curl -X POST http://localhost:8000/api/chat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss:120b",
"messages": [{"role": "user", "content": "Tell me a story"}],
"stream": true
}'
Users
```bash
docker compose -f docker-compose.dev.yml logs -f maestro
Model Maestro is designed to be the backend for modern AI-powered IDEs and tools. See the full integration guide for step-by-step setup:
ANTHROPIC_BASE_URL override./scripts/codex-maestro for the Codex Desktop App (auto-configures Responses API streaming via Maestro; no manual env vars needed). For the VS Code extension or CLI, set OPENAI_BASE_URL + OPENAI_API_KEY. Use a Maestro model group as the default model for dynamic switching without restarting Codex.openclaw.json provider configurationFor complete configuration examples and troubleshooting, see docs/IDE_INTEGRATION.md.
Model Maestro provides a Brave Search-compatible endpoint (/res/v1/web/search) that can be used by OpenClaw and other clients expecting Brave Search semantics.
X-Subscription-Token or Authorization: Bearer <token>Restart the full stack
docker compose -f docker-compose.dev.yml down
docker compose -f docker-compose.dev.yml up --build -d
Run migrations manually
docker exec maestro alembic upgrade head
Re-run seeds
docker exec maestro python -m app.seeder --reset
docker exec maestro python -m app.seeder
Clear cache
docker exec maestro python scripts/clear_cache.py
Check PostgreSQL health
docker exec maestro-postgres pg_isready -U maestro_user -d maestro
Check Redis
docker exec maestro-redis redis-cli ping
View logs
```bash
Model Maestro 是一个基于配置驱动的统一 LLM Gateway(大模型网关)。它通过单一的身份验证 API,实现对 Ollama、OpenAI 以及其他 LLM 提供商的路由、负载均衡与统一管理。系统内置了基于用户的访问控制、模型映射(Model Mapping)、Token 使用量追踪以及具备健康检查功能的节点管理,旨在为开发者提供一个安全、可控的模型接入层。
本项目提供了一套完整的模型管理方案:支持通过 JWT Authentication 进行 Bearer-token 身份验证;配备基于 Next.js 16 的 Admin Dashboard,实现用户、节点、模型、分组及审计日志的可视化管理;强大的 Model Mapping 功能允许通过 PostgreSQL 和 JSON 缓存将自定义显示名称转换为真实的后端模型名称;同时支持针对特定节点的模型映射绑定,确保不同节点间模型调用的隔离性与灵活性。
项目部署主要通过 Docker 实现。首先需在 `.env` 文件中配置 Antigravity OAuth 凭据,随后使用 `docker compose restart maestro` 重启容器。在 Admin Panel 中创建 Node Type 为 `antigravity` 的节点并完成 Google Auth 授权。对于 AWS Bedrock 节点,需在节点详情页配置相应的 AWS 区域 Endpoint 及 `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`,并点击 Sync Models 同步模型列表。此外,系统内置 Tunnel 功能,支持通过 Cloudflare 或 ngrok 快速实现公网访问。
Model Maestro 支持标准的 Chat completions、streaming、tool calls 及图像输入。对于具备 Thinking 能力的模型(如 gemini-3-pro, claude-opus-4-6-thinking)提供原生支持。用户可以通过特定的 Node Prefix(例如 `node:antigravity:...` 或 `node:bedrock:...`)强制将请求路由至特定节点,也可以利用 Model Mapping 实现透明的路由转换。系统还支持 Endpoint fallback 机制,可在 Sandbox、Daily 与 Prod 环境间自动切换。
项目配置通过 `.env` 文件进行管理。部署前请务必将 `.env.example` 复制为 `.env` 并根据实际环境修改关键参数。对于需要公网访问的场景,可在 Admin Panel 的 Settings -> Tunnel 中配置 Cloudflare(支持 Quick 随机 URL 或 Named 自定义域名)或 ngrok。若需通过 API 启动 Tunnel,可使用 `curl` 调用 `/admin/tunnel/start` 接口。请确保在生产环境中修改 `ADMIN_TOKEN` 以保障管理接口的安全。
本项目采用全栈架构,包含 PostgreSQL、Redis、FastAPI 与 Next.js。所有管理类接口均需通过 `ADMIN_TOKEN` 进行身份验证。API 层面完全兼容 OpenAI 风格的 Chat completions 接口,并针对 Bedrock Converse API 进行了深度优化,支持自动进行 AWS SigV4 签名。此外,系统还提供了一个兼容 Brave Search 语义的 `/res/v1/web/search` 接口,方便 OpenClaw 等客户端进行 Web Search 集成。
Model Maestro 被设计为现代 AI 驱动型 IDE 和工具的强大后端。它深度集成了 Claude Code(通过覆盖 `ANTHROPIC_BASE_URL`)和 Codex 等开发工具。同时,通过提供兼容的 Web Search 接口,它可以无缝接入各类 AI Agent 工作流,将 Ollama Web Search 或其他搜索能力转化为标准化的 API 服务,实现从模型路由到工具调用的全链路自动化。
遇到问题时,可以尝试通过 `docker compose down` 后重新 `up --build` 来重启全栈服务。如果数据库结构出现异常,可以使用 `docker exec maestro alembic upgrade head` 手动运行数据库迁移命令。若需重置数据,可通过 `docker exec maestro python -m app.seeder --reset` 重新运行数据种子填充程序。对于生产环境,请务必确保 `ADMIN_TOKEN` 已被修改为高强度随机字符串。
统一LLM网关,支持多个AI服务,代码质量高
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
总体来看,模型大师 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | model-maestro |
| 原始描述 | 开源AI工作流:Unified LLM Gateway that proxies multiple providers (Ollama, OpenAI-compatible) 。⭐6 · Python |
| Topics | aipythonworkflow |
| GitHub | https://github.com/skymoonsun/model-maestro |
| 语言 | Python |
收录时间:2026-05-25 · 更新时间:2026-05-26 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端