[PR #2856] [MERGED] Don't send tool available in system prompt if model supports body.tools #5770

Closed
opened 2026-10-22 04:19:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2856
Author: @Sulphuratum
Created: 6/24/2026
Status: ✅ Merged
Merged: 6/24/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix-tool-systemprompt-injection


📝 Commits (3)

  • ee0a243 Don't send tool available in system prompt if model supports body.tools
  • ff6d58c Merge branch 'staging' into fix-tool-systemprompt-injection
  • 2032869 Merge branch 'staging' into fix-tool-systemprompt-injection

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/server/src/routes/generate.routes.ts (+1 -1)

📄 Description

Linked issue

Closes #2855

Why this change

  • disable sending tools as system prompt if native tool calling is on

What changed

  • see above

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Send message in conversation
  • Check system prompt - no more tool block

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

grafik

Before there was an "Available Tools" Block

Summary by CodeRabbit

  • Bug Fixes
    • Tool-enabled chats now only include function definitions when the connection is treated as a local endpoint, reducing unexpected prompt content in some requests.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2856 **Author:** [@Sulphuratum](https://github.com/Sulphuratum) **Created:** 6/24/2026 **Status:** ✅ Merged **Merged:** 6/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix-tool-systemprompt-injection` --- ### 📝 Commits (3) - [`ee0a243`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ee0a243e5e475f5a9ae8267fb5c7bb8a61e4da47) Don't send tool available in system prompt if model supports body.tools - [`ff6d58c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ff6d58cb2866e8f752a5d64b60dd4c1cf40d218b) Merge branch 'staging' into fix-tool-systemprompt-injection - [`2032869`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2032869f7276d120a10ec69b6004e67a1d823ba0) Merge branch 'staging' into fix-tool-systemprompt-injection ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate.routes.ts` (+1 -1) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #2855 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - disable sending tools as system prompt if native tool calling is on ## What changed <!-- List the key changes in this PR --> - see above ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Send message in conversation - Check system prompt - no more tool block ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <img width="796" height="405" alt="grafik" src="https://github.com/user-attachments/assets/5473d939-25e4-4e22-9805-97cd5083df19" /> Before there was an "Available Tools" Block <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Tool-enabled chats now only include function definitions when the connection is treated as a local endpoint, reducing unexpected prompt content in some requests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:19:20 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5770
No description provided.