TestReasoningModelDetection 测试推理模型检测
(t *testing.T)
| 445 | |
| 446 | // TestReasoningModelDetection 测试推理模型检测 |
| 447 | func TestReasoningModelDetection(t *testing.T) { |
| 448 | testCases := []struct { |
| 449 | model string |
| 450 | isReasoning bool |
| 451 | }{ |
| 452 | {"gpt-4o", false}, |
| 453 | {"gpt-4", false}, |
| 454 | {"o1-preview", true}, |
| 455 | {"o1-mini", true}, |
| 456 | {"o3-mini", true}, |
| 457 | {"claude-3-opus", false}, |
| 458 | } |
| 459 | |
| 460 | for _, tc := range testCases { |
| 461 | t.Run(tc.model, func(t *testing.T) { |
| 462 | result := isReasoningModel(tc.model) |
| 463 | if result != tc.isReasoning { |
| 464 | t.Errorf("Model %s: expected isReasoning=%v, got %v", tc.model, tc.isReasoning, result) |
| 465 | } |
| 466 | }) |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | // TestToolConversion 测试工具转换 |
| 471 | func TestToolConversion(t *testing.T) { |
nothing calls this directly
no test coverage detected