From 61bbb3539aea3f5c81dd5e3d3152ba048ab2051a Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 27 Jun 2024 22:08:47 -0600 Subject: [PATCH] Fix a stupid bug that was dropping system prompts for Claude (#13626) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release Notes: - Fixed a bug that was causing system prompts to be dropped for Anthropic models. @JosephTLyons @notpeter We probably need to hot-fix this as I'm pretty sure this affects the regular anthropic provider in addition to just the feature-flagged cloud stuff. Wouldn't mind confirming that first so we can communicate around it. 😬 --- crates/assistant/src/completion_provider/anthropic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/assistant/src/completion_provider/anthropic.rs b/crates/assistant/src/completion_provider/anthropic.rs index 669e8cb808..87236501a9 100644 --- a/crates/assistant/src/completion_provider/anthropic.rs +++ b/crates/assistant/src/completion_provider/anthropic.rs @@ -236,7 +236,7 @@ pub fn preprocess_anthropic_request(request: &mut LanguageModelRequest) { } if !system_message.is_empty() { - request.messages.insert( + new_messages.insert( 0, LanguageModelRequestMessage { role: Role::System,