diff --git a/packages/types/src/provider-settings.ts b/packages/types/src/provider-settings.ts index 3b53627295..70635d7b8a 100644 --- a/packages/types/src/provider-settings.ts +++ b/packages/types/src/provider-settings.ts @@ -301,9 +301,14 @@ export const getModelId = (settings: ProviderSettings): string | undefined => { } // Providers that use Anthropic-style API protocol -export const ANTHROPIC_STYLE_PROVIDERS: ProviderName[] = ["anthropic", "claude-code"] +export const ANTHROPIC_STYLE_PROVIDERS: ProviderName[] = ["anthropic", "claude-code", "bedrock"] // Helper function to determine API protocol for a provider export const getApiProtocol = (provider: ProviderName | undefined): "anthropic" | "openai" => { - return provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider) ? "anthropic" : "openai" + // Check if provider uses Anthropic-style API by default + if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) { + return "anthropic" + } + // Default to OpenAI style + return "openai" }