diff --git a/internal/llm/provider/openai.go b/internal/llm/provider/openai.go index 498831d92b76b3a6f1c6c155923b2d35e40e7f78..152b242312ba5e348ca3f7964b36a85d2d77c56b 100644 --- a/internal/llm/provider/openai.go +++ b/internal/llm/provider/openai.go @@ -57,7 +57,7 @@ func createOpenAIClient(opts providerClientOptions) openai.Client { } func (o *openaiClient) convertMessages(messages []message.Message) (openaiMessages []openai.ChatCompletionMessageParamUnion) { - isAnthropicModel := o.providerOptions.config.ID == "openrouter" && strings.HasPrefix(o.Model().ID, "anthropic/") + isAnthropicModel := o.providerOptions.config.ID == string(catwalk.InferenceProviderOpenRouter) && strings.HasPrefix(o.Model().ID, "anthropic/") // Add system message first systemMessage := o.providerOptions.systemMessage if o.providerOptions.systemPromptPrefix != "" {