diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c3ee17e83..8f57a9738 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: 530e507dc8ae98ab1d9d250bd8df3267 + docChecksum: 40e2bc23f7c4aa3f3ce0d470a469148e docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.75 - configChecksum: fa2d3e3e8ff7cb847c45bd96c2496266 + releaseVersion: 1.3.76 + configChecksum: ce947364c5392aadce4db6c772e33a89 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 8dc59c19-6805-4fb2-a280-052b0932fa6b - pristine_commit_hash: 199721a5e4af31e3facab416ad9f109efa5236c9 - pristine_tree_hash: af34e13179f1510cb204dee71dc0d93bbca2a9d0 + generation_id: 689c33fb-8a90-47f7-b2d1-032588a65df7 + pristine_commit_hash: cd29ae9fa1a0b5bab48df3c2939cf6121cf9b0ef + pristine_tree_hash: 7bf7b0845609b4efb3525fed8446b305fbd5fe44 features: python: acceptHeaders: 3.0.0 @@ -10272,8 +10272,8 @@ trackedFiles: pristine_git_object: 26a176217e09f4a0029cb92a821d159e104c409c docs/sdks/byok/README.mdx: id: 17792f3b180d - last_write_checksum: sha1:de666d5914416300450e62c960a887664fa81dd5 - pristine_git_object: 08d86cd475282a39de45740038c5530474a95f06 + last_write_checksum: sha1:b330b359739ff08dc70b5d1befa38d001ec0e37b + pristine_git_object: d19a5367364de93b93243e2012f77c8713779601 docs/sdks/chat/README.mdx: id: 1dd859c23fe1 last_write_checksum: sha1:fcf4bfc2dfd58777c5b970b81ea7372af715c70a @@ -10340,8 +10340,8 @@ trackedFiles: pristine_git_object: 044ea9eb6f4710cc2be85a5ce09b8fe6b86629a5 docs/sdks/observability/README.mdx: id: 75811527e651 - last_write_checksum: sha1:5c1c1b6816a3e5af3b84a32a8e9605619e8469c9 - pristine_git_object: b87e2e382fbfa54f2f9a0fc469677b335c02be0d + last_write_checksum: sha1:64c5f312704f58a383fbadb6ad364086f6b72253 + pristine_git_object: 078a05993b4a2d4abd652033a08e52f44f750fd2 docs/sdks/organization/README.mdx: id: f41b85542db0 last_write_checksum: sha1:16a89d4805aafa873479dfe2aa051eb3bc88e47f @@ -10368,8 +10368,8 @@ trackedFiles: pristine_git_object: 32fe3b3de09cacb22378204aa1a4ac831e070500 docs/sdks/scim/README.mdx: id: fd6d8a91a053 - last_write_checksum: sha1:0a28f030bf42146fde86887c2b79831af07f1d4f - pristine_git_object: 240f5da9d86fc9dbbaa7efe345da740768c773b3 + last_write_checksum: sha1:3e0f656ee4c7dfdf2c6ff29b7da6d69421a0ea5d + pristine_git_object: e969462c7f099e28569d132100c1bbb6a3a9f58e docs/sdks/stt/README.mdx: id: 190b0dc9a5d1 last_write_checksum: sha1:4e8456d718c605e733f4d3b51f35fc4c36c637d3 @@ -10404,8 +10404,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:6efbe8012929953cbfe3ef45a7e9dfef81773d3e - pristine_git_object: ef5a2370facf15716afbfacbf3b67358a61b5eef + last_write_checksum: sha1:0d11d5c53be5d0b7fb677bb0faa39d950cb895ec + pristine_git_object: 7f8ab233be116ad0ee4aab4d2eed41a443e48652 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -10432,8 +10432,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:e8829ec24f1122d5a13243e2e17d5e40dd1473c7 - pristine_git_object: 514a818c783227265031fe29197d5038f2d2ce2a + last_write_checksum: sha1:16375f7c967b1e7c112bc04e9fb6dec662429676 + pristine_git_object: 8ceb70f1181bb17a3da10f81b19354345e48b5fa src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a @@ -10468,8 +10468,8 @@ trackedFiles: pristine_git_object: e9bae7b641ce3b858197497c3f48807e5835869c src/openrouter/byok.py: id: bec352462ae1 - last_write_checksum: sha1:85ea3173f700494bc2ec412090206e873536ac9f - pristine_git_object: 8f6695eae6b87f579b79b47a5af49f15e94186a9 + last_write_checksum: sha1:2c6adc3f1205dbfc0c73be9db646118855b8fb0f + pristine_git_object: 2b4c969b6babcec0674cba96ffc380dbcdfa2322 src/openrouter/chat.py: id: 723fdce15c1d last_write_checksum: sha1:33ac449ca72c5c907ec419f04ec9d6a7e82b955e @@ -14148,8 +14148,8 @@ trackedFiles: pristine_git_object: 0df1c3e42dd5af1a7071a6be34253477695edb4b src/openrouter/observability.py: id: 6a17f32d3f33 - last_write_checksum: sha1:aed374189ac7e95d66485d8114e130ecd74af99e - pristine_git_object: f01a5ab1865b16939c092d854fe8a7145c327058 + last_write_checksum: sha1:a602b94936d973cb63a158dc94014889342a5ae5 + pristine_git_object: 4a35ede011d09dddab042e2c00413ce4f6be655e src/openrouter/operations/__init__.py: id: 9afcea1e7161 last_write_checksum: sha1:62a371180a300aa83a33cf0e5d00f7724b39d24f @@ -14796,8 +14796,8 @@ trackedFiles: pristine_git_object: 1aa587d5efdb8e61d83b88ef26532151601edb77 src/openrouter/scim.py: id: 351afd6b616e - last_write_checksum: sha1:2f58c4cf29650549257e79c476de0a9500a33772 - pristine_git_object: a28df9a26e2dd834e5bc8974c3a61d18609c79c0 + last_write_checksum: sha1:4c9a81e177e1dbc246e0955e90365d653d2ba876 + pristine_git_object: 6bc5fe5e691f5136f59e018dac5998ac36700e10 src/openrouter/sdk.py: id: ee9846c4c9c5 last_write_checksum: sha1:77ba201e90ea7357c69be7f049c8b2f4366bd19f @@ -15853,6 +15853,8 @@ examples: application/json: {"error": {"code": 500, "message": "Internal Server Error"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} createBYOKKey: speakeasy-default-create-BYOK-key: requestBody: @@ -15882,6 +15884,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getBYOKKey: speakeasy-default-get-BYOK-key: parameters: @@ -15896,6 +15900,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} updateBYOKKey: speakeasy-default-update-BYOK-key: parameters: @@ -15990,6 +15996,8 @@ examples: application/json: {"error": {"code": 500, "message": "Internal Server Error"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} createObservabilityDestination: speakeasy-default-create-observability-destination: requestBody: @@ -16021,6 +16029,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getObservabilityDestination: speakeasy-default-get-observability-destination: parameters: @@ -16035,6 +16045,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} updateObservabilityDestination: speakeasy-default-update-observability-destination: parameters: @@ -16665,6 +16677,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} createScimGroupMapping: speakeasy-default-create-scim-group-mapping: requestBody: @@ -16682,6 +16696,8 @@ examples: application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} deleteScimGroupMapping: speakeasy-default-delete-scim-group-mapping: parameters: @@ -16700,6 +16716,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getScimGroupMapping: speakeasy-default-get-scim-group-mapping: parameters: @@ -16714,6 +16732,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} updateScimGroupMapping: speakeasy-default-update-scim-group-mapping: parameters: @@ -16732,6 +16752,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} listScimGroups: speakeasy-default-list-scim-groups: parameters: @@ -16747,6 +16769,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getWorkspaceBudget: speakeasy-default-get-workspace-budget: parameters: @@ -16911,6 +16935,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getScimSyncJob: speakeasy-default-get-scim-sync-job: parameters: @@ -16925,6 +16951,8 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} listInternVaultSecrets: speakeasy-default-list-intern-vault-secrets: parameters: @@ -19211,19 +19239,17 @@ examples: examplesVersion: 1.0.2 releaseNotes: | ## Python SDK Changes: - * `open_router.guardrails.list()`: `error.status[403]` **Added** - * `open_router.guardrails.delete()`: `error.status[403]` **Added** - * `open_router.guardrails.get()`: `error.status[403]` **Added** - * `open_router.guardrails.list_guardrail_key_assignments()`: `error.status[403]` **Added** - * `open_router.guardrails.bulk_unassign_keys()`: `error.status[403]` **Added** - * `open_router.guardrails.list_guardrail_member_assignments()`: `error.status[403]` **Added** - * `open_router.guardrails.bulk_assign_members()`: `error.status[403]` **Added** - * `open_router.guardrails.bulk_unassign_members()`: `error.status[403]` **Added** - * `open_router.guardrails.list_key_assignments()`: `error.status[403]` **Added** - * `open_router.guardrails.list_member_assignments()`: `error.status[403]` **Added** - * `open_router.workspaces.list()`: `error.status[403]` **Added** - * `open_router.workspaces.get()`: `error.status[403]` **Added** - * `open_router.workspaces.list_budgets()`: `error.status[403]` **Added** - * `open_router.workspaces.delete_budget()`: `error.status[403]` **Added** - * `open_router.workspaces.get_budget()`: `error.status[403]` **Added** - * `open_router.workspaces.set_budget()`: `error.status[403]` **Added** + * `open_router.byok.list()`: `error.status[403]` **Added** + * `open_router.byok.delete()`: `error.status[403]` **Added** + * `open_router.byok.get()`: `error.status[403]` **Added** + * `open_router.observability.list()`: `error.status[403]` **Added** + * `open_router.observability.delete()`: `error.status[403]` **Added** + * `open_router.observability.get()`: `error.status[403]` **Added** + * `open_router.scim.list_mappings()`: `error.status[403]` **Added** + * `open_router.scim.create()`: `error.status[403]` **Added** + * `open_router.scim.delete()`: `error.status[403]` **Added** + * `open_router.scim.read()`: `error.status[403]` **Added** + * `open_router.scim.update()`: `error.status[403]` **Added** + * `open_router.scim.list_groups()`: `error.status[403]` **Added** + * `open_router.scim.create_sync_job()`: `error.status[403]` **Added** + * `open_router.scim.get_sync_job()`: `error.status[403]` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 70809685d..3fe2a329f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.75 + version: 1.3.76 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index a226b0674..8e44f3fbc 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -37197,6 +37197,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '500': content: application/json: @@ -37341,6 +37351,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -37413,6 +37433,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -48076,6 +48106,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '500': content: application/json: @@ -48238,6 +48278,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -48315,6 +48365,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -51878,6 +51938,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -51949,6 +52019,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -52039,6 +52119,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -52090,6 +52180,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -52157,6 +52257,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -52247,6 +52357,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -52314,6 +52434,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: @@ -52370,6 +52500,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' '404': content: application/json: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 428bd6dac..b38de749d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9ba581b30a2c8e8da9eca1099f3660bfacf5ecff9c5579ddada448746b7a23f0 - sourceBlobDigest: sha256:4544cb2011fe6dbbddec594bf1294852d426b3ef3cb800bfa063072da52262a6 + sourceRevisionDigest: sha256:a0d6d1179366adb7bad868511f5d67a9dd3b6b693eefbe1d8f6f355f1f439f84 + sourceBlobDigest: sha256:f250fc1f30aa4bf26f599271b4c6e83dfc9e074466db14491d5fc05ceabffe40 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9ba581b30a2c8e8da9eca1099f3660bfacf5ecff9c5579ddada448746b7a23f0 - sourceBlobDigest: sha256:4544cb2011fe6dbbddec594bf1294852d426b3ef3cb800bfa063072da52262a6 + sourceRevisionDigest: sha256:a0d6d1179366adb7bad868511f5d67a9dd3b6b693eefbe1d8f6f355f1f439f84 + sourceBlobDigest: sha256:f250fc1f30aa4bf26f599271b4c6e83dfc9e074466db14491d5fc05ceabffe40 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:17f802dd089a87c377bfcc1a68fe0a4a8a325c5b664884b3e08551f2d16333d3 + codeSamplesRevisionDigest: sha256:1d15e58880618bd0c1b6c6ed964f7d6539a810f8092764700a1fc0ff1382327d workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 63e73c9d9..5acafd3b0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3519,4 +3519,14 @@ Based on: ### Generated - [python v1.3.75] . ### Releases -- [PyPI v1.3.75] https://pypi.org/project/openrouter/1.3.75 - . \ No newline at end of file +- [PyPI v1.3.75] https://pypi.org/project/openrouter/1.3.75 - . + +## 2026-10-22 01:16:51 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.76] . +### Releases +- [PyPI v1.3.76] https://pypi.org/project/openrouter/1.3.76 - . \ No newline at end of file diff --git a/docs/sdks/byok/README.mdx b/docs/sdks/byok/README.mdx index b0ee13804..5eb217a97 100644 --- a/docs/sdks/byok/README.mdx +++ b/docs/sdks/byok/README.mdx @@ -65,6 +65,7 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -173,6 +174,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -221,6 +223,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | diff --git a/docs/sdks/observability/README.mdx b/docs/sdks/observability/README.mdx index ee483a418..f8e934d44 100644 --- a/docs/sdks/observability/README.mdx +++ b/docs/sdks/observability/README.mdx @@ -64,6 +64,7 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -178,6 +179,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -226,6 +228,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | diff --git a/docs/sdks/scim/README.mdx b/docs/sdks/scim/README.mdx index 82b0c6ae7..3f49ac60c 100644 --- a/docs/sdks/scim/README.mdx +++ b/docs/sdks/scim/README.mdx @@ -65,6 +65,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -116,6 +117,7 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.ConflictResponseError | 409 | application/json | | errors.InternalServerResponseError | 500 | application/json | @@ -167,6 +169,7 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -215,6 +218,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -265,6 +269,7 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -318,6 +323,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -365,6 +371,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -413,6 +420,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ef5a2370f..7f8ab233b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.75" +version = "1.3.76" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 514a818c7..8ceb70f11 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.75" +__version__: str = "1.3.76" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.3.75 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.76 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/byok.py b/src/openrouter/byok.py index 8f6695eae..2b4c969b6 100644 --- a/src/openrouter/byok.py +++ b/src/openrouter/byok.py @@ -166,6 +166,11 @@ def next_func() -> Optional[operations.ListBYOKKeysResponse]: errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -340,6 +345,11 @@ async def empty_result(): errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -835,6 +845,11 @@ def delete( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -963,6 +978,11 @@ async def delete_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1091,6 +1111,11 @@ def get( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1219,6 +1244,11 @@ async def get_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res diff --git a/src/openrouter/observability.py b/src/openrouter/observability.py index f01a5ab18..4a35ede01 100644 --- a/src/openrouter/observability.py +++ b/src/openrouter/observability.py @@ -162,6 +162,11 @@ def next_func() -> Optional[operations.ListObservabilityDestinationsResponse]: errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -334,6 +339,11 @@ async def empty_result(): errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -859,6 +869,11 @@ def delete( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -989,6 +1004,11 @@ async def delete_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1119,6 +1139,11 @@ def get( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1249,6 +1274,11 @@ async def get_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res diff --git a/src/openrouter/scim.py b/src/openrouter/scim.py index a28df9a26..6bc5fe5e6 100644 --- a/src/openrouter/scim.py +++ b/src/openrouter/scim.py @@ -153,6 +153,11 @@ def next_func() -> Optional[operations.ListScimGroupMappingsResponse]: errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -321,6 +326,11 @@ async def empty_result(): errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -471,6 +481,11 @@ def create( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -626,6 +641,11 @@ async def create_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -769,6 +789,11 @@ def delete( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -907,6 +932,11 @@ async def delete_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1037,6 +1067,11 @@ def read( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1167,6 +1202,11 @@ async def read_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1314,6 +1354,11 @@ def update( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1461,6 +1506,11 @@ async def update_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1632,6 +1682,11 @@ def next_func() -> Optional[operations.ListScimGroupsResponse]: errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1806,6 +1861,11 @@ async def empty_result(): errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -1936,6 +1996,11 @@ def create_sync_job( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -2066,6 +2131,11 @@ async def create_sync_job_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -2194,6 +2264,11 @@ def get_sync_job( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res @@ -2322,6 +2397,11 @@ async def get_sync_job_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response( errors.NotFoundResponseErrorData, http_res diff --git a/uv.lock b/uv.lock index 06a9c60ef..791a902f6 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.75" +version = "1.3.76" source = { editable = "." } dependencies = [ { name = "httpcore" },