fix: inject system prompt as role:system message (server ignores top-level system field)
Verified via behavior test against Qoder API (ultimate model): - system field with a directive: model ignores it (prompt_tokens=15, normal reply) - same directive in messages[0] role:system: model obeys (prompt_tokens=97, marker reply) The server's top-level `system` field in the request body is never fed to the model, so pi's systemPrompt (language prefs, tool rules, agent instructions) was silently dropped. Inject it as a leading role:system message instead, which the server honors.
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ type QoderContent = string | Array<QoderTextPart | QoderImagePart>;
|
||||
|
||||
/** OpenAI-style message sent to the Qoder API. */
|
||||
interface QoderMessage {
|
||||
role: "user" | "assistant" | "tool";
|
||||
role: "user" | "assistant" | "tool" | "system";
|
||||
content: QoderContent | null;
|
||||
tool_calls?: QoderToolCall[];
|
||||
tool_call_id?: string;
|
||||
|
||||
Reference in New Issue
Block a user