能力标签
brick-SR1开源AI工具
🛠
AI工具

brick-SR1开源AI工具

基于 Jupyter Notebook · 开源免费,本地部署,数据完全自主可控
英文名:brick-SR1
⭐ 62 Stars 🍴 3 Forks 💻 Jupyter Notebook 📄 Apache-2.0 🏷 AI 7.5分
7.5AI 综合评分
installableclaude-codecodexllmopen-modelsroutingjupyter notebook
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,brick-SR1开源AI工具 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。

📚 深度解析

brick-SR1开源AI工具 是一款基于 Jupyter 的开源工具,在 GitHub 上收获 0k+ Star,是installable、claude-code、codex、llm领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
brick-SR1开源AI工具 依赖 Jupyter 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Jupyter 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 brick-SR1开源AI工具 的版本更新,及时通知重要功能变化。

📋 工具概览

brick是一款基于复杂性和能力提取的智能AI模型路由器,开源且易于使用,突出其在AI模型管理方面的价值。

brick-SR1开源AI工具 是一款基于 Jupyter Notebook 开发的开源工具,专注于 installable、claude-code、codex 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 62
开发语言
Jupyter Notebook
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
7.5 分
工具类型
AI工具
Forks
3

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

brick是一款基于复杂性和能力提取的智能AI模型路由器,开源且易于使用,突出其在AI模型管理方面的价值。

brick-SR1开源AI工具 是一款基于 Jupyter Notebook 开发的开源工具,专注于 installable、claude-code、codex 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 克隆仓库
git clone https://github.com/regolo-ai/brick-SR1
cd brick-SR1

# 查看安装说明
cat README.md

# 按 README 完成环境依赖安装后即可使用
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
brick-sr1 --help

# 基本运行
brick-sr1 [options] <input>

# 详细使用说明请查阅文档
# https://github.com/regolo-ai/brick-SR1
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# brick-sr1 配置说明
# 查看配置选项
brick-sr1 --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export BRICK_SR1_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 84/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<img width="1640" height="393" alt="Brick (6)" src="https://github.com/user-attachments/assets/4b9dc94a-4767-4d0c-80e7-73f77517d8ce" />

🗂️ What's in the repo

A monorepo to run, use, and reproduce every result in the Brick paper.

ComponentPathPurpose
**Router** (Go + Rust)[apps/router/](apps/router/)OpenAI-format gateway: capability + complexity classifiers, dispatch to the best backend
**CLI** (brick)[apps/cli/](apps/cli/)TypeScript/oclif companion to self-host in one command
**Training**[packages/training/](packages/training/)ModernBERT capability sweep + complexity LoRA recipes
**Evaluation**[packages/evals/](packages/evals/)Dataset A pipeline + 3-judge majority-vote panel
**Baselines**[packages/evals/baselines/](packages/evals/baselines/)Zero-shot RouteLLM, FrugalGPT, Cascade comparisons
**Paper**[docs/paper/](docs/paper/)LaTeX source, figures, compiled PDF

<details> <summary>Full directory tree</summary>

brick-SR1/
├── apps/
│   ├── router/                 # Go + Rust gateway (was vLLM Spatial Router fork)
│   │   ├── src/spatial-router/ #   Go (HTTP proxy, routing pipeline)
│   │   ├── candle-binding/     #   Rust (ML embeddings via candle)
│   │   ├── ml-binding/         #   Rust (Linfa classical ML)
│   │   ├── nlp-binding/        #   Rust (BM25 + n-gram)
│   │   └── Dockerfile
│   └── cli/                    # @regolo-ai/brick CLI (TypeScript + oclif + ink)
├── packages/
│   ├── training/               # Dataset B pipeline + ModernBERT/complexity training
│   ├── evals/                  # Dataset A graders + 00..140 pipeline + baselines/
│   └── datasets/               # HF download recipes (no data in git)
├── docs/
│   ├── paper/                  # paper.tex + figures + compiled PDF
│   └── quickstart/             # quick.md, serve.md, eval.md
├── deploy/                     # docker-compose, addons, Windows installer
├── config.yaml                 # router runtime config
├── package.json / pyproject.toml  # npm + uv workspace roots
└── Makefile                    # build / test / lint / docker-build / release

