Skip to content

Commit 411869e

Browse files
committed
infra: add moonmath provider for ai reviews
1 parent 7d7d56c commit 411869e

4 files changed

Lines changed: 43 additions & 4 deletions

File tree

.github/ai-review/matrix.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
"model": "minimax/MiniMax-M3",
2424
"prompt": "general",
2525
"variant": "high"
26+
},
27+
{
28+
"id": "moonmath",
29+
"model": "zro/minimax-m3",
30+
"prompt": "general",
31+
"variant": "low"
2632
}
2733
],
2834
"verifier_lanes": [

.github/scripts/ai_review.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ def cmd_agentic_lane(args: argparse.Namespace) -> int:
457457
"minimax/": "MINIMAX_API_KEY",
458458
"anthropic/": "ANTHROPIC_API_KEY",
459459
"openai/": "OPENAI_API_KEY",
460+
"zro/": "ZRO_API_KEY",
460461
}
461462

462463

.github/workflows/pr_ai_review.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,16 @@ jobs:
136136
egress-policy: block
137137
# Allowlist harvested from the harden-runner audit of a real run. Covers:
138138
# GitHub Actions infra, opencode install/binary/catalog, pip + npm, and the
139-
# model APIs actually used (openrouter + direct MiniMax). Adding a new
140-
# direct provider means adding its host here or the lane is blocked.
139+
# model APIs actually used (openrouter, direct MiniMax, Moonmath "zro"
140+
# gateway). Adding a new direct provider means adding its host here or the
141+
# lane is blocked.
141142
allowed-endpoints: >
142143
api.github.com:443
143144
api.minimax.io:443
144145
broker.actions.githubusercontent.com:443
145146
files.pythonhosted.org:443
146147
github.com:443
148+
inference.moonmath.ai:443
147149
models.dev:443
148150
opencode.ai:443
149151
openrouter.ai:443
@@ -174,6 +176,10 @@ jobs:
174176
# Install custom tools (submit_findings) globally too, so review lanes report
175177
# findings via a tool call instead of hand-written JSON.
176178
cp .opencode/tools/*.ts "$HOME/.config/opencode/tools/" 2>/dev/null || true
179+
# Install the global opencode config that defines custom providers not in
180+
# models.dev (e.g. the Moonmath "zro" OpenAI-compatible gateway). Inert unless
181+
# a lane references one of these provider ids.
182+
cp .opencode/opencode.json "$HOME/.config/opencode/opencode.json" 2>/dev/null || true
177183
178184
- name: Download review context
179185
uses: actions/download-artifact@v4
@@ -209,6 +215,7 @@ jobs:
209215
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
210216
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
211217
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
218+
ZRO_API_KEY: ${{ secrets.ZRO_API_KEY }}
212219
LANE_JSON: ${{ toJson(matrix.lane) }}
213220
LANE_ID: ${{ matrix.lane.id }}
214221
run: |
@@ -314,14 +321,16 @@ jobs:
314321
egress-policy: block
315322
# Allowlist harvested from the harden-runner audit of a real run. Covers:
316323
# GitHub Actions infra, opencode install/binary/catalog, pip + npm, and the
317-
# model APIs actually used (openrouter + direct MiniMax). Adding a new
318-
# direct provider means adding its host here or the lane is blocked.
324+
# model APIs actually used (openrouter, direct MiniMax, Moonmath "zro"
325+
# gateway). Adding a new direct provider means adding its host here or the
326+
# lane is blocked.
319327
allowed-endpoints: >
320328
api.github.com:443
321329
api.minimax.io:443
322330
broker.actions.githubusercontent.com:443
323331
files.pythonhosted.org:443
324332
github.com:443
333+
inference.moonmath.ai:443
325334
models.dev:443
326335
opencode.ai:443
327336
openrouter.ai:443
@@ -352,6 +361,10 @@ jobs:
352361
# Install custom tools (submit_findings) globally too, so review lanes report
353362
# findings via a tool call instead of hand-written JSON.
354363
cp .opencode/tools/*.ts "$HOME/.config/opencode/tools/" 2>/dev/null || true
364+
# Install the global opencode config that defines custom providers not in
365+
# models.dev (e.g. the Moonmath "zro" OpenAI-compatible gateway). Inert unless
366+
# a lane references one of these provider ids.
367+
cp .opencode/opencode.json "$HOME/.config/opencode/opencode.json" 2>/dev/null || true
355368
356369
- name: Download review context
357370
uses: actions/download-artifact@v4
@@ -393,6 +406,7 @@ jobs:
393406
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
394407
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
395408
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
409+
ZRO_API_KEY: ${{ secrets.ZRO_API_KEY }}
396410
LANE_JSON: ${{ toJson(matrix.lane) }}
397411
LANE_ID: ${{ matrix.lane.id }}
398412
run: |

.opencode/opencode.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"provider": {
4+
"zro": {
5+
"npm": "@ai-sdk/openai-compatible",
6+
"name": "Zro gateway",
7+
"options": {
8+
"baseURL": "https://inference.moonmath.ai/v1",
9+
"apiKey": "{env:ZRO_API_KEY}"
10+
},
11+
"models": {
12+
"minimax-m3": {
13+
"name": "MiniMax M3"
14+
}
15+
}
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)