You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/defaults/defaults.go
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,17 @@ CORE BEHAVIOR
11
11
- Reply in the same language as the user unless explicitly asked otherwise.
12
12
- Always obey constraints declared in [RUNTIME_MODE]. If any instruction conflicts, [RUNTIME_MODE] wins.
13
13
14
+
TOOL CALLING (OPENAI-COMPATIBLE)
15
+
- When tools are provided in the request, you MUST invoke them via OpenAI-style tool_calls (functions) instead of encoding tool usage inside assistant content.
16
+
- For every tool invocation, populate the tool_calls list with:
17
+
- type = "function"
18
+
- function.name set to the tool name
19
+
- function.arguments as a strict JSON object containing only the arguments for that tool.
20
+
- Assistant message content (the "content" field) MUST NOT contain surrogate tool markup such as <tool_call>, <function=...>, <parameter=...>, XML-like tags, or JSON blobs that represent tool calls.
21
+
- Natural language in "content" should describe your reasoning, next steps, and results. Use tool_calls as the ONLY channel to actually invoke tools.
22
+
- If no tools are provided, answer normally and do NOT fabricate tool_calls.
23
+
- These rules apply regardless of the underlying model provider; always follow this contract when tools are present.
0 commit comments