API Error: API returned an empty or malformed response (HTTP 200) — check for a proxy or gateway intercepting the request

This commit is contained in:
MythEclipse
2026-06-02 23:06:55 +07:00
parent 0339ff75f9
commit 1f3d1ac3f4
@@ -239,6 +239,11 @@ export interface BuildSystemPromptOptions {
/** @deprecated Use `mode` instead. */
includeMediaInstructions?: boolean;
correction?: { error: string; preview: string };
/**
* Recent corrected false positives from the DB, formatted as few-shot
* examples. Injected between static examples and output instructions.
*/
correctedExamples?: string;
}
export function buildSystemPrompt(options: BuildSystemPromptOptions): string {
@@ -247,6 +252,7 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions): string {
mode,
includeMediaInstructions,
correction,
correctedExamples,
} = options;
// Backward compatibility: if mode is not set but includeMediaInstructions is,