File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,11 @@ protected static function getCostPerToken(int $pricePerMillionTokens): float
128128 */
129129 protected static function getMaxInputTokens (array $ body ): ?int
130130 {
131- return str_starts_with ($ body ['id ' ], 'grok-2-vision ' )
131+ $ tokens = str_starts_with ($ body ['id ' ], 'grok-2-vision ' )
132132 ? 32768
133133 : 131072 ;
134+
135+ return (int ) ($ tokens * 0.9765625 );
134136 }
135137
136138 /**
Original file line number Diff line number Diff line change 5959 expect ($ modelInfo ->name )->toBe ('grok-3-beta ' );
6060 expect ($ modelInfo ->provider )->toBe (ModelProvider::XAI );
6161 expect ($ modelInfo ->type )->toBe (ModelType::Chat);
62- expect ($ modelInfo ->maxInputTokens )->toBe (131072 );
62+ expect ($ modelInfo ->maxInputTokens )->toBe (128000 );
6363 expect ($ modelInfo ->maxOutputTokens )->toBeNull ();
6464 expect ($ modelInfo ->inputCostPerToken )->toBe (0.0002 );
6565 expect ($ modelInfo ->outputCostPerToken )->toBe (0.001 );
104104 expect ($ modelInfo ->name )->toBe ('grok-2-vision-1212 ' );
105105 expect ($ modelInfo ->provider )->toBe (ModelProvider::XAI );
106106 expect ($ modelInfo ->type )->toBe (ModelType::Chat);
107- expect ($ modelInfo ->maxInputTokens )->toBe (32768 );
107+ expect ($ modelInfo ->maxInputTokens )->toBe (32000 );
108108 expect ($ modelInfo ->maxOutputTokens )->toBeNull ();
109109 expect ($ modelInfo ->inputCostPerToken )->toBe (0.0002 );
110110 expect ($ modelInfo ->outputCostPerToken )->toBe (0.001 );
You can’t perform that action at this time.
0 commit comments