Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 496ee16

Browse files
committed
Disable tools until we handle them properly
Newer versions of continue use tools with Anthropic to perform modifications. We or litellm (to be investigated) don't handle that well which means that file modifications don't surface in chat. Let's just pretend the client didn't ask for tools to be used until we fix that.
1 parent 9d900d6 commit 496ee16

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/codegate/providers/litellmshim/adapter.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ def normalize(self, data: Dict) -> ChatCompletionRequest:
5252
"""
5353
# Make a copy of the data to avoid modifying the original and normalize the message content
5454
normalized_data = self._normalize_content_messages(data)
55-
return self._adapter.translate_completion_input_params(normalized_data)
55+
ret = self._adapter.translate_completion_input_params(normalized_data)
56+
57+
# this is a HACK - either we or liteLLM doesn't handle tools properly
58+
# so let's just pretend they doesn't exist
59+
if ret.get("tools") is not None:
60+
ret["tools"] = []
61+
return ret
5662

5763
def denormalize(self, data: ChatCompletionRequest) -> Dict:
5864
"""

0 commit comments

Comments
 (0)