letta-client 1.0.0a9__py3-none-any.whl → 1.0.0a11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of letta-client might be problematic. Click here for more details.

Files changed (63) hide show
  1. letta_client/_client.py +5 -1
  2. letta_client/_streaming.py +40 -2
  3. letta_client/_version.py +1 -1
  4. letta_client/resources/agents/agents.py +396 -396
  5. letta_client/resources/agents/blocks.py +198 -190
  6. letta_client/resources/agents/files.py +10 -13
  7. letta_client/resources/agents/folders.py +10 -13
  8. letta_client/resources/agents/messages.py +380 -370
  9. letta_client/resources/agents/tools.py +10 -13
  10. letta_client/resources/archives.py +111 -113
  11. letta_client/resources/batches/batches.py +10 -12
  12. letta_client/resources/batches/messages.py +11 -14
  13. letta_client/resources/blocks/blocks.py +238 -222
  14. letta_client/resources/folders/agents.py +10 -13
  15. letta_client/resources/folders/files.py +9 -12
  16. letta_client/resources/folders/folders.py +143 -145
  17. letta_client/resources/groups/groups.py +141 -141
  18. letta_client/resources/groups/messages.py +198 -198
  19. letta_client/resources/identities/blocks.py +7 -7
  20. letta_client/resources/identities/identities.py +151 -153
  21. letta_client/resources/runs/runs.py +11 -13
  22. letta_client/resources/tags.py +10 -13
  23. letta_client/resources/tools.py +802 -204
  24. letta_client/types/__init__.py +14 -7
  25. letta_client/types/{agent_update_params.py → agent_modify_params.py} +2 -2
  26. letta_client/types/agent_state.py +6 -3
  27. letta_client/types/agents/__init__.py +5 -3
  28. letta_client/types/agents/block.py +6 -3
  29. letta_client/types/agents/{block_update_params.py → block_modify_params.py} +8 -5
  30. letta_client/types/agents/file_list_response.py +14 -3
  31. letta_client/types/agents/folder_list_response.py +7 -3
  32. letta_client/types/agents/letta_streaming_response.py +70 -0
  33. letta_client/types/agents/{message_update_params.py → message_modify_params.py} +2 -2
  34. letta_client/types/agents/{message_update_response.py → message_modify_response.py} +2 -2
  35. letta_client/types/agents/tool_list_response.py +10 -0
  36. letta_client/types/archive_list_response.py +10 -0
  37. letta_client/types/{archive_update_params.py → archive_modify_params.py} +2 -2
  38. letta_client/types/batch_list_response.py +10 -0
  39. letta_client/types/batches/__init__.py +1 -0
  40. letta_client/types/batches/message_list_response.py +12 -0
  41. letta_client/types/block_create_params.py +6 -3
  42. letta_client/types/{block_update_params.py → block_modify_params.py} +8 -5
  43. letta_client/types/block_response.py +63 -0
  44. letta_client/types/create_block_param.py +6 -3
  45. letta_client/types/folder_list_response.py +10 -0
  46. letta_client/types/{folder_update_params.py → folder_modify_params.py} +2 -2
  47. letta_client/types/folders/agent_list_response.py +2 -1
  48. letta_client/types/folders/file_list_response.py +7 -4
  49. letta_client/types/{group_update_params.py → group_modify_params.py} +2 -2
  50. letta_client/types/groups/__init__.py +2 -2
  51. letta_client/types/groups/{message_update_params.py → message_modify_params.py} +2 -2
  52. letta_client/types/groups/{message_update_response.py → message_modify_response.py} +2 -2
  53. letta_client/types/identity_list_response.py +10 -0
  54. letta_client/types/{identity_update_params.py → identity_modify_params.py} +2 -2
  55. letta_client/types/run_list_response.py +10 -0
  56. letta_client/types/tag_list_response.py +2 -1
  57. letta_client/types/tool.py +106 -2
  58. letta_client/types/tool_list_response.py +10 -0
  59. letta_client/types/{tool_update_params.py → tool_modify_params.py} +2 -2
  60. {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a11.dist-info}/METADATA +1 -1
  61. {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a11.dist-info}/RECORD +63 -53
  62. {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a11.dist-info}/WHEEL +0 -0
  63. {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a11.dist-info}/licenses/LICENSE +0 -0
