mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4907] [Issue]: Force To Call Tool is ignored by Google, Vertex, and Anthropic #2718
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#2718
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?
Originally created by @Xelvanis on GitHub (Aug 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4907
Originally assigned to: @SpicyMarinara on GitHub.
Summary
The provider-agnostic Force To Call Tool chat setting is ignored by the native Google, Vertex, and Anthropic adapters. The first tool round resolves to Marinara's
toolChoice: "required"policy, but those adapters do not translate it to their native request contracts.Expected behavior
When Force To Call Tool is enabled and tools are available, the first request should require one tool call on supported providers. Google and Vertex should send function-calling mode
ANY; compatible Anthropic requests should sendtool_choice: { "type": "any" }. Later tool rounds should return to automatic selection. Unsupported Anthropic combinations should avoid invalid forced-choice requests and expose a clear fallback or limitation.Actual behavior
Google and Vertex always serialize
toolConfig.functionCallingConfig.modeasAUTO. Anthropic serializes tools but omitstool_choice. The model can therefore answer without calling a tool even though the chat setting is enabled.Steps to reproduce
AUTOfor Google/Vertex or notool_choicefor Anthropic instead of the provider-native forced-tool policy.Environment
stagingat0ec8271962ec4c6c5a3c8e4fb3d358ee21f20418Logs, screenshots, or video
No live provider logs, screenshots, or video are attached. Current request construction shows:
packages/server/src/services/llm/providers/google.provider.tsalways writes modeAUTO.packages/server/src/services/llm/providers/anthropic.provider.tswritestoolsbut notool_choice.packages/server/src/services/generation/tool-resolution-runtime.tsresolves the enabled first round torequired.Additional context
This is a provider-compatibility follow-up to #4197 and #4199. That work introduced the provider-agnostic setting but implemented request translation only for OpenAI-style builders.
Official provider contracts:
Anthropic requires compatibility handling rather than an unconditional field: manual extended thinking rejects forced tool choice, adaptive thinking supports it, and Mythos does not support forced tool use. Provider-body regressions should cover required, automatic, and incompatible cases while preserving existing OpenAI behavior.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Aug 11, 2026):
Addressed by #4908 and merged into staging in
a0c303f6b.