systemPrompt

Version

Sets the system prompt of every request before it is forwarded, so that all clients of an api talk to the model under the same instruction. The prompt is written in the wire format of the configured provider: the system field for Claude, instructions for the OpenAI Responses API, a role: system message for Chat Completions, and systemInstruction for Gemini. A prompt the client sent is replaced, kept or dropped, depending on the action.
 systemPrompt:
   [ action: OVERWRITE | APPEND | PREPEND | REMOVE ]   # default: OVERWRITE
   [ content: <prompt> ]
 

Example Configuration

api:
port: 2000
flow:
- llmGateway:
claude: {}
systemPrompt:
action: PREPEND
content: Answer in German.
target:
url: https://api.anthropic.com
api:
   port: 2000
   flow:
     - llmGateway:
         claude: {}
         systemPrompt:
           action: PREPEND
           content: Answer in German.
   target:
     url: https://api.anthropic.com

Syntax

systemPrompt:
action: remove
content: <string>
systemPrompt:
  action: remove
  content: <string>

Attributes

NameRequiredDefaultDescriptionExamples
actionfalseOVERWRITEWhat to do with the system prompt the client sent. OVERWRITE replaces it, APPEND and PREPEND combine both with a newline between them, and REMOVE drops it and ignores the content.PREPEND
contentfalse(empty)The system prompt to set. Ignored when the action is REMOVE.You are a helpful assistant. Answer in German.

Can be used in