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
+5 -5
View File
@@ -1167,11 +1167,11 @@ PROMPT;
} elseif ($engine === 'azure_full') {
$raw = $this->azure->withDeployment('gpt-4o')->chatText($messages, $opts);
$deployLabel = 'gpt-4o';
} elseif ($engine === 'azure_mini' && $this->azure instanceof DbnBedrockGateway) {
// When Bedrock enabled, azure_mini → Haiku (fast, ~20-50s synthesis)
$haiku = $this->azure->withDeployment(DbnBedrockModelRouter::LITELLM_HAIKU);
$raw = $haiku->chatText($messages, array_merge($opts, ['timeout' => 90]));
$deployLabel = 'Claude Haiku 4.5 (AWS Bedrock)';
} elseif ($engine === 'claude_haiku' || ($engine === 'azure_mini' && $this->azure instanceof DbnBedrockGateway)) {
// Quick tier (claude_haiku) and azure_mini-under-Bedrock → Haiku (fast, ~20-50s synthesis)
$deploy = DbnBedrockModelRouter::deploymentForEngine('claude_haiku', $this->azure instanceof DbnBedrockGateway);
$raw = $this->azure->withDeployment($deploy)->chatText($messages, array_merge($opts, ['timeout' => 90]));
$deployLabel = $deploy;
$thinkingTrace = null;
} elseif ($engine === 'claude_sonnet' || ($this->azure instanceof DbnBedrockGateway)) {
if (