This commit is contained in:
Timothy Jaeryang Baek
2026-02-15 19:32:22 -06:00
parent 24179cde2f
commit 7a7d902238
+3
View File
@@ -2158,6 +2158,9 @@ async def process_chat_payload(request, form_data, user, metadata, model):
) )
if "code_interpreter" in features and features["code_interpreter"]: if "code_interpreter" in features and features["code_interpreter"]:
# Skip XML-tag prompt injection when native FC is enabled —
# execute_code will be injected as a builtin tool instead
if metadata.get("params", {}).get("function_calling") != "native":
form_data["messages"] = add_or_update_user_message( form_data["messages"] = add_or_update_user_message(
( (
request.app.state.config.CODE_INTERPRETER_PROMPT_TEMPLATE request.app.state.config.CODE_INTERPRETER_PROMPT_TEMPLATE