@@ -27,7 +27,7 @@ from ...types import (
27
27
  IdentityType,
28
28
  identity_list_params,
29
29
  identity_create_params,
30
- identity_update_params,
30
+ identity_modify_params,
31
31
  identity_upsert_params,
32
32
  )
33
33
  from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
@@ -48,10 +48,10 @@ from ..._response import (
48
48
  async_to_raw_response_wrapper,
49
49
  async_to_streamed_response_wrapper,
50
50
  )
51
- from ...pagination import SyncArrayPage, AsyncArrayPage
52
- from ..._base_client import AsyncPaginator, make_request_options
51
+ from ..._base_client import make_request_options
53
52
  from ...types.identity import Identity
54
53
  from ...types.identity_type import IdentityType
54
+ from ...types.identity_list_response import IdentityListResponse
55
55
  from ...types.identity_count_response import IdentityCountResponse
56
56
  from ...types.identity_property_param import IdentityPropertyParam
57
57
 
@@ -192,70 +192,6 @@ class IdentitiesResource(SyncAPIResource):
192
192
  cast_to=Identity,
193
193
  )
194
194
 
195
- def update(
196
- self,
197
- identity_id: str,
198
- *,
199
- agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
200
- block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
201
- identifier_key: Optional[str] | Omit = omit,
202
- identity_type: Optional[IdentityType] | Omit = omit,
203
- name: Optional[str] | Omit = omit,
204
- properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
205
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
206
- # The extra values given here take precedence over values defined on the client or passed to this method.
207
- extra_headers: Headers | None = None,
208
- extra_query: Query | None = None,
209
- extra_body: Body | None = None,
210
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
211
- ) -> Identity:
212
- """
213
- Modify Identity
214
-
215
- Args:
216
- identity_id: The ID of the identity in the format 'identity-<uuid4>'
217
-
218
- agent_ids: The agent ids that are associated with the identity.
219
-
220
- block_ids: The IDs of the blocks associated with the identity.
221
-
222
- identifier_key: External, user-generated identifier key of the identity.
223
-
224
- identity_type: Enum to represent the type of the identity.
225
-
226
- name: The name of the identity.
227
-
228
- properties: List of properties associated with the identity.
229
-
230
- extra_headers: Send extra headers
231
-
232
- extra_query: Add additional query parameters to the request
233
-
234
- extra_body: Add additional JSON properties to the request
235
-
236
- timeout: Override the client-level default timeout for this request, in seconds
237
- """
238
- if not identity_id:
239
- raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
240
- return self._patch(
241
- f"/v1/identities/{identity_id}",
242
- body=maybe_transform(
243
- {
244
- "agent_ids": agent_ids,
245
- "block_ids": block_ids,
246
- "identifier_key": identifier_key,
247
- "identity_type": identity_type,
248
- "name": name,
249
- "properties": properties,
250
- },
251
- identity_update_params.IdentityUpdateParams,
252
- ),
253
- options=make_request_options(
254
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
255
- ),
256
- cast_to=Identity,
257
- )
258
-
259
195
  def list(
260
196
  self,
261
197
  *,
@@ -274,7 +210,7 @@ class IdentitiesResource(SyncAPIResource):
274
210
  extra_query: Query | None = None,
275
211
  extra_body: Body | None = None,
276
212
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
277
- ) -> SyncArrayPage[Identity]:
213
+ ) -> IdentityListResponse:
278
214
  """
279
215
  Get a list of all identities in the database
280
216
 
@@ -302,9 +238,8 @@ class IdentitiesResource(SyncAPIResource):
302
238
 
303
239
  timeout: Override the client-level default timeout for this request, in seconds
304
240
  """
