Skip to content

Commit

Permalink
Fix tool_choice being dropped in inspect_model_request
Browse files Browse the repository at this point in the history
  • Loading branch information
alexb-palisaderesearch committed Mar 7, 2025
1 parent db5f359 commit 8af7553
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/inspect_ai/solver/_bridge/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ async def inspect_model_request(
)
)

tool_choice = json_data.get("tool_choice", None)

# resolve model
if model_name == "inspect":
model = get_model()
Expand All @@ -123,6 +125,7 @@ async def inspect_model_request(
output = await model.generate(
input=input,
tools=inspect_tools,
tool_choice=tool_choice,
config=generate_config_from_openai(options),
)

Expand Down

0 comments on commit 8af7553

Please sign in to comment.