</details>

---

Setup

brick claude on     # wires ANTHROPIC_BASE_URL in ~/.claude/settings.json, auto-starts the router

Then: 1. Open a new Claude Code session (your current session is unaffected). 2. In the /model picker, select brick-claude (it sits alongside the built-in opus/sonnet/haiku aliases, which it does not replace).

To revert:

brick claude off    # restores ANTHROPIC_BASE_URL, optionally stops the router

Use brick claude on --no-start to require an already-healthy router instead of auto-starting one, and brick claude off --stop / --keep to control the router without a prompt.

Setup

brick codex on      # sets model/model_provider to brick in ~/.codex/config.toml, auto-starts the router

This materializes a dedicated Codex profile (the OpenAI-pool skill router) and adds a managed provider pointing at the local router. Start a new Codex session and it now routes through Brick.

To revert:

brick codex off     # restores your previous Codex model/provider

Codex exposes the same 5 modes and status view as Claude Code:

brick codex mode           # or: brick codex eco | lite | mid | pro | max
brick codex status         # live routing dashboard

Use brick codex on --no-start to require an already-healthy router instead of auto-starting one. The Claude and Codex router stacks share host port 8000, so only one can serve at a time; stop the other before wiring.

---

⚡ Quickstart

The fastest working path today is the CLI, which self-hosts the router and wires it into Claude Code for you. Requires Node >= 18 and Docker.

git clone https://github.com/regolo-ai/brick-SR1.git
cd brick-SR1/apps/cli && npm install && npm run build && npm link

brick claude on     # starts the router + wires ANTHROPIC_BASE_URL in ~/.claude/settings.json

Then open a new Claude Code session and pick brick-claude in the /model picker. Every request now routes to haiku / sonnet / opus by capability and complexity. See Brick + Claude Code for modes, the effort picker, and the live brick claude status dashboard.

<details> <summary><b>Prefer a raw OpenAI-compatible gateway (no CLI)?</b></summary>

The image is published on Docker Hub (public, no login required). Run the gateway directly:

docker run --rm -p 18000:18000 \
  -e REGOLO_API_KEY=$REGOLO_API_KEY \
  docker.io/regolo/brick:latest      # or pin a version: docker.io/regolo/brick:2.1.2

Then call it like any OpenAI endpoint, just set "model": "brick":

curl http://localhost:18000/v1/chat/completions \
  -H "Authorization: Bearer $REGOLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"brick","messages":[{"role":"user","content":"Prove that sqrt(2) is irrational"}]}'

The x-selected-model response header tells you which backend Brick picked. That math prompt routes to a reasoning model; "Hello" routes to the cheapest one.

Until then, brick serve (from the CLI above) runs the same router locally from source.

</details>

---

Configure the pool in `config.yaml`

Everything Brick decides comes from config.yaml. The core block is skill_router, where you declare the pool, each model's skill vector, and its cost weight:

skill_router:
  enabled: true
  capabilities:                 # the 6 dimensions every query and model live in
    - coding
    - creative_synthesis
    - instruction_following
    - math_reasoning
    - planning_agentic
    - world_knowledge

  models:
    - model: "qwen3.5-9b"
      skill_vector: [0.71, 0.51, 0.81, 0.91, 0.58, 0.18]   # capability per dimension
      use_reasoning: false
      cost_weight: 0.10                                     # relative price, drives the cost bias
    - model: "deepseek-v4-flash"
      skill_vector: [0.82, 0.66, 0.86, 0.93, 0.62, 0.49]
      use_reasoning: false
      cost_weight: 0.40
    - model: "kimi2.6"
      skill_vector: [0.90, 0.75, 0.87, 0.94, 0.64, 0.34]
      use_reasoning: true
      reasoning_effort: "medium"
      cost_weight: 0.60