305
- return self._get_api_list(
241
+ return self._get(
306
242
  "/v1/identities/",
307
- page=SyncArrayPage[Identity],
308
243
  options=make_request_options(
309
244
  extra_headers=extra_headers,
310
245
  extra_query=extra_query,
@@ -325,7 +260,7 @@ class IdentitiesResource(SyncAPIResource):
325
260
  identity_list_params.IdentityListParams,
326
261
  ),
327
262
  ),
328
- model=Identity,
263
+ cast_to=IdentityListResponse,
329
264
  )
330
265
 
331
266
  def delete(
@@ -382,6 +317,70 @@ class IdentitiesResource(SyncAPIResource):
382
317
  cast_to=int,
383
318
  )
384
319
 
320
+ def modify(
321
+ self,
322
+ identity_id: str,
323
+ *,
324
+ agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
325
+ block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
326
+ identifier_key: Optional[str] | Omit = omit,
327
+ identity_type: Optional[IdentityType] | Omit = omit,
328
+ name: Optional[str] | Omit = omit,
329
+ properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
330
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
331
+ # The extra values given here take precedence over values defined on the client or passed to this method.
332
+ extra_headers: Headers | None = None,
333
+ extra_query: Query | None = None,
334
+ extra_body: Body | None = None,
335
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
336
+ ) -> Identity:
337
+ """
338
+ Modify Identity
339
+
340
+ Args:
341
+ identity_id: The ID of the identity in the format 'identity-<uuid4>'
342
+
343
+ agent_ids: The agent ids that are associated with the identity.
344
+
345
+ block_ids: The IDs of the blocks associated with the identity.
346
+
347
+ identifier_key: External, user-generated identifier key of the identity.
348
+
349
+ identity_type: Enum to represent the type of the identity.
350
+
351
+ name: The name of the identity.
352
+
353
+ properties: List of properties associated with the identity.
354
+
355
+ extra_headers: Send extra headers
356
+
357
+ extra_query: Add additional query parameters to the request
358
+
359
+ extra_body: Add additional JSON properties to the request
360
+
361
+ timeout: Override the client-level default timeout for this request, in seconds
362
+ """
363
+ if not identity_id:
364
+ raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
365
+ return self._patch(
366
+ f"/v1/identities/{identity_id}",
367
+ body=maybe_transform(
368
+ {
369
+ "agent_ids": agent_ids,
370
+ "block_ids": block_ids,
371
+ "identifier_key": identifier_key,
372
+ "identity_type": identity_type,
373
+ "name": name,
374
+ "properties": properties,
375
+ },
376
+ identity_modify_params.IdentityModifyParams,
377
+ ),
378
+ options=make_request_options(
379
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
380
+ ),
381
+ cast_to=Identity,
382
+ )
383
+
385
384
  def upsert(
386
385
  self,
387
386
  *,
@@ -584,71 +583,7 @@ class AsyncIdentitiesResource(AsyncAPIResource):
584
583
  cast_to=Identity,
585
584
  )
586
585
 
