@@ -55,6 +55,7 @@ private function mockBasicBody(): array
5555 {
5656 return [
5757 'id ' => 'gen-QcWgjEtiEDNHgomV2jjoQpCZlkRZ ' ,
58+ 'provider ' => 'HuggingFace ' ,
5859 'model ' => $ this ->model ,
5960 'object ' => 'chat.completion ' ,
6061 'created ' => 1718888436 ,
@@ -82,7 +83,7 @@ private function mockBasicCostBody(): array
8283 'data ' => [
8384 'id ' => "gen-QcWgjEtiEDNHgomV2jjoQpCZlkRZ " ,
8485 'model ' => $ this ->model ,
85- 'total_cost ' => 0 ,
86+ 'total_cost ' => 0.00492 ,
8687 'streamed ' => true ,
8788 'origin ' => "https://github.com/moe-mizrak/laravel-openrouter " ,
8889 'cancelled ' => false ,
@@ -110,10 +111,10 @@ private function mockBasicLimitBody(): array
110111 return [
111112 'data ' => [
112113 'label ' => 'sk-or-v1-7a3...1f9 ' ,
113- 'usage ' => 0 ,
114+ 'usage ' => 7.2E-5 ,
114115 'limit ' => 1 ,
115116 'is_free_tier ' => true ,
116- 'limit_remaining ' => 12 ,
117+ 'limit_remaining ' => - 0.0369027621 ,
117118 'rate_limit ' => [
118119 'requests ' => 10 ,
119120 'interval ' => '10s ' ,
@@ -808,6 +809,8 @@ public function it_makes_a_limit_open_route_api_request_and_gets_rate_limit_and_
808809 $ this ->assertNotNull ($ response ->label );
809810 $ this ->assertNotNull ($ response ->usage );
810811 $ this ->assertNotNull ($ response ->is_free_tier );
812+ $ this ->assertNotNull ($ response ->limit );
813+ $ this ->assertNotNull ($ response ->limit_remaining );
811814 $ this ->assertNotNull ($ response ->rate_limit );
812815 $ this ->assertNotNull ($ response ->rate_limit ->requests );
813816 $ this ->assertNotNull ($ response ->rate_limit ->interval );
0 commit comments