Skip to content

Commit d37d657

Browse files
feat(api): api update (#12)
1 parent 7e1b48c commit d37d657

File tree

96 files changed

+1817
-1335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1817
-1335
lines changed

.stats.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hanzo-industries-inc%2FHanzo-AI-ecabe8785463e6887a841c5e04ff8d9cfc0f051e21c68a65253e121da25fb7d5.yml
3-
openapi_spec_hash: c83eb9c3aacb79a28761f5a8aac04d14
1+
configured_endpoints: 188
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hanzo-industries-inc%2FHanzo-AI-74ec345bb9bd4c1c21bd22ff8ed2cd9b1cba5a5c73bf895113c7386b64199b56.yml
3+
openapi_spec_hash: 526f5064d5a79d0a602c9d311b9f8f6b
44
config_hash: 2acfd385c181a354e6449999326a8965

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ from hanzoai import Hanzo
7979
client = Hanzo()
8080

8181
model = client.model.create(
82-
litellm_params={
82+
llm_params={
8383
"model": "model",
8484
"api_base": "api_base",
8585
"api_key": "api_key",
@@ -92,7 +92,7 @@ model = client.model.create(
9292
"custom_llm_provider": "custom_llm_provider",
9393
"input_cost_per_second": 0,
9494
"input_cost_per_token": 0,
95-
"litellm_trace_id": "litellm_trace_id",
95+
"llm_trace_id": "llm_trace_id",
9696
"max_budget": 0,
9797
"max_file_size_mb": 0,
9898
"max_retries": 0,
@@ -115,7 +115,7 @@ model = client.model.create(
115115
model_info={"id": "id"},
116116
model_name="model_name",
117117
)
118-
print(model.litellm_params)
118+
print(model.llm_params)
119119
```
120120

121121
## File uploads

api.md

+12-30
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,7 @@ Methods:
406406
Types:
407407

408408
```python
409-
from hanzoai.types.fine_tuning import (
410-
LiteLlmFineTuningJobCreate,
411-
JobCreateResponse,
412-
JobRetrieveResponse,
413-
JobListResponse,
414-
)
409+
from hanzoai.types.fine_tuning import JobCreateResponse, JobRetrieveResponse, JobListResponse
415410
```
416411

417412
Methods:
@@ -440,8 +435,6 @@ Types:
440435
from hanzoai.types import (
441436
CredentialItem,
442437
CredentialCreateResponse,
443-
CredentialRetrieveResponse,
444-
CredentialUpdateResponse,
445438
CredentialListResponse,
446439
CredentialDeleteResponse,
447440
)
@@ -450,8 +443,6 @@ from hanzoai.types import (
450443
Methods:
451444

452445
- <code title="post /credentials">client.credentials.<a href="./src/hanzoai/resources/credentials.py">create</a>(\*\*<a href="src/hanzoai/types/credential_create_params.py">params</a>) -> <a href="./src/hanzoai/types/credential_create_response.py">object</a></code>
453-
- <code title="get /credentials/{credential_name}">client.credentials.<a href="./src/hanzoai/resources/credentials.py">retrieve</a>(credential_name) -> <a href="./src/hanzoai/types/credential_retrieve_response.py">object</a></code>
454-
- <code title="put /credentials/{credential_name}">client.credentials.<a href="./src/hanzoai/resources/credentials.py">update</a>(path_credential_name, \*\*<a href="src/hanzoai/types/credential_update_params.py">params</a>) -> <a href="./src/hanzoai/types/credential_update_response.py">object</a></code>
455446
- <code title="get /credentials">client.credentials.<a href="./src/hanzoai/resources/credentials.py">list</a>() -> <a href="./src/hanzoai/types/credential_list_response.py">object</a></code>
456447
- <code title="delete /credentials/{credential_name}">client.credentials.<a href="./src/hanzoai/resources/credentials.py">delete</a>(credential_name) -> <a href="./src/hanzoai/types/credential_delete_response.py">object</a></code>
457448

@@ -800,10 +791,8 @@ Types:
800791
```python
801792
from hanzoai.types import (
802793
BlockTeamRequest,
803-
LiteLlmModelTable,
804-
LiteLlmTeamTable,
805-
LiteLlmUserTable,
806794
Member,
795+
TeamCreateResponse,
807796
TeamUpdateResponse,
808797
TeamListResponse,
809798
TeamDeleteResponse,
@@ -820,7 +809,7 @@ from hanzoai.types import (
820809

821810
Methods:
822811

823-
- <code title="post /team/new">client.team.<a href="./src/hanzoai/resources/team/team.py">create</a>(\*\*<a href="src/hanzoai/types/team_create_params.py">params</a>) -> <a href="./src/hanzoai/types/lite_llm_team_table.py">LiteLlmTeamTable</a></code>
812+
- <code title="post /team/new">client.team.<a href="./src/hanzoai/resources/team/team.py">create</a>(\*\*<a href="src/hanzoai/types/team_create_params.py">params</a>) -> <a href="./src/hanzoai/types/team_create_response.py">TeamCreateResponse</a></code>
824813
- <code title="post /team/update">client.team.<a href="./src/hanzoai/resources/team/team.py">update</a>(\*\*<a href="src/hanzoai/types/team_update_params.py">params</a>) -> <a href="./src/hanzoai/types/team_update_response.py">object</a></code>
825814
- <code title="get /team/list">client.team.<a href="./src/hanzoai/resources/team/team.py">list</a>(\*\*<a href="src/hanzoai/types/team_list_params.py">params</a>) -> <a href="./src/hanzoai/types/team_list_response.py">object</a></code>
826815
- <code title="post /team/delete">client.team.<a href="./src/hanzoai/resources/team/team.py">delete</a>(\*\*<a href="src/hanzoai/types/team_delete_params.py">params</a>) -> <a href="./src/hanzoai/types/team_delete_response.py">object</a></code>
@@ -865,40 +854,38 @@ Types:
865854

866855
```python
867856
from hanzoai.types import (
868-
BudgetTable,
869857
OrgMember,
870-
OrganizationMembershipTable,
871-
OrganizationTableWithMembers,
872-
UserRoles,
873858
OrganizationCreateResponse,
859+
OrganizationUpdateResponse,
874860
OrganizationListResponse,
875861
OrganizationDeleteResponse,
876862
OrganizationAddMemberResponse,
877863
OrganizationDeleteMemberResponse,
864+
OrganizationUpdateMemberResponse,
878865
)
879866
```
880867

881868
Methods:
882869

883870
- <code title="post /organization/new">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">create</a>(\*\*<a href="src/hanzoai/types/organization_create_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_create_response.py">OrganizationCreateResponse</a></code>
884-
- <code title="patch /organization/update">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">update</a>(\*\*<a href="src/hanzoai/types/organization_update_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_table_with_members.py">OrganizationTableWithMembers</a></code>
871+
- <code title="patch /organization/update">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">update</a>(\*\*<a href="src/hanzoai/types/organization_update_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_update_response.py">OrganizationUpdateResponse</a></code>
885872
- <code title="get /organization/list">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">list</a>() -> <a href="./src/hanzoai/types/organization_list_response.py">OrganizationListResponse</a></code>
886873
- <code title="delete /organization/delete">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">delete</a>(\*\*<a href="src/hanzoai/types/organization_delete_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_delete_response.py">OrganizationDeleteResponse</a></code>
887874
- <code title="post /organization/member_add">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">add_member</a>(\*\*<a href="src/hanzoai/types/organization_add_member_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_add_member_response.py">OrganizationAddMemberResponse</a></code>
888875
- <code title="delete /organization/member_delete">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">delete_member</a>(\*\*<a href="src/hanzoai/types/organization_delete_member_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_delete_member_response.py">object</a></code>
889-
- <code title="patch /organization/member_update">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">update_member</a>(\*\*<a href="src/hanzoai/types/organization_update_member_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_membership_table.py">OrganizationMembershipTable</a></code>
876+
- <code title="patch /organization/member_update">client.organization.<a href="./src/hanzoai/resources/organization/organization.py">update_member</a>(\*\*<a href="src/hanzoai/types/organization_update_member_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_update_member_response.py">OrganizationUpdateMemberResponse</a></code>
890877

891878
## Info
892879

893880
Types:
894881

895882
```python
896-
from hanzoai.types.organization import InfoDeprecatedResponse
883+
from hanzoai.types.organization import InfoRetrieveResponse, InfoDeprecatedResponse
897884
```
898885

899886
Methods:
900887

901-
- <code title="get /organization/info">client.organization.info.<a href="./src/hanzoai/resources/organization/info.py">retrieve</a>(\*\*<a href="src/hanzoai/types/organization/info_retrieve_params.py">params</a>) -> <a href="./src/hanzoai/types/organization_table_with_members.py">OrganizationTableWithMembers</a></code>
888+
- <code title="get /organization/info">client.organization.info.<a href="./src/hanzoai/resources/organization/info.py">retrieve</a>(\*\*<a href="src/hanzoai/types/organization/info_retrieve_params.py">params</a>) -> <a href="./src/hanzoai/types/organization/info_retrieve_response.py">InfoRetrieveResponse</a></code>
902889
- <code title="post /organization/info">client.organization.info.<a href="./src/hanzoai/resources/organization/info.py">deprecated</a>(\*\*<a href="src/hanzoai/types/organization/info_deprecated_params.py">params</a>) -> <a href="./src/hanzoai/types/organization/info_deprecated_response.py">object</a></code>
903890

904891
# Customer
@@ -908,12 +895,12 @@ Types:
908895
```python
909896
from hanzoai.types import (
910897
BlockUsers,
911-
LiteLlmEndUserTable,
912898
CustomerCreateResponse,
913899
CustomerUpdateResponse,
914900
CustomerListResponse,
915901
CustomerDeleteResponse,
916902
CustomerBlockResponse,
903+
CustomerRetrieveInfoResponse,
917904
CustomerUnblockResponse,
918905
)
919906
```
@@ -925,20 +912,15 @@ Methods:
925912
- <code title="get /customer/list">client.customer.<a href="./src/hanzoai/resources/customer.py">list</a>() -> <a href="./src/hanzoai/types/customer_list_response.py">CustomerListResponse</a></code>
926913
- <code title="post /customer/delete">client.customer.<a href="./src/hanzoai/resources/customer.py">delete</a>(\*\*<a href="src/hanzoai/types/customer_delete_params.py">params</a>) -> <a href="./src/hanzoai/types/customer_delete_response.py">object</a></code>
927914
- <code title="post /customer/block">client.customer.<a href="./src/hanzoai/resources/customer.py">block</a>(\*\*<a href="src/hanzoai/types/customer_block_params.py">params</a>) -> <a href="./src/hanzoai/types/customer_block_response.py">object</a></code>
928-
- <code title="get /customer/info">client.customer.<a href="./src/hanzoai/resources/customer.py">retrieve_info</a>(\*\*<a href="src/hanzoai/types/customer_retrieve_info_params.py">params</a>) -> <a href="./src/hanzoai/types/lite_llm_end_user_table.py">LiteLlmEndUserTable</a></code>
915+
- <code title="get /customer/info">client.customer.<a href="./src/hanzoai/resources/customer.py">retrieve_info</a>(\*\*<a href="src/hanzoai/types/customer_retrieve_info_params.py">params</a>) -> <a href="./src/hanzoai/types/customer_retrieve_info_response.py">CustomerRetrieveInfoResponse</a></code>
929916
- <code title="post /customer/unblock">client.customer.<a href="./src/hanzoai/resources/customer.py">unblock</a>(\*\*<a href="src/hanzoai/types/customer_unblock_params.py">params</a>) -> <a href="./src/hanzoai/types/customer_unblock_response.py">object</a></code>
930917

931918
# Spend
932919

933920
Types:
934921

935922
```python
936-
from hanzoai.types import (
937-
LiteLlmSpendLogs,
938-
SpendCalculateSpendResponse,
939-
SpendListLogsResponse,
940-
SpendListTagsResponse,
941-
)
923+
from hanzoai.types import SpendCalculateSpendResponse, SpendListLogsResponse, SpendListTagsResponse
942924
```
943925

944926
Methods:

src/hanzoai/resources/active.py

+22-22
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def list_callbacks(
4949
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
5050
) -> object:
5151
"""
52-
Returns a list of litellm level settings
52+
Returns a list of llm level settings
5353
5454
This is useful for debugging and ensuring the proxy server is configured
5555
correctly.
@@ -59,17 +59,17 @@ def list_callbacks(
5959
```
6060
{
6161
"alerting": _alerting,
62-
"litellm.callbacks": litellm_callbacks,
63-
"litellm.input_callback": litellm_input_callbacks,
64-
"litellm.failure_callback": litellm_failure_callbacks,
65-
"litellm.success_callback": litellm_success_callbacks,
66-
"litellm._async_success_callback": litellm_async_success_callbacks,
67-
"litellm._async_failure_callback": litellm_async_failure_callbacks,
68-
"litellm._async_input_callback": litellm_async_input_callbacks,
69-
"all_litellm_callbacks": all_litellm_callbacks,
70-
"num_callbacks": len(all_litellm_callbacks),
62+
"llm.callbacks": llm_callbacks,
63+
"llm.input_callback": llm_input_callbacks,
64+
"llm.failure_callback": llm_failure_callbacks,
65+
"llm.success_callback": llm_success_callbacks,
66+
"llm._async_success_callback": llm_async_success_callbacks,
67+
"llm._async_failure_callback": llm_async_failure_callbacks,
68+
"llm._async_input_callback": llm_async_input_callbacks,
69+
"all_llm_callbacks": all_llm_callbacks,
70+
"num_callbacks": len(all_llm_callbacks),
7171
"num_alerting": _num_alerting,
72-
"litellm.request_timeout": litellm.request_timeout,
72+
"llm.request_timeout": llm.request_timeout,
7373
}
7474
```
7575
"""
@@ -113,7 +113,7 @@ async def list_callbacks(
113113
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
114114
) -> object:
115115
"""
116-
Returns a list of litellm level settings
116+
Returns a list of llm level settings
117117
118118
This is useful for debugging and ensuring the proxy server is configured
119119
correctly.
@@ -123,17 +123,17 @@ async def list_callbacks(
123123
```
124124
{
125125
"alerting": _alerting,
126-
"litellm.callbacks": litellm_callbacks,
127-
"litellm.input_callback": litellm_input_callbacks,
128-
"litellm.failure_callback": litellm_failure_callbacks,
129-
"litellm.success_callback": litellm_success_callbacks,
130-
"litellm._async_success_callback": litellm_async_success_callbacks,
131-
"litellm._async_failure_callback": litellm_async_failure_callbacks,
132-
"litellm._async_input_callback": litellm_async_input_callbacks,
133-
"all_litellm_callbacks": all_litellm_callbacks,
134-
"num_callbacks": len(all_litellm_callbacks),
126+
"llm.callbacks": llm_callbacks,
127+
"llm.input_callback": llm_input_callbacks,
128+
"llm.failure_callback": llm_failure_callbacks,
129+
"llm.success_callback": llm_success_callbacks,
130+
"llm._async_success_callback": llm_async_success_callbacks,
131+
"llm._async_failure_callback": llm_async_failure_callbacks,
132+
"llm._async_input_callback": llm_async_input_callbacks,
133+
"all_llm_callbacks": all_llm_callbacks,
134+
"num_callbacks": len(all_llm_callbacks),
135135
"num_alerting": _num_alerting,
136-
"litellm.request_timeout": litellm.request_timeout,
136+
"llm.request_timeout": llm.request_timeout,
137137
}
138138
```
139139
"""

src/hanzoai/resources/anthropic.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def create(
5050
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
5151
) -> object:
5252
"""
53-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
53+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
5454
5555
Args:
5656
extra_headers: Send extra headers
@@ -83,7 +83,7 @@ def retrieve(
8383
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
8484
) -> object:
8585
"""
86-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
86+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
8787
8888
Args:
8989
extra_headers: Send extra headers
@@ -116,7 +116,7 @@ def update(
116116
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
117117
) -> object:
118118
"""
119-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
119+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
120120
121121
Args:
122122
extra_headers: Send extra headers
@@ -149,7 +149,7 @@ def delete(
149149
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
150150
) -> object:
151151
"""
152-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
152+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
153153
154154
Args:
155155
extra_headers: Send extra headers
@@ -182,7 +182,7 @@ def modify(
182182
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
183183
) -> object:
184184
"""
185-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
185+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
186186
187187
Args:
188188
extra_headers: Send extra headers
@@ -236,7 +236,7 @@ async def create(
236236
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
237237
) -> object:
238238
"""
239-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
239+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
240240
241241
Args:
242242
extra_headers: Send extra headers
@@ -269,7 +269,7 @@ async def retrieve(
269269
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
270270
) -> object:
271271
"""
272-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
272+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
273273
274274
Args:
275275
extra_headers: Send extra headers
@@ -302,7 +302,7 @@ async def update(
302302
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
303303
) -> object:
304304
"""
305-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
305+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
306306
307307
Args:
308308
extra_headers: Send extra headers
@@ -335,7 +335,7 @@ async def delete(
335335
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
336336
) -> object:
337337
"""
338-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
338+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
339339
340340
Args:
341341
extra_headers: Send extra headers
@@ -368,7 +368,7 @@ async def modify(
368368
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
369369
) -> object:
370370
"""
371-
[Docs](https://docs.litellm.ai/docs/anthropic_completion)
371+
[Docs](https://docs.llm.ai/docs/anthropic_completion)
372372
373373
Args:
374374
extra_headers: Send extra headers

0 commit comments

Comments
 (0)