Add or swap any OpenAI-compatible backend here; the backends themselves are declared under provider_profiles / model_config (the shipped config points them all at Regolo). Two more blocks let you nudge routing without touching the math:

  keyword_rules:
    - name: "force_coder"       # hard override: send these prompts to a specific model
      mode: "override"
      model: "kimi2.6"
      operator: "OR"
      keywords: ["debug", "refactor", "compile", "write a function"]
    - name: "coding_bias"       # soft nudge: push one capability dimension up
      mode: "bias"
      capability: "coding"
      operator: "OR"
      keywords: ["python", "rust", "sql", "async"]

Other useful sections: brick (multimodal preprocessing: STT, OCR, vision), the r preference knob in r ∈ [-1, 1] (max-saving to max-quality), and the classifier endpoints. The CLI can edit most of this for you (brick add model, brick config edit), or edit the YAML directly. Full field reference: apps/router/README.md.

---

One Query, One Endpoint, Every LLM on Earth.

Brick is a Mixture-of-Models (MoM) routing gateway. It reads each prompt's capability and complexity, then routes it to the best backend in a pool of open- and closed-weight LLMs, matching the strongest single model's quality at a fraction of its cost. No cascades. No wasted calls. Drop-in model: "brick".

CI Release License Last commit Stars Issues

Go Rust Python OpenAI compatible Models on HF

When to use Brick · Quickstart · Why Brick · Claude Code · Codex · FAQ · Benchmarks · How it works · Paper

</div>

---

Works with workflows and subagents

Brick routing is per request. In Claude Code workflows and subagents, each agent's call is routed independently as long as that agent uses brick-claude, so a cheap subagent task can land on haiku while a hard one escalates to opus in the same run.

---

❓ FAQ

<details> <summary><b>How is Brick different from a cascade router like FrugalGPT?</b></summary>

A cascade calls models in sequence (cheap first, escalate on low confidence) and pays for every miss in tokens and latency. Brick makes a single forward decision per query from a capability vector and a complexity score, so there is no wasted call. See Why Brick. </details>

<details> <summary><b>Which backend did Brick pick for my request?</b></summary>

Read the x-selected-model response header. Every /v1/chat/completions and /v1/messages response carries it. </details>

<details> <summary><b>How do I trade cost against quality?</b></summary>

Slide the r knob in r ∈ [-1, 1]. At r = -1 Brick favors the cheapest capable model (max-saving), at r = 1 it favors the strongest (max-quality). For Claude Code the same idea is exposed as 5 named modes, see the 5 modes. </details>

<details> <summary><b>Do I need GPUs to run the gateway?</b></summary>

No. The router and both classifiers run on CPU. GPUs only matter if you self-host the backend LLMs; with a hosted pool (Regolo, Anthropic, etc.) a CPU box is enough. </details>

<details> <summary><b>Can I use my own model pool?</b></summary>

Yes. The pool, per-model skill vectors, costs, and the model_map live in config.yaml (skill_router.models). Add or swap any OpenAI-compatible backend. See apps/router/README.md. </details>

<details> <summary><b>What is the upstream for the OpenAI-compatible endpoint failing with 401/insufficient_quota?</b></summary>

That error comes from the backend provider, not Brick. Check the credential you forward (REGOLO_API_KEY or your own key); Brick passes Authorization through unchanged. </details>

---

🇨🇳 中文文档镜像 AI 翻译 2026-07-09
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

brick-SR1 是一个 Monorepo 项目,旨在完整实现并复现 Brick 论文中的所有实验结果。通过该项目,开发者可以运行、使用并验证 Brick 提出的模型路由机制,确保研究成果的可落地性与可重复性。

⚡ 功能介绍

本项目包含多个核心组件:Router 部分采用 Go 和 Rust 开发,作为一个兼容 OpenAI 格式的网关,能够对请求的 Capability(能力)和 Complexity(复杂度)进行分类,并将其���发至最合适的后端模型;CLI 工具基于 TypeScript/oclif 构建,支持通过单条命令实现自托管;此外还包含用于模型训练的相关模块。

