You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tests): update ToolMode conversion tests for conditional ToolChoice behavior
xAI now rejects requests that set ToolChoice when no tools are present in
the request. The production code was already updated to gate ToolChoice on
request.Tools.Count > 0, but the five AsCompletionsRequest_*ToolMode* tests
were still passing an empty tools list and asserting ToolChoice was set.
Changes:
- Add DummyTool() helper that creates a minimal AIFunction for use in tests
- Add Tools = [DummyTool()] to all ToolMode tests so ToolChoice gets set
- Add AsCompletionsRequest_NoTools_DoesNotSetToolChoice to explicitly document
and verify the new behavior: no tools => no ToolChoice, regardless of ToolMode
0 commit comments