587
- async def update(
588
- self,
589
- identity_id: str,
590
- *,
591
- agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
592
- block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
593
- identifier_key: Optional[str] | Omit = omit,
594
- identity_type: Optional[IdentityType] | Omit = omit,
595
- name: Optional[str] | Omit = omit,
596
- properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
597
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
598
- # The extra values given here take precedence over values defined on the client or passed to this method.
599
- extra_headers: Headers | None = None,
600
- extra_query: Query | None = None,
601
- extra_body: Body | None = None,
602
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
603
- ) -> Identity:
604
- """
605
- Modify Identity
606
-
607
- Args:
608
- identity_id: The ID of the identity in the format 'identity-<uuid4>'
609
-
610
- agent_ids: The agent ids that are associated with the identity.
611
-
612
- block_ids: The IDs of the blocks associated with the identity.
613
-
614
- identifier_key: External, user-generated identifier key of the identity.
615
-
616
- identity_type: Enum to represent the type of the identity.
617
-
618
- name: The name of the identity.
619
-
620
- properties: List of properties associated with the identity.
621
-
622
- extra_headers: Send extra headers
623
-
624
- extra_query: Add additional query parameters to the request
625
-
626
- extra_body: Add additional JSON properties to the request
627
-
628
- timeout: Override the client-level default timeout for this request, in seconds
629
- """
630
- if not identity_id:
631
- raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
632
- return await self._patch(
633
- f"/v1/identities/{identity_id}",
634
- body=await async_maybe_transform(
635
- {
636
- "agent_ids": agent_ids,
637
- "block_ids": block_ids,
638
- "identifier_key": identifier_key,
639
- "identity_type": identity_type,
640
- "name": name,
641
- "properties": properties,
642
- },
643
- identity_update_params.IdentityUpdateParams,
644
- ),
645
- options=make_request_options(
646
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
647
- ),
648
- cast_to=Identity,
649
- )
650
-
651
- def list(
586
+ async def list(
652
587
  self,
653
588
  *,
654
589
  after: Optional[str] | Omit = omit,
@@ -666,7 +601,7 @@ class AsyncIdentitiesResource(AsyncAPIResource):
666
601
  extra_query: Query | None = None,
667
602
  extra_body: Body | None = None,
668
603
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
669
- ) -> AsyncPaginator[Identity, AsyncArrayPage[Identity]]:
604
+ ) -> IdentityListResponse:
670
605
  """
671
606
  Get a list of all identities in the database
672
607
 
@@ -694,15 +629,14 @@ class AsyncIdentitiesResource(AsyncAPIResource):
694
629
 
695
630
  timeout: Override the client-level default timeout for this request, in seconds
696
631
  """
