diff --git a/extensions/amazon-bedrock/index.ts b/extensions/amazon-bedrock/index.ts index c871100605c..4dc69af95a2 100644 --- a/extensions/amazon-bedrock/index.ts +++ b/extensions/amazon-bedrock/index.ts @@ -25,7 +25,9 @@ export default definePluginEntry({ const providers = config?.models?.providers; if (providers) { for (const [key, value] of Object.entries(providers)) { - if (normalizeProviderId(key) !== PROVIDER_ID) continue; + if (normalizeProviderId(key) !== PROVIDER_ID) { + continue; + } const models = (value as { models?: Array<{ id?: string; name?: string }> })?.models; const modelDef = models?.find((m) => m.id === modelId); if (modelDef?.name) { diff --git a/src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts b/src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts index db5ef2955eb..6800f142e87 100644 --- a/src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts +++ b/src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts @@ -409,7 +409,9 @@ export function isAnthropicBedrockModel(modelId: string, modelName?: string): bo normalized.includes(":application-inference-profile/") ) { const profileId = normalized.split(":application-inference-profile/")[1] ?? ""; - if (profileId.includes("claude")) return true; + if (profileId.includes("claude")) { + return true; + } return modelName ? modelName.toLowerCase().includes("claude") : false; } @@ -419,7 +421,9 @@ export function isAnthropicBedrockModel(modelId: string, modelName?: string): bo // Note: the regex is intentionally broad; it is safe because standard Bedrock model IDs // always contain dots or colons (e.g. "amazon.nova-micro-v1:0") which exclude them here. if (looksLikeShortProfileId(normalized)) { - if (normalized.includes("claude")) return true; + if (normalized.includes("claude")) { + return true; + } return modelName ? modelName.toLowerCase().includes("claude") : false; }