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:
@@ -42,7 +42,7 @@
|
||||
traceList: document.getElementById('traceList'),
|
||||
slices: Array.from(document.querySelectorAll('.dr-slice')),
|
||||
langButtons: Array.from(document.querySelectorAll('#drLangSwitcher .lang-btn')),
|
||||
engineRadios: Array.from(document.querySelectorAll('input[name="drEngine"]')),
|
||||
tierRadios: Array.from(document.querySelectorAll('input[name="drTier"]')),
|
||||
personaControl: document.getElementById('drPersonaControl'),
|
||||
personaSelect: document.getElementById('drPersonaSelect'),
|
||||
subQ: document.getElementById('drSubQ'),
|
||||
@@ -280,9 +280,9 @@
|
||||
return out;
|
||||
}
|
||||
|
||||
function getEngine() {
|
||||
const checked = els.engineRadios.find((r) => r.checked);
|
||||
return checked ? checked.value : 'azure_mini';
|
||||
function getTier() {
|
||||
const checked = els.tierRadios.find((r) => r.checked);
|
||||
return checked ? checked.value : 'quick';
|
||||
}
|
||||
|
||||
function getControls() {
|
||||
@@ -308,10 +308,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const engine = getEngine();
|
||||
const expectedDuration = engine === 'azure_full'
|
||||
? '60–180 seconds with Azure gpt-4o'
|
||||
: (engine === 'gpu' ? '30–90 seconds on GPU' : '15–45 seconds with Azure gpt-4o-mini');
|
||||
const tier = getTier();
|
||||
const expectedDuration = tier === 'pro'
|
||||
? '60–180 seconds with Claude Sonnet'
|
||||
: '15–45 seconds with Claude Haiku';
|
||||
|
||||
setStatus(`Running deep research… (${expectedDuration})`, 'busy');
|
||||
els.runButton.disabled = true;
|
||||
@@ -325,7 +325,7 @@
|
||||
query,
|
||||
paste_text: '',
|
||||
slices,
|
||||
engine,
|
||||
tier,
|
||||
language: lang,
|
||||
controls: getControls(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user