File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed
Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -303,23 +303,7 @@ export const getModelId = (settings: ProviderSettings): string | undefined => {
303303// Providers that use Anthropic-style API protocol
304304export const ANTHROPIC_STYLE_PROVIDERS : ProviderName [ ] = [ "anthropic" , "claude-code" ]
305305
306- // Helper function to determine API protocol for a provider and model
307- export const getApiProtocol = ( provider : ProviderName | undefined , modelId ?: string ) : "anthropic" | "openai" => {
308- // First check if the provider is an Anthropic-style provider
309- if ( provider && ANTHROPIC_STYLE_PROVIDERS . includes ( provider ) ) {
310- return "anthropic"
311- }
312-
313- // For vertex and bedrock providers, check if the model ID contains "claude" (case-insensitive)
314- if (
315- provider &&
316- ( provider === "vertex" || provider === "bedrock" ) &&
317- modelId &&
318- modelId . toLowerCase ( ) . includes ( "claude" )
319- ) {
320- return "anthropic"
321- }
322-
323- // Default to OpenAI protocol
324- return "openai"
306+ // Helper function to determine API protocol for a provider
307+ export const getApiProtocol = ( provider : ProviderName | undefined ) : "anthropic" | "openai" => {
308+ return provider && ANTHROPIC_STYLE_PROVIDERS . includes ( provider ) ? "anthropic" : "openai"
325309}
You can’t perform that action at this time.
0 commit comments