mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[GH-ISSUE #24572] feat: Take CODE_INTERPRETER_PROMPT_TEMPLATE into account when native function calling mode is enabled #123652
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexandrumc on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24572
Check Existing Issues
Verify Feature Scope
Problem Description
As can be seen here,
CODE_INTERPRETER_PROMPT_TEMPLATEis only considered when native function calling is disabled. In this case, onlyCODE_INTERPRETER_PYODIDE_PROMPTis used.However, given that
CODE_INTERPRETER_PYODIDE_PROMPTis a Python variable, one cannot change this default prompt without modifying the OWUI code directly.Desired Solution you'd like
Either consider
CODE_INTERPRETER_PROMPT_TEMPLATEwhen native function calling is enabled or makeCODE_INTERPRETER_PYODIDE_PROMPTconfigurable.Alternatives Considered
No response
Additional Context
No response
@owui-terminator[bot] commented on GitHub (May 11, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #19943 issue: Code Interpreter doesn't work under Native Function Calling Mode
Directly related: this issue reports that code interpreter fails when native function calling mode is enabled. The new issue is also specifically about native function calling mode and code interpreter prompt behavior.
by swiftdev29 ·
bug🟣 #23269 issue: Pyodide prompt injection constantly poisons the token cache (native tool calling)
Related to the same native function calling + code interpreter path, but from the caching/prompt-injection angle. It shows the Pyodide prompt is handled differently under native tool calling and causes side effects there.
by arbv ·
bug🟣 #22965 issue: Code interpreter prompt (Pyodide) injected into user turn instead of system prompt
Related because it focuses on the Pyodide/code interpreter prompt injection mechanism itself. The new request is about making the code-interpreter prompt template respected or configurable, which is the same prompt plumbing area.
by AirRunner ·
bug🟣 #20864 issue: IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE is ignored when clicking the IMAGE button on LLM response. The prompt is sent directly to ComfyUI without translation/enhancement.
This is a broader example of a prompt template being ignored in a specific UI/action path. It is relevant as a parallel issue where a configured prompt template is bypassed, similar to CODE_INTERPRETER_PROMPT_TEMPLATE being ignored under native function calling.
by karoldydo ·
bug💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@gerpervaz commented on GitHub (May 21, 2026):
I ran into the same core issue and confirmed it with request-level logs.
In Native mode, Open WebUI sends builtin tools including
execute_code, and the model can call the tool successfully, but the configured Code Interpreter prompt/template is not included in themessagespayload sent to the backend LLM.As a workaround, moving the same instructions into the regular system prompt works immediately, which strongly suggests the problem is specifically in Code Interpreter prompt injection / plumbing for Native mode.
There is also a related UX problem: the model customization UI exposes Code Interpreter-related options in multiple places (Capabilities, Default Features, Builtin Tools / Integrated Tools), but the helper text does not make it clear which controls affect availability, default activation, or actual native tool injection.
I initially opened #24977 before noticing this one, but this issue seems to be the right canonical place for the core behavior. Happy to share more detail if useful.
@Classic298 commented on GitHub (May 21, 2026):
The code interpreter prompt is specifically not needed in native tool calling mode, Please describe in your feature request WHY it should be included, because the entire prompt is simply wrong for the model and WILL lead to false behaviour of the model if included in native function calling mode.