Skip to content

Commit 3e5debb

Browse files
authored
Pinned latest litellm for tool_choice=Tool's finish_reason fix (#244)
1 parent 20a1e92 commit 3e5debb

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ lfrqa = ["aviary.lfrqa"]
7979
litqa = ["aviary.litqa"]
8080
llm = [
8181
"fhlmi",
82-
'litellm; python_version < "3.13"', # NOTE: paper-qa==5.3 doesn't support 3.13 yet
83-
'litellm>=1.49.1; python_version >= "3.13"', # For removal of imghdr
82+
"litellm>=1.72.0", # Pin for fixed finish_reason when specifying a tool_choice
8483
]
8584
server = [
8685
"click",

src/aviary/tools/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ async def __call__(
6969
"type": "function",
7070
"function": {"name": tool_choice.info.name},
7171
}
72-
expected_finish_reason = {"stop"} # TODO: should this be .add("stop") too?
7372
elif tool_choice is not None:
7473
completion_kwargs["tool_choice"] = tool_choice
7574
if tool_choice == self.TOOL_CHOICE_REQUIRED:

uv.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)