Repository navigation
fix(agent): send no tools with the LLM connection test - #538
Open
Phantom-IN wants to merge 1 commit into
Open
Phantom-IN wants to merge 1 commit into
Phantom-IN wants to merge 1 commit into
Conversation
TestConnection passes an empty Tools slice so the model gets a bare chat request, but agentcore still appends its background-task tools (TaskOutput, TaskStop, TaskList, Monitor) unless DisableBackgroundTasks is set. The request therefore carried four tool definitions, and models answered the "ping" with a TaskOutput call or tool-like text instead of OK (BaaRai#526). Against a local gemma4:e4b the streaming test spent its whole 30 s budget reasoning about those tools and failed; with them gone it answers OK in under a second. Set DisableBackgroundTasks, as goal decomposition already does, and add a test that checks the request body has no tools.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the cause behind #526.
TestConnectionpassesTools: []actool.CoreTool{}, but agentcore still appends its background-task tools unlessDisableBackgroundTasksis set. I put a logging proxy in front of my local Ollama and the "ping" request carried four tool definitions:TaskOutput,TaskStop,TaskListandMonitor. That matches the report: a much bigger prompt than a direct call, and replies that areTaskOutput-like text or a realtool_calls.With
gemma4:e4bthe streaming test never got to OK. The model spent the full 30 s reasoning about whether to use those tools and the test failed withcontext deadline exceeded. With the tools off it answersOKin about 0.6 s, streaming and non-streaming.The fix sets
DisableBackgroundTasks: true, asagent/goals.goalready does. The newTestConnectionSendsNoToolsreads the request body from an httptest server and checks it has notools. It fails on main with "sent 4 tools".I didn't change the "any non-empty reply is Connected" check the issue also mentions. That felt like a separate decision.
go vet ./agent/andgo test ./agent/pass.