Skip to content

Commit ba13719

Browse files
committed
Fix an issue where local models may not return a response with the minimal prompt.
1 parent 35323dd commit ba13719

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Sources/ConfigurationSystem/SystemPromptConfiguration.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ public struct SystemPromptConfiguration: Codable, Identifiable, Hashable, Sendab
110110
return workflowModeEnabled
111111
}
112112

113+
/// Completion Signal component (SAM Minimal): Include ONLY if workflow mode enabled.
114+
/// This ensures SAM Minimal behaves consistently with SAM Default's workflow mode requirements.
115+
if component.title == "Completion Signal" {
116+
return workflowModeEnabled
117+
}
118+
113119
/// Dynamic Iterations component: Include ONLY if dynamic iterations enabled.
114120
if component.title == "Dynamic Iterations" {
115121
return dynamicIterationsEnabled
@@ -906,7 +912,7 @@ private static func buildSAMSpecificPatterns() -> String {
906912
SystemPromptComponent(
907913
title: "Completion Signal",
908914
content: Self.buildMinimalCompletionSignal(),
909-
isEnabled: true,
915+
isEnabled: false, // Conditional - only when workflow mode enabled
910916
order: 3
911917
)
912918
]

0 commit comments

Comments
 (0)