697
- return self._get_api_list(
632
+ return await self._get(
698
633
  "/v1/identities/",
699
- page=AsyncArrayPage[Identity],
700
634
  options=make_request_options(
701
635
  extra_headers=extra_headers,
702
636
  extra_query=extra_query,
703
637
  extra_body=extra_body,
704
638
  timeout=timeout,
705
- query=maybe_transform(
639
+ query=await async_maybe_transform(
706
640
  {
707
641
  "after": after,
708
642
  "before": before,
@@ -717,7 +651,7 @@ class AsyncIdentitiesResource(AsyncAPIResource):
717
651
  identity_list_params.IdentityListParams,
718
652
  ),
719
653
  ),
720
- model=Identity,
654
+ cast_to=IdentityListResponse,
721
655
  )
722
656
 
723
657
  async def delete(
@@ -774,6 +708,70 @@ class AsyncIdentitiesResource(AsyncAPIResource):
774
708
  cast_to=int,
775
709
  )
776
710
 
711
+ async def modify(
712
+ self,
713
+ identity_id: str,
714
+ *,
715
+ agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
716
+ block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
717
+ identifier_key: Optional[str] | Omit = omit,
718
+ identity_type: Optional[IdentityType] | Omit = omit,
719
+ name: Optional[str] | Omit = omit,
720
+ properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
721
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
722
+ # The extra values given here take precedence over values defined on the client or passed to this method.
723
+ extra_headers: Headers | None = None,
724
+ extra_query: Query | None = None,
725
+ extra_body: Body | None = None,
726
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
727
+ ) -> Identity:
728
+ """
729
+ Modify Identity
730
+
731
+ Args:
732
+ identity_id: The ID of the identity in the format 'identity-<uuid4>'
733
+
734
+ agent_ids: The agent ids that are associated with the identity.
735
+
736
+ block_ids: The IDs of the blocks associated with the identity.
737
+
738
+ identifier_key: External, user-generated identifier key of the identity.
739
+
740
+ identity_type: Enum to represent the type of the identity.
741
+
742
+ name: The name of the identity.
743
+
744
+ properties: List of properties associated with the identity.
745
+
746
+ extra_headers: Send extra headers
747
+
748
+ extra_query: Add additional query parameters to the request
749
+
750
+ extra_body: Add additional JSON properties to the request
751
+
752
+ timeout: Override the client-level default timeout for this request, in seconds
753
+ """
754
+ if not identity_id:
755
+ raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
756
+ return await self._patch(
757
+ f"/v1/identities/{identity_id}",
758
+ body=await async_maybe_transform(
759
+ {
760
+ "agent_ids": agent_ids,
761
+ "block_ids": block_ids,
762
+ "identifier_key": identifier_key,
763
+ "identity_type": identity_type,
764
+ "name": name,
765
+ "properties": properties,
766
+ },
767
+ identity_modify_params.IdentityModifyParams,
768
+ ),
769
+ options=make_request_options(
770
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
771
+ ),
772
+ cast_to=Identity,
773
+ )
774
+
777
775
  async def upsert(
778
776
  self,
779
777
  *,
@@ -852,9 +850,6 @@ class IdentitiesResourceWithRawResponse:
852
850
  self.retrieve = to_raw_response_wrapper(
853
851
  identities.retrieve,
854
852
  )
855
- self.update = to_raw_response_wrapper(
856
- identities.update,
857
- )
858
853
  self.list = to_raw_response_wrapper(
859
854
  identities.list,
860
855
  )
@@ -864,6 +859,9 @@ class IdentitiesResourceWithRawResponse:
864
859
  self.count = to_raw_response_wrapper(
865
860
  identities.count,
866
861
  )
862
+ self.modify = to_raw_response_wrapper(
863
+ identities.modify,
864
+ )
867
865
  self.upsert = to_raw_response_wrapper(
868
866
  identities.upsert,
869
867
  )
@@ -891,9 +889,6 @@ class AsyncIdentitiesResourceWithRawResponse:
891
889
  self.retrieve = async_to_raw_response_wrapper(
892
890
  identities.retrieve,
893
891
  )
894
- self.update = async_to_raw_response_wrapper(
895
- identities.update,
896
- )
897
892
  self.list = async_to_raw_response_wrapper(
898
893
  identities.list,
899
894
  )
@@ -903,6 +898,9 @@ class AsyncIdentitiesResourceWithRawResponse:
903
898
  self.count = async_to_raw_response_wrapper(
904
899
  identities.count,
905
900
  )
901
+ self.modify = async_to_raw_response_wrapper(
902
+ identities.modify,
903
+ )
906
904
  self.upsert = async_to_raw_response_wrapper(
907
905
  identities.upsert,
908
906
  )
@@ -930,9 +928,6 @@ class IdentitiesResourceWithStreamingResponse:
930
928
  self.retrieve = to_streamed_response_wrapper(
931
929
  identities.retrieve,
932
930
  )
933
- self.update = to_streamed_response_wrapper(
934
- identities.update,
935
- )
936
931
  self.list = to_streamed_response_wrapper(
937
932
  identities.list,
938
933
  )
@@ -942,6 +937,9 @@ class IdentitiesResourceWithStreamingResponse:
942
937
  self.count = to_streamed_response_wrapper(
943
938
  identities.count,
944
939
  )
940
+ self.modify = to_streamed_response_wrapper(
941
+ identities.modify,
942
+ )
945
943
  self.upsert = to_streamed_response_wrapper(
946
944
  identities.upsert,
947
945
  )
@@ -969,9 +967,6 @@ class AsyncIdentitiesResourceWithStreamingResponse:
969
967
  self.retrieve = async_to_streamed_response_wrapper(
970
968
  identities.retrieve,
971
969
  )
972
- self.update = async_to_streamed_response_wrapper(
973
- identities.update,
974
- )
975
970
  self.list = async_to_streamed_response_wrapper(
976
971
  identities.list,
977
972
  )
@@ -981,6 +976,9 @@ class AsyncIdentitiesResourceWithStreamingResponse:
981
976
  self.count = async_to_streamed_response_wrapper(
982
977
  identities.count,
983
978
  )
979
+ self.modify = async_to_streamed_response_wrapper(
980
+ identities.modify,
981
+ )
984
982
  self.upsert = async_to_streamed_response_wrapper(
985
983
  identities.upsert,
986
984
  )
@@ -25,7 +25,7 @@ from .usage import (
25
25
  )
26
26
  from ...types import StopReasonType, run_list_params
27
27
  from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
28
- from ..._utils import maybe_transform
28
+ from ..._utils import maybe_transform, async_maybe_transform
29
29
  from .messages import (
30
30
  MessagesResource,
31
31
  AsyncMessagesResource,
@@ -42,10 +42,10 @@ from ..._response import (
42
42
  async_to_raw_response_wrapper,
43
43
  async_to_streamed_response_wrapper,
44
44
  )
45
- from ...pagination import SyncArrayPage, AsyncArrayPage
46
- from ..._base_client import AsyncPaginator, make_request_options
45
+ from ..._base_client import make_request_options
47
46
  from ...types.agents.run import Run
48
47
  from ...types.stop_reason_type import StopReasonType
48
+ from ...types.run_list_response import RunListResponse
49
49
 
50
50
  __all__ = ["RunsResource", "AsyncRunsResource"]
51
51
 
@@ -136,7 +136,7 @@ class RunsResource(SyncAPIResource):
136
136
  extra_query: Query | None = None,
137
137
  extra_body: Body | None = None,
138
138
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
139
- ) -> SyncArrayPage[Run]:
139
+ ) -> RunListResponse:
140
140
  """
141
141
  List all runs.
142
142
 
@@ -178,9 +178,8 @@ class RunsResource(SyncAPIResource):
178
178
 
179
179
  timeout: Override the client-level default timeout for this request, in seconds
180
180
  """
181
- return self._get_api_list(
181
+ return self._get(
182
182
  "/v1/runs/",
183
- page=SyncArrayPage[Run],
184
183
  options=make_request_options(
185
184
  extra_headers=extra_headers,
186
185
  extra_query=extra_query,
@@ -204,7 +203,7 @@ class RunsResource(SyncAPIResource):
204
203
  run_list_params.RunListParams,
205
204
  ),
206
205
  ),
207
- model=Run,
206
+ cast_to=RunListResponse,
208
207
  )
209
208
 
210
209
 
@@ -273,7 +272,7 @@ class AsyncRunsResource(AsyncAPIResource):
273
272
  cast_to=Run,
274
273
  )
275
274
 
276
- def list(
275
+ async def list(
277
276
  self,
278
277
  *,
279
278
  active: bool | Omit = omit,
@@ -294,7 +293,7 @@ class AsyncRunsResource(AsyncAPIResource):
294
293
  extra_query: Query | None = None,
295
294
  extra_body: Body | None = None,
296
295
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
297
- ) -> AsyncPaginator[Run, AsyncArrayPage[Run]]:
296
+ ) -> RunListResponse:
298
297
  """
299
298
  List all runs.
300
299
 
@@ -336,15 +335,14 @@ class AsyncRunsResource(AsyncAPIResource):
336
335
 
337
336
  timeout: Override the client-level default timeout for this request, in seconds
338
337
  """
339
- return self._get_api_list(
338
+ return await self._get(
340
339
  "/v1/runs/",
341
- page=AsyncArrayPage[Run],
342
340
  options=make_request_options(
343
341
  extra_headers=extra_headers,
344
342
  extra_query=extra_query,
345
343
  extra_body=extra_body,
346
344
  timeout=timeout,
347
- query=maybe_transform(
345
+ query=await async_maybe_transform(
348
346
  {
349
347
  "active": active,
350
348
  "after": after,
@@ -362,7 +360,7 @@ class AsyncRunsResource(AsyncAPIResource):
362
360
  run_list_params.RunListParams,
363
361
  ),
364
362
  ),
365
- model=Run,
363
+ cast_to=RunListResponse,
366
364
  )
367
365
 
368
366
 
@@ -9,7 +9,7 @@ import httpx
9
9
 
10
10
  from ..types import tag_list_params
11
11
  from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
12
- from .._utils import maybe_transform
12
+ from .._utils import maybe_transform, async_maybe_transform
13
13
  from .._compat import cached_property
14
14
  from .._resource import SyncAPIResource, AsyncAPIResource
15
15
  from .._response import (
@@ -18,8 +18,7 @@ from .._response import (
18
18
  async_to_raw_response_wrapper,
19
19
  async_to_streamed_response_wrapper,
20
20
  )
21
- from ..pagination import SyncArrayPage, AsyncArrayPage
22
- from .._base_client import AsyncPaginator, make_request_options
21
+ from .._base_client import make_request_options
23
22
  from ..types.tag_list_response import TagListResponse
24
23
 
25
24
  __all__ = ["TagsResource", "AsyncTagsResource"]
@@ -61,7 +60,7 @@ class TagsResource(SyncAPIResource):
61
60
  extra_query: Query | None = None,
62
61
  extra_body: Body | None = None,
63
62
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
64
- ) -> SyncArrayPage[TagListResponse]:
63
+ ) -> TagListResponse:
65
64
  """
66
65
  Get the list of all agent tags that have been created.
67
66
 
@@ -91,9 +90,8 @@ class TagsResource(SyncAPIResource):
91
90
 
92
91
  timeout: Override the client-level default timeout for this request, in seconds
93
92
  """
94
- return self._get_api_list(
93
+ return self._get(
95
94
  "/v1/tags/",
96
- page=SyncArrayPage[TagListResponse],
97
95
  options=make_request_options(
98
96
  extra_headers=extra_headers,
99
97
  extra_query=extra_query,
@@ -112,7 +110,7 @@ class TagsResource(SyncAPIResource):
112
110
  tag_list_params.TagListParams,
113
111
  ),
114
112
  ),
115
- model=str,
113
+ cast_to=TagListResponse,
116
114
  )
117
115
 
118
116
 
@@ -136,7 +134,7 @@ class AsyncTagsResource(AsyncAPIResource):
136
134
  """
137
135
  return AsyncTagsResourceWithStreamingResponse(self)
138
136
 
139
- def list(
137
+ async def list(
140
138
  self,
141
139
  *,
142
140
  after: Optional[str] | Omit = omit,
@@ -152,7 +150,7 @@ class AsyncTagsResource(AsyncAPIResource):
152
150
  extra_query: Query | None = None,
153
151
  extra_body: Body | None = None,
154
152
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
155
- ) -> AsyncPaginator[TagListResponse, AsyncArrayPage[TagListResponse]]:
153
+ ) -> TagListResponse:
156
154
  """
157
155
  Get the list of all agent tags that have been created.
158
156
 
@@ -182,15 +180,14 @@ class AsyncTagsResource(AsyncAPIResource):
182
180
 
183
181
  timeout: Override the client-level default timeout for this request, in seconds
184
182
  """
185
- return self._get_api_list(
183
+ return await self._get(
186
184
  "/v1/tags/",
187
- page=AsyncArrayPage[TagListResponse],
188
185
  options=make_request_options(
189
186
  extra_headers=extra_headers,
190
187
  extra_query=extra_query,
191
188
  extra_body=extra_body,
192
189
  timeout=timeout,
193
- query=maybe_transform(
190
+ query=await async_maybe_transform(
194
191
  {
195
192
  "after": after,
196
193
  "before": before,
@@ -203,7 +200,7 @@ class AsyncTagsResource(AsyncAPIResource):
203
200
  tag_list_params.TagListParams,
204
201
  ),
205
202
  ),
206
- model=str,
203
+ cast_to=TagListResponse,
207
204
  )
208
205
 
209
206