Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ocr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For `large-lean-hotspots`, the scout is enabled by default and uses sandboxed.sh

- `OCR_SCOUT_ENABLED`: optional, defaults to `true`; set to `false` to disable only the large Lean scout call.
- `OCR_SCOUT_LLM_URL`: optional; defaults to `OCR_LLM_URL` when the same sandboxed endpoint supports model selection.
- `OCR_SCOUT_LLM_KEY`: optional; defaults to `OCR_LLM_KEY` when the same sandboxed key can route both models.
- `OCR_SCOUT_LLM_KEY`: optional; defaults to `OCR_LLM_KEY`, then `OCR_LLM_TOKEN`, when the same sandboxed key can route both models.
- `OCR_SCOUT_LLM_MODEL`: optional; defaults to `MiniMax-M3`, the MiniMax hybrid long-context scout model listed in the sandboxed.sh provider catalog.

The router sends only a bounded JSON risk dossier to the scout model. The scout model is cheap triage only: it selects packet IDs, reasons, risk categories, questions for a stronger reviewer, and residual coverage. It never produces final review approval. If scout configuration is absent, disabled, malformed, rejected by the provider, or the call fails, the router records that state in metrics and falls back to deterministic ranking.
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/ocr-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ function stripThinking(text) {
return text
.replace(/<mm:think>[\s\S]*?<\/mm:think>/gi, '')
.replace(/<think>[\s\S]*?<\/think>/gi, '')
.trim()
.replace(/^```(?:json)?\s*/i, '')
.replace(/\s*```$/i, '');
}
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/test-ocr-routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ function testScoutConfigDefaultsToMiniMaxOnOcrEndpoint() {
assert.strictEqual(config.url, 'https://sandboxed.example/v1');
assert.strictEqual(config.key, 'shared-key');
assert.strictEqual(config.model, 'MiniMax-M3');
const ocrReviewerModel = 'reviewer';
assert.strictEqual(ocrReviewerModel, 'reviewer');
const workflow = fs.readFileSync(path.join(__dirname, '..', 'workflows', 'ocr-review.yml'), 'utf8');
assert.ok(workflow.includes('OCR_LLM_MODEL: reviewer'));
}

function testScoutConfigCanDisableLargeLeanScout() {
Expand Down
Loading