feat(tools): converge two-tier Quick/Pro selector onto .no fork

Port the dobetterlegal-tools two-tier quality stack to dobetternorge.no:
QUALITY_TIERS registry + resolveTier (ToolModels), dbnToolsResolveToolRun
(bootstrap), tier read+charge in the 6 analytical endpoints, Quick/Pro
UI + payload.tier on the 6 tool pages/JS, and the bounded
corpusContextForSummarize RAG fix (per-passage trim + total budget +
reranker_enabled). Back-compat: requests without `tier` keep legacy
engine behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 12:23:46 +02:00
parent b217f18118
commit a8b1bb87a6
21 changed files with 339 additions and 103 deletions
+4 -6
View File
@@ -49,7 +49,7 @@
results: document.getElementById('dcResults'),
traceList: document.getElementById('traceList'),
langButtons: Array.from(document.querySelectorAll('#dcLangSwitcher .lang-btn')),
engineRadios: Array.from(document.querySelectorAll('input[name="dcEngine"]')),
tierRadios: Array.from(document.querySelectorAll('input[name="dcTier"]')),
slices: Array.from(document.querySelectorAll('.adv-slice')),
// File A
zoneA: document.getElementById('dcZoneA'),
@@ -188,12 +188,10 @@
return;
}
const engine = (els.engineRadios.find((r) => r.checked) || {}).value || 'azure_mini';
const tier = (els.tierRadios.find((r) => r.checked) || {}).value || 'quick';
const slices = getSelectedSlices();
const expectedDuration = engine === 'azure_full' ? '2-3 minutes'
: engine === 'gpu' ? '~90 seconds'
: '60-90 seconds';
const expectedDuration = tier === 'pro' ? '2-3 minutes' : '60-90 seconds';
setStatus(`Comparing documents… (${expectedDuration})`, 'busy');
els.runButton.disabled = true;
@@ -203,7 +201,7 @@
renderTrace(stepState);
const payload = {
engine, language: lang, slices,
tier, language: lang, slices,
use_my_case: (typeof window.dbnGetUseMyCase === 'function') ? window.dbnGetUseMyCase() : false,
};
const form = new FormData();