Skip to content

feat: LLM Gateway 部署方案(ADR-0002 rev1) - #2

Merged
randypanding merged 2 commits into
mainfrom
llm-gateway-deploy
Aug 18, 2026
Merged

feat: LLM Gateway 部署方案(ADR-0002 rev1)#2
randypanding merged 2 commits into
mainfrom
llm-gateway-deploy

Conversation

@randypanding

Copy link
Copy Markdown
Contributor

内容

  • deploy/llm-gateway/:LiteLLM config(4 alias 与 models.yaml 对齐)+ compose(image pin)+ .env.example + 三步部署 README
  • validate.py:新增 gateway↔models.yaml 别名集合一致性强制
  • ADR-0002 rev1:部署位置=本仓;上游 openJiuwen-ai/jiuwenswarm 官方镜像不 fork;弃 submodule(理由见 ADR)
  • models.yaml:gateway 段指向更新

待用户操作(部署时)

.env 填 provider key + master key;config.yaml 四个 TODO 占位换真实模型名;docker compose up -d

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@randypanding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Limit details: You’ve used all 3 included reviews currently available under your plan.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bbdb2ddb-c392-4c3f-88cd-67a4b6bbaa28

📥 Commits

Reviewing files that changed from the base of the PR and between c712670 and ac4896a.

📒 Files selected for processing (8)
  • .github/workflows/validate.yml
  • decisions/ADR-0002-llm-gateway.md
  • deploy/llm-gateway/.env.example
  • deploy/llm-gateway/README.md
  • deploy/llm-gateway/config.yaml
  • deploy/llm-gateway/docker-compose.yml
  • registry/models.yaml
  • scripts/validate.py

Comment @coderabbitai help to get the list of available commands.

@randypanding
randypanding enabled auto-merge (squash) August 18, 2026 10:37
@randypanding
randypanding merged commit 2fe9d81 into main Aug 18, 2026
5 checks passed
@randypanding
randypanding deleted the llm-gateway-deploy branch August 18, 2026 10:43
randypanding added a commit that referenced this pull request Aug 18, 2026
- validate.py:members 非列表/agent 非字符串 → fail 而非 TypeError/re.sub 崩溃;
  checks.yaml 根节点为列表/标量 → 结构错误而非 AttributeError——畸形输入走
  受控 fail() 路径(qodo #5/#6,CodeRabbit)
- ADR 文件名 fullmatch:恰 4 位数字+非空 slug——ADR-12345-x.md(5 位被前缀
  读作 1234)与 ADR-0014-.md(空 slug)不再被放行(qodo #7,CodeRabbit)
- ADR-0011 豁免按精确文件集校验:第三个同号文件或历史双档改名/缺失均 fail,
  编号 0011 不因豁免而可复用(qodo #4)
- validate.yml:PR 文件清单 --paginate(>100 文件的 C1 变更不再漏检成
  changed=false,qodo #2/CodeRabbit);ADR 引用正则加词边界 \b
  (NOTADR-0013junk 子串不再满足要求,qodo #3)
- checks.yaml/ADR-0013:adr-required 的 C1 路径说明补 tests/(与工作流
  实际触发路径一致,CodeRabbit)
- tests/:新增 6 项负向回归(标量 members、非字符串 agent、列表根、
  标量 checks、空 slug、5 位编号),消息断言随新诊断同步

qodo #1(planned check 可引用)经复核不成立:approved-status 要求针对
agent/skill/tool 实体引用(validate.py 已查);checks 注册表按 ADR-0012
设计 planned=已登记未实装、引用合法(pr-identity-path-matrix 的
enforced_by 引用即此语义)——回复说明,不改代码。

Refs: ADR-0013, #9
randypanding added a commit that referenced this pull request Aug 18, 2026
* feat: 红队修复批次——validate.py 元验证、防线注册表硬化、ADR 编号唯一性(ADR-0013)

- tests/test_validate.py:validate.py 元验证套件(issue #9 P0-2)——
  正向全树绿 + 14 项负向注入(每项缺陷必须被拒绝,防错误放行回归);
  validate.yml gate 内接线(PR head 自洽 + main 各跑一次,失败阻塞合并)
- checks.yaml 条目结构硬化(PR#8 qodo 评审项):id 语法+唯一、
  status∈{active,planned}、where 非空、consumed_externally 布尔——
  畸形条目 fail 而非静默授权
- check 引用侧完整 token 匹配:捕获 [A-Za-z0-9_-]+ 全串 + 词边界——
  防 check:gate_typo 前缀截断放行、防 healthcheck:x 误报;
  诊断路径相对各自扫描根(双 checkout 不串根)
- ADR 编号唯一性机器检查(issue #9 P1-6):编号冲突即 FAIL,
  唯一豁免=ADR-0011 历史双档(ADR-0012 消歧约定,代码显式记录)
- team members 下限 1(issue #9 P0-1 机器侧)+ 畸形条目防御
- adr-required check 实装转 active(CT-CUR-003 闭环):
  C1 路径变更的 PR 必须引用 ADR-NNNN 且被引 ADR 存在于 head decisions/
- curator-main.md:governance-core 陈旧引用更正为 team:stewardship
  (ADR-0004 规划名的落地形态;ADR-0004/0007 历史记录不改写)

* fix: 评审修复——validate.py 类型防御、ADR 文件名全匹配、分页与词边界(ADR-0013)

- validate.py:members 非列表/agent 非字符串 → fail 而非 TypeError/re.sub 崩溃;
  checks.yaml 根节点为列表/标量 → 结构错误而非 AttributeError——畸形输入走
  受控 fail() 路径(qodo #5/#6,CodeRabbit)
- ADR 文件名 fullmatch:恰 4 位数字+非空 slug——ADR-12345-x.md(5 位被前缀
  读作 1234)与 ADR-0014-.md(空 slug)不再被放行(qodo #7,CodeRabbit)
- ADR-0011 豁免按精确文件集校验:第三个同号文件或历史双档改名/缺失均 fail,
  编号 0011 不因豁免而可复用(qodo #4)
- validate.yml:PR 文件清单 --paginate(>100 文件的 C1 变更不再漏检成
  changed=false,qodo #2/CodeRabbit);ADR 引用正则加词边界 \b
  (NOTADR-0013junk 子串不再满足要求,qodo #3)
- checks.yaml/ADR-0013:adr-required 的 C1 路径说明补 tests/(与工作流
  实际触发路径一致,CodeRabbit)
- tests/:新增 6 项负向回归(标量 members、非字符串 agent、列表根、
  标量 checks、空 slug、5 位编号),消息断言随新诊断同步

qodo #1(planned check 可引用)经复核不成立:approved-status 要求针对
agent/skill/tool 实体引用(validate.py 已查);checks 注册表按 ADR-0012
设计 planned=已登记未实装、引用合法(pr-identity-path-matrix 的
enforced_by 引用即此语义)——回复说明,不改代码。

Refs: ADR-0013, #9

* docs: ADR-0013 补记 adr-required 存在性后验设计(跨仓私有读权与 secret 暴露面的权衡)

---------

Co-authored-by: randypanding <randypanding@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant