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

Disable tools until we handle them properly #190

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/codegate/providers/litellmshim/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ def normalize(self, data: Dict) -> ChatCompletionRequest:
"""
# Make a copy of the data to avoid modifying the original and normalize the message content
normalized_data = self._normalize_content_messages(data)
return self._adapter.translate_completion_input_params(normalized_data)
ret = self._adapter.translate_completion_input_params(normalized_data)

# this is a HACK - either we or liteLLM doesn't handle tools properly
# so let's just pretend they doesn't exist
if ret.get("tools") is not None:
ret["tools"] = []
return ret

def denormalize(self, data: ChatCompletionRequest) -> Dict:
"""
Expand Down