Skip to content

Conversation

@danielfrg
Copy link
Contributor

Summary

  • Fix compaction failing with LiteLLM proxies when message history contains tool calls

Problem

When using /compact on sessions with LiteLLM proxy providers, the request fails with:

litellm.UnsupportedParamsError: Bedrock doesn't support tool calling without `tools=` param specified

Root Cause

The _noop dummy tool was being added correctly to satisfy LiteLLM's requirement, but it was filtered out from activeTools on line 211 of llm.ts, so it was never actually sent in the API request.

Fix

Remove _noop from the activeTools filter so it gets included in requests when needed.

The _noop dummy tool was being added to satisfy LiteLLM's requirement
for a tools parameter when message history contains tool calls, but it
was filtered out from activeTools. This caused compaction to fail with
'Bedrock doesn't support tool calling without tools= param' error.
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Related PR Found:

Why it's related: This PR also addresses LiteLLM proxy compatibility issues with tool calling. While PR #9912 focuses specifically on the _noop tool not being included in activeTools, PR #8497 handles dangling tool_use blocks for the same provider. Both are tackling different aspects of LiteLLM proxy compatibility with tool handling.

@rekram1-node rekram1-node merged commit 6d57454 into anomalyco:dev Jan 22, 2026
5 checks passed
@rekram1-node
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants