Compare commits

..
Author SHA1 Message Date
speakeasy-github[bot] 3d5f1b50d6 empty commit to trigger [run-tests] workflow 2026-06-22 16:37:39 +00:00
speakeasybot f5ba09f0c9 ## Python SDK Changes:
* `open_router.benchmarks.get_benchmarks()`: **Added**
* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Deleted** **Breaking** ⚠️
* `open_router.datasets.get_benchmarks_design_arena()`: **Deleted** **Breaking** ⚠️
* `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**
* `open_router.models.list_for_user()`:  `response.data.[].reasoning` **Added**
2026-06-22 16:37:22 +00:00
Christine Chen 7b4b9feaa5 fix: update auto-merge workflow triggers and bot username (#345) 2026-06-22 12:32:12 -04:00
Christine Chen add423f762 fix: add updated workflow with corrected bot username and event handling
- Add 'opened' trigger to catch PRs when bot immediately applies label
- Fix bot username to github-actions[bot] (verified via API and commit history)
- Restructure condition to handle both 'labeled' and 'opened' events
  * 'labeled': uses github.event.label.name
  * 'opened': uses github.event.pull_request.labels.*.name
  * Prevents 'opened' event from failing due to missing github.event.label
This enables the auto-merge workflow to work with Speakeasy SDK generation PRs.
2026-06-22 11:59:27 -04:00
Christine Chen c34ce15fa2 fix: update auto-merge workflow triggers and bot username
- Add 'opened' trigger to catch PRs when bot immediately applies label
- Fix bot username from github-actions[bot] to app/github-actions
This enables the auto-merge workflow to work with Speakeasy SDK generation PRs.
2026-06-22 11:20:24 -04:00
robert-j-yandOpenRouter SDK Bot 8e637041c4 chore: update OpenAPI spec from monorepo (#343)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-22 08:00:49 -07:00
robert-j-yandOpenRouter SDK Bot 146cec3c08 chore: update OpenAPI spec from monorepo (#341)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-19 09:03:24 -07:00
robert-j-yandOpenRouter SDK Bot 14a62e3451 chore: update OpenAPI spec from monorepo (#339)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-18 16:24:52 -07:00
16 changed files with 356 additions and 55 deletions
@@ -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
+56 -46
View File
@@ -1,7 +1,7 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: 8a12eb05f6d29e6d4369ce71067b4c27
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: c5f6bbbc-e077-4608-9e45-3c82a8c6ccf3
pristine_commit_hash: 9aafb3f6936aaf821532a25a46df74a5faa9a7c3
pristine_tree_hash: 7b768060a0f6d7e54a10dda44219006db5253019
generation_id: f33a53f9-3f01-4c9a-a75d-989b51eeb1a9
pristine_commit_hash: dae7364eb22953752f89648a8742d1ed3eaebd11
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,16 +866,16 @@ 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
pristine_git_object: 13ae40be5e3c883f88789c3b5b74a3b2da4c85c2
docs/components/chatresult.md:
id: 212b0f66efd0
last_write_checksum: sha1:0a94cfb0c88a0dbf0f0abc5d83ac6fc6c48051b4
pristine_git_object: cc04eadd2f48efd93533a3ddae52ad39e91f5dee
last_write_checksum: sha1:f40df693ad2d2d8e156aacb218af394f675bfb89
pristine_git_object: 41f82f9576591d048a504f29ca19b148ccca02bc
docs/components/chatresultobject.md:
id: 668504931d18
last_write_checksum: sha1:6d550246aa007a5be94a9788ae4cfdfb75006980
@@ -898,8 +898,8 @@ trackedFiles:
pristine_git_object: 690d74b67239bf7f423039652aea3741c831137e
docs/components/chatstreamchunk.md:
id: 404d264ea22c
last_write_checksum: sha1:1353c09378850a9810c39cf3198f0fd5e049f610
pristine_git_object: 3c64aec72fb2eb9f0cf6eae975dd9c8bb183c6e6
last_write_checksum: sha1:096b20b3777fd22cbe9c3ffb26c0d6bf51feedbe
pristine_git_object: 5cce75d63c13268740aa9fdb46f5273f77cd1c25
docs/components/chatstreamchunkobject.md:
id: 5393918d9606
last_write_checksum: sha1:0765d94b3d01c811155dce29c20c2ae4bd4abd0e
@@ -998,8 +998,8 @@ trackedFiles:
pristine_git_object: 7eb1791a9153498d5ffffc6b67d3668df59000c2
docs/components/chatusage.md:
id: 72cd0c41ec64
last_write_checksum: sha1:9a6a709e2ea8f36c1f55afc3ae364917ab787e5e
pristine_git_object: 536fc52c1d3dec20dc3dd38e65714da08779e4d3
last_write_checksum: sha1:97805cc7bc61ef57d2279033d8c0b6859cd6e09f
pristine_git_object: 206128fbeaf4799b95c46d20265c1143f83a7898
docs/components/chatusermessage.md:
id: 4ab205b0030b
last_write_checksum: sha1:4c87fbc12f54bb5b58526949e3f8ea9c161f8cdf
@@ -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
@@ -3920,6 +3920,10 @@ trackedFiles:
id: beee40001fda
last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf
pristine_git_object: 2e0839d06f821dd97780dc22f202dedf23e4efe1
docs/components/servertoolusedetails.md:
id: b14e315828c5
last_write_checksum: sha1:2e4e747062c990a502a208c1c90382305e428fe7
pristine_git_object: fb12e181963bb9eada3294d7a605b076f695ab58
docs/components/serviceunavailableresponseerrordata.md:
id: 6d65ecfd7ad3
last_write_checksum: sha1:c0e9357b45a58f3da2d3520b502cec7dae5f3446
@@ -4154,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
@@ -4900,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
@@ -4974,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
@@ -6102,8 +6110,8 @@ trackedFiles:
pristine_git_object: a1894915bd32aee65f019885634eb7908970a046
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:805bb2df1d5fe49556f426348971e5ccdc08aa56
pristine_git_object: eca63a922d8154ae9106e8f8b5aaf16dbc580afd
last_write_checksum: sha1:e59a97a36a75c1848f5342f9c3d061dd993855d8
pristine_git_object: f2928e99d526cad8e81c673c4c03bc864c14a365
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:1b6b66672fb80dccdc39843a98bdef6d7d804364
@@ -6122,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
@@ -6494,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
@@ -6558,8 +6566,8 @@ trackedFiles:
pristine_git_object: 2ccba8386486b7a730816a9829b01754935a2e96
src/openrouter/components/chatusage.py:
id: f224a054bf45
last_write_checksum: sha1:947079d2163225a49e423151de25dc6132df5bf6
pristine_git_object: 3a7357d8a6f725ba18b1f15215a197f11e917659
last_write_checksum: sha1:e63f9a7b86d0091b0fddf04ee273088b51dd76a6
pristine_git_object: 62e2f91566dbcaf0794d927b679552757efe46b1
src/openrouter/components/chatusermessage.py:
id: 7777191e729a
last_write_checksum: sha1:1ecc9101c05178427d73e455de4d679ac8d78015
@@ -6902,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
@@ -7170,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
@@ -7638,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
@@ -7862,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
@@ -8234,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
@@ -8278,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
@@ -10057,6 +10065,8 @@ releaseNotes: |
* `open_router.benchmarks.get_benchmarks()`: **Added**
* `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**
+56
View File
@@ -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
@@ -5401,6 +5404,9 @@ components:
prompt_tokens: 10
prompt_tokens_details:
cached_tokens: 2
server_tool_use_details:
tool_calls_executed: 2
tool_calls_requested: 2
total_tokens: 25
properties:
completion_tokens:
@@ -5457,6 +5463,28 @@ components:
description: Video input tokens
type: integer
type: object
server_tool_use_details:
description: Usage for server-side tool execution (e.g., web search)
nullable: true
properties:
tool_calls_executed:
description: Number of OpenRouter server tool calls that executed and produced a result
nullable: true
type: integer
tool_calls_requested:
description: >-
Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types.
Provider-native tools (e.g. native web search) are not counted here.
nullable: true
type: integer
web_search_requests:
description: >-
Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search
is also counted in tool_calls_requested; provider-native web search may report web_search_requests only.
Do not sum the two.
nullable: true
type: integer
type: object
total_tokens:
description: Total number of tokens
type: integer
@@ -8180,6 +8208,7 @@ components:
effort:
description: Reasoning effort level for panelist and judge inner calls.
enum:
- max
- xhigh
- high
- medium
@@ -18437,6 +18466,7 @@ components:
type: response.reasoning_text.done
ReasoningEffort:
enum:
- max
- xhigh
- high
- medium
@@ -19897,6 +19927,7 @@ components:
effort:
description: Reasoning effort level for the subagent call.
enum:
- max
- xhigh
- high
- medium
@@ -24610,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
+53
View File
@@ -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
@@ -5392,6 +5395,9 @@ components:
prompt_tokens: 10
prompt_tokens_details:
cached_tokens: 2
server_tool_use_details:
tool_calls_executed: 2
tool_calls_requested: 2
total_tokens: 25
properties:
completion_tokens:
@@ -5448,6 +5454,25 @@ components:
description: Video input tokens
type: integer
type: object
server_tool_use_details:
description: Usage for server-side tool execution (e.g., web search)
nullable: true
properties:
tool_calls_executed:
description: Number of OpenRouter server tool calls that executed and produced a result
nullable: true
type: integer
tool_calls_requested:
description: >-
Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here.
nullable: true
type: integer
web_search_requests:
description: >-
Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two.
nullable: true
type: integer
type: object
total_tokens:
description: Total number of tokens
type: integer
@@ -8136,6 +8161,7 @@ components:
effort:
description: Reasoning effort level for panelist and judge inner calls.
enum:
- max
- xhigh
- high
- medium
@@ -18331,6 +18357,7 @@ components:
type: response.reasoning_text.done
ReasoningEffort:
enum:
- max
- xhigh
- high
- medium
@@ -19783,6 +19810,7 @@ components:
effort:
description: Reasoning effort level for the subagent call.
enum:
- max
- xhigh
- high
- medium
@@ -24459,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
+6 -6
View File
@@ -2,20 +2,20 @@ speakeasyVersion: 1.680.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6ca77315c3cd31ab7e308e010b26b7c9eb366b11b78ea9c71179facc4daaf97b
sourceBlobDigest: sha256:8bada810c7c5ddb302c51dbbbb36dd0c9a45c4ba1c5e44af1646f69fc2a38751
sourceRevisionDigest: sha256:e723fd6d93d1675f10180ae0294e31a5f58f3492260b2afb840c9d21afe73fa5
sourceBlobDigest: sha256:e0cae9ca4d8bd6326bf2af1bc0b1444b9819a634698e848acf6831bcd7391c36
tags:
- latest
- speakeasy-sdk-regen-1781803346
- speakeasy-sdk-regen-1782146156
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6ca77315c3cd31ab7e308e010b26b7c9eb366b11b78ea9c71179facc4daaf97b
sourceBlobDigest: sha256:8bada810c7c5ddb302c51dbbbb36dd0c9a45c4ba1c5e44af1646f69fc2a38751
sourceRevisionDigest: sha256:e723fd6d93d1675f10180ae0294e31a5f58f3492260b2afb840c9d21afe73fa5
sourceBlobDigest: sha256:e0cae9ca4d8bd6326bf2af1bc0b1444b9819a634698e848acf6831bcd7391c36
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:80ceff338c097e19bf3951fd00e8010fc7c102b916a684eeec33d507b7a3844f
codeSamplesRevisionDigest: sha256:18d9a2a331754321fc8bb0067e344794777799ec325b28bdd67548c0d0f3bbe1
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
+1 -1
View File
@@ -30,7 +30,7 @@ Based on:
### Releases
- [PyPI v0.10.0] https://pypi.org/project/openrouter/0.10.0 - .
## 2026-06-18 17:22:05
## 2026-06-22 16:35:38
### Changes
Based on:
- OpenAPI Doc
+6
View File
@@ -527,6 +527,8 @@ if TYPE_CHECKING:
CompletionTokensDetailsTypedDict,
PromptTokensDetails,
PromptTokensDetailsTypedDict,
ServerToolUseDetails,
ServerToolUseDetailsTypedDict,
)
from .chatusermessage import (
ChatUserMessage,
@@ -4056,6 +4058,8 @@ __all__ = [
"SearchQualityLevel",
"Security",
"SecurityTypedDict",
"ServerToolUseDetails",
"ServerToolUseDetailsTypedDict",
"ServiceUnavailableResponseErrorData",
"ServiceUnavailableResponseErrorDataTypedDict",
"ShellCallItem",
@@ -4742,6 +4746,8 @@ _dynamic_imports: dict[str, str] = {
"CompletionTokensDetailsTypedDict": ".chatusage",
"PromptTokensDetails": ".chatusage",
"PromptTokensDetailsTypedDict": ".chatusage",
"ServerToolUseDetails": ".chatusage",
"ServerToolUseDetailsTypedDict": ".chatusage",
"ChatUserMessage": ".chatusermessage",
"ChatUserMessageContent": ".chatusermessage",
"ChatUserMessageContentTypedDict": ".chatusermessage",
@@ -10,6 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
AdvisorReasoningEffort = Union[
Literal[
"max",
"xhigh",
"high",
"medium",
+2
View File
@@ -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",
+69
View File
@@ -112,6 +112,68 @@ class PromptTokensDetails(BaseModel):
r"""Video input tokens"""
class ServerToolUseDetailsTypedDict(TypedDict):
r"""Usage for server-side tool execution (e.g., web search)"""
tool_calls_executed: NotRequired[Nullable[int]]
r"""Number of OpenRouter server tool calls that executed and produced a result"""
tool_calls_requested: NotRequired[Nullable[int]]
r"""Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here."""
web_search_requests: NotRequired[Nullable[int]]
r"""Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two."""
class ServerToolUseDetails(BaseModel):
r"""Usage for server-side tool execution (e.g., web search)"""
tool_calls_executed: OptionalNullable[int] = UNSET
r"""Number of OpenRouter server tool calls that executed and produced a result"""
tool_calls_requested: OptionalNullable[int] = UNSET
r"""Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here."""
web_search_requests: OptionalNullable[int] = UNSET
r"""Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
"tool_calls_executed",
"tool_calls_requested",
"web_search_requests",
]
nullable_fields = [
"tool_calls_executed",
"tool_calls_requested",
"web_search_requests",
]
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 ChatUsageTypedDict(TypedDict):
r"""Token usage statistics"""
@@ -131,6 +193,8 @@ class ChatUsageTypedDict(TypedDict):
r"""Whether a request was made using a Bring Your Own Key configuration"""
prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]]
r"""Detailed prompt token usage"""
server_tool_use_details: NotRequired[Nullable[ServerToolUseDetailsTypedDict]]
r"""Usage for server-side tool execution (e.g., web search)"""
class ChatUsage(BaseModel):
@@ -160,6 +224,9 @@ class ChatUsage(BaseModel):
prompt_tokens_details: OptionalNullable[PromptTokensDetails] = UNSET
r"""Detailed prompt token usage"""
server_tool_use_details: OptionalNullable[ServerToolUseDetails] = UNSET
r"""Usage for server-side tool execution (e.g., web search)"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
@@ -168,12 +235,14 @@ class ChatUsage(BaseModel):
"cost_details",
"is_byok",
"prompt_tokens_details",
"server_tool_use_details",
]
nullable_fields = [
"completion_tokens_details",
"cost",
"cost_details",
"prompt_tokens_details",
"server_tool_use_details",
]
null_default_fields = []
@@ -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",
+6
View File
@@ -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"""