fix(tools): route quick/pro tiers to Haiku/Sonnet on Bedrock

Tier engine strings (claude_haiku/claude_sonnet) were stripped back to
azure_mini by per-method whitelists, so both tiers ran gpt-4o-mini and Pro
charged 2x for the same model. Add a shared DbnBedrockModelRouter::
deploymentForEngine() helper and route the cloud path through it across
summarize, ask, barnevernet, discrepancy, deep-research, and korrespond.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 17:35:22 +02:00
parent a8b1bb87a6
commit a4b5b6e3f2
6 changed files with 37 additions and 27 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ try {
$ftUid = dbnToolsFreeTierCheck('korrespond');
$engine = ToolModels::engineForUser($ftUid, 'azure_mini');
$inputEngine = (string)($input['engine'] ?? '');
if (in_array($inputEngine, ['azure_mini', 'claude_sonnet'], true)) {
if (in_array($inputEngine, ['azure_mini', 'claude_haiku', 'claude_sonnet'], true)) {
$engine = $inputEngine;
}
$run = ['credits' => null, 'metadata' => []];