|
8 | 8 | expect(ModelName::GPT_5_MINI->value)->toBe('gpt-5-mini') |
9 | 9 | ->and(ModelName::GPT_5_NANO->value)->toBe('gpt-5-nano') |
10 | 10 | ->and(ModelName::GEMINI_2_5_FLASH->value)->toBe('gemini-2.5-flash') |
11 | | - ->and(ModelName::GEMINI_3_FLASH->value)->toBe('gemini-3-flash-preview'); |
| 11 | + ->and(ModelName::GEMINI_3_FLASH->value)->toBe('gemini-3-flash-preview') |
| 12 | + ->and(ModelName::GEMINI_3_1_PRO->value)->toBe('gemini-3.1-pro-preview'); |
12 | 13 | }); |
13 | 14 |
|
14 | 15 | it('returns correct names', function (): void { |
15 | 16 | expect(ModelName::GPT_5_MINI->getName())->toBe('GPT-5 mini') |
16 | 17 | ->and(ModelName::GPT_5_NANO->getName())->toBe('GPT-5 Nano') |
17 | 18 | ->and(ModelName::GEMINI_2_5_FLASH->getName())->toBe('Gemini 2.5 Flash') |
18 | | - ->and(ModelName::GEMINI_3_FLASH->getName())->toBe('Gemini 3 Flash'); |
| 19 | + ->and(ModelName::GEMINI_3_FLASH->getName())->toBe('Gemini 3 Flash') |
| 20 | + ->and(ModelName::GEMINI_3_1_PRO->getName())->toBe('Gemini 3.1 Pro'); |
19 | 21 | }); |
20 | 22 |
|
21 | 23 | it('returns correct descriptions', function (): void { |
22 | 24 | expect(ModelName::GPT_5_MINI->getDescription())->toBe('Cheapest model, best for smarter tasks') |
23 | 25 | ->and(ModelName::GPT_5_NANO->getDescription())->toBe('Cheapest model, best for simpler tasks') |
24 | 26 | ->and(ModelName::GEMINI_2_5_FLASH->getDescription())->toBe('Fast and versatile performance across a variety of tasks') |
25 | | - ->and(ModelName::GEMINI_3_FLASH->getDescription())->toBe("Google's latest model with frontier intelligence built for speed that helps everyone learn, build, and plan anything — faster"); |
| 27 | + ->and(ModelName::GEMINI_3_FLASH->getDescription())->toBe("Google's latest model with frontier intelligence built for speed that helps everyone learn, build, and plan anything — faster") |
| 28 | + ->and(ModelName::GEMINI_3_1_PRO->getDescription())->toBe("Google's latest Pro model with advanced reasoning and frontier capabilities"); |
26 | 29 | }); |
27 | 30 |
|
28 | 31 | it('returns correct providers', function (): void { |
29 | 32 | expect(ModelName::GPT_5_MINI->getProvider())->toBe('openai') |
30 | 33 | ->and(ModelName::GPT_5_NANO->getProvider())->toBe('openai') |
31 | 34 | ->and(ModelName::GEMINI_2_5_FLASH->getProvider())->toBe('google') |
32 | | - ->and(ModelName::GEMINI_3_FLASH->getProvider())->toBe('google'); |
| 35 | + ->and(ModelName::GEMINI_3_FLASH->getProvider())->toBe('google') |
| 36 | + ->and(ModelName::GEMINI_3_1_PRO->getProvider())->toBe('google'); |
33 | 37 | }); |
34 | 38 |
|
35 | 39 | it('identifies models that require thinking mode', function (): void { |
36 | 40 | expect(ModelName::GEMINI_3_FLASH->requiresThinkingMode())->toBeTrue() |
| 41 | + ->and(ModelName::GEMINI_3_1_PRO->requiresThinkingMode())->toBeTrue() |
37 | 42 | ->and(ModelName::GEMINI_2_5_FLASH->requiresThinkingMode())->toBeFalse() |
38 | 43 | ->and(ModelName::GPT_5_MINI->requiresThinkingMode())->toBeFalse() |
39 | 44 | ->and(ModelName::GPT_5_NANO->requiresThinkingMode())->toBeFalse(); |
|
43 | 48 | expect(ModelName::GPT_5_MINI->supportsTemperature())->toBeFalse() |
44 | 49 | ->and(ModelName::GPT_5_NANO->supportsTemperature())->toBeFalse() |
45 | 50 | ->and(ModelName::GEMINI_2_5_FLASH->supportsTemperature())->toBeTrue() |
46 | | - ->and(ModelName::GEMINI_3_FLASH->supportsTemperature())->toBeTrue(); |
| 51 | + ->and(ModelName::GEMINI_3_FLASH->supportsTemperature())->toBeTrue() |
| 52 | + ->and(ModelName::GEMINI_3_1_PRO->supportsTemperature())->toBeTrue(); |
47 | 53 | }); |
48 | 54 |
|
49 | 55 | it('returns correct thinking budget for thinking models', function (): void { |
50 | 56 | expect(ModelName::GEMINI_3_FLASH->getThinkingBudget())->toBe(8192) |
| 57 | + ->and(ModelName::GEMINI_3_1_PRO->getThinkingBudget())->toBe(8192) |
51 | 58 | ->and(ModelName::GEMINI_2_5_FLASH->getThinkingBudget())->toBeNull() |
52 | 59 | ->and(ModelName::GPT_5_MINI->getThinkingBudget())->toBeNull(); |
53 | 60 | }); |
54 | 61 |
|
55 | 62 | it('returns correct recommended temperature', function (): void { |
56 | 63 | expect(ModelName::GEMINI_3_FLASH->getRecommendedTemperature())->toBe(1.0) |
| 64 | + ->and(ModelName::GEMINI_3_1_PRO->getRecommendedTemperature())->toBe(1.0) |
57 | 65 | ->and(ModelName::GEMINI_2_5_FLASH->getRecommendedTemperature())->toBe(0.7) |
58 | 66 | ->and(ModelName::GPT_5_MINI->getRecommendedTemperature())->toBe(0.7); |
59 | 67 | }); |
60 | 68 |
|
61 | 69 | it('returns correct minimum max tokens', function (): void { |
62 | 70 | expect(ModelName::GEMINI_3_FLASH->getMinMaxTokens())->toBe(16384) |
| 71 | + ->and(ModelName::GEMINI_3_1_PRO->getMinMaxTokens())->toBe(16384) |
63 | 72 | ->and(ModelName::GEMINI_2_5_FLASH->getMinMaxTokens())->toBe(8000) |
64 | 73 | ->and(ModelName::GPT_5_MINI->getMinMaxTokens())->toBe(8000); |
65 | 74 | }); |
|
79 | 88 | $models = ModelName::getAvailableModels(); |
80 | 89 |
|
81 | 90 | expect($models)->toBeArray() |
82 | | - ->and($models)->toHaveCount(4) |
| 91 | + ->and($models)->toHaveCount(5) |
83 | 92 | ->and($models[0])->toHaveKeys(['id', 'name', 'description', 'provider']) |
84 | 93 | ->and($models[0]['id'])->toBe('gpt-5-mini') |
85 | 94 | ->and($models[1]['id'])->toBe('gpt-5-nano') |
86 | 95 | ->and($models[2]['id'])->toBe('gemini-2.5-flash') |
87 | | - ->and($models[3]['id'])->toBe('gemini-3-flash-preview'); |
| 96 | + ->and($models[3]['id'])->toBe('gemini-3-flash-preview') |
| 97 | + ->and($models[4]['id'])->toBe('gemini-3.1-pro-preview'); |
88 | 98 | }); |
0 commit comments