Test OpenAI-specific tool choice "none"
| 649 | |
| 650 | // Test OpenAI-specific tool choice "none" |
| 651 | TEST_F(OpenAISpecificToolTest, ToolChoiceNoneSupport) { |
| 652 | if (!use_real_api_) { |
| 653 | GTEST_SKIP() << "No OPENAI_API_KEY environment variable set"; |
| 654 | } |
| 655 | |
| 656 | GenerateOptions options(model_, "Tell me about the weather"); |
| 657 | options.tools = tools_; |
| 658 | options.tool_choice = ToolChoice::none(); |
| 659 | options.max_tokens = 150; |
| 660 | |
| 661 | auto result = client_->generate_text(options); |
| 662 | |
| 663 | TestAssertions::assertSuccess(result); |
| 664 | EXPECT_FALSE(result.text.empty()); |
| 665 | EXPECT_FALSE(result.has_tool_calls()); |
| 666 | } |
| 667 | |
| 668 | class AnthropicSpecificToolTest : public ::testing::Test { |
| 669 | protected: |
nothing calls this directly
no test coverage detected