🛠 安装步骤(Docker/pip/源码)

安装过程非常便捷。首先需要确保环境已安装 Node.js (>= 18) 和 Docker。通过克隆仓库并进入 apps/cli 目录进行安装、构建与链接后,运行 `brick claude on` 命令,系统会自动配置 ~/.claude/settings.json 中的 ANTHROPIC_BASE_URL 并启动 Router。若需恢复原状,只需执行 `brick claude off` 即可。

🚀 使用教程

目前最快速的使用路径是通过 CLI 工具。在完成安装并执行 `brick claude on` 后,请开启一个新的 Claude Code 会话(当前会话不受影响)。在 `/model` 选择器中,你会看到一个名为 `brick-claude` 的新选项,它与原有的 opus/sonnet/haiku 别名并列存在,通过它即可直接调用 Brick 路由能力。

⚙️ 配置说明(含 MCP / env)

Brick 的所有决策逻辑均由 `config.yaml` 文件驱动。核心配置位于 `skill_router` 模块,开发者可以在此处声明模型池(Pool),并为每个模型定义其 Skill Vector(能力向量)以及对应的 Cost Weight(成本权重)。配置涵盖了 coding、math_reasoning 等 6 个维度的能力评估。

🔌 API 说明

Brick 是一个 Mixture-of-Models (MoM) 路由网关。它通过解析每个 Prompt 的 Capability 和 Complexity,从包含开源与闭源 LLM 的模型池中精准路由至最匹配的后端。这种设计旨在匹配最强单体模型的质量,同时仅消耗极小的成本,避免了传统的级联调用(Cascade)带来的 Token 浪费和延迟问题。

🔄 工作流/模块

Brick 的路由决策是基于单次请求(Per-request)进行的。在 Claude Code 的工作流(Workflows)或子代理(Subagents)场景中,只要 Agent 使用的是 `brick-claude` 接口,每个 Agent 的调用都会被独立路由。这意味着在同一次运行中,简单的子任务可以路由到 haiku,而复杂的任务则会自动升级到 opus。

❓ FAQ 摘要

针对常见问题,Brick 与 FrugalGPT 等级联路由器的主要区别在于:级联路由通过顺序调用模型(先廉价后升级)来工作,若判断失误会产生额外的 Token 成本和延迟;而 Brick 基于能力向量进行单次前向决策(Single Forward Decision),确保每次请求都能在一次调用中精准命中目标模型。

🎯 aiskill88 AI 点评 A 级 2026-07-07

brick是一款基于复杂性和能力提取的智能AI模型路由器,开源且易于使用,突出其在AI模型管理方面的价值,但其稳定性和扩展性需要进一步优化。

📚 实用指南(长尾问题)
适合谁
  • 需要 brick-SR1 解决具体问题的开发者与运营人员
最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
brick-SR1 中文教程brick-SR1 安装报错怎么办brick-SR1 与同类工具对比brick-SR1 最佳实践brick-SR1 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要 brick-SR1 解决具体问题的开发者与运营人员
⭐ 最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

通过Jupyter Notebook安装brick
💡 AI Skill Hub 点评

AI Skill Hub 点评:brick-SR1开源AI工具 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

📚 深入学习 brick-SR1开源AI工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 brick-SR1
原始描述 开源AI工具:brick is a smart AI Models router, based on complexity & capabilities extraction。⭐62 · Jupyter Notebook
Topics installableclaude-codecodexllmopen-modelsroutingjupyter notebook
GitHub https://github.com/regolo-ai/brick-SR1
License Apache-2.0
语言 Jupyter Notebook
🔗 原始来源
🐙 GitHub 仓库  https://github.com/regolo-ai/brick-SR1 🌐 官方网站  https://regolo.ai

收录时间:2026-07-07 · 更新时间:2026-07-07 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →