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:
@@ -73,6 +73,22 @@ final class DbnBedrockModelRouter
|
||||
return $route['model'] ?? self::LITELLM_SONNET;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a quality-tier engine string to the LiteLLM deployment name passed to
|
||||
* withDeployment(). claude_haiku/claude_sonnet route to Bedrock Claude when the
|
||||
* active gateway is Bedrock; otherwise they degrade to the Azure GPT-4o family.
|
||||
*/
|
||||
public static function deploymentForEngine(string $engine, bool $isBedrock): string
|
||||
{
|
||||
switch ($engine) {
|
||||
case 'claude_sonnet': return $isBedrock ? self::LITELLM_SONNET : 'gpt-4o';
|
||||
case 'claude_haiku': return $isBedrock ? self::LITELLM_HAIKU : 'gpt-4o-mini';
|
||||
case 'azure_full': return 'gpt-4o';
|
||||
case 'azure_mini':
|
||||
default: return 'gpt-4o-mini';
|
||||
}
|
||||
}
|
||||
|
||||
public static function supportsThinking(string $modelName): bool
|
||||
{
|
||||
return in_array($modelName, self::THINKING_MODELS, true);
|
||||
|
||||
Reference in New Issue
Block a user