From a9d58b095ea5e82740ef791af08ab25bee7f016c Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 17 Nov 2026 18:44:40 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.benchmarks.get_benchmarks()`: * `request.task_type` **Changed** * `response.data[].union(UnifiedBenchmarksAAItem)` **Changed** * `open_router.embeddings.list_models()`: `response.data[].benchmarks.artificial_analysis` **Changed** * `open_router.models.get()`: `response.data.benchmarks.artificial_analysis` **Changed** * `open_router.models.list()`: * `request` **Changed** * `response.data[].benchmarks.artificial_analysis` **Changed** * `open_router.models.list_for_user()`: * `request.sort` **Changed** * `response.data[].benchmarks.artificial_analysis` **Changed** --- .speakeasy/gen.lock | 130 ++-- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 558 ++++++++++++++++-- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/components/aabenchmarkentry.mdx | 22 +- docs/components/model.mdx | 46 +- docs/components/modelbenchmarks.mdx | 8 +- docs/components/paretorouterplugin.mdx | 2 +- docs/components/unifiedbenchmarksaaitem.mdx | 31 +- docs/components/unifiedbenchmarksmeta.mdx | 18 +- .../unifiedbenchmarksmetasource.mdx | 2 +- docs/operations/getbenchmarksrequest.mdx | 28 +- docs/operations/getmodelsrequest.mdx | 90 +-- docs/operations/getmodelssort.mdx | 12 +- docs/operations/listmodelsuserrequest.mdx | 20 +- docs/operations/listmodelsusersort.mdx | 12 +- docs/operations/tasktype.mdx | 15 +- docs/sdks/benchmarks/README.mdx | 32 +- docs/sdks/models/README.mdx | 116 ++-- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- src/openrouter/benchmarks.py | 8 +- src/openrouter/components/aabenchmarkentry.py | 83 ++- src/openrouter/components/modelbenchmarks.py | 4 +- .../components/paretorouterplugin.py | 4 +- .../components/unifiedbenchmarksaaitem.py | 85 ++- .../components/unifiedbenchmarksmeta.py | 14 +- .../components/unifiedbenchmarksresponse.py | 4 +- src/openrouter/models_.py | 192 +++++- src/openrouter/operations/getbenchmarks.py | 17 +- src/openrouter/operations/getmodels.py | 252 +++++++- src/openrouter/operations/listmodelsuser.py | 16 +- uv.lock | 2 +- 34 files changed, 1475 insertions(+), 378 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 96b34bcac..4d0adf6c6 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: 329734feca974c9af4144746bd149689 + docChecksum: fd25ec9ed7f6e3fc7effa59cff5637b2 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.184 - configChecksum: fc7db2dc2dd88e5c3b32a6d8d74409d5 + releaseVersion: 1.3.185 + configChecksum: 843a9f74c6f551b57ada8a9353ca5929 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: b1a8a3a5-28aa-4a97-95a1-571cc09bd3db - pristine_commit_hash: 7445e113510a2e567eb7a7cdae4145be662cd7f4 - pristine_tree_hash: dbb4084b0b5fab948cdf0c40d911738c728d2749 + generation_id: 917cf744-f90d-4fbc-b822-9bc1b7fab2f5 + pristine_commit_hash: 239e2920e8485ee220fdba3d44ad1fcedfafe1fb + pristine_tree_hash: 0b30491ccfe28faa43596407962ce4a3d964a471 features: python: acceptHeaders: 3.0.0 @@ -80,8 +80,8 @@ trackedFiles: pristine_git_object: 9c1506b8f539140db04b239d7a84d8b599747932 docs/components/aabenchmarkentry.mdx: id: 35ebea5f13ae - last_write_checksum: sha1:af2dc09d64143a3256c9655308a78808577657d3 - pristine_git_object: df17c6fa014872a56c32842a745d5d49767b4539 + last_write_checksum: sha1:73a9ee986cb4f5726e15a0bdaa5e4b9bfed40e7f + pristine_git_object: d13b9f95950ac1083b38062b4c38f554022f1991 docs/components/account.mdx: id: b174f975ca46 last_write_checksum: sha1:88a5b5a6c6a36afaa89c78643aef73d5adc87964 @@ -5528,8 +5528,8 @@ trackedFiles: pristine_git_object: 432f9b632b00dbc6e7cd8a87908df962923bf3d6 docs/components/model.mdx: id: ee338c3cef0a - last_write_checksum: sha1:04f6bb11207ff88d5f41cb69b65d4938b4e4ddd7 - pristine_git_object: 0a601f49dd9988385e358deb05d9c9cb216937dd + last_write_checksum: sha1:c9277ba12f527c7c16ff67cd9f6850b2fd85221a + pristine_git_object: 0e60fa4d21ec8b7f26d58460eda2cf2451be4a4d docs/components/modelaliastarget.mdx: id: 4c176a0fc594 last_write_checksum: sha1:f62206b85ab831a8851bb952302699c14d9f4aef @@ -5604,8 +5604,8 @@ trackedFiles: pristine_git_object: aa249e0b80016a508217b2e71857980148df1cf8 docs/components/modelbenchmarks.mdx: id: a56406a8820b - last_write_checksum: sha1:433bba8f8155452134d1fe6942b48ac1f0950b6c - pristine_git_object: 37643a40c1fd2e064c7b19845999c38d63b6fc1b + last_write_checksum: sha1:7603f1bd5366c48135f3392d5d9b96719853cdeb + pristine_git_object: e1f0625c7722abb7c1e8ac433424bf7a1fefb31d docs/components/modelgroup.mdx: id: 8f246164d34c last_write_checksum: sha1:2954097c66c1dd56fa0440a501630275a6cfebea @@ -7112,8 +7112,8 @@ trackedFiles: pristine_git_object: 10aae49519a15c0c8e3206be854249d6b98d106a docs/components/paretorouterplugin.mdx: id: 92e7a1e63fd0 - last_write_checksum: sha1:7f6358d515a34d7328a603ed35f4c067e85a1817 - pristine_git_object: 703aaf55300cd58c5b7d791ad3acd18fd907dae7 + last_write_checksum: sha1:27fa4f4d48e831f716fcc0c6e607e93d33f887d6 + pristine_git_object: 8f6e3ff350a6e73c97065ae79c2849224212e644 docs/components/paretorouterpluginid.mdx: id: 1142f2f64cc8 last_write_checksum: sha1:6e5b2bd86e73db92a9b4b93f014acb57cc61e1ae @@ -8884,8 +8884,8 @@ trackedFiles: pristine_git_object: 710712bd83dc820773f9b220873ef64e7a7746b5 docs/components/unifiedbenchmarksaaitem.mdx: id: 17da67bd22b0 - last_write_checksum: sha1:73e644169bdb6dfa63b8401195e6f1ab29dc0eee - pristine_git_object: 8e262198f9a321810c87af455b08ec84f80a0774 + last_write_checksum: sha1:16fe983e8f3cc6d7ccfdfac5af318ee2a6dd1b00 + pristine_git_object: 3d56a72b89e5c06fd24e7a615b75b3ab417d5a07 docs/components/unifiedbenchmarksaaitemsource.mdx: id: 181f24319290 last_write_checksum: sha1:6b6b0883911fb085166e280f6f473337bf421956 @@ -8900,12 +8900,12 @@ trackedFiles: pristine_git_object: a194185c8fda7c1377041151e57baf12b904ebfc docs/components/unifiedbenchmarksmeta.mdx: id: 7876023186a1 - last_write_checksum: sha1:abb279b2054c408ba644027f0fc4c6ac163aaedf - pristine_git_object: 25898bb9b6f7e9826714a899f6bc97af18bddf61 + last_write_checksum: sha1:b8d1e2a982523866c02096b961d0589320e45b64 + pristine_git_object: a17ca2a7fbcad2b9eecfe016c3522c828609b0a7 docs/components/unifiedbenchmarksmetasource.mdx: id: c6bc112e85a2 - last_write_checksum: sha1:50a07e9a95420069bd010b5b8d270fda128d256b - pristine_git_object: 5528a6a2cd6612a404941b73b4e68bb341697e99 + last_write_checksum: sha1:1a725e60bbd2c11686dba285364532c3b0b123e1 + pristine_git_object: cf8edcfdb844c236a17473165cf1940a0259802d docs/components/unifiedbenchmarksmetaversion.mdx: id: 994afa2e9d2c last_write_checksum: sha1:d113d8b5aedeecb78fccd3451e58b42428906a0d @@ -10316,8 +10316,8 @@ trackedFiles: pristine_git_object: 274aa021a035d63106eb432eb84e38e80ebd85eb docs/operations/getbenchmarksrequest.mdx: id: 704fb5d64a7c - last_write_checksum: sha1:06f374dd4e87544721728de4edeac020c814edbc - pristine_git_object: ab720f00c82b746a7c41895e187a617b2d5d6101 + last_write_checksum: sha1:49583135cdf0dcc449165abe57bf1666a24ca154 + pristine_git_object: 7aca7c792055388bae64fe82c0ee03f5852d40f4 docs/operations/getbudgetpolicyglobals.mdx: id: 1fd05a15603a last_write_checksum: sha1:042ba8a33b8116004832b9f96785dd49e21a2995 @@ -10460,16 +10460,16 @@ trackedFiles: pristine_git_object: 0f723aca82c55a90e4e4db888152d92e19bc65f1 docs/operations/getmodelsrequest.mdx: id: b2627beb1959 - last_write_checksum: sha1:c50802714b37f545077849e871bf8e4208fbe13a - pristine_git_object: 043503e2dc0c819ff2cd21f7767c7050baf96b40 + last_write_checksum: sha1:fd7f21cd87f8923bb9c693e80775a8ebc802da95 + pristine_git_object: 3aff498bcb33781eaf6cb6d10078497311f249c4 docs/operations/getmodelsresponse.mdx: id: acfd4707ddde last_write_checksum: sha1:4cdb8094183af736a2679e306454157e8468da39 pristine_git_object: cb73087fe5c85685c95f4ddc6b814d2fda007e17 docs/operations/getmodelssort.mdx: id: 3cfd33e60661 - last_write_checksum: sha1:6d75758523f8665ff617fe5d4e54385ad785c7ef - pristine_git_object: 537a70d3eb590cda229847689553607b46a3a5f7 + last_write_checksum: sha1:31da820631342fd10804d990ffc098eec10d2f5d + pristine_git_object: 771fe45d8ffcbe39bf2aca441bd3c98e6d274e89 docs/operations/getmoderationpolicyglobals.mdx: id: ba912e4f7927 last_write_checksum: sha1:d00889f156ee52fea3c86ad2b73a9c578aaca4b9 @@ -10932,8 +10932,8 @@ trackedFiles: pristine_git_object: b6ff4ac617c15b9ce560d8f7be1f2813ac73b696 docs/operations/listmodelsuserrequest.mdx: id: 01537864056e - last_write_checksum: sha1:c84bf81ea9165231ee75ed3a64978ae1b9286ea9 - pristine_git_object: 74bcc49ed49ed4cc8ed5704399155606fb3984b1 + last_write_checksum: sha1:44d1c32fef1341f14997e60b8e37b34b4b98a83b + pristine_git_object: 4d81aec24e005978ab8775db1c29ca2126370aa5 docs/operations/listmodelsuserresponse.mdx: id: 34f7a1648ceb last_write_checksum: sha1:2ba3da93b8dd5a76d5f1acf0a080bc45ced552b6 @@ -10944,8 +10944,8 @@ trackedFiles: pristine_git_object: 30c48ec99d5e99e45a91ae00d14c4f1514628f8c docs/operations/listmodelsusersort.mdx: id: a6cd738b2b05 - last_write_checksum: sha1:fbe3a59ea629b15942d1aeadde96f46a51f29a66 - pristine_git_object: 4bae293ec5d0a8b931bb85c6df53316562c66fee + last_write_checksum: sha1:8727603af278d196803f713cb443c4220592a36c + pristine_git_object: 574a4984cf9684e909691cd758d5e13fecc9afb6 docs/operations/listmoderationpoliciesglobals.mdx: id: 9696f0898918 last_write_checksum: sha1:81f4f38601d5ac6cbf0ebfd33e4b1a3b2b0211d3 @@ -11316,8 +11316,8 @@ trackedFiles: pristine_git_object: 9b01565b648f986bbd230b5f897f3998623d00f9 docs/operations/tasktype.mdx: id: d3da8106d2d1 - last_write_checksum: sha1:0955731aba6ddddeeaee3b34ca7e353dc2dd9700 - pristine_git_object: ca10bf29d177ce5724fe59c84d929b20e40781c6 + last_write_checksum: sha1:42a44b770f7ea37a243793bd3c4bcd7aa003d97a + pristine_git_object: fdb7bf7ca805286505bb42eb526c609b35ea0b88 docs/operations/timerange.mdx: id: 03a218211f06 last_write_checksum: sha1:471eae0736b3af652fe5eb42ecb93e252c8c5516 @@ -11532,8 +11532,8 @@ trackedFiles: pristine_git_object: 569ef3d149eed44d36c0e00c4507e5b3efa30ad1 docs/sdks/benchmarks/README.mdx: id: 5b483a6770ba - last_write_checksum: sha1:1123cde0a42d442dd80c502c40b3072f795cdd84 - pristine_git_object: 46fe09f0c09e01c11b8b88fc5265802ac48ee05d + last_write_checksum: sha1:298b23dc76e681ff838e78ea11d2e9160a494f7f + pristine_git_object: 5e9e4d5428eacd9151c49d278c917fd769b2ec9e docs/sdks/betaresponses/README.mdx: id: 8a1e987c9840 last_write_checksum: sha1:b6c877d4e4d77e6ea6ce093fbb4964b18e87fa48 @@ -11604,8 +11604,8 @@ trackedFiles: pristine_git_object: d45846d4514d25a84fbd8cd439a6bd5c37e75946 docs/sdks/models/README.mdx: id: 58f1ca464e0b - last_write_checksum: sha1:2d106e4557b3c7602c77b7b7f237867a8736bb6c - pristine_git_object: 24fda0f8e544cca9d93d6a83f0917927842041aa + last_write_checksum: sha1:fed0a9321e7705d29049028dabf4ed450b36f11a + pristine_git_object: fd084ff5bc58c423c324936ee08d612a5e0170f5 docs/sdks/oauth/README.mdx: id: 42b5079343d2 last_write_checksum: sha1:ed962f2d4afda6e456d031d8783a4825aeb85b97 @@ -11680,8 +11680,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:c90dc0eb350e122b849bd89a0ceac03f99e02edb - pristine_git_object: 0807489a62013955b5755f21f6c71d794dc91cc2 + last_write_checksum: sha1:bb14fe1c9556bdc23350915831c9db901f906775 + pristine_git_object: 01a04b80f507244b5c9962ceb9e55b48c7a1bb41 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11708,8 +11708,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:765e64372cbcfab0769279442f0941145cf95242 - pristine_git_object: 6b34a5c63943f70b34badded0ca9193d0d961145 + last_write_checksum: sha1:215f1d88c39d15c23a2bb6c7bbbe6dcb5ef91c38 + pristine_git_object: 7fde9643bc1b21327822e7d02081df43b13422c9 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -11732,8 +11732,8 @@ trackedFiles: pristine_git_object: a333c0862a1f01a381e9d5323765a8dfbb12fb57 src/openrouter/benchmarks.py: id: 178d2ad8d706 - last_write_checksum: sha1:15b8a7ea05a7550032afb15981958aa73b756881 - pristine_git_object: f163fcbb9c21fc1327d6c9a1eefcc60cbf9091ea + last_write_checksum: sha1:aec03783a8012aee174f71a1a41e1026ddc22930 + pristine_git_object: 69d54e690138cd75f4a983e057a772820fd5455b src/openrouter/beta.py: id: fffdf54fd8f5 last_write_checksum: sha1:21fb1d65cd9800c65c7a2ae520619002976e37cd @@ -11760,8 +11760,8 @@ trackedFiles: pristine_git_object: 82d048afb80ff11f2bebec41fe6144180e3da3e3 src/openrouter/components/aabenchmarkentry.py: id: e2e0f0b48c82 - last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c - pristine_git_object: ad39bd9765938465f06b5422706fc867db11e468 + last_write_checksum: sha1:98f5828e7188c8fa506e51773ad54f256d94978d + pristine_git_object: fe000bbfabfe54ff6bab970496b5e04ba58f42e1 src/openrouter/components/accountguardrailpolicy.py: id: 280c4cb634e8 last_write_checksum: sha1:397d865dd94f366abac85d10e5bffca666050c78 @@ -14016,8 +14016,8 @@ trackedFiles: pristine_git_object: b711944d157ac79e84abab12ebc4a37ac03c3400 src/openrouter/components/modelbenchmarks.py: id: efd0b01b6775 - last_write_checksum: sha1:71dd3f1be37b6ea21345316025cb106488a9a4c9 - pristine_git_object: 466a8274140ec2d35bb15233371be4555a79e915 + last_write_checksum: sha1:7c999f6fc941aa4a8608c650c97f128a54b5186d + pristine_git_object: 4ad4302d287a960f8dbb3984ec268dfb26acbfb2 src/openrouter/components/modelgroup.py: id: ffb5492b0d39 last_write_checksum: sha1:75da0e0a977d4fd2908506683548c7a8c878b869 @@ -14528,8 +14528,8 @@ trackedFiles: pristine_git_object: 27208f70776f6533f6d9fe26f1774e874de6922e src/openrouter/components/paretorouterplugin.py: id: b239c8e11899 - last_write_checksum: sha1:f36635eb48633dabd5a732beb42c272410a1d7e6 - pristine_git_object: 7ff8ba8179cc275e7312e94f14ae44fbfd4cf3b8 + last_write_checksum: sha1:61a3e9c14f1093d3258cfea3fa30b0bac5c1dbe8 + pristine_git_object: 451b0b412e9b3e60d8de662e58e5f8506dfe0e82 src/openrouter/components/payloadtoolargeresponseerrordata.py: id: 5209b3a61cc9 last_write_checksum: sha1:2eb2cf9270ed1047dd0703ce31726edd1e862fff @@ -15312,24 +15312,24 @@ trackedFiles: pristine_git_object: bad387cea54fcab00e8a7fe54780dd97a29d72c3 src/openrouter/components/unifiedbenchmarksaaitem.py: id: cc8382ac1af5 - last_write_checksum: sha1:7c82b5274f6b8a9a89cfe2472af093bf23731a7b - pristine_git_object: 9e6db28829540fc20c08a6c1523980a5289bdf7e + last_write_checksum: sha1:cd048ad949a165ab670eb60c823484b06b7e9ba4 + pristine_git_object: 21a530ac6525a203cfe9656013bdc53c34f49ab3 src/openrouter/components/unifiedbenchmarksdaitem.py: id: 946501943ce2 last_write_checksum: sha1:c554401eb1ef4fb597743004c4bcf77afbd059ba pristine_git_object: bc4d5b68d8a9d2e5990b8e663857ee9e26a0e806 src/openrouter/components/unifiedbenchmarksmeta.py: id: ca02b44f633a - last_write_checksum: sha1:a7ec056c8b9c73c7f244d03b0cda22fee8263a42 - pristine_git_object: 68d76b7b6dbd1817f825e38902556719b179015d + last_write_checksum: sha1:99cea445b48c0d91af0830a705ca574f428fa6c4 + pristine_git_object: 3313711a9766030ff2e9bb133b40f96a8d7d25b8 src/openrouter/components/unifiedbenchmarksoritem.py: id: 8da361fd40c8 last_write_checksum: sha1:f946862e244121ae6f27017a5f8652fc3f964d67 pristine_git_object: c1671f3ef45eaaf719dc7d29b2f6a3824fb98934 src/openrouter/components/unifiedbenchmarksresponse.py: id: 4f7bbccaba03 - last_write_checksum: sha1:a7f33321910d7e05e31f9533da54ee2706250aec - pristine_git_object: e2ed5fb98fd78b6e9a6184f467bd80617ca9371f + last_write_checksum: sha1:1285281aa6227d0ef2618da9ad23c15962c505b6 + pristine_git_object: b7fd3b0149508121456d17df9029ccd0cabeaa2d src/openrouter/components/unifiedbenchmarkssearchitem.py: id: cc77d4dc2470 last_write_checksum: sha1:7dadc353af8a9c3b803e69da3d4c7fd840403eae @@ -15780,8 +15780,8 @@ trackedFiles: pristine_git_object: 5b741456655ff48919d17ffd552a6410f0587966 src/openrouter/models_.py: id: 4e1ae1fe5b98 - last_write_checksum: sha1:7cb88dbed70440003090d729e04a89e473140a06 - pristine_git_object: 4cea7bb4be88f162bd3783c7bdc32a035ed1f411 + last_write_checksum: sha1:dd14d6eb07c88ebe699d616c81c853551202f72b + pristine_git_object: cd738baa66033d65d6bad495f822fd4381db7cd9 src/openrouter/oauth.py: id: 1948ce27255b last_write_checksum: sha1:938c8b5ac63c1410e1173a2873b9c2493d720a1d @@ -16072,8 +16072,8 @@ trackedFiles: pristine_git_object: 2e8240578f955bc7d8985533d4f57b81a85bd404 src/openrouter/operations/getbenchmarks.py: id: 5fb88644491e - last_write_checksum: sha1:c059365dfa135f5d6d929464c06af3421cf89c62 - pristine_git_object: 51f1f39f8f61ebb2edc9770ad79e09bd7886fd2d + last_write_checksum: sha1:35901dd9de7b6968dd73c45a25ebd16fe8fc0550 + pristine_git_object: 1e48e932b788665b9a91783c50b034fbd2e34c03 src/openrouter/operations/getbudgetpolicy.py: id: e17092f50a72 last_write_checksum: sha1:5afb8cb870f2b3b0a533c95ec1ce85a2ed41135e @@ -16128,8 +16128,8 @@ trackedFiles: pristine_git_object: 607d128d5100c8275490b56b11fcec7ef735aaa6 src/openrouter/operations/getmodels.py: id: 5bd5dfcb0125 - last_write_checksum: sha1:ab0df91438a333015c3c7b8e6ef262c300f684a6 - pristine_git_object: 51ad0ee78c5e47e0e42b1a2b12133467670402d4 + last_write_checksum: sha1:e1267ce52ba9eeba08af7d5b5b33b36b75209596 + pristine_git_object: 5ae045de237788951e674010c38ef1470918a2a7 src/openrouter/operations/getmoderationpolicy.py: id: 423190ca3bf3 last_write_checksum: sha1:c7b742130072c52879d95fbe3b8f60296cca4353 @@ -16296,8 +16296,8 @@ trackedFiles: pristine_git_object: cdde733b97c9b409d550fd58f9d49184d1647f4d src/openrouter/operations/listmodelsuser.py: id: 16eb5946cf60 - last_write_checksum: sha1:eec8c0a76f1fe80183b15617d25580d1547aad2b - pristine_git_object: c5b9f8c2f29e740fef85a4e2f2a427d94c6f04bb + last_write_checksum: sha1:b912ce89e88c901715893cd1cb88fca8db0fc5b4 + pristine_git_object: 15d06ccd09a0c9e3327a449af67a27755b8e7a8c src/openrouter/operations/listmoderationpolicies.py: id: a091a9ee01d0 last_write_checksum: sha1:589611d2c8438f22d130d88497aecd6fbe15ff0e @@ -18326,7 +18326,7 @@ examples: include_run_config: true responses: "200": - application/json: {"data": [{"agentic_index": 58.3, "coding_index": 65.8, "display_name": "GPT-4o", "intelligence_index": 71.2, "model_permaslug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "source": "artificial-analysis"}, {"accuracy": 0.72, "accuracy_stddev": 0.03, "avg_cost_per_task": 0.002, "benchmark_type": "gpqa_diamond", "display_name": "GPT-4o", "last_run_timestamp": "2026-06-03T12:00:00Z", "model_permaslug": "openai/gpt-4o", "source": "openrouter", "total_tasks": 300}], "meta": {"as_of": "2026-06-03T12:00:00Z", "citation": null, "model_count": 1, "source": null, "source_url": null, "task_type": null, "version": "v1"}} + application/json: {"data": [{"agentic_index": 55.8, "coding_index": 63.2, "cyber_index": 36.4, "decision_index": 75.7, "display_name": "GPT-4o", "economics_index": 57.2, "engineering_index": 60.4, "finance_and_accounting_index": 58.1, "healthcare_and_medical_index": 56.9, "intelligence_index": 71.4, "legal_index": 52.3, "model_permaslug": "openai/gpt-4o", "multilingual_index": 0.82, "openness_index": 33.3, "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "source": "artificial-analysis", "strategy_and_ops_index": 61.7}, {"accuracy": 0.72, "accuracy_stddev": 0.03, "avg_cost_per_task": 0.002, "benchmark_type": "gpqa_diamond", "display_name": "GPT-4o", "last_run_timestamp": "2026-06-03T12:00:00Z", "model_permaslug": "openai/gpt-4o", "source": "openrouter", "total_tasks": 300}], "meta": {"as_of": "2026-06-03T12:00:00Z", "citation": null, "model_count": 1, "source": null, "source_url": null, "task_type": null, "version": "v1"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -21719,6 +21719,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.api_keys.list()`: `request` **Changed** (Breaking ⚠️) +releaseNotes: "## Python SDK Changes:\n* `open_router.benchmarks.get_benchmarks()`: \n * `request.task_type` **Changed**\n * `response.data[].union(UnifiedBenchmarksAAItem)` **Changed**\n* `open_router.embeddings.list_models()`: `response.data[].benchmarks.artificial_analysis` **Changed**\n* `open_router.models.get()`: `response.data.benchmarks.artificial_analysis` **Changed**\n* `open_router.models.list()`: \n * `request` **Changed**\n * `response.data[].benchmarks.artificial_analysis` **Changed**\n* `open_router.models.list_for_user()`: \n * `request.sort` **Changed**\n * `response.data[].benchmarks.artificial_analysis` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index cb3387e4b..66b975f65 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.184 + version: 1.3.185 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 191c83f92..ee4f5476d 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -24,37 +24,129 @@ components: Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. schemas: AABenchmarkEntry: - description: 'Artificial Analysis benchmark index scores.' + description: 'Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model''s best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model''s strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them.' example: agentic_index: 55.8 coding_index: 63.2 + cyber_index: 36.4 + decision_index: 75.7 + economics_index: 57.2 + engineering_index: 60.4 + finance_and_accounting_index: 58.1 + healthcare_and_medical_index: 56.9 intelligence_index: 71.4 + legal_index: 52.3 + multilingual_index: 0.82 + openness_index: 33.3 + strategy_and_ops_index: 61.7 properties: agentic_index: - description: 'Artificial Analysis Agentic Index score' + deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.' example: 55.8 format: 'double' type: - 'number' - 'null' coding_index: - description: 'Artificial Analysis Coding Index score' + deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.' example: 63.2 format: 'double' type: - 'number' - 'null' + cyber_index: + description: 'Artificial Analysis Cyber Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 36.4 + format: 'double' + type: + - 'number' + - 'null' + decision_index: + description: 'Artificial Analysis Decision Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model.' + example: 75.7 + format: 'double' + type: + - 'number' + - 'null' + economics_index: + description: 'Artificial Analysis Economics Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 57.2 + format: 'double' + type: + - 'number' + - 'null' + engineering_index: + description: 'Artificial Analysis Engineering Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 60.4 + format: 'double' + type: + - 'number' + - 'null' + finance_and_accounting_index: + description: 'Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 58.1 + format: 'double' + type: + - 'number' + - 'null' + healthcare_and_medical_index: + description: 'Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 56.9 + format: 'double' + type: + - 'number' + - 'null' intelligence_index: - description: 'Artificial Analysis Intelligence Index score' + description: 'Artificial Analysis Intelligence Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' example: 71.4 format: 'double' type: - 'number' - 'null' + legal_index: + description: 'Artificial Analysis Legal Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 52.3 + format: 'double' + type: + - 'number' + - 'null' + multilingual_index: + description: 'Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 0.82 + format: 'double' + type: + - 'number' + - 'null' + openness_index: + description: 'Artificial Analysis Openness Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 33.3 + format: 'double' + type: + - 'number' + - 'null' + strategy_and_ops_index: + description: 'Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 61.7 + format: 'double' + type: + - 'number' + - 'null' required: - 'intelligence_index' - 'coding_index' - 'agentic_index' + - 'finance_and_accounting_index' + - 'strategy_and_ops_index' + - 'legal_index' + - 'healthcare_and_medical_index' + - 'engineering_index' + - 'economics_index' + - 'cyber_index' + - 'openness_index' + - 'multilingual_index' + - 'decision_index' type: 'object' AccountGuardrailPolicy: discriminator: @@ -22190,7 +22282,17 @@ components: artificial_analysis: agentic_index: 55.8 coding_index: 63.2 + cyber_index: 36.4 + decision_index: 75.7 + economics_index: 57.2 + engineering_index: 60.4 + finance_and_accounting_index: 58.1 + healthcare_and_medical_index: 56.9 intelligence_index: 71.4 + legal_index: 52.3 + multilingual_index: 0.82 + openness_index: 33.3 + strategy_and_ops_index: 61.7 design_arena: - arena: 'models' category: 'website' @@ -29318,8 +29420,8 @@ components: minimum: 0 type: 'number' min_coding_score: - description: 'Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over).' - example: 0.8 + description: 'Selects one of three tiers of coding models with a number between 0 and 1. It is not a threshold on a model score: the tiers are groups of the current shortlist of top coding models. >= 0.66 → high (the strongest group), >= 0.33 → medium (the two strongest groups), < 0.33 → low (the whole shortlist). Omit to use the high tier. Not used when max_price is set (price-based selection takes over).' + example: 0.4 format: 'double' maximum: 1 minimum: 0 @@ -36288,27 +36390,54 @@ components: - 'object' - 'null' UnifiedBenchmarksAAItem: + description: 'One model''s Artificial Analysis index scores. Each score is the model''s best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model''s strongest by Intelligence Index, then Coding Index, then Agentic Index. With `task_type` set to `intelligence`, `coding` or `agentic`, those three indexes all come from the configuration that scores best on the one named.' example: - agentic_index: 58.3 - coding_index: 65.8 + agentic_index: 55.8 + coding_index: 63.2 + cyber_index: 36.4 + decision_index: 75.7 display_name: 'GPT-4o' - intelligence_index: 71.2 + economics_index: 57.2 + engineering_index: 60.4 + finance_and_accounting_index: 58.1 + healthcare_and_medical_index: 56.9 + intelligence_index: 71.4 + legal_index: 52.3 model_permaslug: 'openai/gpt-4o' + multilingual_index: 0.82 + openness_index: 33.3 pricing: completion: '0.00001' prompt: '0.0000025' source: 'artificial-analysis' + strategy_and_ops_index: 61.7 properties: agentic_index: - description: 'Artificial Analysis Agentic Index composite score. Higher is better.' - example: 58.3 + deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.' + example: 55.8 format: 'double' type: - 'number' - 'null' coding_index: - description: 'Artificial Analysis Coding Index composite score. Higher is better.' - example: 65.8 + deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.' + example: 63.2 + format: 'double' + type: + - 'number' + - 'null' + cyber_index: + description: 'Artificial Analysis Cyber Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 36.4 + format: 'double' + type: + - 'number' + - 'null' + decision_index: + description: 'Artificial Analysis Decision Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model.' + example: 75.7 format: 'double' type: - 'number' @@ -36317,9 +36446,44 @@ components: description: 'Model name as listed on Artificial Analysis.' example: 'GPT-4o' type: 'string' + economics_index: + description: 'Artificial Analysis Economics Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 57.2 + format: 'double' + type: + - 'number' + - 'null' + engineering_index: + description: 'Artificial Analysis Engineering Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 60.4 + format: 'double' + type: + - 'number' + - 'null' + finance_and_accounting_index: + description: 'Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 58.1 + format: 'double' + type: + - 'number' + - 'null' + healthcare_and_medical_index: + description: 'Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 56.9 + format: 'double' + type: + - 'number' + - 'null' intelligence_index: - description: 'Artificial Analysis Intelligence Index composite score. Higher is better.' - example: 71.2 + description: 'Artificial Analysis Intelligence Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 71.4 + format: 'double' + type: + - 'number' + - 'null' + legal_index: + description: 'Artificial Analysis Legal Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 52.3 format: 'double' type: - 'number' @@ -36328,6 +36492,20 @@ components: description: 'Stable OpenRouter model identifier.' example: 'openai/gpt-4o' type: 'string' + multilingual_index: + description: 'Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 0.82 + format: 'double' + type: + - 'number' + - 'null' + openness_index: + description: 'Artificial Analysis Openness Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.' + example: 33.3 + format: 'double' + type: + - 'number' + - 'null' pricing: $ref: '#/components/schemas/UnifiedBenchmarkPricing' source: @@ -36335,6 +36513,13 @@ components: enum: - 'artificial-analysis' type: 'string' + strategy_and_ops_index: + description: 'Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model''s best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.' + example: 61.7 + format: 'double' + type: + - 'number' + - 'null' required: - 'source' - 'model_permaslug' @@ -36342,6 +36527,16 @@ components: - 'intelligence_index' - 'coding_index' - 'agentic_index' + - 'finance_and_accounting_index' + - 'strategy_and_ops_index' + - 'legal_index' + - 'healthcare_and_medical_index' + - 'engineering_index' + - 'economics_index' + - 'cyber_index' + - 'openness_index' + - 'multilingual_index' + - 'decision_index' - 'pricing' type: 'object' UnifiedBenchmarksDAItem: @@ -36461,7 +36656,7 @@ components: example: '2026-06-03T12:00:00Z' type: 'string' citation: - description: 'Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator).' + description: 'Required attribution when republishing this data. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources (attribute each item by its `source` discriminator) or there are none.' example: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' type: - 'string' @@ -36470,7 +36665,7 @@ components: description: 'Number of unique models in the response.' type: 'integer' source: - description: 'The source filter applied, or null when all sources are returned.' + description: 'The one source the response is limited to: the `source` filter, or Artificial Analysis for a `task_type` only it answers. Null when the response draws on every source.' enum: - 'artificial-analysis' - 'design-arena' @@ -36482,7 +36677,7 @@ components: - 'null' x-speakeasy-unknown-values: allow source_url: - description: 'URL of the upstream data source, or null when results span multiple sources.' + description: 'URL of the upstream data source. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources or there are none.' example: 'https://artificialanalysis.ai' type: - 'string' @@ -36580,15 +36775,25 @@ components: UnifiedBenchmarksResponse: example: data: - - agentic_index: 58.3 - coding_index: 65.8 + - agentic_index: 55.8 + coding_index: 63.2 + cyber_index: 36.4 + decision_index: 75.7 display_name: 'GPT-4o' - intelligence_index: 71.2 + economics_index: 57.2 + engineering_index: 60.4 + finance_and_accounting_index: 58.1 + healthcare_and_medical_index: 56.9 + intelligence_index: 71.4 + legal_index: 52.3 model_permaslug: 'openai/gpt-4o' + multilingual_index: 0.82 + openness_index: 33.3 pricing: completion: '0.00001' prompt: '0.0000025' source: 'artificial-analysis' + strategy_and_ops_index: 61.7 - accuracy: 0.72 accuracy_stddev: 0.03 avg_cost_per_task: 0.002 @@ -41906,7 +42111,7 @@ paths: - $ref: "#/components/parameters/AppCategories" /benchmarks: get: - description: 'Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter''s own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Use task_type=search (or a search_* benchmark_type) for OpenRouter''s search benchmarks, which publish each model''s highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account.' + description: 'Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter''s own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Artificial Analysis items carry one score per Artificial Analysis index (Intelligence Index, Finance & Accounting Index, Strategy & Ops Index, Legal Index, Healthcare & Medical Index, Engineering Index, Economics Index, Cyber Index, Openness Index, Multilingual Index, Decision Index); attribute Artificial Analysis when you republish them. A response whose items all come from one source carries that source''s citation in meta; in a mixed response, attribute each item by its source. Use task_type=search (or a search_* benchmark_type) for OpenRouter''s search benchmarks, which publish each model''s highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account.' operationId: 'getBenchmarks' parameters: - description: 'Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.' @@ -41922,16 +42127,25 @@ paths: example: 'artificial-analysis' type: 'string' x-speakeasy-unknown-values: allow - - description: 'Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only.' + - description: 'Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter''s own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only.' in: 'query' name: 'task_type' required: false schema: - description: 'Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only.' + description: 'Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter''s own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only.' enum: - - 'coding' - 'intelligence' + - 'coding' - 'agentic' + - 'finance-and-accounting' + - 'strategy-and-ops' + - 'legal' + - 'healthcare-and-medical' + - 'engineering' + - 'economics' + - 'cyber' + - 'multilingual' + - 'decision' - 'search' example: 'coding' type: 'string' @@ -42017,15 +42231,25 @@ paths: application/json: example: data: - - agentic_index: 58.3 - coding_index: 65.8 + - agentic_index: 55.8 + coding_index: 63.2 + cyber_index: 36.4 + decision_index: 75.7 display_name: 'GPT-4o' - intelligence_index: 71.2 + economics_index: 57.2 + engineering_index: 60.4 + finance_and_accounting_index: 58.1 + healthcare_and_medical_index: 56.9 + intelligence_index: 71.4 + legal_index: 52.3 model_permaslug: 'openai/gpt-4o' + multilingual_index: 0.82 + openness_index: 33.3 pricing: completion: '0.00001' prompt: '0.0000025' source: 'artificial-analysis' + strategy_and_ops_index: 61.7 - accuracy: 0.72 accuracy_stddev: 0.03 avg_cost_per_task: 0.002 @@ -52661,12 +52885,12 @@ paths: description: 'Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text".' example: 'text' type: 'string' - - description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.' + - description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.' in: 'query' name: 'sort' required: false schema: - description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.' + description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.' enum: - 'most-popular' - 'newest' @@ -52679,6 +52903,16 @@ paths: - 'intelligence-high-to-low' - 'coding-high-to-low' - 'agentic-high-to-low' + - 'finance-and-accounting-high-to-low' + - 'strategy-and-ops-high-to-low' + - 'legal-high-to-low' + - 'healthcare-and-medical-high-to-low' + - 'engineering-high-to-low' + - 'economics-high-to-low' + - 'cyber-high-to-low' + - 'openness-high-to-low' + - 'multilingual-high-to-low' + - 'decision-high-to-low' - 'design-arena-elo-high-to-low' example: 'newest' type: 'string' @@ -52840,67 +53074,293 @@ paths: type: - 'integer' - 'null' - - description: 'Minimum Artificial Analysis intelligence index.' + - description: 'Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.' in: 'query' name: 'min_intelligence_index' required: false schema: - description: 'Minimum Artificial Analysis intelligence index.' + description: 'Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.' example: 50 minimum: 0 type: - 'number' - 'null' - - description: 'Maximum Artificial Analysis intelligence index.' + - description: 'Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.' in: 'query' name: 'max_intelligence_index' required: false schema: - description: 'Maximum Artificial Analysis intelligence index.' + description: 'Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.' example: 100 minimum: 0 type: - 'number' - 'null' - - description: 'Minimum Artificial Analysis coding index.' + - deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded.' in: 'query' name: 'min_coding_index' required: false schema: - description: 'Minimum Artificial Analysis coding index.' + description: 'Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded.' example: 50 minimum: 0 type: - 'number' - 'null' - - description: 'Maximum Artificial Analysis coding index.' + - deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded.' in: 'query' name: 'max_coding_index' required: false schema: - description: 'Maximum Artificial Analysis coding index.' + description: 'Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded.' example: 100 minimum: 0 type: - 'number' - 'null' - - description: 'Minimum Artificial Analysis agentic index.' + - deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded.' in: 'query' name: 'min_agentic_index' required: false schema: - description: 'Minimum Artificial Analysis agentic index.' + description: 'Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded.' example: 50 minimum: 0 type: - 'number' - 'null' - - description: 'Maximum Artificial Analysis agentic index.' + - deprecated: true + description: 'Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded.' in: 'query' name: 'max_agentic_index' required: false schema: - description: 'Maximum Artificial Analysis agentic index.' + description: 'Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_finance_and_accounting_index' + required: false + schema: + description: 'Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_finance_and_accounting_index' + required: false + schema: + description: 'Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_strategy_and_ops_index' + required: false + schema: + description: 'Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_strategy_and_ops_index' + required: false + schema: + description: 'Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_legal_index' + required: false + schema: + description: 'Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_legal_index' + required: false + schema: + description: 'Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_healthcare_and_medical_index' + required: false + schema: + description: 'Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_healthcare_and_medical_index' + required: false + schema: + description: 'Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_engineering_index' + required: false + schema: + description: 'Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_engineering_index' + required: false + schema: + description: 'Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_economics_index' + required: false + schema: + description: 'Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_economics_index' + required: false + schema: + description: 'Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_cyber_index' + required: false + schema: + description: 'Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_cyber_index' + required: false + schema: + description: 'Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_openness_index' + required: false + schema: + description: 'Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_openness_index' + required: false + schema: + description: 'Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded.' + example: 100 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.' + in: 'query' + name: 'min_multilingual_index' + required: false + schema: + description: 'Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.' + example: 0.5 + maximum: 1 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.' + in: 'query' + name: 'max_multilingual_index' + required: false + schema: + description: 'Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.' + example: 1 + maximum: 1 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'min_decision_index' + required: false + schema: + description: 'Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded.' + example: 50 + minimum: 0 + type: + - 'number' + - 'null' + - description: 'Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded.' + in: 'query' + name: 'max_decision_index' + required: false + schema: + description: 'Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded.' example: 100 minimum: 0 type: @@ -53339,12 +53799,12 @@ paths: description: 'Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text".' example: 'text' type: 'string' - - description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.' + - description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.' in: 'query' name: 'sort' required: false schema: - description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.' + description: 'Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.' enum: - 'most-popular' - 'newest' @@ -53357,6 +53817,16 @@ paths: - 'intelligence-high-to-low' - 'coding-high-to-low' - 'agentic-high-to-low' + - 'finance-and-accounting-high-to-low' + - 'strategy-and-ops-high-to-low' + - 'legal-high-to-low' + - 'healthcare-and-medical-high-to-low' + - 'engineering-high-to-low' + - 'economics-high-to-low' + - 'cyber-high-to-low' + - 'openness-high-to-low' + - 'multilingual-high-to-low' + - 'decision-high-to-low' - 'design-arena-elo-high-to-low' example: 'newest' type: 'string' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 587755032..2d4ff5192 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:e03a89ad7cda8391ea2f72c97b127aabf29cae7c1637c1bccc967b78902ec4a7 - sourceBlobDigest: sha256:28d7010dc24ee9c307a8271fffc452c0204c0ece7b363e756d3969ffb612a0bc + sourceRevisionDigest: sha256:6759006b6fbfa569a11dc07ca386499d66b1e988407cfd39aa6ff760eb82350b + sourceBlobDigest: sha256:4896646be61b1abffef941f4a698d8d00177422f9a1c40af3000d7c25b0f5199 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:e03a89ad7cda8391ea2f72c97b127aabf29cae7c1637c1bccc967b78902ec4a7 - sourceBlobDigest: sha256:28d7010dc24ee9c307a8271fffc452c0204c0ece7b363e756d3969ffb612a0bc + sourceRevisionDigest: sha256:6759006b6fbfa569a11dc07ca386499d66b1e988407cfd39aa6ff760eb82350b + sourceBlobDigest: sha256:4896646be61b1abffef941f4a698d8d00177422f9a1c40af3000d7c25b0f5199 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:8126f8b55d107e9dc94923721bc20e807893c7cf009a29446cc666cd7a6b7dbb + codeSamplesRevisionDigest: sha256:5b7de7c78dc174c979cecda0e56179685509ccaa1730b71946573c855124dde6 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index ec91e208b..b4d2f1587 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4609,4 +4609,14 @@ Based on: ### Generated - [python v1.3.184] . ### Releases -- [PyPI v1.3.184] https://pypi.org/project/openrouter/1.3.184 - . \ No newline at end of file +- [PyPI v1.3.184] https://pypi.org/project/openrouter/1.3.184 - . + +## 2026-11-17 18:41:24 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.185] . +### Releases +- [PyPI v1.3.185] https://pypi.org/project/openrouter/1.3.185 - . \ No newline at end of file diff --git a/docs/components/aabenchmarkentry.mdx b/docs/components/aabenchmarkentry.mdx index df17c6fa0..d13b9f959 100644 --- a/docs/components/aabenchmarkentry.mdx +++ b/docs/components/aabenchmarkentry.mdx @@ -2,13 +2,23 @@ title: "AABenchmarkEntry" --- -Artificial Analysis benchmark index scores. +Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `agentic_index` | *Nullable[float]* | ✔️ | Artificial Analysis Agentic Index score | 55.8 | -| `coding_index` | *Nullable[float]* | ✔️ | Artificial Analysis Coding Index score | 63.2 | -| `intelligence_index` | *Nullable[float]* | ✔️ | Artificial Analysis Intelligence Index score | 71.4 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`agentic_index`~~ | *Nullable[float]* | ✔️ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed. | 55.8 | +| ~~`coding_index`~~ | *Nullable[float]* | ✔️ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed. | 63.2 | +| `cyber_index` | *Nullable[float]* | ✔️ | Artificial Analysis Cyber Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 36.4 | +| `decision_index` | *Nullable[float]* | ✔️ | Artificial Analysis Decision Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model. | 75.7 | +| `economics_index` | *Nullable[float]* | ✔️ | Artificial Analysis Economics Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 57.2 | +| `engineering_index` | *Nullable[float]* | ✔️ | Artificial Analysis Engineering Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 60.4 | +| `finance_and_accounting_index` | *Nullable[float]* | ✔️ | Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 58.1 | +| `healthcare_and_medical_index` | *Nullable[float]* | ✔️ | Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 56.9 | +| `intelligence_index` | *Nullable[float]* | ✔️ | Artificial Analysis Intelligence Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 71.4 | +| `legal_index` | *Nullable[float]* | ✔️ | Artificial Analysis Legal Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 52.3 | +| `multilingual_index` | *Nullable[float]* | ✔️ | Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 0.82 | +| `openness_index` | *Nullable[float]* | ✔️ | Artificial Analysis Openness Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 33.3 | +| `strategy_and_ops_index` | *Nullable[float]* | ✔️ | Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 61.7 | \ No newline at end of file diff --git a/docs/components/model.mdx b/docs/components/model.mdx index 0a601f49d..0e60fa4d2 100644 --- a/docs/components/model.mdx +++ b/docs/components/model.mdx @@ -7,26 +7,26 @@ Information about an AI model available on OpenRouter ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `alias_target` | [Optional[components.ModelAliasTarget]](../components/modelaliastarget.mdx) | ➖ | Concrete model targeted by this tilde-latest alias, when applicable | \{
"name": "Claude Sonnet 4.5",
"slug": "anthropic/claude-sonnet-4.5"
} | -| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.mdx) | ✔️ | Model architecture information | \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
} | -| `benchmarks` | [Optional[components.ModelBenchmarks]](../components/modelbenchmarks.mdx) | ➖ | Third-party benchmark rankings for this model. Omitted when no benchmark data is available. | \{
"artificial_analysis": \{
"agentic_index": 55.8,
"coding_index": 63.2,
"intelligence_index": 71.4
},
"design_arena": [
\{
"arena": "models",
"category": "website",
"elo": 1385.2,
"rank": 5,
"win_rate": 62.5
}
]
} | -| `canonical_slug` | *str* | ✔️ | Canonical slug for the model | openai/gpt-4 | -| `context_length` | *Nullable[int]* | ✔️ | Maximum context length in tokens | 8192 | -| `created` | *int* | ✔️ | Unix timestamp of when the model was created | 1692901234 | -| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.mdx) | ✔️ | Default parameters for this model | \{
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 0,
"top_p": 0.9
} | -| `description` | *Optional[str]* | ➖ | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. | -| `endpoints` | List[*str*] | ✔️ | Request API paths that serve this model, derived from the same modality and adapter rules the routers use. A model served only through an alpha surface lists only that path. | [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
] | -| `expiration_date` | *OptionalNullable[str]* | ➖ | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | -| `hugging_face_id` | *OptionalNullable[str]* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | -| `id` | *str* | ✔️ | Unique identifier for the model | openai/gpt-4 | -| `knowledge_cutoff` | *OptionalNullable[str]* | ➖ | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | -| `links` | [components.ModelLinks](../components/modellinks.mdx) | ✔️ | Related API endpoints and resources for this model. | \{
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | -| `name` | *str* | ✔️ | Display name of the model | GPT-4 | -| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.mdx) | ✔️ | Per-request token limits | \{
"completion_tokens": 1000,
"prompt_tokens": 1000
} | -| `pricing` | [components.PublicPricing](../components/publicpricing.mdx) | ✔️ | Pricing information for the model | \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
} | -| `reasoning` | [Optional[components.ModelReasoning]](../components/modelreasoning.mdx) | ➖ | Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. | \{
"default_effort": "medium",
"default_enabled": true,
"mandatory": false,
"supported_efforts": [
"high",
"medium",
"low",
"minimal"
]
} | -| `supported_parameters` | List[[components.Parameter](../components/parameter.mdx)] | ✔️ | List of supported parameters for this model | | -| `supported_voices` | List[*str*] | ✔️ | List of supported voice identifiers for TTS models. Null for non-TTS models. | null | -| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.mdx) | ✔️ | Information about the top provider for this model | \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `alias_target` | [Optional[components.ModelAliasTarget]](../components/modelaliastarget.mdx) | ➖ | Concrete model targeted by this tilde-latest alias, when applicable | \{
"name": "Claude Sonnet 4.5",
"slug": "anthropic/claude-sonnet-4.5"
} | +| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.mdx) | ✔️ | Model architecture information | \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
} | +| `benchmarks` | [Optional[components.ModelBenchmarks]](../components/modelbenchmarks.mdx) | ➖ | Third-party benchmark rankings for this model. Omitted when no benchmark data is available. | \{
"artificial_analysis": \{
"agentic_index": 55.8,
"coding_index": 63.2,
"cyber_index": 36.4,
"decision_index": 75.7,
"economics_index": 57.2,
"engineering_index": 60.4,
"finance_and_accounting_index": 58.1,
"healthcare_and_medical_index": 56.9,
"intelligence_index": 71.4,
"legal_index": 52.3,
"multilingual_index": 0.82,
"openness_index": 33.3,
"strategy_and_ops_index": 61.7
},
"design_arena": [
\{
"arena": "models",
"category": "website",
"elo": 1385.2,
"rank": 5,
"win_rate": 62.5
}
]
} | +| `canonical_slug` | *str* | ✔️ | Canonical slug for the model | openai/gpt-4 | +| `context_length` | *Nullable[int]* | ✔️ | Maximum context length in tokens | 8192 | +| `created` | *int* | ✔️ | Unix timestamp of when the model was created | 1692901234 | +| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.mdx) | ✔️ | Default parameters for this model | \{
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 0,
"top_p": 0.9
} | +| `description` | *Optional[str]* | ➖ | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. | +| `endpoints` | List[*str*] | ✔️ | Request API paths that serve this model, derived from the same modality and adapter rules the routers use. A model served only through an alpha surface lists only that path. | [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
] | +| `expiration_date` | *OptionalNullable[str]* | ➖ | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | +| `hugging_face_id` | *OptionalNullable[str]* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | +| `id` | *str* | ✔️ | Unique identifier for the model | openai/gpt-4 | +| `knowledge_cutoff` | *OptionalNullable[str]* | ➖ | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | +| `links` | [components.ModelLinks](../components/modellinks.mdx) | ✔️ | Related API endpoints and resources for this model. | \{
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | +| `name` | *str* | ✔️ | Display name of the model | GPT-4 | +| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.mdx) | ✔️ | Per-request token limits | \{
"completion_tokens": 1000,
"prompt_tokens": 1000
} | +| `pricing` | [components.PublicPricing](../components/publicpricing.mdx) | ✔️ | Pricing information for the model | \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
} | +| `reasoning` | [Optional[components.ModelReasoning]](../components/modelreasoning.mdx) | ➖ | Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. | \{
"default_effort": "medium",
"default_enabled": true,
"mandatory": false,
"supported_efforts": [
"high",
"medium",
"low",
"minimal"
]
} | +| `supported_parameters` | List[[components.Parameter](../components/parameter.mdx)] | ✔️ | List of supported parameters for this model | | +| `supported_voices` | List[*str*] | ✔️ | List of supported voice identifiers for TTS models. Null for non-TTS models. | null | +| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.mdx) | ✔️ | Information about the top provider for this model | \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
} | \ No newline at end of file diff --git a/docs/components/modelbenchmarks.mdx b/docs/components/modelbenchmarks.mdx index 37643a40c..e1f0625c7 100644 --- a/docs/components/modelbenchmarks.mdx +++ b/docs/components/modelbenchmarks.mdx @@ -7,7 +7,7 @@ Third-party benchmark rankings for this model. Omitted when no benchmark data is ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `artificial_analysis` | [Optional[components.AABenchmarkEntry]](../components/aabenchmarkentry.mdx) | ➖ | Artificial Analysis benchmark index scores. | \{
"agentic_index": 55.8,
"coding_index": 63.2,
"intelligence_index": 71.4
} | -| `design_arena` | List[[components.DABenchmarkEntry](../components/dabenchmarkentry.mdx)] | ✔️ | Design Arena ELO rankings across arena+category pairs. | [
\{
"arena": "models",
"category": "website",
"elo": 1385.2,
"rank": 5,
"win_rate": 62.5
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `artificial_analysis` | [Optional[components.AABenchmarkEntry]](../components/aabenchmarkentry.mdx) | ➖ | Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them. | \{
"agentic_index": 55.8,
"coding_index": 63.2,
"cyber_index": 36.4,
"decision_index": 75.7,
"economics_index": 57.2,
"engineering_index": 60.4,
"finance_and_accounting_index": 58.1,
"healthcare_and_medical_index": 56.9,
"intelligence_index": 71.4,
"legal_index": 52.3,
"multilingual_index": 0.82,
"openness_index": 33.3,
"strategy_and_ops_index": 61.7
} | +| `design_arena` | List[[components.DABenchmarkEntry](../components/dabenchmarkentry.mdx)] | ✔️ | Design Arena ELO rankings across arena+category pairs. | [
\{
"arena": "models",
"category": "website",
"elo": 1385.2,
"rank": 5,
"win_rate": 62.5
}
] | \ No newline at end of file diff --git a/docs/components/paretorouterplugin.mdx b/docs/components/paretorouterplugin.mdx index 703aaf553..8f6e3ff35 100644 --- a/docs/components/paretorouterplugin.mdx +++ b/docs/components/paretorouterplugin.mdx @@ -9,5 +9,5 @@ title: "ParetoRouterPlugin" | `enabled` | *Optional[bool]* | ➖ | Set to false to disable the pareto-router plugin for this request. Defaults to true. | | | `id` | [components.ParetoRouterPluginID](../components/paretorouterpluginid.mdx) | ✔️ | N/A | | | `max_price` | *Optional[float]* | ➖ | Maximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, falling back through cheaper frontier models, then non-frontier models. Enforced against the price source given by price_source. Returns 404 when no candidate satisfies the cap. | 5 | -| `min_coding_score` | *Optional[float]* | ➖ | Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over). | 0.8 | +| `min_coding_score` | *Optional[float]* | ➖ | Selects one of three tiers of coding models with a number between 0 and 1. It is not a threshold on a model score: the tiers are groups of the current shortlist of top coding models. >= 0.66 → high (the strongest group), >= 0.33 → medium (the two strongest groups), < 0.33 → low (the whole shortlist). Omit to use the high tier. Not used when max_price is set (price-based selection takes over). | 0.4 | | `price_source` | [Optional[components.PriceSource]](../components/pricesource.mdx) | ➖ | Price source for the Pareto frontier cost axis and for enforcing max_price. "prompt" uses catalog list price (endpoint.pricing.prompt). "weighted_avg" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to "prompt". | | \ No newline at end of file diff --git a/docs/components/unifiedbenchmarksaaitem.mdx b/docs/components/unifiedbenchmarksaaitem.mdx index 8e262198f..3d56a72b8 100644 --- a/docs/components/unifiedbenchmarksaaitem.mdx +++ b/docs/components/unifiedbenchmarksaaitem.mdx @@ -2,14 +2,27 @@ title: "UnifiedBenchmarksAAItem" --- +One model's Artificial Analysis index scores. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. With `task_type` set to `intelligence`, `coding` or `agentic`, those three indexes all come from the configuration that scores best on the one named. + + ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `agentic_index` | *Nullable[float]* | ✔️ | Artificial Analysis Agentic Index composite score. Higher is better. | 58.3 | -| `coding_index` | *Nullable[float]* | ✔️ | Artificial Analysis Coding Index composite score. Higher is better. | 65.8 | -| `display_name` | *str* | ✔️ | Model name as listed on Artificial Analysis. | GPT-4o | -| `intelligence_index` | *Nullable[float]* | ✔️ | Artificial Analysis Intelligence Index composite score. Higher is better. | 71.2 | -| `model_permaslug` | *str* | ✔️ | Stable OpenRouter model identifier. | openai/gpt-4o | -| `pricing` | [Nullable[components.UnifiedBenchmarkPricing]](../components/unifiedbenchmarkpricing.mdx) | ✔️ | OpenRouter pricing per token for this model. Null if pricing is unavailable. | \{
"completion": "0.000015",
"prompt": "0.000003"
} | -| `source` | [components.UnifiedBenchmarksAAItemSource](../components/unifiedbenchmarksaaitemsource.mdx) | ✔️ | Benchmark source discriminator. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`agentic_index`~~ | *Nullable[float]* | ✔️ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed. | 55.8 | +| ~~`coding_index`~~ | *Nullable[float]* | ✔️ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed. | 63.2 | +| `cyber_index` | *Nullable[float]* | ✔️ | Artificial Analysis Cyber Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 36.4 | +| `decision_index` | *Nullable[float]* | ✔️ | Artificial Analysis Decision Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model. | 75.7 | +| `display_name` | *str* | ✔️ | Model name as listed on Artificial Analysis. | GPT-4o | +| `economics_index` | *Nullable[float]* | ✔️ | Artificial Analysis Economics Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 57.2 | +| `engineering_index` | *Nullable[float]* | ✔️ | Artificial Analysis Engineering Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 60.4 | +| `finance_and_accounting_index` | *Nullable[float]* | ✔️ | Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 58.1 | +| `healthcare_and_medical_index` | *Nullable[float]* | ✔️ | Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 56.9 | +| `intelligence_index` | *Nullable[float]* | ✔️ | Artificial Analysis Intelligence Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 71.4 | +| `legal_index` | *Nullable[float]* | ✔️ | Artificial Analysis Legal Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 52.3 | +| `model_permaslug` | *str* | ✔️ | Stable OpenRouter model identifier. | openai/gpt-4o | +| `multilingual_index` | *Nullable[float]* | ✔️ | Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 0.82 | +| `openness_index` | *Nullable[float]* | ✔️ | Artificial Analysis Openness Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model. | 33.3 | +| `pricing` | [Nullable[components.UnifiedBenchmarkPricing]](../components/unifiedbenchmarkpricing.mdx) | ✔️ | OpenRouter pricing per token for this model. Null if pricing is unavailable. | \{
"completion": "0.000015",
"prompt": "0.000003"
} | +| `source` | [components.UnifiedBenchmarksAAItemSource](../components/unifiedbenchmarksaaitemsource.mdx) | ✔️ | Benchmark source discriminator. | | +| `strategy_and_ops_index` | *Nullable[float]* | ✔️ | Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model. | 61.7 | \ No newline at end of file diff --git a/docs/components/unifiedbenchmarksmeta.mdx b/docs/components/unifiedbenchmarksmeta.mdx index 25898bb9b..a17ca2a7f 100644 --- a/docs/components/unifiedbenchmarksmeta.mdx +++ b/docs/components/unifiedbenchmarksmeta.mdx @@ -4,12 +4,12 @@ title: "UnifiedBenchmarksMeta" ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `as_of` | *str* | ✔️ | ISO-8601 timestamp of when this data was last updated. | 2026-06-03T12:00:00Z | -| `citation` | *Nullable[str]* | ✔️ | Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator). | Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings). | -| `model_count` | *int* | ✔️ | Number of unique models in the response. | | -| `source` | [Nullable[components.UnifiedBenchmarksMetaSource]](../components/unifiedbenchmarksmetasource.mdx) | ✔️ | The source filter applied, or null when all sources are returned. | artificial-analysis | -| `source_url` | *Nullable[str]* | ✔️ | URL of the upstream data source, or null when results span multiple sources. | https://artificialanalysis.ai | -| `task_type` | *Nullable[str]* | ✔️ | The task_type filter applied, or null if showing all. | | -| `version` | [components.UnifiedBenchmarksMetaVersion](../components/unifiedbenchmarksmetaversion.mdx) | ✔️ | Dataset version. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `as_of` | *str* | ✔️ | ISO-8601 timestamp of when this data was last updated. | 2026-06-03T12:00:00Z | +| `citation` | *Nullable[str]* | ✔️ | Required attribution when republishing this data. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources (attribute each item by its `source` discriminator) or there are none. | Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings). | +| `model_count` | *int* | ✔️ | Number of unique models in the response. | | +| `source` | [Nullable[components.UnifiedBenchmarksMetaSource]](../components/unifiedbenchmarksmetasource.mdx) | ✔️ | The one source the response is limited to: the `source` filter, or Artificial Analysis for a `task_type` only it answers. Null when the response draws on every source. | artificial-analysis | +| `source_url` | *Nullable[str]* | ✔️ | URL of the upstream data source. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources or there are none. | https://artificialanalysis.ai | +| `task_type` | *Nullable[str]* | ✔️ | The task_type filter applied, or null if showing all. | | +| `version` | [components.UnifiedBenchmarksMetaVersion](../components/unifiedbenchmarksmetaversion.mdx) | ✔️ | Dataset version. | | \ No newline at end of file diff --git a/docs/components/unifiedbenchmarksmetasource.mdx b/docs/components/unifiedbenchmarksmetasource.mdx index 5528a6a2c..cf8edcfdb 100644 --- a/docs/components/unifiedbenchmarksmetasource.mdx +++ b/docs/components/unifiedbenchmarksmetasource.mdx @@ -2,7 +2,7 @@ title: "UnifiedBenchmarksMetaSource" --- -The source filter applied, or null when all sources are returned. +The one source the response is limited to: the `source` filter, or Artificial Analysis for a `task_type` only it answers. Null when the response draws on every source. ## Example Usage diff --git a/docs/operations/getbenchmarksrequest.mdx b/docs/operations/getbenchmarksrequest.mdx index ab720f00c..7aca7c792 100644 --- a/docs/operations/getbenchmarksrequest.mdx +++ b/docs/operations/getbenchmarksrequest.mdx @@ -4,17 +4,17 @@ title: "GetBenchmarksRequest" ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `source` | [Optional[operations.Source]](../operations/source.mdx) | ➖ | Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. | artificial-analysis | -| `task_type` | [Optional[operations.TaskType]](../operations/tasktype.mdx) | ➖ | Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only. | coding | -| `benchmark_type` | [Optional[operations.BenchmarkType]](../operations/benchmarktype.mdx) | ➖ | Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are. | search_widesearch | -| `include_run_config` | *Optional[bool]* | ➖ | Search benchmarks only: include the published lane configuration whitelist in each search item. Defaults to false. The whitelist is limited to agent turn count, reasoning effort, and temperature so future harness configuration changes do not change the public contract. | true | -| `search_engine` | *Optional[str]* | ➖ | OpenRouter search benchmarks only: filter by the search engine used. | exa | -| `search_surface` | [Optional[operations.SearchSurface]](../operations/searchsurface.mdx) | ➖ | OpenRouter search benchmarks only: filter by the request surface the lane ran on. | server-tool | -| `arena` | [Optional[operations.Arena]](../operations/arena.mdx) | ➖ | Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. | models | -| `category` | *Optional[str]* | ➖ | Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. | codecategories | -| `max_results` | *Optional[int]* | ➖ | Maximum number of items to return. When omitted, all matching results are returned. | 50 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `source` | [Optional[operations.Source]](../operations/source.mdx) | ➖ | Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. | artificial-analysis | +| `task_type` | [Optional[operations.TaskType]](../operations/tasktype.mdx) | ➖ | Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only. | coding | +| `benchmark_type` | [Optional[operations.BenchmarkType]](../operations/benchmarktype.mdx) | ➖ | Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are. | search_widesearch | +| `include_run_config` | *Optional[bool]* | ➖ | Search benchmarks only: include the published lane configuration whitelist in each search item. Defaults to false. The whitelist is limited to agent turn count, reasoning effort, and temperature so future harness configuration changes do not change the public contract. | true | +| `search_engine` | *Optional[str]* | ➖ | OpenRouter search benchmarks only: filter by the search engine used. | exa | +| `search_surface` | [Optional[operations.SearchSurface]](../operations/searchsurface.mdx) | ➖ | OpenRouter search benchmarks only: filter by the request surface the lane ran on. | server-tool | +| `arena` | [Optional[operations.Arena]](../operations/arena.mdx) | ➖ | Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. | models | +| `category` | *Optional[str]* | ➖ | Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. | codecategories | +| `max_results` | *Optional[int]* | ➖ | Maximum number of items to return. When omitted, all matching results are returned. | 50 | \ No newline at end of file diff --git a/docs/operations/getmodelsrequest.mdx b/docs/operations/getmodelsrequest.mdx index 043503e2d..3aff498bc 100644 --- a/docs/operations/getmodelsrequest.mdx +++ b/docs/operations/getmodelsrequest.mdx @@ -4,38 +4,58 @@ title: "GetModelsRequest" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | -| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | -| `category` | [Optional[operations.GetModelsCategory]](../operations/getmodelscategory.mdx) | ➖ | Filter models by use case category | programming | -| `supported_parameters` | *Optional[str]* | ➖ | Filter models by supported parameter (comma-separated) | temperature | -| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | -| `sort` | [Optional[operations.GetModelsSort]](../operations/getmodelssort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest | -| `q` | *Optional[str]* | ➖ | Free-text search by model name or slug. | gpt-4 | -| `input_modalities` | *Optional[str]* | ➖ | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image | -| `endpoints` | *Optional[str]* | ➖ | Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike). | /api/alpha/extractions | -| `context` | *Optional[int]* | ➖ | Minimum context length (tokens). Models with smaller context are excluded. | 128000 | -| `min_price` | *OptionalNullable[float]* | ➖ | Minimum prompt price in $/M tokens. | 0 | -| `max_price` | *OptionalNullable[float]* | ➖ | Maximum prompt price in $/M tokens. | 10 | -| `arch` | *Optional[str]* | ➖ | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT | -| `model_authors` | *Optional[str]* | ➖ | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic | -| `providers` | *Optional[str]* | ➖ | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic | -| `distillable` | [Optional[operations.Distillable]](../operations/distillable.mdx) | ➖ | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true | -| `zdr` | [Optional[operations.Zdr]](../operations/zdr.mdx) | ➖ | When set to "true", return only models with zero data retention endpoints. | true | -| `region` | [Optional[operations.Region]](../operations/region.mdx) | ➖ | Filter to models with endpoints in the given data region ("eu" or "us"). | eu | -| `min_output_price` | *OptionalNullable[float]* | ➖ | Minimum completion (output) price in $/M tokens. | 0 | -| `max_output_price` | *OptionalNullable[float]* | ➖ | Maximum completion (output) price in $/M tokens. | 10 | -| `min_age_days` | *OptionalNullable[int]* | ➖ | Minimum model age in days since its creation date. | 0 | -| `max_age_days` | *OptionalNullable[int]* | ➖ | Maximum model age in days since its creation date. | 90 | -| `min_intelligence_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis intelligence index. | 50 | -| `max_intelligence_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis intelligence index. | 100 | -| `min_coding_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis coding index. | 50 | -| `max_coding_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis coding index. | 100 | -| `min_agentic_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis agentic index. | 50 | -| `max_agentic_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis agentic index. | 100 | -| `min_tool_success_rate` | *OptionalNullable[float]* | ➖ | Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). | 0.9 | -| `max_tool_success_rate` | *OptionalNullable[float]* | ➖ | Maximum tool-calling success rate, as a fraction in [0, 1]. | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | +| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | +| `category` | [Optional[operations.GetModelsCategory]](../operations/getmodelscategory.mdx) | ➖ | Filter models by use case category | programming | +| `supported_parameters` | *Optional[str]* | ➖ | Filter models by supported parameter (comma-separated) | temperature | +| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | +| `sort` | [Optional[operations.GetModelsSort]](../operations/getmodelssort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), \-high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. | newest | +| `q` | *Optional[str]* | ➖ | Free-text search by model name or slug. | gpt-4 | +| `input_modalities` | *Optional[str]* | ➖ | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image | +| `endpoints` | *Optional[str]* | ➖ | Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike). | /api/alpha/extractions | +| `context` | *Optional[int]* | ➖ | Minimum context length (tokens). Models with smaller context are excluded. | 128000 | +| `min_price` | *OptionalNullable[float]* | ➖ | Minimum prompt price in $/M tokens. | 0 | +| `max_price` | *OptionalNullable[float]* | ➖ | Maximum prompt price in $/M tokens. | 10 | +| `arch` | *Optional[str]* | ➖ | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT | +| `model_authors` | *Optional[str]* | ➖ | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic | +| `providers` | *Optional[str]* | ➖ | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic | +| `distillable` | [Optional[operations.Distillable]](../operations/distillable.mdx) | ➖ | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true | +| `zdr` | [Optional[operations.Zdr]](../operations/zdr.mdx) | ➖ | When set to "true", return only models with zero data retention endpoints. | true | +| `region` | [Optional[operations.Region]](../operations/region.mdx) | ➖ | Filter to models with endpoints in the given data region ("eu" or "us"). | eu | +| `min_output_price` | *OptionalNullable[float]* | ➖ | Minimum completion (output) price in $/M tokens. | 0 | +| `max_output_price` | *OptionalNullable[float]* | ➖ | Maximum completion (output) price in $/M tokens. | 10 | +| `min_age_days` | *OptionalNullable[int]* | ➖ | Minimum model age in days since its creation date. | 0 | +| `max_age_days` | *OptionalNullable[int]* | ➖ | Maximum model age in days since its creation date. | 90 | +| `min_intelligence_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. | 50 | +| `max_intelligence_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. | 100 | +| ~~`min_coding_index`~~ | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded. | 50 | +| ~~`max_coding_index`~~ | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded. | 100 | +| ~~`min_agentic_index`~~ | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded. | 50 | +| ~~`max_agentic_index`~~ | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded. | 100 | +| `min_finance_and_accounting_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. | 50 | +| `max_finance_and_accounting_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. | 100 | +| `min_strategy_and_ops_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. | 50 | +| `max_strategy_and_ops_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. | 100 | +| `min_legal_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded. | 50 | +| `max_legal_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded. | 100 | +| `min_healthcare_and_medical_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. | 50 | +| `max_healthcare_and_medical_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. | 100 | +| `min_engineering_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. | 50 | +| `max_engineering_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. | 100 | +| `min_economics_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded. | 50 | +| `max_economics_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded. | 100 | +| `min_cyber_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. | 50 | +| `max_cyber_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. | 100 | +| `min_openness_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded. | 50 | +| `max_openness_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded. | 100 | +| `min_multilingual_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. | 0.5 | +| `max_multilingual_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. | 1 | +| `min_decision_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded. | 50 | +| `max_decision_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded. | 100 | +| `min_tool_success_rate` | *OptionalNullable[float]* | ➖ | Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). | 0.9 | +| `max_tool_success_rate` | *OptionalNullable[float]* | ➖ | Maximum tool-calling success rate, as a fraction in [0, 1]. | 1 | \ No newline at end of file diff --git a/docs/operations/getmodelssort.mdx b/docs/operations/getmodelssort.mdx index 537a70d3e..771fe45d8 100644 --- a/docs/operations/getmodelssort.mdx +++ b/docs/operations/getmodelssort.mdx @@ -2,7 +2,7 @@ title: "GetModelsSort" --- -Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. +Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), \-high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. ## Example Usage @@ -29,4 +29,14 @@ This is an open enum. Unrecognized values will not fail type checks. - `"intelligence-high-to-low"` - `"coding-high-to-low"` - `"agentic-high-to-low"` +- `"finance-and-accounting-high-to-low"` +- `"strategy-and-ops-high-to-low"` +- `"legal-high-to-low"` +- `"healthcare-and-medical-high-to-low"` +- `"engineering-high-to-low"` +- `"economics-high-to-low"` +- `"cyber-high-to-low"` +- `"openness-high-to-low"` +- `"multilingual-high-to-low"` +- `"decision-high-to-low"` - `"design-arena-elo-high-to-low"` diff --git a/docs/operations/listmodelsuserrequest.mdx b/docs/operations/listmodelsuserrequest.mdx index 74bcc49ed..4d81aec24 100644 --- a/docs/operations/listmodelsuserrequest.mdx +++ b/docs/operations/listmodelsuserrequest.mdx @@ -4,13 +4,13 @@ title: "ListModelsUserRequest" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | -| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | -| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | -| `sort` | [Optional[operations.ListModelsUserSort]](../operations/listmodelsusersort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest | -| `client` | [Optional[operations.Client]](../operations/client.mdx) | ➖ | Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use. | codex | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | +| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | +| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | +| `sort` | [Optional[operations.ListModelsUserSort]](../operations/listmodelsusersort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), \-high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. | newest | +| `client` | [Optional[operations.Client]](../operations/client.mdx) | ➖ | Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use. | codex | \ No newline at end of file diff --git a/docs/operations/listmodelsusersort.mdx b/docs/operations/listmodelsusersort.mdx index 4bae293ec..574a4984c 100644 --- a/docs/operations/listmodelsusersort.mdx +++ b/docs/operations/listmodelsusersort.mdx @@ -2,7 +2,7 @@ title: "ListModelsUserSort" --- -Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. +Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), \-high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. ## Example Usage @@ -29,4 +29,14 @@ This is an open enum. Unrecognized values will not fail type checks. - `"intelligence-high-to-low"` - `"coding-high-to-low"` - `"agentic-high-to-low"` +- `"finance-and-accounting-high-to-low"` +- `"strategy-and-ops-high-to-low"` +- `"legal-high-to-low"` +- `"healthcare-and-medical-high-to-low"` +- `"engineering-high-to-low"` +- `"economics-high-to-low"` +- `"cyber-high-to-low"` +- `"openness-high-to-low"` +- `"multilingual-high-to-low"` +- `"decision-high-to-low"` - `"design-arena-elo-high-to-low"` diff --git a/docs/operations/tasktype.mdx b/docs/operations/tasktype.mdx index ca10bf29d..fdb7bf7ca 100644 --- a/docs/operations/tasktype.mdx +++ b/docs/operations/tasktype.mdx @@ -2,7 +2,7 @@ title: "TaskType" --- -Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only. +Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only. ## Example Usage @@ -10,7 +10,7 @@ Filter results by task type. For Artificial Analysis, maps to the corresponding from openrouter.operations import TaskType # Open enum: unrecognized values are captured as UnrecognizedStr -value: TaskType = "coding" +value: TaskType = "intelligence" ``` @@ -18,7 +18,16 @@ value: TaskType = "coding" This is an open enum. Unrecognized values will not fail type checks. -- `"coding"` - `"intelligence"` +- `"coding"` - `"agentic"` +- `"finance-and-accounting"` +- `"strategy-and-ops"` +- `"legal"` +- `"healthcare-and-medical"` +- `"engineering"` +- `"economics"` +- `"cyber"` +- `"multilingual"` +- `"decision"` - `"search"` diff --git a/docs/sdks/benchmarks/README.mdx b/docs/sdks/benchmarks/README.mdx index 46fe09f0c..5e9e4d542 100644 --- a/docs/sdks/benchmarks/README.mdx +++ b/docs/sdks/benchmarks/README.mdx @@ -13,7 +13,7 @@ Benchmarks endpoints ## get_benchmarks -Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. +Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Artificial Analysis items carry one score per Artificial Analysis index (Intelligence Index, Finance & Accounting Index, Strategy & Ops Index, Legal Index, Healthcare & Medical Index, Engineering Index, Economics Index, Cyber Index, Openness Index, Multilingual Index, Decision Index); attribute Artificial Analysis when you republish them. A response whose items all come from one source carries that source's citation in meta; in a mixed response, attribute each item by its source. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. ### Example Usage @@ -38,21 +38,21 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `source` | [Optional[operations.Source]](../../operations/source.mdx) | ➖ | Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. | artificial-analysis | -| `task_type` | [Optional[operations.TaskType]](../../operations/tasktype.mdx) | ➖ | Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only. | coding | -| `benchmark_type` | [Optional[operations.BenchmarkType]](../../operations/benchmarktype.mdx) | ➖ | Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are. | search_widesearch | -| `include_run_config` | *Optional[bool]* | ➖ | Search benchmarks only: include the published lane configuration whitelist in each search item. Defaults to false. The whitelist is limited to agent turn count, reasoning effort, and temperature so future harness configuration changes do not change the public contract. | true | -| `search_engine` | *Optional[str]* | ➖ | OpenRouter search benchmarks only: filter by the search engine used. | exa | -| `search_surface` | [Optional[operations.SearchSurface]](../../operations/searchsurface.mdx) | ➖ | OpenRouter search benchmarks only: filter by the request surface the lane ran on. | server-tool | -| `arena` | [Optional[operations.Arena]](../../operations/arena.mdx) | ➖ | Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. | models | -| `category` | *Optional[str]* | ➖ | Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. | codecategories | -| `max_results` | *Optional[int]* | ➖ | Maximum number of items to return. When omitted, all matching results are returned. | 50 | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `source` | [Optional[operations.Source]](../../operations/source.mdx) | ➖ | Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. | artificial-analysis | +| `task_type` | [Optional[operations.TaskType]](../../operations/tasktype.mdx) | ➖ | Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only. | coding | +| `benchmark_type` | [Optional[operations.BenchmarkType]](../../operations/benchmarktype.mdx) | ➖ | Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are. | search_widesearch | +| `include_run_config` | *Optional[bool]* | ➖ | Search benchmarks only: include the published lane configuration whitelist in each search item. Defaults to false. The whitelist is limited to agent turn count, reasoning effort, and temperature so future harness configuration changes do not change the public contract. | true | +| `search_engine` | *Optional[str]* | ➖ | OpenRouter search benchmarks only: filter by the search engine used. | exa | +| `search_surface` | [Optional[operations.SearchSurface]](../../operations/searchsurface.mdx) | ➖ | OpenRouter search benchmarks only: filter by the request surface the lane ran on. | server-tool | +| `arena` | [Optional[operations.Arena]](../../operations/arena.mdx) | ➖ | Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. | models | +| `category` | *Optional[str]* | ➖ | Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. | codecategories | +| `max_results` | *Optional[int]* | ➖ | Maximum number of items to return. When omitted, all matching results are returned. | 50 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/models/README.mdx b/docs/sdks/models/README.mdx index 24fda0f8e..fd084ff5b 100644 --- a/docs/sdks/models/README.mdx +++ b/docs/sdks/models/README.mdx @@ -92,42 +92,62 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | -| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | -| `category` | [Optional[operations.GetModelsCategory]](../../operations/getmodelscategory.mdx) | ➖ | Filter models by use case category | programming | -| `supported_parameters` | *Optional[str]* | ➖ | Filter models by supported parameter (comma-separated) | temperature | -| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | -| `sort` | [Optional[operations.GetModelsSort]](../../operations/getmodelssort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest | -| `q` | *Optional[str]* | ➖ | Free-text search by model name or slug. | gpt-4 | -| `input_modalities` | *Optional[str]* | ➖ | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image | -| `endpoints` | *Optional[str]* | ➖ | Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike). | /api/alpha/extractions | -| `context` | *Optional[int]* | ➖ | Minimum context length (tokens). Models with smaller context are excluded. | 128000 | -| `min_price` | *OptionalNullable[float]* | ➖ | Minimum prompt price in $/M tokens. | 0 | -| `max_price` | *OptionalNullable[float]* | ➖ | Maximum prompt price in $/M tokens. | 10 | -| `arch` | *Optional[str]* | ➖ | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT | -| `model_authors` | *Optional[str]* | ➖ | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic | -| `providers` | *Optional[str]* | ➖ | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic | -| `distillable` | [Optional[operations.Distillable]](../../operations/distillable.mdx) | ➖ | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true | -| `zdr` | [Optional[operations.Zdr]](../../operations/zdr.mdx) | ➖ | When set to "true", return only models with zero data retention endpoints. | true | -| `region` | [Optional[operations.Region]](../../operations/region.mdx) | ➖ | Filter to models with endpoints in the given data region ("eu" or "us"). | eu | -| `min_output_price` | *OptionalNullable[float]* | ➖ | Minimum completion (output) price in $/M tokens. | 0 | -| `max_output_price` | *OptionalNullable[float]* | ➖ | Maximum completion (output) price in $/M tokens. | 10 | -| `min_age_days` | *OptionalNullable[int]* | ➖ | Minimum model age in days since its creation date. | 0 | -| `max_age_days` | *OptionalNullable[int]* | ➖ | Maximum model age in days since its creation date. | 90 | -| `min_intelligence_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis intelligence index. | 50 | -| `max_intelligence_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis intelligence index. | 100 | -| `min_coding_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis coding index. | 50 | -| `max_coding_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis coding index. | 100 | -| `min_agentic_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis agentic index. | 50 | -| `max_agentic_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis agentic index. | 100 | -| `min_tool_success_rate` | *OptionalNullable[float]* | ➖ | Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). | 0.9 | -| `max_tool_success_rate` | *OptionalNullable[float]* | ➖ | Maximum tool-calling success rate, as a fraction in [0, 1]. | 1 | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | +| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | +| `category` | [Optional[operations.GetModelsCategory]](../../operations/getmodelscategory.mdx) | ➖ | Filter models by use case category | programming | +| `supported_parameters` | *Optional[str]* | ➖ | Filter models by supported parameter (comma-separated) | temperature | +| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | +| `sort` | [Optional[operations.GetModelsSort]](../../operations/getmodelssort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), \-high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. | newest | +| `q` | *Optional[str]* | ➖ | Free-text search by model name or slug. | gpt-4 | +| `input_modalities` | *Optional[str]* | ➖ | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image | +| `endpoints` | *Optional[str]* | ➖ | Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike). | /api/alpha/extractions | +| `context` | *Optional[int]* | ➖ | Minimum context length (tokens). Models with smaller context are excluded. | 128000 | +| `min_price` | *OptionalNullable[float]* | ➖ | Minimum prompt price in $/M tokens. | 0 | +| `max_price` | *OptionalNullable[float]* | ➖ | Maximum prompt price in $/M tokens. | 10 | +| `arch` | *Optional[str]* | ➖ | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT | +| `model_authors` | *Optional[str]* | ➖ | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic | +| `providers` | *Optional[str]* | ➖ | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic | +| `distillable` | [Optional[operations.Distillable]](../../operations/distillable.mdx) | ➖ | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true | +| `zdr` | [Optional[operations.Zdr]](../../operations/zdr.mdx) | ➖ | When set to "true", return only models with zero data retention endpoints. | true | +| `region` | [Optional[operations.Region]](../../operations/region.mdx) | ➖ | Filter to models with endpoints in the given data region ("eu" or "us"). | eu | +| `min_output_price` | *OptionalNullable[float]* | ➖ | Minimum completion (output) price in $/M tokens. | 0 | +| `max_output_price` | *OptionalNullable[float]* | ➖ | Maximum completion (output) price in $/M tokens. | 10 | +| `min_age_days` | *OptionalNullable[int]* | ➖ | Minimum model age in days since its creation date. | 0 | +| `max_age_days` | *OptionalNullable[int]* | ➖ | Maximum model age in days since its creation date. | 90 | +| `min_intelligence_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. | 50 | +| `max_intelligence_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. | 100 | +| `min_coding_index` | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded. | 50 | +| `max_coding_index` | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded. | 100 | +| `min_agentic_index` | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded. | 50 | +| `max_agentic_index` | *OptionalNullable[float]* | ➖ | ⚠️ **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded. | 100 | +| `min_finance_and_accounting_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. | 50 | +| `max_finance_and_accounting_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. | 100 | +| `min_strategy_and_ops_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. | 50 | +| `max_strategy_and_ops_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. | 100 | +| `min_legal_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded. | 50 | +| `max_legal_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded. | 100 | +| `min_healthcare_and_medical_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. | 50 | +| `max_healthcare_and_medical_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. | 100 | +| `min_engineering_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. | 50 | +| `max_engineering_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. | 100 | +| `min_economics_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded. | 50 | +| `max_economics_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded. | 100 | +| `min_cyber_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. | 50 | +| `max_cyber_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. | 100 | +| `min_openness_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded. | 50 | +| `max_openness_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded. | 100 | +| `min_multilingual_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. | 0.5 | +| `max_multilingual_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. | 1 | +| `min_decision_index` | *OptionalNullable[float]* | ➖ | Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded. | 50 | +| `max_decision_index` | *OptionalNullable[float]* | ➖ | Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded. | 100 | +| `min_tool_success_rate` | *OptionalNullable[float]* | ➖ | Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). | 0.9 | +| `max_tool_success_rate` | *OptionalNullable[float]* | ➖ | Maximum tool-calling success rate, as a fraction in [0, 1]. | 1 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | | ### Response @@ -226,18 +246,18 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.mdx) | ✔️ | N/A | | -| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | -| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | -| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | -| `sort` | [Optional[operations.ListModelsUserSort]](../../operations/listmodelsusersort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest | -| `client` | [Optional[operations.Client]](../../operations/client.mdx) | ➖ | Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use. | codex | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.mdx) | ✔️ | N/A | | +| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `offset` | *OptionalNullable[int]* | ➖ | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 | +| `limit` | *Optional[int]* | ➖ | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 | +| `output_modalities` | *Optional[str]* | ➖ | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or "all" to include all models. Defaults to "text". | text | +| `sort` | [Optional[operations.ListModelsUserSort]](../../operations/listmodelsusersort.mdx) | ➖ | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), \-high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. | newest | +| `client` | [Optional[operations.Client]](../../operations/client.mdx) | ➖ | Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use. | codex | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/pyproject.toml b/pyproject.toml index 0807489a6..01a04b80f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.184" +version = "1.3.185" 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 6b34a5c63..7fde9643b 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.184" +__version__: str = "1.3.185" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.184 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.185 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/benchmarks.py b/src/openrouter/benchmarks.py index f163fcbb9..69d54e690 100644 --- a/src/openrouter/benchmarks.py +++ b/src/openrouter/benchmarks.py @@ -34,7 +34,7 @@ def get_benchmarks( ) -> components.UnifiedBenchmarksResponse: r"""List Benchmarks - Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. + Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Artificial Analysis items carry one score per Artificial Analysis index (Intelligence Index, Finance & Accounting Index, Strategy & Ops Index, Legal Index, Healthcare & Medical Index, Engineering Index, Economics Index, Cyber Index, Openness Index, Multilingual Index, Decision Index); attribute Artificial Analysis when you republish them. A response whose items all come from one source carries that source's citation in meta; in a mixed response, attribute each item by its source. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -44,7 +44,7 @@ def get_benchmarks( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param source: Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. - :param task_type: Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only. + :param task_type: Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only. :param benchmark_type: Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are. :param include_run_config: Search benchmarks only: include the published lane configuration whitelist in each search item. Defaults to false. The whitelist is limited to agent turn count, reasoning effort, and temperature so future harness configuration changes do not change the public contract. :param search_engine: OpenRouter search benchmarks only: filter by the search engine used. @@ -193,7 +193,7 @@ async def get_benchmarks_async( ) -> components.UnifiedBenchmarksResponse: r"""List Benchmarks - Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. + Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Artificial Analysis items carry one score per Artificial Analysis index (Intelligence Index, Finance & Accounting Index, Strategy & Ops Index, Legal Index, Healthcare & Medical Index, Engineering Index, Economics Index, Cyber Index, Openness Index, Multilingual Index, Decision Index); attribute Artificial Analysis when you republish them. A response whose items all come from one source carries that source's citation in meta; in a mixed response, attribute each item by its source. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -203,7 +203,7 @@ async def get_benchmarks_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param source: Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. - :param task_type: Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only. + :param task_type: Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only. :param benchmark_type: Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are. :param include_run_config: Search benchmarks only: include the published lane configuration whitelist in each search item. Defaults to false. The whitelist is limited to agent turn count, reasoning effort, and temperature so future harness configuration changes do not change the public contract. :param search_engine: OpenRouter search benchmarks only: filter by the search engine used. diff --git a/src/openrouter/components/aabenchmarkentry.py b/src/openrouter/components/aabenchmarkentry.py index ad39bd976..fe000bbfa 100644 --- a/src/openrouter/components/aabenchmarkentry.py +++ b/src/openrouter/components/aabenchmarkentry.py @@ -2,32 +2,93 @@ from __future__ import annotations from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic from pydantic import model_serializer -from typing_extensions import TypedDict +from typing_extensions import Annotated, TypedDict class AABenchmarkEntryTypedDict(TypedDict): - r"""Artificial Analysis benchmark index scores.""" + r"""Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them.""" agentic_index: Nullable[float] - r"""Artificial Analysis Agentic Index score""" + r"""Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" coding_index: Nullable[float] - r"""Artificial Analysis Coding Index score""" + r"""Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" + cyber_index: Nullable[float] + r"""Artificial Analysis Cyber Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + decision_index: Nullable[float] + r"""Artificial Analysis Decision Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model.""" + economics_index: Nullable[float] + r"""Artificial Analysis Economics Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + engineering_index: Nullable[float] + r"""Artificial Analysis Engineering Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + finance_and_accounting_index: Nullable[float] + r"""Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + healthcare_and_medical_index: Nullable[float] + r"""Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" intelligence_index: Nullable[float] - r"""Artificial Analysis Intelligence Index score""" + r"""Artificial Analysis Intelligence Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + legal_index: Nullable[float] + r"""Artificial Analysis Legal Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + multilingual_index: Nullable[float] + r"""Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + openness_index: Nullable[float] + r"""Artificial Analysis Openness Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + strategy_and_ops_index: Nullable[float] + r"""Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" class AABenchmarkEntry(BaseModel): - r"""Artificial Analysis benchmark index scores.""" + r"""Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them.""" - agentic_index: Nullable[float] - r"""Artificial Analysis Agentic Index score""" + agentic_index: Annotated[ + Nullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + r"""Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" - coding_index: Nullable[float] - r"""Artificial Analysis Coding Index score""" + coding_index: Annotated[ + Nullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + r"""Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" + + cyber_index: Nullable[float] + r"""Artificial Analysis Cyber Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + decision_index: Nullable[float] + r"""Artificial Analysis Decision Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model.""" + + economics_index: Nullable[float] + r"""Artificial Analysis Economics Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + engineering_index: Nullable[float] + r"""Artificial Analysis Engineering Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + finance_and_accounting_index: Nullable[float] + r"""Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + healthcare_and_medical_index: Nullable[float] + r"""Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" intelligence_index: Nullable[float] - r"""Artificial Analysis Intelligence Index score""" + r"""Artificial Analysis Intelligence Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + legal_index: Nullable[float] + r"""Artificial Analysis Legal Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + multilingual_index: Nullable[float] + r"""Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + openness_index: Nullable[float] + r"""Artificial Analysis Openness Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + strategy_and_ops_index: Nullable[float] + r"""Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/openrouter/components/modelbenchmarks.py b/src/openrouter/components/modelbenchmarks.py index 466a82741..4ad4302d2 100644 --- a/src/openrouter/components/modelbenchmarks.py +++ b/src/openrouter/components/modelbenchmarks.py @@ -15,7 +15,7 @@ class ModelBenchmarksTypedDict(TypedDict): design_arena: List[DABenchmarkEntryTypedDict] r"""Design Arena ELO rankings across arena+category pairs.""" artificial_analysis: NotRequired[AABenchmarkEntryTypedDict] - r"""Artificial Analysis benchmark index scores.""" + r"""Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them.""" class ModelBenchmarks(BaseModel): @@ -25,7 +25,7 @@ class ModelBenchmarks(BaseModel): r"""Design Arena ELO rankings across arena+category pairs.""" artificial_analysis: Optional[AABenchmarkEntry] = None - r"""Artificial Analysis benchmark index scores.""" + r"""Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/openrouter/components/paretorouterplugin.py b/src/openrouter/components/paretorouterplugin.py index 7ff8ba817..451b0b412 100644 --- a/src/openrouter/components/paretorouterplugin.py +++ b/src/openrouter/components/paretorouterplugin.py @@ -27,7 +27,7 @@ class ParetoRouterPluginTypedDict(TypedDict): max_price: NotRequired[float] r"""Maximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, falling back through cheaper frontier models, then non-frontier models. Enforced against the price source given by price_source. Returns 404 when no candidate satisfies the cap.""" min_coding_score: NotRequired[float] - r"""Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over).""" + r"""Selects one of three tiers of coding models with a number between 0 and 1. It is not a threshold on a model score: the tiers are groups of the current shortlist of top coding models. >= 0.66 → high (the strongest group), >= 0.33 → medium (the two strongest groups), < 0.33 → low (the whole shortlist). Omit to use the high tier. Not used when max_price is set (price-based selection takes over).""" price_source: NotRequired[PriceSource] r"""Price source for the Pareto frontier cost axis and for enforcing max_price. \"prompt\" uses catalog list price (endpoint.pricing.prompt). \"weighted_avg\" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to \"prompt\".""" @@ -42,7 +42,7 @@ class ParetoRouterPlugin(BaseModel): r"""Maximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, falling back through cheaper frontier models, then non-frontier models. Enforced against the price source given by price_source. Returns 404 when no candidate satisfies the cap.""" min_coding_score: Optional[float] = None - r"""Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over).""" + r"""Selects one of three tiers of coding models with a number between 0 and 1. It is not a threshold on a model score: the tiers are groups of the current shortlist of top coding models. >= 0.66 → high (the strongest group), >= 0.33 → medium (the two strongest groups), < 0.33 → low (the whole shortlist). Omit to use the high tier. Not used when max_price is set (price-based selection takes over).""" price_source: Optional[PriceSource] = None r"""Price source for the Pareto frontier cost axis and for enforcing max_price. \"prompt\" uses catalog list price (endpoint.pricing.prompt). \"weighted_avg\" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to \"prompt\".""" diff --git a/src/openrouter/components/unifiedbenchmarksaaitem.py b/src/openrouter/components/unifiedbenchmarksaaitem.py index 9e6db2882..21a530ac6 100644 --- a/src/openrouter/components/unifiedbenchmarksaaitem.py +++ b/src/openrouter/components/unifiedbenchmarksaaitem.py @@ -6,9 +6,10 @@ UnifiedBenchmarkPricingTypedDict, ) from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic from pydantic import model_serializer from typing import Literal -from typing_extensions import TypedDict +from typing_extensions import Annotated, TypedDict UnifiedBenchmarksAAItemSource = Literal["artificial-analysis",] @@ -16,44 +17,108 @@ class UnifiedBenchmarksAAItemTypedDict(TypedDict): + r"""One model's Artificial Analysis index scores. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. With `task_type` set to `intelligence`, `coding` or `agentic`, those three indexes all come from the configuration that scores best on the one named.""" + agentic_index: Nullable[float] - r"""Artificial Analysis Agentic Index composite score. Higher is better.""" + r"""Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" coding_index: Nullable[float] - r"""Artificial Analysis Coding Index composite score. Higher is better.""" + r"""Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" + cyber_index: Nullable[float] + r"""Artificial Analysis Cyber Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + decision_index: Nullable[float] + r"""Artificial Analysis Decision Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model.""" display_name: str r"""Model name as listed on Artificial Analysis.""" + economics_index: Nullable[float] + r"""Artificial Analysis Economics Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + engineering_index: Nullable[float] + r"""Artificial Analysis Engineering Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + finance_and_accounting_index: Nullable[float] + r"""Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + healthcare_and_medical_index: Nullable[float] + r"""Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" intelligence_index: Nullable[float] - r"""Artificial Analysis Intelligence Index composite score. Higher is better.""" + r"""Artificial Analysis Intelligence Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + legal_index: Nullable[float] + r"""Artificial Analysis Legal Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" model_permaslug: str r"""Stable OpenRouter model identifier.""" + multilingual_index: Nullable[float] + r"""Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + openness_index: Nullable[float] + r"""Artificial Analysis Openness Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" pricing: Nullable[UnifiedBenchmarkPricingTypedDict] r"""OpenRouter pricing per token for this model. Null if pricing is unavailable.""" source: UnifiedBenchmarksAAItemSource r"""Benchmark source discriminator.""" + strategy_and_ops_index: Nullable[float] + r"""Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" class UnifiedBenchmarksAAItem(BaseModel): - agentic_index: Nullable[float] - r"""Artificial Analysis Agentic Index composite score. Higher is better.""" - - coding_index: Nullable[float] - r"""Artificial Analysis Coding Index composite score. Higher is better.""" + r"""One model's Artificial Analysis index scores. Each score is the model's best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding and Agentic Index scores are the exception: both come from one configuration, the model's strongest by Intelligence Index, then Coding Index, then Agentic Index. With `task_type` set to `intelligence`, `coding` or `agentic`, those three indexes all come from the configuration that scores best on the one named.""" + + agentic_index: Annotated[ + Nullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + r"""Deprecated: Artificial Analysis has retired its Agentic Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" + + coding_index: Annotated[ + Nullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + r"""Deprecated: Artificial Analysis has retired its Coding Index and no longer publishes it. Holds the last score Artificial Analysis published for the model, on a 0-100 scale, or null; it will be null for every model once those stored scores are removed.""" + + cyber_index: Nullable[float] + r"""Artificial Analysis Cyber Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + decision_index: Nullable[float] + r"""Artificial Analysis Decision Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Published for decision models and for the language models Artificial Analysis evaluates on decision tasks. Null when Artificial Analysis has not published a score for the model.""" display_name: str r"""Model name as listed on Artificial Analysis.""" + economics_index: Nullable[float] + r"""Artificial Analysis Economics Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + engineering_index: Nullable[float] + r"""Artificial Analysis Engineering Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + finance_and_accounting_index: Nullable[float] + r"""Artificial Analysis Finance & Accounting Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + + healthcare_and_medical_index: Nullable[float] + r"""Artificial Analysis Healthcare & Medical Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + intelligence_index: Nullable[float] - r"""Artificial Analysis Intelligence Index composite score. Higher is better.""" + r"""Artificial Analysis Intelligence Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + legal_index: Nullable[float] + r"""Artificial Analysis Legal Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" model_permaslug: str r"""Stable OpenRouter model identifier.""" + multilingual_index: Nullable[float] + r"""Artificial Analysis Multilingual Index score, as a fraction from 0 to 1: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + + openness_index: Nullable[float] + r"""Artificial Analysis Openness Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. Null when Artificial Analysis has not published a score for the model.""" + pricing: Nullable[UnifiedBenchmarkPricing] r"""OpenRouter pricing per token for this model. Null if pricing is unavailable.""" source: UnifiedBenchmarksAAItemSource r"""Benchmark source discriminator.""" + strategy_and_ops_index: Nullable[float] + r"""Artificial Analysis Strategy & Ops Index score, on a 0-100 scale: the model's best across the configurations Artificial Analysis evaluated. Higher is better. One of the six Artificial Analysis Capability Indexes. Null when Artificial Analysis has not published a score for the model.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): serialized = handler(self) diff --git a/src/openrouter/components/unifiedbenchmarksmeta.py b/src/openrouter/components/unifiedbenchmarksmeta.py index 68d76b7b6..3313711a9 100644 --- a/src/openrouter/components/unifiedbenchmarksmeta.py +++ b/src/openrouter/components/unifiedbenchmarksmeta.py @@ -15,7 +15,7 @@ ], UnrecognizedStr, ] -r"""The source filter applied, or null when all sources are returned.""" +r"""The one source the response is limited to: the `source` filter, or Artificial Analysis for a `task_type` only it answers. Null when the response draws on every source.""" UnifiedBenchmarksMetaVersion = Literal["v1",] @@ -26,13 +26,13 @@ class UnifiedBenchmarksMetaTypedDict(TypedDict): as_of: str r"""ISO-8601 timestamp of when this data was last updated.""" citation: Nullable[str] - r"""Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator).""" + r"""Required attribution when republishing this data. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources (attribute each item by its `source` discriminator) or there are none.""" model_count: int r"""Number of unique models in the response.""" source: Nullable[UnifiedBenchmarksMetaSource] - r"""The source filter applied, or null when all sources are returned.""" + r"""The one source the response is limited to: the `source` filter, or Artificial Analysis for a `task_type` only it answers. Null when the response draws on every source.""" source_url: Nullable[str] - r"""URL of the upstream data source, or null when results span multiple sources.""" + r"""URL of the upstream data source. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources or there are none.""" task_type: Nullable[str] r"""The task_type filter applied, or null if showing all.""" version: UnifiedBenchmarksMetaVersion @@ -44,16 +44,16 @@ class UnifiedBenchmarksMeta(BaseModel): r"""ISO-8601 timestamp of when this data was last updated.""" citation: Nullable[str] - r"""Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator).""" + r"""Required attribution when republishing this data. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources (attribute each item by its `source` discriminator) or there are none.""" model_count: int r"""Number of unique models in the response.""" source: Nullable[UnifiedBenchmarksMetaSource] - r"""The source filter applied, or null when all sources are returned.""" + r"""The one source the response is limited to: the `source` filter, or Artificial Analysis for a `task_type` only it answers. Null when the response draws on every source.""" source_url: Nullable[str] - r"""URL of the upstream data source, or null when results span multiple sources.""" + r"""URL of the upstream data source. Always set when `source` is set. When `source` is null, set if every returned item comes from one source, and null if the items span sources or there are none.""" task_type: Nullable[str] r"""The task_type filter applied, or null if showing all.""" diff --git a/src/openrouter/components/unifiedbenchmarksresponse.py b/src/openrouter/components/unifiedbenchmarksresponse.py index e2ed5fb98..b7fd3b014 100644 --- a/src/openrouter/components/unifiedbenchmarksresponse.py +++ b/src/openrouter/components/unifiedbenchmarksresponse.py @@ -26,10 +26,10 @@ UnifiedBenchmarksResponseDataTypedDict = TypeAliasType( "UnifiedBenchmarksResponseDataTypedDict", Union[ - UnifiedBenchmarksAAItemTypedDict, UnifiedBenchmarksORItemTypedDict, UnifiedBenchmarksDAItemTypedDict, UnifiedBenchmarksSearchItemTypedDict, + UnifiedBenchmarksAAItemTypedDict, ], ) @@ -37,10 +37,10 @@ UnifiedBenchmarksResponseData = TypeAliasType( "UnifiedBenchmarksResponseData", Union[ - UnifiedBenchmarksAAItem, UnifiedBenchmarksORItem, UnifiedBenchmarksDAItem, UnifiedBenchmarksSearchItem, + UnifiedBenchmarksAAItem, ], ) diff --git a/src/openrouter/models_.py b/src/openrouter/models_.py index 4cea7bb4b..cd738baa6 100644 --- a/src/openrouter/models_.py +++ b/src/openrouter/models_.py @@ -309,6 +309,26 @@ def list( max_coding_index: OptionalNullable[float] = UNSET, min_agentic_index: OptionalNullable[float] = UNSET, max_agentic_index: OptionalNullable[float] = UNSET, + min_finance_and_accounting_index: OptionalNullable[float] = UNSET, + max_finance_and_accounting_index: OptionalNullable[float] = UNSET, + min_strategy_and_ops_index: OptionalNullable[float] = UNSET, + max_strategy_and_ops_index: OptionalNullable[float] = UNSET, + min_legal_index: OptionalNullable[float] = UNSET, + max_legal_index: OptionalNullable[float] = UNSET, + min_healthcare_and_medical_index: OptionalNullable[float] = UNSET, + max_healthcare_and_medical_index: OptionalNullable[float] = UNSET, + min_engineering_index: OptionalNullable[float] = UNSET, + max_engineering_index: OptionalNullable[float] = UNSET, + min_economics_index: OptionalNullable[float] = UNSET, + max_economics_index: OptionalNullable[float] = UNSET, + min_cyber_index: OptionalNullable[float] = UNSET, + max_cyber_index: OptionalNullable[float] = UNSET, + min_openness_index: OptionalNullable[float] = UNSET, + max_openness_index: OptionalNullable[float] = UNSET, + min_multilingual_index: OptionalNullable[float] = UNSET, + max_multilingual_index: OptionalNullable[float] = UNSET, + min_decision_index: OptionalNullable[float] = UNSET, + max_decision_index: OptionalNullable[float] = UNSET, min_tool_success_rate: OptionalNullable[float] = UNSET, max_tool_success_rate: OptionalNullable[float] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -330,7 +350,7 @@ def list( :param category: Filter models by use case category :param supported_parameters: Filter models by supported parameter (comma-separated) :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or \"all\" to include all models. Defaults to \"text\". - :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. + :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. :param q: Free-text search by model name or slug. :param input_modalities: Filter models by input modality. Comma-separated list of: text, image, audio, file. :param endpoints: Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike). @@ -347,12 +367,32 @@ def list( :param max_output_price: Maximum completion (output) price in $/M tokens. :param min_age_days: Minimum model age in days since its creation date. :param max_age_days: Maximum model age in days since its creation date. - :param min_intelligence_index: Minimum Artificial Analysis intelligence index. - :param max_intelligence_index: Maximum Artificial Analysis intelligence index. - :param min_coding_index: Minimum Artificial Analysis coding index. - :param max_coding_index: Maximum Artificial Analysis coding index. - :param min_agentic_index: Minimum Artificial Analysis agentic index. - :param max_agentic_index: Maximum Artificial Analysis agentic index. + :param min_intelligence_index: Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. + :param max_intelligence_index: Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. + :param min_coding_index: Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded. + :param max_coding_index: Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded. + :param min_agentic_index: Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded. + :param max_agentic_index: Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded. + :param min_finance_and_accounting_index: Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. + :param max_finance_and_accounting_index: Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. + :param min_strategy_and_ops_index: Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. + :param max_strategy_and_ops_index: Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. + :param min_legal_index: Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded. + :param max_legal_index: Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded. + :param min_healthcare_and_medical_index: Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. + :param max_healthcare_and_medical_index: Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. + :param min_engineering_index: Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. + :param max_engineering_index: Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. + :param min_economics_index: Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded. + :param max_economics_index: Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded. + :param min_cyber_index: Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. + :param max_cyber_index: Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. + :param min_openness_index: Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded. + :param max_openness_index: Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded. + :param min_multilingual_index: Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. + :param max_multilingual_index: Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. + :param min_decision_index: Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded. + :param max_decision_index: Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded. :param min_tool_success_rate: Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). :param max_tool_success_rate: Maximum tool-calling success rate, as a fraction in [0, 1]. :param retries: Override the default retry configuration for this method @@ -402,6 +442,26 @@ def list( max_coding_index=max_coding_index, min_agentic_index=min_agentic_index, max_agentic_index=max_agentic_index, + min_finance_and_accounting_index=min_finance_and_accounting_index, + max_finance_and_accounting_index=max_finance_and_accounting_index, + min_strategy_and_ops_index=min_strategy_and_ops_index, + max_strategy_and_ops_index=max_strategy_and_ops_index, + min_legal_index=min_legal_index, + max_legal_index=max_legal_index, + min_healthcare_and_medical_index=min_healthcare_and_medical_index, + max_healthcare_and_medical_index=max_healthcare_and_medical_index, + min_engineering_index=min_engineering_index, + max_engineering_index=max_engineering_index, + min_economics_index=min_economics_index, + max_economics_index=max_economics_index, + min_cyber_index=min_cyber_index, + max_cyber_index=max_cyber_index, + min_openness_index=min_openness_index, + max_openness_index=max_openness_index, + min_multilingual_index=min_multilingual_index, + max_multilingual_index=max_multilingual_index, + min_decision_index=min_decision_index, + max_decision_index=max_decision_index, min_tool_success_rate=min_tool_success_rate, max_tool_success_rate=max_tool_success_rate, ) @@ -504,6 +564,26 @@ def next_func() -> Optional[operations.GetModelsResponse]: max_coding_index=max_coding_index, min_agentic_index=min_agentic_index, max_agentic_index=max_agentic_index, + min_finance_and_accounting_index=min_finance_and_accounting_index, + max_finance_and_accounting_index=max_finance_and_accounting_index, + min_strategy_and_ops_index=min_strategy_and_ops_index, + max_strategy_and_ops_index=max_strategy_and_ops_index, + min_legal_index=min_legal_index, + max_legal_index=max_legal_index, + min_healthcare_and_medical_index=min_healthcare_and_medical_index, + max_healthcare_and_medical_index=max_healthcare_and_medical_index, + min_engineering_index=min_engineering_index, + max_engineering_index=max_engineering_index, + min_economics_index=min_economics_index, + max_economics_index=max_economics_index, + min_cyber_index=min_cyber_index, + max_cyber_index=max_cyber_index, + min_openness_index=min_openness_index, + max_openness_index=max_openness_index, + min_multilingual_index=min_multilingual_index, + max_multilingual_index=max_multilingual_index, + min_decision_index=min_decision_index, + max_decision_index=max_decision_index, min_tool_success_rate=min_tool_success_rate, max_tool_success_rate=max_tool_success_rate, retries=retries, @@ -610,6 +690,26 @@ async def list_async( max_coding_index: OptionalNullable[float] = UNSET, min_agentic_index: OptionalNullable[float] = UNSET, max_agentic_index: OptionalNullable[float] = UNSET, + min_finance_and_accounting_index: OptionalNullable[float] = UNSET, + max_finance_and_accounting_index: OptionalNullable[float] = UNSET, + min_strategy_and_ops_index: OptionalNullable[float] = UNSET, + max_strategy_and_ops_index: OptionalNullable[float] = UNSET, + min_legal_index: OptionalNullable[float] = UNSET, + max_legal_index: OptionalNullable[float] = UNSET, + min_healthcare_and_medical_index: OptionalNullable[float] = UNSET, + max_healthcare_and_medical_index: OptionalNullable[float] = UNSET, + min_engineering_index: OptionalNullable[float] = UNSET, + max_engineering_index: OptionalNullable[float] = UNSET, + min_economics_index: OptionalNullable[float] = UNSET, + max_economics_index: OptionalNullable[float] = UNSET, + min_cyber_index: OptionalNullable[float] = UNSET, + max_cyber_index: OptionalNullable[float] = UNSET, + min_openness_index: OptionalNullable[float] = UNSET, + max_openness_index: OptionalNullable[float] = UNSET, + min_multilingual_index: OptionalNullable[float] = UNSET, + max_multilingual_index: OptionalNullable[float] = UNSET, + min_decision_index: OptionalNullable[float] = UNSET, + max_decision_index: OptionalNullable[float] = UNSET, min_tool_success_rate: OptionalNullable[float] = UNSET, max_tool_success_rate: OptionalNullable[float] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -631,7 +731,7 @@ async def list_async( :param category: Filter models by use case category :param supported_parameters: Filter models by supported parameter (comma-separated) :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or \"all\" to include all models. Defaults to \"text\". - :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. + :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. :param q: Free-text search by model name or slug. :param input_modalities: Filter models by input modality. Comma-separated list of: text, image, audio, file. :param endpoints: Filter models by the request API paths they serve, as listed in each model's `endpoints` field. Comma-separated; a model must serve every listed path. Valid values: /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses, /api/v1/embeddings, /api/v1/rerank, /api/alpha/decisions, /api/alpha/extractions, /api/v1/videos, /api/v1/audio/speech, /api/v1/audio/transcriptions, /api/v1/images, /api/v1/batches. When set without `output_modalities`, models of every output modality are considered (the companion `/api/alpha/extractions` route is served by text and decisions models alike). @@ -648,12 +748,32 @@ async def list_async( :param max_output_price: Maximum completion (output) price in $/M tokens. :param min_age_days: Minimum model age in days since its creation date. :param max_age_days: Maximum model age in days since its creation date. - :param min_intelligence_index: Minimum Artificial Analysis intelligence index. - :param max_intelligence_index: Maximum Artificial Analysis intelligence index. - :param min_coding_index: Minimum Artificial Analysis coding index. - :param max_coding_index: Maximum Artificial Analysis coding index. - :param min_agentic_index: Minimum Artificial Analysis agentic index. - :param max_agentic_index: Maximum Artificial Analysis agentic index. + :param min_intelligence_index: Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. + :param max_intelligence_index: Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded. + :param min_coding_index: Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded. + :param max_coding_index: Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded. + :param min_agentic_index: Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded. + :param max_agentic_index: Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded. + :param min_finance_and_accounting_index: Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. + :param max_finance_and_accounting_index: Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded. + :param min_strategy_and_ops_index: Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. + :param max_strategy_and_ops_index: Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded. + :param min_legal_index: Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded. + :param max_legal_index: Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded. + :param min_healthcare_and_medical_index: Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. + :param max_healthcare_and_medical_index: Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded. + :param min_engineering_index: Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. + :param max_engineering_index: Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded. + :param min_economics_index: Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded. + :param max_economics_index: Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded. + :param min_cyber_index: Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. + :param max_cyber_index: Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded. + :param min_openness_index: Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded. + :param max_openness_index: Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded. + :param min_multilingual_index: Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. + :param max_multilingual_index: Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded. + :param min_decision_index: Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded. + :param max_decision_index: Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded. :param min_tool_success_rate: Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). :param max_tool_success_rate: Maximum tool-calling success rate, as a fraction in [0, 1]. :param retries: Override the default retry configuration for this method @@ -703,6 +823,26 @@ async def list_async( max_coding_index=max_coding_index, min_agentic_index=min_agentic_index, max_agentic_index=max_agentic_index, + min_finance_and_accounting_index=min_finance_and_accounting_index, + max_finance_and_accounting_index=max_finance_and_accounting_index, + min_strategy_and_ops_index=min_strategy_and_ops_index, + max_strategy_and_ops_index=max_strategy_and_ops_index, + min_legal_index=min_legal_index, + max_legal_index=max_legal_index, + min_healthcare_and_medical_index=min_healthcare_and_medical_index, + max_healthcare_and_medical_index=max_healthcare_and_medical_index, + min_engineering_index=min_engineering_index, + max_engineering_index=max_engineering_index, + min_economics_index=min_economics_index, + max_economics_index=max_economics_index, + min_cyber_index=min_cyber_index, + max_cyber_index=max_cyber_index, + min_openness_index=min_openness_index, + max_openness_index=max_openness_index, + min_multilingual_index=min_multilingual_index, + max_multilingual_index=max_multilingual_index, + min_decision_index=min_decision_index, + max_decision_index=max_decision_index, min_tool_success_rate=min_tool_success_rate, max_tool_success_rate=max_tool_success_rate, ) @@ -808,6 +948,26 @@ async def empty_result(): max_coding_index=max_coding_index, min_agentic_index=min_agentic_index, max_agentic_index=max_agentic_index, + min_finance_and_accounting_index=min_finance_and_accounting_index, + max_finance_and_accounting_index=max_finance_and_accounting_index, + min_strategy_and_ops_index=min_strategy_and_ops_index, + max_strategy_and_ops_index=max_strategy_and_ops_index, + min_legal_index=min_legal_index, + max_legal_index=max_legal_index, + min_healthcare_and_medical_index=min_healthcare_and_medical_index, + max_healthcare_and_medical_index=max_healthcare_and_medical_index, + min_engineering_index=min_engineering_index, + max_engineering_index=max_engineering_index, + min_economics_index=min_economics_index, + max_economics_index=max_economics_index, + min_cyber_index=min_cyber_index, + max_cyber_index=max_cyber_index, + min_openness_index=min_openness_index, + max_openness_index=max_openness_index, + min_multilingual_index=min_multilingual_index, + max_multilingual_index=max_multilingual_index, + min_decision_index=min_decision_index, + max_decision_index=max_decision_index, min_tool_success_rate=min_tool_success_rate, max_tool_success_rate=max_tool_success_rate, retries=retries, @@ -1167,7 +1327,7 @@ def list_for_user( :param offset: Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned :param limit: Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or \"all\" to include all models. Defaults to \"text\". - :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. + :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. :param client: Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1371,7 +1531,7 @@ async def list_for_user_async( :param offset: Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned :param limit: Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or \"all\" to include all models. Defaults to \"text\". - :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. + :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved. :param client: Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/src/openrouter/operations/getbenchmarks.py b/src/openrouter/operations/getbenchmarks.py index 51f1f39f8..1e48e932b 100644 --- a/src/openrouter/operations/getbenchmarks.py +++ b/src/openrouter/operations/getbenchmarks.py @@ -86,14 +86,23 @@ def serialize_model(self, handler): TaskType = Union[ Literal[ - "coding", "intelligence", + "coding", "agentic", + "finance-and-accounting", + "strategy-and-ops", + "legal", + "healthcare-and-medical", + "engineering", + "economics", + "cyber", + "multilingual", + "decision", "search", ], UnrecognizedStr, ] -r"""Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only.""" +r"""Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only.""" BenchmarkType = Union[ @@ -148,7 +157,7 @@ class GetBenchmarksRequestTypedDict(TypedDict): source: NotRequired[Source] r"""Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.""" task_type: NotRequired[TaskType] - r"""Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only.""" + r"""Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only.""" benchmark_type: NotRequired[BenchmarkType] r"""Return results for one exact OpenRouter benchmark. A `search_*` value narrows the response to search results only; a classic value narrows the OpenRouter items and leaves other sources' items as they are.""" include_run_config: NotRequired[bool] @@ -204,7 +213,7 @@ class GetBenchmarksRequest(BaseModel): Optional[TaskType], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. `search` returns OpenRouter search benchmark results only.""" + r"""Filter results by task type. Every value except `search` names the Artificial Analysis index of the same name and returns only models scored on it, best first (`coding` and `agentic` are deprecated: Artificial Analysis has retired those indexes). Design Arena answers only `coding`, `intelligence` and `agentic`, and OpenRouter's own evals only `intelligence` and `agentic`. `search` returns OpenRouter search benchmark results only.""" benchmark_type: Annotated[ Optional[BenchmarkType], diff --git a/src/openrouter/operations/getmodels.py b/src/openrouter/operations/getmodels.py index 51ad0ee78..5ae045de2 100644 --- a/src/openrouter/operations/getmodels.py +++ b/src/openrouter/operations/getmodels.py @@ -114,11 +114,21 @@ def serialize_model(self, handler): "intelligence-high-to-low", "coding-high-to-low", "agentic-high-to-low", + "finance-and-accounting-high-to-low", + "strategy-and-ops-high-to-low", + "legal-high-to-low", + "healthcare-and-medical-high-to-low", + "engineering-high-to-low", + "economics-high-to-low", + "cyber-high-to-low", + "openness-high-to-low", + "multilingual-high-to-low", + "decision-high-to-low", "design-arena-elo-high-to-low", ], UnrecognizedStr, ] -r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.""" +r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.""" Distillable = Union[ @@ -170,7 +180,7 @@ class GetModelsRequestTypedDict(TypedDict): output_modalities: NotRequired[str] r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or \"all\" to include all models. Defaults to \"text\".""" sort: NotRequired[GetModelsSort] - r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.""" + r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.""" q: NotRequired[str] r"""Free-text search by model name or slug.""" input_modalities: NotRequired[str] @@ -204,17 +214,57 @@ class GetModelsRequestTypedDict(TypedDict): max_age_days: NotRequired[Nullable[int]] r"""Maximum model age in days since its creation date.""" min_intelligence_index: NotRequired[Nullable[float]] - r"""Minimum Artificial Analysis intelligence index.""" + r"""Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.""" max_intelligence_index: NotRequired[Nullable[float]] - r"""Maximum Artificial Analysis intelligence index.""" + r"""Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.""" min_coding_index: NotRequired[Nullable[float]] - r"""Minimum Artificial Analysis coding index.""" + r"""Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded.""" max_coding_index: NotRequired[Nullable[float]] - r"""Maximum Artificial Analysis coding index.""" + r"""Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded.""" min_agentic_index: NotRequired[Nullable[float]] - r"""Minimum Artificial Analysis agentic index.""" + r"""Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded.""" max_agentic_index: NotRequired[Nullable[float]] - r"""Maximum Artificial Analysis agentic index.""" + r"""Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded.""" + min_finance_and_accounting_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.""" + max_finance_and_accounting_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.""" + min_strategy_and_ops_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.""" + max_strategy_and_ops_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.""" + min_legal_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded.""" + max_legal_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded.""" + min_healthcare_and_medical_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.""" + max_healthcare_and_medical_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.""" + min_engineering_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.""" + max_engineering_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.""" + min_economics_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded.""" + max_economics_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded.""" + min_cyber_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.""" + max_cyber_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.""" + min_openness_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded.""" + max_openness_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded.""" + min_multilingual_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.""" + max_multilingual_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.""" + min_decision_index: NotRequired[Nullable[float]] + r"""Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded.""" + max_decision_index: NotRequired[Nullable[float]] + r"""Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded.""" min_tool_success_rate: NotRequired[Nullable[float]] r"""Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).""" max_tool_success_rate: NotRequired[Nullable[float]] @@ -284,7 +334,7 @@ class GetModelsRequest(BaseModel): Optional[GetModelsSort], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.""" + r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.""" q: Annotated[ Optional[str], @@ -386,37 +436,169 @@ class GetModelsRequest(BaseModel): OptionalNullable[float], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Minimum Artificial Analysis intelligence index.""" + r"""Minimum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.""" max_intelligence_index: Annotated[ OptionalNullable[float], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Maximum Artificial Analysis intelligence index.""" + r"""Maximum Artificial Analysis Intelligence Index score (0-100); unscored models are excluded.""" min_coding_index: Annotated[ OptionalNullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Minimum Artificial Analysis coding index.""" + r"""Deprecated: Artificial Analysis has retired its Coding Index. Minimum score (0-100); unscored models are excluded.""" max_coding_index: Annotated[ OptionalNullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Maximum Artificial Analysis coding index.""" + r"""Deprecated: Artificial Analysis has retired its Coding Index. Maximum score (0-100); unscored models are excluded.""" min_agentic_index: Annotated[ OptionalNullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Minimum Artificial Analysis agentic index.""" + r"""Deprecated: Artificial Analysis has retired its Agentic Index. Minimum score (0-100); unscored models are excluded.""" max_agentic_index: Annotated[ OptionalNullable[float], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Maximum Artificial Analysis agentic index.""" + r"""Deprecated: Artificial Analysis has retired its Agentic Index. Maximum score (0-100); unscored models are excluded.""" + + min_finance_and_accounting_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.""" + + max_finance_and_accounting_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Finance & Accounting Index score (0-100); unscored models are excluded.""" + + min_strategy_and_ops_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.""" + + max_strategy_and_ops_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Strategy & Ops Index score (0-100); unscored models are excluded.""" + + min_legal_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Legal Index score (0-100); unscored models are excluded.""" + + max_legal_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Legal Index score (0-100); unscored models are excluded.""" + + min_healthcare_and_medical_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.""" + + max_healthcare_and_medical_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Healthcare & Medical Index score (0-100); unscored models are excluded.""" + + min_engineering_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.""" + + max_engineering_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Engineering Index score (0-100); unscored models are excluded.""" + + min_economics_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Economics Index score (0-100); unscored models are excluded.""" + + max_economics_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Economics Index score (0-100); unscored models are excluded.""" + + min_cyber_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.""" + + max_cyber_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Cyber Index score (0-100); unscored models are excluded.""" + + min_openness_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Openness Index score (0-100); unscored models are excluded.""" + + max_openness_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Openness Index score (0-100); unscored models are excluded.""" + + min_multilingual_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.""" + + max_multilingual_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Multilingual Index score (0-1); unscored models are excluded.""" + + min_decision_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Minimum Artificial Analysis Decision Index score (0-100); unscored models are excluded.""" + + max_decision_index: Annotated[ + OptionalNullable[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Maximum Artificial Analysis Decision Index score (0-100); unscored models are excluded.""" min_tool_success_rate: Annotated[ OptionalNullable[float], @@ -465,6 +647,26 @@ def serialize_model(self, handler): "max_coding_index", "min_agentic_index", "max_agentic_index", + "min_finance_and_accounting_index", + "max_finance_and_accounting_index", + "min_strategy_and_ops_index", + "max_strategy_and_ops_index", + "min_legal_index", + "max_legal_index", + "min_healthcare_and_medical_index", + "max_healthcare_and_medical_index", + "min_engineering_index", + "max_engineering_index", + "min_economics_index", + "max_economics_index", + "min_cyber_index", + "max_cyber_index", + "min_openness_index", + "max_openness_index", + "min_multilingual_index", + "max_multilingual_index", + "min_decision_index", + "max_decision_index", "min_tool_success_rate", "max_tool_success_rate", ] @@ -484,6 +686,26 @@ def serialize_model(self, handler): "max_coding_index", "min_agentic_index", "max_agentic_index", + "min_finance_and_accounting_index", + "max_finance_and_accounting_index", + "min_strategy_and_ops_index", + "max_strategy_and_ops_index", + "min_legal_index", + "max_legal_index", + "min_healthcare_and_medical_index", + "max_healthcare_and_medical_index", + "min_engineering_index", + "max_engineering_index", + "min_economics_index", + "max_economics_index", + "min_cyber_index", + "max_cyber_index", + "min_openness_index", + "max_openness_index", + "min_multilingual_index", + "max_multilingual_index", + "min_decision_index", + "max_decision_index", "min_tool_success_rate", "max_tool_success_rate", ] diff --git a/src/openrouter/operations/listmodelsuser.py b/src/openrouter/operations/listmodelsuser.py index c5b9f8c2f..15d06ccd0 100644 --- a/src/openrouter/operations/listmodelsuser.py +++ b/src/openrouter/operations/listmodelsuser.py @@ -116,11 +116,21 @@ class ListModelsUserSecurity(BaseModel): "intelligence-high-to-low", "coding-high-to-low", "agentic-high-to-low", + "finance-and-accounting-high-to-low", + "strategy-and-ops-high-to-low", + "legal-high-to-low", + "healthcare-and-medical-high-to-low", + "engineering-high-to-low", + "economics-high-to-low", + "cyber-high-to-low", + "openness-high-to-low", + "multilingual-high-to-low", + "decision-high-to-low", "design-arena-elo-high-to-low", ], UnrecognizedStr, ] -r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.""" +r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.""" Client = Union[ @@ -155,7 +165,7 @@ class ListModelsUserRequestTypedDict(TypedDict): output_modalities: NotRequired[str] r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or \"all\" to include all models. Defaults to \"text\".""" sort: NotRequired[ListModelsUserSort] - r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.""" + r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.""" client: NotRequired[Client] r"""Filter models and presets by the named harness's eligibility policy: tool calling is required, and when one of your guardrails sets `enforce_first_party_harness_models`, only the harness vendor's own models remain (OpenAI for codex, Anthropic for claude_code and claude_desktop). When your workspace's Managed Machines policy sets a model list for that harness, only the listed models remain, and a preset remains only while every model it routes to is listed. This filter doesn't apply the harness's ranking, caps or Claude Desktop model ID aliases, so returned IDs stay routable. One of: claude_code, claude_desktop, codex. Omit it to get every model you can use.""" @@ -211,7 +221,7 @@ class ListModelsUserRequest(BaseModel): Optional[ListModelsUserSort], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.""" + r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), -high-to-low for each Artificial Analysis index (the coding and agentic sorts are deprecated: Artificial Analysis has retired those indexes), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. The decision sort ranks decision models, so pass output_modalities=decisions or all with it. When omitted, the existing default ordering is preserved.""" client: Annotated[ Optional[Client], diff --git a/uv.lock b/uv.lock index 5732e88d2..8976247a2 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.184" +version = "1.3.185" source = { editable = "." } dependencies = [ { name = "httpcore" }, From daad909a42ef6010035aa19a3e241e582bd7a9dc Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:44:48 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow