mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1740] [MERGED] Fix Mari custom tool_choice compatibility #5252
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5252
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1740
Author: @cha1latte
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1704-lm-studio-tool-choice📝 Commits (1)
4495b7dFix Mari custom tool choice compatibility📊 Changes
1 file changed (+98 additions, -10 deletions)
View changed files
📝
src-tauri/src/commands/storage/mari.rs(+98 -10)📄 Description
Linked issue
Closes #1704
Why this change
tool_choicefor all native-tool providers. LM Studio's OpenAI-compatible local server rejects that object form and only accepts string values such as"required", which made Mari fail before the model saw codebase/library requests.What changed
tool_choice: "required"forcustomconnections so LM Studio-compatible endpoints get the broadly accepted string form.openai.Refactor impact
Primary owner:
Rust storage / Professor Mari provider bridge.
Impact areas reviewed:
src-tauri/src/commands/storage/mari.rssrc-tauri/crates/llm/src/lib.rstool-choice pass-through behaviorBoundary notes:
Pressure points touched:
chat_with_toolsrequest parameters.Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses locally before PR push/handoff, including the unused-code checkpnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyCodex-run verification:
node scratch\repro-1704-tool-choice.mjstool_choiceassignments forsearch_marinara_codeandread_marinara_library.tool_choice: "required".cargo test --manifest-path src-tauri\Cargo.toml professor_mari -- --nocapturepassed: 10 passed.cargo check --manifest-path src-tauri\Cargo.tomlpassed.pnpm checkpassed after rebasing onto currentupstream/refactor.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.jsonpassed.Manual verification notes
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs or release-note files were changed.
UI evidence
N/A. This is a backend/provider request-shape fix with no visible UI state change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.