mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-16 11:24:35 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbc76c779e | ||
|
|
9454ae7365 | ||
|
|
7b4b9feaa5 | ||
|
|
add423f762 | ||
|
|
c34ce15fa2 | ||
|
|
8e637041c4 | ||
|
|
146cec3c08 |
@@ -5,7 +5,7 @@ name: Auto-merge Speakeasy PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled]
|
||||
types: [labeled, opened]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -22,7 +22,13 @@ jobs:
|
||||
github.event.pull_request.user.login == 'github-actions[bot]' &&
|
||||
startsWith(github.event.pull_request.head.ref, 'speakeasy-sdk-regen-') &&
|
||||
contains(github.event.pull_request.title, '🐝 Update SDK') &&
|
||||
contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)
|
||||
(
|
||||
(github.event.action == 'labeled' && contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)) ||
|
||||
(github.event.action == 'opened' &&
|
||||
(contains(github.event.pull_request.labels.*.name, 'patch') ||
|
||||
contains(github.event.pull_request.labels.*.name, 'minor') ||
|
||||
contains(github.event.pull_request.labels.*.name, 'major')))
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close superseded Speakeasy PRs
|
||||
|
||||
+41
-36
@@ -1,7 +1,7 @@
|
||||
lockVersion: 2.0.0
|
||||
id: c48cf606-fb42-4a45-9c23-8f0555307828
|
||||
management:
|
||||
docChecksum: ed88d95b0b7f60419c1114838caf081b
|
||||
docChecksum: a8ac206fd4d6c2a1336d9d65e35988c0
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
generationVersion: 2.788.4
|
||||
@@ -11,9 +11,9 @@ management:
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
persistentEdits:
|
||||
generation_id: 9aa73187-1861-4f91-95f7-cd1d2afafdff
|
||||
pristine_commit_hash: 3750e2dd54138f67d21ec18da9f09d92da278104
|
||||
pristine_tree_hash: 10fa76667eb33e2d858c8f50f5028fccb1afff88
|
||||
generation_id: abb906fe-f1e6-4836-ab0d-65a3aa53024c
|
||||
pristine_commit_hash: d8b83213f131c51b08d343960443188822f7e43d
|
||||
pristine_tree_hash: efb6e09e141797febaca6535c4612226426a8e8c
|
||||
features:
|
||||
python:
|
||||
acceptHeaders: 3.0.0
|
||||
@@ -118,8 +118,8 @@ trackedFiles:
|
||||
pristine_git_object: 123091224cbc4d87e2e01748e013618f2d142632
|
||||
docs/components/advisorreasoningeffort.md:
|
||||
id: 8b65bf21bf5d
|
||||
last_write_checksum: sha1:ffd01ce6c48ad3d25fb92083622f94c855ed2dea
|
||||
pristine_git_object: 70c97a14813005cfafcc7e2d132921d3e95fb7bc
|
||||
last_write_checksum: sha1:ae1a31169657770ac54bd15b8b9ba99dec447546
|
||||
pristine_git_object: 8828292d4f0692af00fefc00ae0a702cb151d2f1
|
||||
docs/components/advisorservertoolconfig.md:
|
||||
id: 9a630ec9486f
|
||||
last_write_checksum: sha1:b01e3db43dd70ddca3a7bb093b99f5b14c669835
|
||||
@@ -854,8 +854,8 @@ trackedFiles:
|
||||
pristine_git_object: 6c832606b0e983d2efd7cc6e3bec98d70e7fc603
|
||||
docs/components/chatrequesteffort.md:
|
||||
id: 244b6cbbd2e1
|
||||
last_write_checksum: sha1:232d283adecdffb3fd73e052f4913320c9d0b997
|
||||
pristine_git_object: ed30f437a84f7ae8508545aefa44198935377768
|
||||
last_write_checksum: sha1:f9ce1e4a1c3f705b673808b35750af7b71b158ca
|
||||
pristine_git_object: 26c09f0c5ae097d1373b8e5c721a4606765d5c99
|
||||
docs/components/chatrequestplugin.md:
|
||||
id: 24a908f99472
|
||||
last_write_checksum: sha1:0d96c14c2f1675e1bc3cdea7b70a82385a5bc117
|
||||
@@ -866,8 +866,8 @@ trackedFiles:
|
||||
pristine_git_object: baa1fb1a1f855f0ea648d44b8cb4c52185efe77d
|
||||
docs/components/chatrequestreasoningeffort.md:
|
||||
id: d91e84590d64
|
||||
last_write_checksum: sha1:e05ffa6a13566055170ad3490b2114c7f8215c70
|
||||
pristine_git_object: ab2eb8e2084efaee1528e74f2de35166d9bbf05e
|
||||
last_write_checksum: sha1:b72a0292fdffaf77b2531a155ca00d6d46405746
|
||||
pristine_git_object: 475f655086e1ec97e9b7aadc35ea4977da9e32dd
|
||||
docs/components/chatrequestservicetier.md:
|
||||
id: deaf591bec38
|
||||
last_write_checksum: sha1:8fa53b0f868c99934b83719b7c0b6b44b1f960eb
|
||||
@@ -1402,8 +1402,8 @@ trackedFiles:
|
||||
pristine_git_object: 870296bd3335da46ecdf4ec1722a3d47037a09c9
|
||||
docs/components/defaulteffort.md:
|
||||
id: 08dabde07c1d
|
||||
last_write_checksum: sha1:96f06eb8b68e44984b691338b99e746fef1253ac
|
||||
pristine_git_object: f3f07f26e47692dd4e6a728e45f32cfe5795082e
|
||||
last_write_checksum: sha1:0a1d4ee947c22010f9bb2cb66a52a0bbb2011e00
|
||||
pristine_git_object: 871219eaf7153f1027be70d26b1f667444a6fb17
|
||||
docs/components/defaultparameters.md:
|
||||
id: a84477afcaec
|
||||
last_write_checksum: sha1:a20e8b576e341dbcdb91884b8fc83cf4316ab106
|
||||
@@ -1846,8 +1846,8 @@ trackedFiles:
|
||||
pristine_git_object: b243b885cd9572d61cb63f2364f924a0751b19fa
|
||||
docs/components/fusionservertoolconfigeffort.md:
|
||||
id: 897b52512b1c
|
||||
last_write_checksum: sha1:3d2f3e019eee3c6bf4aedba909f7a92740d21225
|
||||
pristine_git_object: c7578213d3c65bdf579321a08c84d8f4c1de59a6
|
||||
last_write_checksum: sha1:2bb8798736eeb5504615ae93293601042af679cd
|
||||
pristine_git_object: 3e3f9ac35f973801cf9cc5be1ac29e9916074377
|
||||
docs/components/fusionservertoolconfigreasoning.md:
|
||||
id: 349d14075b51
|
||||
last_write_checksum: sha1:9c650a736d7b96f193e6d24da5e82b7aa24ba39e
|
||||
@@ -3690,8 +3690,8 @@ trackedFiles:
|
||||
pristine_git_object: 31d997aa9e0721cacdebfeb79ce3428d5ec79bf0
|
||||
docs/components/reasoningeffort.md:
|
||||
id: ea6dba24a061
|
||||
last_write_checksum: sha1:1a34f59ecfdc631ed846c0e33951b52d2a86beae
|
||||
pristine_git_object: 9fb0ddf227e42c634f5c435a2749db2e7effbf45
|
||||
last_write_checksum: sha1:53d8315d1f29bca1071672fbe583cad08f1cec81
|
||||
pristine_git_object: 225df68e53d3632bcd740e4f821d4f14233be403
|
||||
docs/components/reasoningformat.md:
|
||||
id: c0483881ee4e
|
||||
last_write_checksum: sha1:45038411b97c73c37fa000694770b06d13b0eb4b
|
||||
@@ -4158,8 +4158,8 @@ trackedFiles:
|
||||
pristine_git_object: 3e49330ffc6e7ae403873cfe3e8297ad188bcafa
|
||||
docs/components/subagentreasoningeffort.md:
|
||||
id: 068a2b1e59c4
|
||||
last_write_checksum: sha1:6b27ed5774615473f501ec7bf18c1524c99e4002
|
||||
pristine_git_object: fe29f80f29f7137d07401b4d25def11360a70a32
|
||||
last_write_checksum: sha1:6dbeef8db7e15799fd0f87d4965ba5613a388396
|
||||
pristine_git_object: 57b95be94ff3162b0601124a9d6d9b49f49eecaf
|
||||
docs/components/subagentservertoolconfig.md:
|
||||
id: 07f1740a203f
|
||||
last_write_checksum: sha1:3175e6b1db4977f98195f30c6e2391092bc017ff
|
||||
@@ -4904,6 +4904,10 @@ trackedFiles:
|
||||
id: 01cceb61d42f
|
||||
last_write_checksum: sha1:7e1d73bd30584d55f4b116737c15d7c73cdf6a3a
|
||||
pristine_git_object: 522f4978a3c4e1d1c0d197b541fc57e745b7d4e7
|
||||
docs/operations/costdetails.md:
|
||||
id: 777b240173de
|
||||
last_write_checksum: sha1:b2748fc0cf305791446f5f217947d82bd74a8350
|
||||
pristine_git_object: 58a1aa8485130f8b49c633dfef0439b83a5f239c
|
||||
docs/operations/createaudiospeechglobals.md:
|
||||
id: c67d64f11ad7
|
||||
last_write_checksum: sha1:a0026b1caf2268dd4a79177fa2bb630eca1498b4
|
||||
@@ -4978,8 +4982,8 @@ trackedFiles:
|
||||
pristine_git_object: 1ff75cb8fa59d2b7b756ea07e9f5849995b62435
|
||||
docs/operations/createembeddingsusage.md:
|
||||
id: 2dc99973f6c7
|
||||
last_write_checksum: sha1:b01ba733f5d1369b21a54b9f3bfb0e4059504b6f
|
||||
pristine_git_object: 007fb235eef4ebb9b3dda14352e9a252004de4c2
|
||||
last_write_checksum: sha1:292de8b3a80697b56a961d2eb7f97d54dd29c4ae
|
||||
pristine_git_object: 639fb7e305ff27786b6ea858b425e36aaaf20252
|
||||
docs/operations/createguardrailglobals.md:
|
||||
id: 34f5b2a17330
|
||||
last_write_checksum: sha1:a43fb357b9c08974befd14a79da7623e72bc3245
|
||||
@@ -6126,8 +6130,8 @@ trackedFiles:
|
||||
pristine_git_object: e21d2d2322aad32dabda485132c4046d2ec6de89
|
||||
src/openrouter/components/advisorreasoning.py:
|
||||
id: d5af5c19fc73
|
||||
last_write_checksum: sha1:ee69d03c9da3a6b9b42c3e6525d21d9c1910cfa1
|
||||
pristine_git_object: 7376346542022324ca4d8475237e78346ee607dc
|
||||
last_write_checksum: sha1:db9d67036b51e37b98ea76b383528af3d48f6ca6
|
||||
pristine_git_object: a2ab43864d385b5554fc911cc9ee9ebe9893c10f
|
||||
src/openrouter/components/advisorservertool_openrouter.py:
|
||||
id: 4442cd9ad387
|
||||
last_write_checksum: sha1:c1825628e0bbba268e5addad89e7abe6e45b2926
|
||||
@@ -6498,8 +6502,8 @@ trackedFiles:
|
||||
pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810
|
||||
src/openrouter/components/chatrequest.py:
|
||||
id: 5e39eaefa9cf
|
||||
last_write_checksum: sha1:65012c617dd06019eb4bf62d04c434ebfb23adcc
|
||||
pristine_git_object: f90c290577966b6fc85afaf1634b2413b02661b6
|
||||
last_write_checksum: sha1:eb9f865918863ceb12508060f3bc8605f3a9a87a
|
||||
pristine_git_object: f60f367c641cb92d48bbc2873bba0704800165d9
|
||||
src/openrouter/components/chatresult.py:
|
||||
id: 9062fe2935fe
|
||||
last_write_checksum: sha1:b44dc25412b1206cc188d9516191a273d0f3e4dc
|
||||
@@ -6906,8 +6910,8 @@ trackedFiles:
|
||||
pristine_git_object: 5729ea0c31a0ce7283a77316282ea77c91f13ae3
|
||||
src/openrouter/components/fusionservertoolconfig.py:
|
||||
id: 0d1d229c531f
|
||||
last_write_checksum: sha1:9f013aa6431316312a04ad960d3ef26d0a341356
|
||||
pristine_git_object: 4eae6cf00e69b060b3a99ef75ccc7a3762de37d0
|
||||
last_write_checksum: sha1:620671fb147ba5a006cf1444f833c1e6f26ba8fa
|
||||
pristine_git_object: 7e1442b9cf9fc0a81f7450e0efbe1448aa85ceb1
|
||||
src/openrouter/components/generationcontentdata.py:
|
||||
id: 0140215b5b46
|
||||
last_write_checksum: sha1:09e15ae2acc4f44084e2206ea51e6a06f4c5ee11
|
||||
@@ -7174,8 +7178,8 @@ trackedFiles:
|
||||
pristine_git_object: c197cb2c527296adff2c3cfd9e49bcbc48087ce7
|
||||
src/openrouter/components/modelreasoning.py:
|
||||
id: 58bb3f2d75e0
|
||||
last_write_checksum: sha1:3da126ae596520b6d4f0edcc7fb8e4f786f686c7
|
||||
pristine_git_object: b71947b65e2054b23ff2094a270763720e740d96
|
||||
last_write_checksum: sha1:d7decd330533b566bda99e6b4b5e120970cf61f1
|
||||
pristine_git_object: fa73b90a1b4b140d6b9ceb9ac284142c4d95e4d7
|
||||
src/openrouter/components/modelresponse.py:
|
||||
id: 023136e6dedf
|
||||
last_write_checksum: sha1:af84587984cbe6341f59f176b08df43096ac48c6
|
||||
@@ -7642,8 +7646,8 @@ trackedFiles:
|
||||
pristine_git_object: 29c0fc9a1ff14d26fc99a70bac491ce3b4240384
|
||||
src/openrouter/components/reasoningeffort.py:
|
||||
id: cadb8da93572
|
||||
last_write_checksum: sha1:a4d9c3c61ccfc2842592ca33d310b15b60bf9a10
|
||||
pristine_git_object: 3cf5b2e32d9b73277c73db6141e841f416fba384
|
||||
last_write_checksum: sha1:f0cac6530b869890e30631e9d42eedae0f2a5be8
|
||||
pristine_git_object: fe3562c76fc28d2f8cacd49a12c0a0500b069147
|
||||
src/openrouter/components/reasoningformat.py:
|
||||
id: 99d79e5500b6
|
||||
last_write_checksum: sha1:bfb111196309079ff8dcb09ab406d08a3a809e67
|
||||
@@ -7866,8 +7870,8 @@ trackedFiles:
|
||||
pristine_git_object: 8e1417b1cf116bf26060143dcab214d2623bddcf
|
||||
src/openrouter/components/subagentreasoning.py:
|
||||
id: 2715ebf26eb3
|
||||
last_write_checksum: sha1:40e3041f4cf9ac8b4371e6351686cbf537d17da1
|
||||
pristine_git_object: 1eb4e862985164f2e48b53dd0119d42bf8bed25e
|
||||
last_write_checksum: sha1:ce0a8989c3e42612edf46770a0039aca05b949de
|
||||
pristine_git_object: d2d508152e2a4339602d010776894f76210b3abf
|
||||
src/openrouter/components/subagentservertool_openrouter.py:
|
||||
id: f08524c6985a
|
||||
last_write_checksum: sha1:771b71aae9989727ea3564615f06da7f08431705
|
||||
@@ -8238,8 +8242,8 @@ trackedFiles:
|
||||
pristine_git_object: 37ee42a638f5fce69fc7db1e6b86efb51f381582
|
||||
src/openrouter/operations/__init__.py:
|
||||
id: 9afcea1e7161
|
||||
last_write_checksum: sha1:d0572cc16c500a9dba895239890bc01414b339a6
|
||||
pristine_git_object: 650e7d0faaf2b32b7c96dd196b6e8c412c573795
|
||||
last_write_checksum: sha1:b555b71cf7d07da5aa6b121a740d1ef69e513629
|
||||
pristine_git_object: b9e4c525f346b441e837c4497cc2e8d723a44352
|
||||
src/openrouter/operations/bulkaddworkspacemembers.py:
|
||||
id: e0ed56117619
|
||||
last_write_checksum: sha1:2b9c73dd8a24d6c479d50118a309e4e0969ca7ea
|
||||
@@ -8282,8 +8286,8 @@ trackedFiles:
|
||||
pristine_git_object: 523d24efa869d63a145167b94e811671b84c5cfb
|
||||
src/openrouter/operations/createembeddings.py:
|
||||
id: fe1160a960e9
|
||||
last_write_checksum: sha1:5307ac65b8a4c3eec3de9158c2a3d10554212e8b
|
||||
pristine_git_object: 4cc4c5c044fa87a8ae21dd7aa0f83d09f4d00f09
|
||||
last_write_checksum: sha1:55a231d6e9a2f2a76c3fbc1f8af893e393e08bc3
|
||||
pristine_git_object: 6459cab7e1a597f5a1b24f690d845b4ee8809236
|
||||
src/openrouter/operations/createguardrail.py:
|
||||
id: 52ed4b2f5903
|
||||
last_write_checksum: sha1:119141c01d19df6b6d090b67f80145e3bf4d4d60
|
||||
@@ -10062,6 +10066,7 @@ releaseNotes: |
|
||||
* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Deleted** **Breaking** :warning:
|
||||
* `open_router.datasets.get_benchmarks_design_arena()`: **Deleted** **Breaking** :warning:
|
||||
* `open_router.chat.send()`: `response` **Changed**
|
||||
* `open_router.embeddings.generate()`: `response.usage` **Changed**
|
||||
* `open_router.embeddings.list_models()`: `response.data.[].reasoning` **Added**
|
||||
* `open_router.models.get()`: `response.data.reasoning` **Added**
|
||||
* `open_router.models.list()`: `response.data.[].reasoning` **Added**
|
||||
|
||||
@@ -156,6 +156,7 @@ components:
|
||||
effort:
|
||||
description: Reasoning effort level for the advisor call.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -4745,6 +4746,7 @@ components:
|
||||
effort:
|
||||
description: Constrains effort on reasoning for reasoning models
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -4763,6 +4765,7 @@ components:
|
||||
Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used
|
||||
simultaneously with reasoning.effort if they differ.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -8205,6 +8208,7 @@ components:
|
||||
effort:
|
||||
description: Reasoning effort level for panelist and judge inner calls.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -18462,6 +18466,7 @@ components:
|
||||
type: response.reasoning_text.done
|
||||
ReasoningEffort:
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -19922,6 +19927,7 @@ components:
|
||||
effort:
|
||||
description: Reasoning effort level for the subagent call.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -24635,6 +24641,31 @@ paths:
|
||||
example: 0.0001
|
||||
format: double
|
||||
type: number
|
||||
cost_details:
|
||||
description: Breakdown of upstream inference costs
|
||||
example:
|
||||
upstream_inference_completions_cost: 0.0004
|
||||
upstream_inference_cost: null
|
||||
upstream_inference_prompt_cost: 0.0008
|
||||
nullable: true
|
||||
properties:
|
||||
upstream_inference_completions_cost:
|
||||
format: double
|
||||
type: number
|
||||
upstream_inference_cost:
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
upstream_inference_prompt_cost:
|
||||
format: double
|
||||
type: number
|
||||
required:
|
||||
- upstream_inference_prompt_cost
|
||||
- upstream_inference_completions_cost
|
||||
type: object
|
||||
is_byok:
|
||||
description: Whether a request was made using a Bring Your Own Key configuration
|
||||
type: boolean
|
||||
prompt_tokens:
|
||||
description: Number of tokens in the input
|
||||
example: 8
|
||||
|
||||
@@ -175,6 +175,7 @@ components:
|
||||
effort:
|
||||
description: Reasoning effort level for the advisor call.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -4742,6 +4743,7 @@ components:
|
||||
effort:
|
||||
description: Constrains effort on reasoning for reasoning models
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -4760,6 +4762,7 @@ components:
|
||||
description: >-
|
||||
Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -8158,6 +8161,7 @@ components:
|
||||
effort:
|
||||
description: Reasoning effort level for panelist and judge inner calls.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -18353,6 +18357,7 @@ components:
|
||||
type: response.reasoning_text.done
|
||||
ReasoningEffort:
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -19805,6 +19810,7 @@ components:
|
||||
effort:
|
||||
description: Reasoning effort level for the subagent call.
|
||||
enum:
|
||||
- max
|
||||
- xhigh
|
||||
- high
|
||||
- medium
|
||||
@@ -24481,6 +24487,31 @@ paths:
|
||||
example: 0.0001
|
||||
format: double
|
||||
type: number
|
||||
cost_details:
|
||||
description: Breakdown of upstream inference costs
|
||||
example:
|
||||
upstream_inference_completions_cost: 0.0004
|
||||
upstream_inference_cost: null
|
||||
upstream_inference_prompt_cost: 0.0008
|
||||
nullable: true
|
||||
properties:
|
||||
upstream_inference_completions_cost:
|
||||
format: double
|
||||
type: number
|
||||
upstream_inference_cost:
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
upstream_inference_prompt_cost:
|
||||
format: double
|
||||
type: number
|
||||
required:
|
||||
- upstream_inference_prompt_cost
|
||||
- upstream_inference_completions_cost
|
||||
type: object
|
||||
is_byok:
|
||||
description: Whether a request was made using a Bring Your Own Key configuration
|
||||
type: boolean
|
||||
prompt_tokens:
|
||||
description: Number of tokens in the input
|
||||
example: 8
|
||||
|
||||
@@ -2,20 +2,20 @@ speakeasyVersion: 1.680.0
|
||||
sources:
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:3961034f6f0bdec425b86df15fce217a97ac7b47776d8a0c815e3dd64ebd81de
|
||||
sourceBlobDigest: sha256:4e1f247864fe64f3cd13e9a6d8e3215f118d8497db4d1eb58e5c803d0d34b5dc
|
||||
sourceRevisionDigest: sha256:e723fd6d93d1675f10180ae0294e31a5f58f3492260b2afb840c9d21afe73fa5
|
||||
sourceBlobDigest: sha256:e0cae9ca4d8bd6326bf2af1bc0b1444b9819a634698e848acf6831bcd7391c36
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1781825192
|
||||
- speakeasy-sdk-regen-1782146304
|
||||
- 1.0.0
|
||||
targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:3961034f6f0bdec425b86df15fce217a97ac7b47776d8a0c815e3dd64ebd81de
|
||||
sourceBlobDigest: sha256:4e1f247864fe64f3cd13e9a6d8e3215f118d8497db4d1eb58e5c803d0d34b5dc
|
||||
sourceRevisionDigest: sha256:e723fd6d93d1675f10180ae0294e31a5f58f3492260b2afb840c9d21afe73fa5
|
||||
sourceBlobDigest: sha256:e0cae9ca4d8bd6326bf2af1bc0b1444b9819a634698e848acf6831bcd7391c36
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:d59fc8e5b1b99b9889f59b905f8ecf55e91c3ded775b70c80e3c3b3a940f9eba
|
||||
codeSamplesRevisionDigest: sha256:18d9a2a331754321fc8bb0067e344794777799ec325b28bdd67548c0d0f3bbe1
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ Based on:
|
||||
### Releases
|
||||
- [PyPI v0.10.0] https://pypi.org/project/openrouter/0.10.0 - .
|
||||
|
||||
## 2026-06-19 01:04:04
|
||||
## 2026-06-22 16:46:58
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
|
||||
@@ -10,6 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
AdvisorReasoningEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
|
||||
@@ -106,6 +106,7 @@ ChatRequestPlugin = Annotated[
|
||||
|
||||
ChatRequestEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
@@ -172,6 +173,7 @@ class ChatRequestReasoning(BaseModel):
|
||||
|
||||
ChatRequestReasoningEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
|
||||
@@ -10,6 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
FusionServerToolConfigEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
|
||||
@@ -19,6 +19,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
DefaultEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
|
||||
@@ -7,6 +7,7 @@ from typing import Literal, Union
|
||||
|
||||
ReasoningEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
|
||||
@@ -10,6 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
SubagentReasoningEffort = Union[
|
||||
Literal[
|
||||
"max",
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
|
||||
@@ -81,6 +81,8 @@ if TYPE_CHECKING:
|
||||
ContentText,
|
||||
ContentTextTypedDict,
|
||||
ContentTypedDict,
|
||||
CostDetails,
|
||||
CostDetailsTypedDict,
|
||||
CreateEmbeddingsData,
|
||||
CreateEmbeddingsDataTypedDict,
|
||||
CreateEmbeddingsGlobals,
|
||||
@@ -719,6 +721,8 @@ __all__ = [
|
||||
"ContentText",
|
||||
"ContentTextTypedDict",
|
||||
"ContentTypedDict",
|
||||
"CostDetails",
|
||||
"CostDetailsTypedDict",
|
||||
"CreateAudioSpeechGlobals",
|
||||
"CreateAudioSpeechGlobalsTypedDict",
|
||||
"CreateAudioSpeechRequest",
|
||||
@@ -1263,6 +1267,8 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ContentText": ".createembeddings",
|
||||
"ContentTextTypedDict": ".createembeddings",
|
||||
"ContentTypedDict": ".createembeddings",
|
||||
"CostDetails": ".createembeddings",
|
||||
"CostDetailsTypedDict": ".createembeddings",
|
||||
"CreateEmbeddingsData": ".createembeddings",
|
||||
"CreateEmbeddingsDataTypedDict": ".createembeddings",
|
||||
"CreateEmbeddingsGlobals": ".createembeddings",
|
||||
|
||||
@@ -344,6 +344,54 @@ class CreateEmbeddingsData(BaseModel):
|
||||
Object = Literal["list",]
|
||||
|
||||
|
||||
class CostDetailsTypedDict(TypedDict):
|
||||
r"""Breakdown of upstream inference costs"""
|
||||
|
||||
upstream_inference_completions_cost: float
|
||||
upstream_inference_prompt_cost: float
|
||||
upstream_inference_cost: NotRequired[Nullable[float]]
|
||||
|
||||
|
||||
class CostDetails(BaseModel):
|
||||
r"""Breakdown of upstream inference costs"""
|
||||
|
||||
upstream_inference_completions_cost: float
|
||||
|
||||
upstream_inference_prompt_cost: float
|
||||
|
||||
upstream_inference_cost: OptionalNullable[float] = UNSET
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["upstream_inference_cost"]
|
||||
nullable_fields = ["upstream_inference_cost"]
|
||||
null_default_fields = []
|
||||
|
||||
serialized = handler(self)
|
||||
|
||||
m = {}
|
||||
|
||||
for n, f in type(self).model_fields.items():
|
||||
k = f.alias or n
|
||||
val = serialized.get(k)
|
||||
serialized.pop(k, None)
|
||||
|
||||
optional_nullable = k in optional_fields and k in nullable_fields
|
||||
is_set = (
|
||||
self.__pydantic_fields_set__.intersection({n})
|
||||
or k in null_default_fields
|
||||
) # pylint: disable=no-member
|
||||
|
||||
if val is not None and val != UNSET_SENTINEL:
|
||||
m[k] = val
|
||||
elif val != UNSET_SENTINEL and (
|
||||
not k in optional_fields or (optional_nullable and is_set)
|
||||
):
|
||||
m[k] = val
|
||||
|
||||
return m
|
||||
|
||||
|
||||
class PromptTokensDetailsTypedDict(TypedDict):
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
@@ -387,6 +435,10 @@ class CreateEmbeddingsUsageTypedDict(TypedDict):
|
||||
r"""Total number of tokens used"""
|
||||
cost: NotRequired[float]
|
||||
r"""Cost of the request in credits"""
|
||||
cost_details: NotRequired[Nullable[CostDetailsTypedDict]]
|
||||
r"""Breakdown of upstream inference costs"""
|
||||
is_byok: NotRequired[bool]
|
||||
r"""Whether a request was made using a Bring Your Own Key configuration"""
|
||||
prompt_tokens_details: NotRequired[PromptTokensDetailsTypedDict]
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
@@ -403,9 +455,45 @@ class CreateEmbeddingsUsage(BaseModel):
|
||||
cost: Optional[float] = None
|
||||
r"""Cost of the request in credits"""
|
||||
|
||||
cost_details: OptionalNullable[CostDetails] = UNSET
|
||||
r"""Breakdown of upstream inference costs"""
|
||||
|
||||
is_byok: Optional[bool] = None
|
||||
r"""Whether a request was made using a Bring Your Own Key configuration"""
|
||||
|
||||
prompt_tokens_details: Optional[PromptTokensDetails] = None
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["cost", "cost_details", "is_byok", "prompt_tokens_details"]
|
||||
nullable_fields = ["cost_details"]
|
||||
null_default_fields = []
|
||||
|
||||
serialized = handler(self)
|
||||
|
||||
m = {}
|
||||
|
||||
for n, f in type(self).model_fields.items():
|
||||
k = f.alias or n
|
||||
val = serialized.get(k)
|
||||
serialized.pop(k, None)
|
||||
|
||||
optional_nullable = k in optional_fields and k in nullable_fields
|
||||
is_set = (
|
||||
self.__pydantic_fields_set__.intersection({n})
|
||||
or k in null_default_fields
|
||||
) # pylint: disable=no-member
|
||||
|
||||
if val is not None and val != UNSET_SENTINEL:
|
||||
m[k] = val
|
||||
elif val != UNSET_SENTINEL and (
|
||||
not k in optional_fields or (optional_nullable and is_set)
|
||||
):
|
||||
m[k] = val
|
||||
|
||||
return m
|
||||
|
||||
|
||||
class CreateEmbeddingsResponseBodyTypedDict(TypedDict):
|
||||
r"""Embeddings response containing embedding vectors"""
|
||||
|
||||
Reference in New Issue
Block a user