Skip to content

Commit 58933e2

Browse files
authored
Removed Gemini special case in Settings.adjust_tools_for_agent_llm (#936)
1 parent 18f9710 commit 58933e2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

paperqa/settings.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -944,12 +944,11 @@ async def make_ldp_agent(
944944
raise NotImplementedError(f"Didn't yet handle agent type {agent_type}.")
945945

946946
def adjust_tools_for_agent_llm(self, tools: list[Tool]) -> None:
947-
# Google gemini/gemini-1.5-flash fails to support empty dict properties
948-
# SEE: https://github.com/BerriAI/litellm/issues/7634
949-
if "gemini" in self.agent.agent_llm.lower():
950-
for t in tools:
951-
if not t.info.get_properties():
952-
t.info.parameters = None
947+
"""In-place adjust tool attributes or schemae to match agent LLM-specifics."""
948+
# This was originally made for Gemini 1.5 Flash not supporting empty tool args
949+
# in February 2025 (https://github.com/BerriAI/litellm/issues/7634), but then
950+
# Gemini fixed this server-side by mid-April 2025,
951+
# so this method is now just available for use
953952

954953

955954
# Settings: already Settings

0 commit comments

Comments
 (0)