openrouter 0.1.2__py3-none-any.whl → 0.1.3__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.
- openrouter/_version.py +2 -2
- openrouter/analytics.py +2 -2
- openrouter/api_keys.py +20 -0
- openrouter/components/__init__.py +46 -34
- openrouter/components/{_schema3.py → _schema2.py} +22 -22
- openrouter/components/assistantmessage.py +32 -1
- openrouter/components/chatmessagecontentitemimage.py +4 -4
- openrouter/components/chatresponsechoice.py +1 -6
- openrouter/components/chatstreamingmessagechunk.py +3 -3
- openrouter/components/model.py +7 -1
- openrouter/components/outputmodality.py +1 -0
- openrouter/components/publicendpoint.py +10 -0
- openrouter/components/publicpricing.py +5 -0
- openrouter/credits.py +2 -2
- openrouter/guardrails.py +3017 -0
- openrouter/models_.py +4 -4
- openrouter/operations/__init__.py +281 -30
- openrouter/operations/bulkassignkeystoguardrail.py +49 -0
- openrouter/operations/bulkassignmemberstoguardrail.py +49 -0
- openrouter/operations/bulkunassignkeysfromguardrail.py +49 -0
- openrouter/operations/bulkunassignmembersfromguardrail.py +49 -0
- openrouter/operations/createguardrail.py +247 -0
- openrouter/operations/deleteguardrail.py +38 -0
- openrouter/operations/getguardrail.py +161 -0
- openrouter/operations/getmodels.py +28 -5
- openrouter/operations/listguardrailkeyassignments.py +125 -0
- openrouter/operations/listguardrailmemberassignments.py +120 -0
- openrouter/operations/listguardrails.py +171 -0
- openrouter/operations/listkeyassignments.py +118 -0
- openrouter/operations/listmemberassignments.py +113 -0
- openrouter/operations/updateguardrail.py +271 -0
- openrouter/sdk.py +4 -4
- openrouter/types/models.py +378 -0
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/METADATA +1 -1
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/RECORD +38 -25
- openrouter/operations/getparameters.py +0 -123
- openrouter/parameters.py +0 -237
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/WHEEL +0 -0
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/top_level.txt +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
openrouter/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
|
|
2
|
-
openrouter/_version.py,sha256=
|
|
3
|
-
openrouter/analytics.py,sha256=
|
|
4
|
-
openrouter/api_keys.py,sha256=
|
|
2
|
+
openrouter/_version.py,sha256=AGrP7L8Iep6QyCVkc6m8luJzadQxwyX4XxYuF6Wz-dw,462
|
|
3
|
+
openrouter/analytics.py,sha256=R6kxwSshCpAMMmWiIlrxiBciWYzqiEpXVT4Qr7-Ntrs,9953
|
|
4
|
+
openrouter/api_keys.py,sha256=9RdBuPITRTvEEWtxDwLSPEuIwBiHG1lU73XgcsH_Z9s,58924
|
|
5
5
|
openrouter/basesdk.py,sha256=VhwM2eELTCr-7vgi1MLohTxYmNJurxN0hwhQjJKfOsA,12595
|
|
6
6
|
openrouter/beta.py,sha256=MzJTf7x1qwLAR2nd5Y4yzD8bIQCOsREEPf8uhwune_U,668
|
|
7
7
|
openrouter/chat.py,sha256=ul2ZAqnmJM3l-UWDp_wPpF1Tl4wzqQkubR-OqgXzuBs,40937
|
|
8
8
|
openrouter/completions.py,sha256=TB7mb7XSfflk7XtMnys0l5sTI-3RY88xKTWYw1MqdHU,14276
|
|
9
|
-
openrouter/credits.py,sha256=
|
|
9
|
+
openrouter/credits.py,sha256=00AsSt-OwZt7PduEav6R6lVR_HygUpyMzg6VvAzHj4I,19076
|
|
10
10
|
openrouter/embeddings.py,sha256=zqbIXUtQIx_e0Zm9qZ2z1Ieo6H5ZX22MyNmA9ZLULfs,24383
|
|
11
11
|
openrouter/endpoints.py,sha256=z50tI4vJbF6Sbq9_rKdKWIxmU1MYOfKau2K8GNnxInY,15520
|
|
12
12
|
openrouter/generations.py,sha256=sOwPS56RWFLLVaeher1gLoYhdQLa0BcZ-TBwQsmtEAU,12092
|
|
13
|
+
openrouter/guardrails.py,sha256=LQLuhfssA4iq51QFrbqWIrs21J6ACtkENHwRJHZHiDU,127953
|
|
13
14
|
openrouter/httpclient.py,sha256=dqTPONDBpRn4ktXfcetQiRXnG93f0pJkFhqsYFhLUac,3945
|
|
14
|
-
openrouter/models_.py,sha256=
|
|
15
|
+
openrouter/models_.py,sha256=fbH9u54y4e3sk8oO4q_NYV_qas61k4b6PcQ2Xp93BXM,23541
|
|
15
16
|
openrouter/oauth.py,sha256=zjmDnnJipJVzM6dqCft5Y73KOtL69rlYPXCXHgXCoTo,21476
|
|
16
|
-
openrouter/parameters.py,sha256=n5ff0YDwU-iImICpcpLWGGs1zl7OtzFECuE_on9ghig,9630
|
|
17
17
|
openrouter/providers.py,sha256=UDurmmNvy1y78TGJ8KrxOwx0XY6VGw2n1ZZBv0IOI3U,7414
|
|
18
18
|
openrouter/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
19
19
|
openrouter/responses.py,sha256=uQc9kTnO31IpeEPmC4L0qD6LOGUgUkfQmSO1zBxEalQ,59785
|
|
20
|
-
openrouter/sdk.py,sha256=
|
|
20
|
+
openrouter/sdk.py,sha256=l4wvFJXo4kkh0BLHIFQWzg8kOcIjuKOPAz8UPalrEbs,9177
|
|
21
21
|
openrouter/sdkconfiguration.py,sha256=Dy4l6oqgR2cdrWqL7i9nkGmjaWaS7X0m5TeOUDzHc5o,1848
|
|
22
22
|
openrouter/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
|
|
23
23
|
openrouter/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
|
24
24
|
openrouter/_hooks/sdkhooks.py,sha256=LCCg5knZJaFz4Jo42RY9WAHZRRnDbvUE88sEKhQYXM8,2527
|
|
25
25
|
openrouter/_hooks/types.py,sha256=ZFfWuTCcAptJH7HnEKcZK7K9ENY9bp6zMPbyLLbzNzQ,2989
|
|
26
|
-
openrouter/components/__init__.py,sha256=
|
|
26
|
+
openrouter/components/__init__.py,sha256=f-3tszyZiiB2uQ0_9xjOyAAPX_8EYhlYEdDvXbX4V1c,111659
|
|
27
27
|
openrouter/components/_schema0.py,sha256=oyV2mhdJMiPV_ADH5bNcZxEylsfnn5sko2CYK8x9d-8,2023
|
|
28
|
-
openrouter/components/
|
|
28
|
+
openrouter/components/_schema2.py,sha256=Olg1bfGVYGxwra-VFP7rsCFicw8EuVXQiLADHiZlnvE,6530
|
|
29
29
|
openrouter/components/activityitem.py,sha256=QYddTlC36y1VMbIviD50Qw8Rt1GODRXMV_iJuotwyNo,1920
|
|
30
|
-
openrouter/components/assistantmessage.py,sha256=
|
|
30
|
+
openrouter/components/assistantmessage.py,sha256=1qHrb-zRmZypUo7j9klaA7swJH-5zP6U94O6ku28-rU,3360
|
|
31
31
|
openrouter/components/badgatewayresponseerrordata.py,sha256=pojFsYueX95FC7Ic6tiEiphw4fvI9Z6Jax0QUACU-FI,1643
|
|
32
32
|
openrouter/components/badrequestresponseerrordata.py,sha256=vo3KNC-cwAqaohMTV0ztfnklqWmxpC5VKUZp-3FUoYE,1643
|
|
33
33
|
openrouter/components/chatcompletionfinishreason.py,sha256=oPpIHQ4HdBIcszyYlbsfPocwGUBZ2EBnwDvvUD_3sPM,367
|
|
@@ -37,16 +37,16 @@ openrouter/components/chatgenerationtokenusage.py,sha256=M5rFdUdMfg3d3yj8LQx3sdj
|
|
|
37
37
|
openrouter/components/chatmessagecontentitem.py,sha256=L4luQfVHGUKnkL1w3cd-WuLtdGjY9g32yqKUuZJO7DI,1498
|
|
38
38
|
openrouter/components/chatmessagecontentitemaudio.py,sha256=w2oedR10YJmBWFlsNkTqqLHt2fZHcK_zfHGV3PxY4xM,1025
|
|
39
39
|
openrouter/components/chatmessagecontentitemcachecontrol.py,sha256=excB0uceH2xW4JaGnay0V9-_RhBpmzjPxtaFanxneUQ,938
|
|
40
|
-
openrouter/components/chatmessagecontentitemimage.py,sha256=
|
|
40
|
+
openrouter/components/chatmessagecontentitemimage.py,sha256=kDhC1J8fTugNiOM3pA1aD0Pdxoow3jjYDjCJecEVv08,1321
|
|
41
41
|
openrouter/components/chatmessagecontentitemtext.py,sha256=o-MH8YXkQgqGlbxCjfNofc6Nmj_KQej34Gz8c37UsJM,963
|
|
42
42
|
openrouter/components/chatmessagecontentitemvideo.py,sha256=g0Em43dX0xDVENIavmE0EYPuu5tiM3HLC7yfK8JkQtA,1914
|
|
43
43
|
openrouter/components/chatmessagetokenlogprob.py,sha256=msS-G6Bj2_3DJggKGgXfg_7vGFC9cVcKDw46vCgsNxA,2800
|
|
44
44
|
openrouter/components/chatmessagetokenlogprobs.py,sha256=HW1f8RM-gUIMf1HxIwlBPZSzfbjMfU57b8KCLqoxWYw,1625
|
|
45
45
|
openrouter/components/chatmessagetoolcall.py,sha256=lEaBzI74PCCOgwks6NIZzqS3Xir79G9GQhE18TdNmtI,915
|
|
46
46
|
openrouter/components/chatresponse.py,sha256=u72782C1mRmQdTJtBR3vsTd5U4rf6nEi1m1KC55PGKY,2353
|
|
47
|
-
openrouter/components/chatresponsechoice.py,sha256=
|
|
47
|
+
openrouter/components/chatresponsechoice.py,sha256=rXANO0ovX3ow9W4i4AG7lyAQHzHVR-YasGcjc-txiSg,2121
|
|
48
48
|
openrouter/components/chatstreamingchoice.py,sha256=xpHEEYnNtm3eO8pJmJb6VBHU1LEFQ02dUbZA3ZFZ_a4,2177
|
|
49
|
-
openrouter/components/chatstreamingmessagechunk.py,sha256=
|
|
49
|
+
openrouter/components/chatstreamingmessagechunk.py,sha256=HlieZQobuEO78g5irPdMIV51LQAoXtBVd9pyNR4BWnY,2391
|
|
50
50
|
openrouter/components/chatstreamingmessagetoolcall.py,sha256=eTp291e9xwR6yCRQ_DPjfrgUGqbg2B0piNtxTfycYe8,1179
|
|
51
51
|
openrouter/components/chatstreamingresponsechunk.py,sha256=cK3D1eTMB_F54Oh6bwB2rj2ODvulOH1uK6tCjU7QN3U,2927
|
|
52
52
|
openrouter/components/chatstreamoptions.py,sha256=b8fwrfV7bPoX9CxoPCUuyn1_T9V5N42GrWJQCXRR63g,391
|
|
@@ -70,7 +70,7 @@ openrouter/components/internalserverresponseerrordata.py,sha256=6BtoI6QZNZjdrC4t
|
|
|
70
70
|
openrouter/components/jsonschemaconfig.py,sha256=PfJ7Z5TbDlgwtVCqoJGCes96ivhxk9EdbVnm-mSf5XM,1711
|
|
71
71
|
openrouter/components/listendpointsresponse.py,sha256=rtdM6ZHtxnNQJNx0IPINoqiosu50nIkFUfEM8l70g6A,4026
|
|
72
72
|
openrouter/components/message.py,sha256=Xw75z4vPJN4O-POrIThRUoKYrYMbrvnj6MVf87DMDWo,2105
|
|
73
|
-
openrouter/components/model.py,sha256=
|
|
73
|
+
openrouter/components/model.py,sha256=TmxeS0wSqsAHItjgT_ZuAzQ4Wg0W7ze2dsD4VLuVbfY,4685
|
|
74
74
|
openrouter/components/modelarchitecture.py,sha256=IBeSVEv4PzulcY7nATFb_886Hj5NnnIolryqe7ytBOc,3405
|
|
75
75
|
openrouter/components/modelgroup.py,sha256=hN2VH_hksubq8YoOlr320yFTnAVE72Ubo6PKPPq4LEQ,617
|
|
76
76
|
openrouter/components/modelscountresponse.py,sha256=Y29-2jbyoT9-kDJiALNzLzC0Sp_u-26Vj8CozEoRDyo,744
|
|
@@ -119,7 +119,7 @@ openrouter/components/openresponseswebsearchpreviewtool.py,sha256=Wn8hzIZPsCkCWh
|
|
|
119
119
|
openrouter/components/openresponseswebsearchtool.py,sha256=0JVWrgSNw1u6SurGWZNQaMG9UrtYGOG7wA9KE3auiZE,3855
|
|
120
120
|
openrouter/components/outputitemimagegenerationcall.py,sha256=KdCl0dpLsV2cxXPqAovbXXspFz-y4Y0ygRgvmzvMB5g,1897
|
|
121
121
|
openrouter/components/outputmessage.py,sha256=262rM0JS75dP_TPRiUKM8HhAmo9T9MV0Rl_DxXkYfKQ,2102
|
|
122
|
-
openrouter/components/outputmodality.py,sha256=
|
|
122
|
+
openrouter/components/outputmodality.py,sha256=1-8xdC-toKlwsgt9vxcbIgmhKAGPlgiFEfEI2mcczHA,328
|
|
123
123
|
openrouter/components/parameter.py,sha256=3U8kFsb0EzocJa35TZ8jmKXdbNt6ypZF_T_REzA3wnY,806
|
|
124
124
|
openrouter/components/payloadtoolargeresponseerrordata.py,sha256=kksPhvoVefVY_snEVvP37TEh_TlZd_fCYft0T8RA5Pc,1663
|
|
125
125
|
openrouter/components/paymentrequiredresponseerrordata.py,sha256=rwnrHSbpFug6BjgVPRbgx9eZyxMqwtySBa23PMVk3B8,1663
|
|
@@ -137,8 +137,8 @@ openrouter/components/providerpreferences.py,sha256=iGnLzGLm8UGiDRElfOgcPo40h0r1
|
|
|
137
137
|
openrouter/components/providersort.py,sha256=YfJgDEQpTHK4MyRxlHv4LBdAraAteoOd5DATB_zRjL4,312
|
|
138
138
|
openrouter/components/providersortconfig.py,sha256=Kigyy9Kd-WmBVEDM5cRErlpwlazLzgxmQpjJUFXzDCQ,1962
|
|
139
139
|
openrouter/components/providersortunion.py,sha256=keZD3nNkp_UW--H9xn2pwMgMKcQDUd-a4R1wJJKKqfQ,730
|
|
140
|
-
openrouter/components/publicendpoint.py,sha256=
|
|
141
|
-
openrouter/components/publicpricing.py,sha256=
|
|
140
|
+
openrouter/components/publicendpoint.py,sha256=IdL_CTs_XQYB5BRrniIBjlWDOxJAr8A7on3LwpSRPxk,6636
|
|
141
|
+
openrouter/components/publicpricing.py,sha256=Bp1qWvD_qx6WUYHWm3Mm-2jW9WsieZg4XM3d3Uo6T6k,2896
|
|
142
142
|
openrouter/components/quantization.py,sha256=1LUfelzKMuC3ZwSpkWOD1ORaNOFcepzMqDHqoYddmNw,398
|
|
143
143
|
openrouter/components/reasoningsummarytext.py,sha256=qWxNZNRc2mDDKfdLzxYMn8SufkXHipjq5KeDRoWAKHs,458
|
|
144
144
|
openrouter/components/reasoningsummaryverbosity.py,sha256=gWBgfnfwZH1Iq7iYH8UtDpXtP9_Hm6fJxKwZ_tZDZlo,322
|
|
@@ -206,30 +206,43 @@ openrouter/errors/unprocessableentityresponse_error.py,sha256=uepXefHSgB1-5HS3A3
|
|
|
206
206
|
openrouter/models/__init__.py,sha256=wIW9sbvSKlrGyoPY4mXvHqw-_Inpl6zqpN6U6j-w6SU,83
|
|
207
207
|
openrouter/models/internal/__init__.py,sha256=xowceJVTVAP3WRyQ0NEGkm9PAoYU1l0_VYgXZP0ZvlM,1569
|
|
208
208
|
openrouter/models/internal/globals.py,sha256=fI0KPVfEWU8t5H3Wph85DiLo6NSIt69gSnCW9wLY4NI,1363
|
|
209
|
-
openrouter/operations/__init__.py,sha256=
|
|
209
|
+
openrouter/operations/__init__.py,sha256=NL2bKNvTyakACu27KynILp-tH28p_qnS6yVtX34VL4s,29828
|
|
210
|
+
openrouter/operations/bulkassignkeystoguardrail.py,sha256=NiAipjOz6MIm3APgp-X4i8hS6XmPyteQ7LR3L6FMLMo,1484
|
|
211
|
+
openrouter/operations/bulkassignmemberstoguardrail.py,sha256=SYQqvMqr0DisNkv0yGsX72dxeFqVw7qETgJhtk0Fna4,1526
|
|
212
|
+
openrouter/operations/bulkunassignkeysfromguardrail.py,sha256=PHfy6EXMpzmN3OZ2gbQmqKpzKju4W5fy0MEGfK7L7fQ,1536
|
|
213
|
+
openrouter/operations/bulkunassignmembersfromguardrail.py,sha256=8Wbs0qUmkQwEZJtSplFMnflFmAo0TB4rHs4j2idXpf0,1578
|
|
210
214
|
openrouter/operations/createauthkeyscode.py,sha256=WM9oLRrH7U64XfYEpXDUDvf7w4N6qm6BUZhEXdHPKLg,4034
|
|
211
215
|
openrouter/operations/createcoinbasecharge.py,sha256=yOkAvPj_e6rAqM6ThuZKHs7QId5m9S2vH701oNOeYAU,2241
|
|
212
216
|
openrouter/operations/createembeddings.py,sha256=chf5gAent2rFeaRpQcBhKx5th4aZPEAYBYiUjilHANg,4125
|
|
217
|
+
openrouter/operations/createguardrail.py,sha256=faoBM9LeNnIH5ubI-UYbrf5gwvBxSjAO_MucPaRnUEU,7459
|
|
213
218
|
openrouter/operations/createkeys.py,sha256=P6UbY4onogiWdMCMfcnNPHvJLRSIuB-KetdHznD2PAM,8322
|
|
214
219
|
openrouter/operations/createresponses.py,sha256=Vu1lRymqLWq4PvxkJPJIwHqFRdyyy47bI3SMuU4v2j0,1942
|
|
220
|
+
openrouter/operations/deleteguardrail.py,sha256=BoJb3ZYKOE8aJL85BuYQBy5GSouee-QETbg21TI8ebw,1181
|
|
215
221
|
openrouter/operations/deletekeys.py,sha256=_XTN4M6sU22DBdhZVj-4qaCo5k-CWEq1e_Xsp5fqqIU,1149
|
|
216
222
|
openrouter/operations/exchangeauthcodeforapikey.py,sha256=rRAFH6q21ePf448YCAi1UY3aBFU__xLm4FLkYh-FKpc,3973
|
|
217
223
|
openrouter/operations/getcredits.py,sha256=AG4qt-dIu5zCu5sjoDC5MYy-zrruDCi01AinqteVuVk,729
|
|
218
224
|
openrouter/operations/getcurrentkey.py,sha256=NJd5s5QfvZCHjSiUPlS7rZNFm7sBQz1pyTfDmnRe_k0,5955
|
|
219
225
|
openrouter/operations/getgeneration.py,sha256=pR3OIZa7NA5dts5VOsCYbGjSOrrC2e7uJoBXS7-ttS4,8471
|
|
226
|
+
openrouter/operations/getguardrail.py,sha256=CkZsrE8Rxr_7ZyfoOnLgcysr99FeVnxI56SdK--VLb8,4697
|
|
220
227
|
openrouter/operations/getkey.py,sha256=upv7udNsaAILJpqq-L4Mvn971xCts_4nQqzP3zJB9mU,5473
|
|
221
|
-
openrouter/operations/getmodels.py,sha256=
|
|
222
|
-
openrouter/operations/getparameters.py,sha256=qk4xRSQ5h7uTO-rjSH_s0GOtMdm89wam14P1wGyTJqQ,3104
|
|
228
|
+
openrouter/operations/getmodels.py,sha256=DGuK2ZjgHbsFjAio8dLjXiQFWCkYziWmSWB9O6DYPGg,1365
|
|
223
229
|
openrouter/operations/getuseractivity.py,sha256=oeqU_jqy8t2xtBjnQ9opfDY-FtJlK5essI9oJvfYTjs,1252
|
|
224
230
|
openrouter/operations/list.py,sha256=meW1unMF371YvOdNFdIjh3Ya2ADY-7xo2WQcFaKAwHk,5766
|
|
225
231
|
openrouter/operations/listendpoints.py,sha256=keS39WecfOoZvYVZdPEN7Fuxb5LFWhgpbhNXaVReGSQ,1117
|
|
226
232
|
openrouter/operations/listendpointszdr.py,sha256=2CdXrknZg79FTHvFOMA165epUYulrg0PpSu7IjE4rVs,591
|
|
233
|
+
openrouter/operations/listguardrailkeyassignments.py,sha256=RW_KREyJk7VmnGPNir_NnCqKm4ojL86yciPOK7itN9s,3706
|
|
234
|
+
openrouter/operations/listguardrailmemberassignments.py,sha256=ZE-GcAfMuuK7vlTftNtJVZ2u47dgUDNnoJ92yVATu18,3627
|
|
235
|
+
openrouter/operations/listguardrails.py,sha256=kBWyKdQZ574HODRwvEoFCbGF6PSrDFk6q3Y24Qq0cUg,5129
|
|
236
|
+
openrouter/operations/listkeyassignments.py,sha256=W7nDxQx66ySH6tHOfeEjkHiCailBluHty1BonIz4hpc,3395
|
|
237
|
+
openrouter/operations/listmemberassignments.py,sha256=KhP9KO88BmtoB3jTBv8MvQGQNcAV9DWuiZSRt7nN2sQ,3316
|
|
227
238
|
openrouter/operations/listmodelsuser.py,sha256=m_jM93D_m-MnUB6S0WUDHX1bQMP-UJimYOxAcM0Kqjw,643
|
|
228
239
|
openrouter/operations/listproviders.py,sha256=072auQF9sz-yb0UmZAo8sRacibp0IldU0pndumAyK1g,2530
|
|
229
240
|
openrouter/operations/sendchatcompletionrequest.py,sha256=AtBi9ZPxgU9kb0sKpt-5gCXrkgY2Qsmj_D2GNLRzOXg,1364
|
|
241
|
+
openrouter/operations/updateguardrail.py,sha256=4W1AEfJyGqEeF4rH6z_rqDI-uNQKLwoml34kneiNbsQ,8164
|
|
230
242
|
openrouter/operations/updatekeys.py,sha256=zCKB7Gvh9kYkpcow3h6I6zSc2aqw-K0v_8Xml8iAOZ0,8618
|
|
231
243
|
openrouter/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
232
244
|
openrouter/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
|
|
245
|
+
openrouter/types/models.py,sha256=1C-32R4HqLoHMUAfvMYRLP-dZRy28BrGyDQHPOuVFp8,12759
|
|
233
246
|
openrouter/utils/__init__.py,sha256=CAG0O76aEToGKXpT6Ft87Vd-iiQTh4XdBrQ37BVbsiM,5861
|
|
234
247
|
openrouter/utils/annotations.py,sha256=FvfvVTUj8TUclm4HbGgY5yi2Ap7EzGmu2UPFU4FwC1w,2755
|
|
235
248
|
openrouter/utils/datetimes.py,sha256=oppAA5e3V35pQov1-FNLKxAaNF1_XWi-bQtyjjql3H8,855
|
|
@@ -249,8 +262,8 @@ openrouter/utils/serializers.py,sha256=Hndks5M_rJXVub_N5lu0gKZQUoEmWrn6PN7R-0Hwv
|
|
|
249
262
|
openrouter/utils/unmarshal_json_response.py,sha256=glq_wLEH2vSvfMedJOY2dbd5T_z_I4yDxwbBJDI8OjU,875
|
|
250
263
|
openrouter/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
251
264
|
openrouter/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
252
|
-
openrouter-0.1.
|
|
253
|
-
openrouter-0.1.
|
|
254
|
-
openrouter-0.1.
|
|
255
|
-
openrouter-0.1.
|
|
256
|
-
openrouter-0.1.
|
|
265
|
+
openrouter-0.1.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
266
|
+
openrouter-0.1.3.dist-info/METADATA,sha256=20k-Bop1PYpYPME6KbeGO6FIxMLutEQ2WR7ZhQVOkKE,7461
|
|
267
|
+
openrouter-0.1.3.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
268
|
+
openrouter-0.1.3.dist-info/top_level.txt,sha256=0jnlCcRirGeYZLm5ZbWQRUonIp4tTPl_9mq-ds_1SEo,11
|
|
269
|
+
openrouter-0.1.3.dist-info/RECORD,,
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from openrouter.components import providername as components_providername
|
|
5
|
-
from openrouter.types import BaseModel, UnrecognizedStr
|
|
6
|
-
from openrouter.utils import (
|
|
7
|
-
FieldMetadata,
|
|
8
|
-
PathParamMetadata,
|
|
9
|
-
QueryParamMetadata,
|
|
10
|
-
SecurityMetadata,
|
|
11
|
-
validate_open_enum,
|
|
12
|
-
)
|
|
13
|
-
from pydantic.functional_validators import PlainValidator
|
|
14
|
-
from typing import List, Literal, Optional, Union
|
|
15
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class GetParametersSecurityTypedDict(TypedDict):
|
|
19
|
-
bearer: str
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class GetParametersSecurity(BaseModel):
|
|
23
|
-
bearer: Annotated[
|
|
24
|
-
str,
|
|
25
|
-
FieldMetadata(
|
|
26
|
-
security=SecurityMetadata(
|
|
27
|
-
scheme=True,
|
|
28
|
-
scheme_type="http",
|
|
29
|
-
sub_type="bearer",
|
|
30
|
-
field_name="Authorization",
|
|
31
|
-
)
|
|
32
|
-
),
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class GetParametersRequestTypedDict(TypedDict):
|
|
37
|
-
author: str
|
|
38
|
-
slug: str
|
|
39
|
-
provider: NotRequired[components_providername.ProviderName]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class GetParametersRequest(BaseModel):
|
|
43
|
-
author: Annotated[
|
|
44
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
45
|
-
]
|
|
46
|
-
|
|
47
|
-
slug: Annotated[
|
|
48
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
provider: Annotated[
|
|
52
|
-
Annotated[
|
|
53
|
-
Optional[components_providername.ProviderName],
|
|
54
|
-
PlainValidator(validate_open_enum(False)),
|
|
55
|
-
],
|
|
56
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
57
|
-
] = None
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
SupportedParameter = Union[
|
|
61
|
-
Literal[
|
|
62
|
-
"temperature",
|
|
63
|
-
"top_p",
|
|
64
|
-
"top_k",
|
|
65
|
-
"min_p",
|
|
66
|
-
"top_a",
|
|
67
|
-
"frequency_penalty",
|
|
68
|
-
"presence_penalty",
|
|
69
|
-
"repetition_penalty",
|
|
70
|
-
"max_tokens",
|
|
71
|
-
"logit_bias",
|
|
72
|
-
"logprobs",
|
|
73
|
-
"top_logprobs",
|
|
74
|
-
"seed",
|
|
75
|
-
"response_format",
|
|
76
|
-
"structured_outputs",
|
|
77
|
-
"stop",
|
|
78
|
-
"tools",
|
|
79
|
-
"tool_choice",
|
|
80
|
-
"parallel_tool_calls",
|
|
81
|
-
"include_reasoning",
|
|
82
|
-
"reasoning",
|
|
83
|
-
"reasoning_effort",
|
|
84
|
-
"web_search_options",
|
|
85
|
-
"verbosity",
|
|
86
|
-
],
|
|
87
|
-
UnrecognizedStr,
|
|
88
|
-
]
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
class GetParametersDataTypedDict(TypedDict):
|
|
92
|
-
r"""Parameter analytics data"""
|
|
93
|
-
|
|
94
|
-
model: str
|
|
95
|
-
r"""Model identifier"""
|
|
96
|
-
supported_parameters: List[SupportedParameter]
|
|
97
|
-
r"""List of parameters supported by this model"""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
class GetParametersData(BaseModel):
|
|
101
|
-
r"""Parameter analytics data"""
|
|
102
|
-
|
|
103
|
-
model: str
|
|
104
|
-
r"""Model identifier"""
|
|
105
|
-
|
|
106
|
-
supported_parameters: List[
|
|
107
|
-
Annotated[SupportedParameter, PlainValidator(validate_open_enum(False))]
|
|
108
|
-
]
|
|
109
|
-
r"""List of parameters supported by this model"""
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class GetParametersResponseTypedDict(TypedDict):
|
|
113
|
-
r"""Returns the parameters for the specified model"""
|
|
114
|
-
|
|
115
|
-
data: GetParametersDataTypedDict
|
|
116
|
-
r"""Parameter analytics data"""
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
class GetParametersResponse(BaseModel):
|
|
120
|
-
r"""Returns the parameters for the specified model"""
|
|
121
|
-
|
|
122
|
-
data: GetParametersData
|
|
123
|
-
r"""Parameter analytics data"""
|
openrouter/parameters.py
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from .basesdk import BaseSDK
|
|
4
|
-
from openrouter import components, errors, operations, utils
|
|
5
|
-
from openrouter._hooks import HookContext
|
|
6
|
-
from openrouter.types import OptionalNullable, UNSET
|
|
7
|
-
from openrouter.utils import get_security_from_env
|
|
8
|
-
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, Mapping, Optional, Union
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Parameters(BaseSDK):
|
|
13
|
-
r"""Parameters endpoints"""
|
|
14
|
-
|
|
15
|
-
def get_parameters(
|
|
16
|
-
self,
|
|
17
|
-
*,
|
|
18
|
-
security: Union[
|
|
19
|
-
operations.GetParametersSecurity, operations.GetParametersSecurityTypedDict
|
|
20
|
-
],
|
|
21
|
-
author: str,
|
|
22
|
-
slug: str,
|
|
23
|
-
provider: Optional[components.ProviderName] = None,
|
|
24
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
25
|
-
server_url: Optional[str] = None,
|
|
26
|
-
timeout_ms: Optional[int] = None,
|
|
27
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
28
|
-
) -> operations.GetParametersResponse:
|
|
29
|
-
r"""Get a model's supported parameters and data about which are most popular
|
|
30
|
-
|
|
31
|
-
:param security:
|
|
32
|
-
:param author:
|
|
33
|
-
:param slug:
|
|
34
|
-
:param provider:
|
|
35
|
-
:param retries: Override the default retry configuration for this method
|
|
36
|
-
:param server_url: Override the default server URL for this method
|
|
37
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
38
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
39
|
-
"""
|
|
40
|
-
base_url = None
|
|
41
|
-
url_variables = None
|
|
42
|
-
if timeout_ms is None:
|
|
43
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
44
|
-
|
|
45
|
-
if server_url is not None:
|
|
46
|
-
base_url = server_url
|
|
47
|
-
else:
|
|
48
|
-
base_url = self._get_url(base_url, url_variables)
|
|
49
|
-
|
|
50
|
-
request = operations.GetParametersRequest(
|
|
51
|
-
author=author,
|
|
52
|
-
slug=slug,
|
|
53
|
-
provider=provider,
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
req = self._build_request(
|
|
57
|
-
method="GET",
|
|
58
|
-
path="/parameters/{author}/{slug}",
|
|
59
|
-
base_url=base_url,
|
|
60
|
-
url_variables=url_variables,
|
|
61
|
-
request=request,
|
|
62
|
-
request_body_required=False,
|
|
63
|
-
request_has_path_params=True,
|
|
64
|
-
request_has_query_params=True,
|
|
65
|
-
user_agent_header="user-agent",
|
|
66
|
-
accept_header_value="application/json",
|
|
67
|
-
http_headers=http_headers,
|
|
68
|
-
security=utils.get_pydantic_model(
|
|
69
|
-
security, operations.GetParametersSecurity
|
|
70
|
-
),
|
|
71
|
-
allow_empty_value=None,
|
|
72
|
-
timeout_ms=timeout_ms,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
if retries == UNSET:
|
|
76
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
77
|
-
retries = self.sdk_configuration.retry_config
|
|
78
|
-
|
|
79
|
-
retry_config = None
|
|
80
|
-
if isinstance(retries, utils.RetryConfig):
|
|
81
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
82
|
-
|
|
83
|
-
http_res = self.do_request(
|
|
84
|
-
hook_ctx=HookContext(
|
|
85
|
-
config=self.sdk_configuration,
|
|
86
|
-
base_url=base_url or "",
|
|
87
|
-
operation_id="getParameters",
|
|
88
|
-
oauth2_scopes=None,
|
|
89
|
-
security_source=get_security_from_env(security, components.Security),
|
|
90
|
-
),
|
|
91
|
-
request=req,
|
|
92
|
-
error_status_codes=["401", "404", "4XX", "500", "5XX"],
|
|
93
|
-
retry_config=retry_config,
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
response_data: Any = None
|
|
97
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
98
|
-
return unmarshal_json_response(operations.GetParametersResponse, http_res)
|
|
99
|
-
if utils.match_response(http_res, "401", "application/json"):
|
|
100
|
-
response_data = unmarshal_json_response(
|
|
101
|
-
errors.UnauthorizedResponseErrorData, http_res
|
|
102
|
-
)
|
|
103
|
-
raise errors.UnauthorizedResponseError(response_data, http_res)
|
|
104
|
-
if utils.match_response(http_res, "404", "application/json"):
|
|
105
|
-
response_data = unmarshal_json_response(
|
|
106
|
-
errors.NotFoundResponseErrorData, http_res
|
|
107
|
-
)
|
|
108
|
-
raise errors.NotFoundResponseError(response_data, http_res)
|
|
109
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
110
|
-
response_data = unmarshal_json_response(
|
|
111
|
-
errors.InternalServerResponseErrorData, http_res
|
|
112
|
-
)
|
|
113
|
-
raise errors.InternalServerResponseError(response_data, http_res)
|
|
114
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
115
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
116
|
-
raise errors.OpenRouterDefaultError(
|
|
117
|
-
"API error occurred", http_res, http_res_text
|
|
118
|
-
)
|
|
119
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
120
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
121
|
-
raise errors.OpenRouterDefaultError(
|
|
122
|
-
"API error occurred", http_res, http_res_text
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
|
|
126
|
-
|
|
127
|
-
async def get_parameters_async(
|
|
128
|
-
self,
|
|
129
|
-
*,
|
|
130
|
-
security: Union[
|
|
131
|
-
operations.GetParametersSecurity, operations.GetParametersSecurityTypedDict
|
|
132
|
-
],
|
|
133
|
-
author: str,
|
|
134
|
-
slug: str,
|
|
135
|
-
provider: Optional[components.ProviderName] = None,
|
|
136
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
137
|
-
server_url: Optional[str] = None,
|
|
138
|
-
timeout_ms: Optional[int] = None,
|
|
139
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
140
|
-
) -> operations.GetParametersResponse:
|
|
141
|
-
r"""Get a model's supported parameters and data about which are most popular
|
|
142
|
-
|
|
143
|
-
:param security:
|
|
144
|
-
:param author:
|
|
145
|
-
:param slug:
|
|
146
|
-
:param provider:
|
|
147
|
-
:param retries: Override the default retry configuration for this method
|
|
148
|
-
:param server_url: Override the default server URL for this method
|
|
149
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
150
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
151
|
-
"""
|
|
152
|
-
base_url = None
|
|
153
|
-
url_variables = None
|
|
154
|
-
if timeout_ms is None:
|
|
155
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
156
|
-
|
|
157
|
-
if server_url is not None:
|
|
158
|
-
base_url = server_url
|
|
159
|
-
else:
|
|
160
|
-
base_url = self._get_url(base_url, url_variables)
|
|
161
|
-
|
|
162
|
-
request = operations.GetParametersRequest(
|
|
163
|
-
author=author,
|
|
164
|
-
slug=slug,
|
|
165
|
-
provider=provider,
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
req = self._build_request_async(
|
|
169
|
-
method="GET",
|
|
170
|
-
path="/parameters/{author}/{slug}",
|
|
171
|
-
base_url=base_url,
|
|
172
|
-
url_variables=url_variables,
|
|
173
|
-
request=request,
|
|
174
|
-
request_body_required=False,
|
|
175
|
-
request_has_path_params=True,
|
|
176
|
-
request_has_query_params=True,
|
|
177
|
-
user_agent_header="user-agent",
|
|
178
|
-
accept_header_value="application/json",
|
|
179
|
-
http_headers=http_headers,
|
|
180
|
-
security=utils.get_pydantic_model(
|
|
181
|
-
security, operations.GetParametersSecurity
|
|
182
|
-
),
|
|
183
|
-
allow_empty_value=None,
|
|
184
|
-
timeout_ms=timeout_ms,
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
if retries == UNSET:
|
|
188
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
189
|
-
retries = self.sdk_configuration.retry_config
|
|
190
|
-
|
|
191
|
-
retry_config = None
|
|
192
|
-
if isinstance(retries, utils.RetryConfig):
|
|
193
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
194
|
-
|
|
195
|
-
http_res = await self.do_request_async(
|
|
196
|
-
hook_ctx=HookContext(
|
|
197
|
-
config=self.sdk_configuration,
|
|
198
|
-
base_url=base_url or "",
|
|
199
|
-
operation_id="getParameters",
|
|
200
|
-
oauth2_scopes=None,
|
|
201
|
-
security_source=get_security_from_env(security, components.Security),
|
|
202
|
-
),
|
|
203
|
-
request=req,
|
|
204
|
-
error_status_codes=["401", "404", "4XX", "500", "5XX"],
|
|
205
|
-
retry_config=retry_config,
|
|
206
|
-
)
|
|
207
|
-
|
|
208
|
-
response_data: Any = None
|
|
209
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
210
|
-
return unmarshal_json_response(operations.GetParametersResponse, http_res)
|
|
211
|
-
if utils.match_response(http_res, "401", "application/json"):
|
|
212
|
-
response_data = unmarshal_json_response(
|
|
213
|
-
errors.UnauthorizedResponseErrorData, http_res
|
|
214
|
-
)
|
|
215
|
-
raise errors.UnauthorizedResponseError(response_data, http_res)
|
|
216
|
-
if utils.match_response(http_res, "404", "application/json"):
|
|
217
|
-
response_data = unmarshal_json_response(
|
|
218
|
-
errors.NotFoundResponseErrorData, http_res
|
|
219
|
-
)
|
|
220
|
-
raise errors.NotFoundResponseError(response_data, http_res)
|
|
221
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
222
|
-
response_data = unmarshal_json_response(
|
|
223
|
-
errors.InternalServerResponseErrorData, http_res
|
|
224
|
-
)
|
|
225
|
-
raise errors.InternalServerResponseError(response_data, http_res)
|
|
226
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
227
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
228
|
-
raise errors.OpenRouterDefaultError(
|
|
229
|
-
"API error occurred", http_res, http_res_text
|
|
230
|
-
)
|
|
231
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
232
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
233
|
-
raise errors.OpenRouterDefaultError(
|
|
234
|
-
"API error occurred", http_res, http_res_text
|
|
235
|
-
)
|
|
236
|
-
|
|
237
|
-
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|