mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e29e408af | ||
|
|
30bc131b97 | ||
|
|
1b0118c365 | ||
|
|
cda73e5ebf |
@@ -0,0 +1,86 @@
|
||||
name: Auto-merge Speakeasy PR
|
||||
|
||||
# Speakeasy mode:pr opens PRs (speakeasy-sdk-regen-*) and labels them
|
||||
# patch/minor/major. Merge automatically so sdk_publish.yaml can run.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: auto-merge-speakeasy
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
auto-merge:
|
||||
if: |
|
||||
github.event.sender.login == 'github-actions[bot]' &&
|
||||
github.event.pull_request.user.login == 'github-actions[bot]' &&
|
||||
startsWith(github.event.pull_request.head.ref, 'speakeasy-sdk-regen-') &&
|
||||
contains(github.event.pull_request.title, '🐝 Update SDK') &&
|
||||
contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close superseded Speakeasy PRs
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
CURRENT_PR="${{ github.event.pull_request.number }}"
|
||||
|
||||
PRIOR_JSON=$(gh pr list \
|
||||
--repo "${{ github.repository }}" \
|
||||
--state open \
|
||||
--search "head:speakeasy-sdk-regen-" \
|
||||
--limit 500 \
|
||||
--json number \
|
||||
| jq -r --arg cur "$CURRENT_PR" \
|
||||
'[.[].number | select(tostring != $cur)] | .[]')
|
||||
|
||||
if [ -z "$PRIOR_JSON" ]; then
|
||||
echo "No superseded Speakeasy PRs to close"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mapfile -t PRIOR <<< "$PRIOR_JSON"
|
||||
|
||||
echo "Closing ${#PRIOR[@]} superseded Speakeasy PR(s)"
|
||||
for N in "${PRIOR[@]}"; do
|
||||
gh pr close "$N" --repo "${{ github.repository }}" --delete-branch \
|
||||
--comment "Superseded by newer Speakeasy SDK generation PR #${CURRENT_PR}" \
|
||||
|| echo "::warning::Failed to close PR #$N (continuing)"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Auto-merge Speakeasy PR
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
PR_NUM="${{ github.event.pull_request.number }}"
|
||||
REPO="${{ github.repository }}"
|
||||
|
||||
STATE=$(gh pr view "$PR_NUM" --repo "$REPO" --json state --jq .state)
|
||||
if [ "$STATE" != "OPEN" ]; then
|
||||
echo "PR #$PR_NUM is $STATE — skipping merge"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Prefer GitHub auto-merge when required checks exist; otherwise
|
||||
# squash-merge directly (same pattern as sdk-release-prs.yaml).
|
||||
AUTO_MERGE_NOOP_PATTERN='is in clean status|protected branch rules|Branch does not have required protected branch rules'
|
||||
if gh pr merge "$PR_NUM" --repo "$REPO" --squash --auto --delete-branch 2> /tmp/gh-merge.err; then
|
||||
echo "Auto-merge enabled for Speakeasy PR #$PR_NUM"
|
||||
elif grep -qiE "$AUTO_MERGE_NOOP_PATTERN" /tmp/gh-merge.err; then
|
||||
echo "Auto-merge not applicable — merging PR #$PR_NUM directly"
|
||||
cat /tmp/gh-merge.err >&2
|
||||
gh pr merge "$PR_NUM" --repo "$REPO" --squash --delete-branch
|
||||
else
|
||||
echo "::error::Failed to enable auto-merge on Speakeasy PR #$PR_NUM"
|
||||
cat /tmp/gh-merge.err >&2
|
||||
exit 1
|
||||
fi
|
||||
+19
-36
@@ -1,19 +1,19 @@
|
||||
lockVersion: 2.0.0
|
||||
id: c48cf606-fb42-4a45-9c23-8f0555307828
|
||||
management:
|
||||
docChecksum: cc6966b5800766370c195f5c42b10761
|
||||
docChecksum: 8dd32184dc771115ba5e79b3c70e7f6f
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
generationVersion: 2.788.4
|
||||
releaseVersion: 0.10.1
|
||||
configChecksum: b1687c127d87a1ac114b35dd9b492f3c
|
||||
releaseVersion: 0.10.0
|
||||
configChecksum: 00a97c5bcdbddf7e591c0a1d7a45e98e
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
persistentEdits:
|
||||
generation_id: 8123354f-2376-451c-8dbd-6e7ed6d6980c
|
||||
pristine_commit_hash: 48c154f879472adb6f282e81083593c020808530
|
||||
pristine_tree_hash: 3e5484ebb7e5c6660a037fb427b4aa9edd240571
|
||||
generation_id: b6cb6701-b1ae-453f-beb8-2064f09433f4
|
||||
pristine_commit_hash: ed0a00c99b7b3b76ed1de023bc8174696435c2cd
|
||||
pristine_tree_hash: a5b3d8dc9253bb236d709d9f365f5766595d820b
|
||||
features:
|
||||
python:
|
||||
acceptHeaders: 3.0.0
|
||||
@@ -1448,10 +1448,6 @@ trackedFiles:
|
||||
id: 8d84fb41685d
|
||||
last_write_checksum: sha1:fcfbe6740c505b263b90f7de5281d4f506922b05
|
||||
pristine_git_object: 870296bd3335da46ecdf4ec1722a3d47037a09c9
|
||||
docs/components/defaulteffort.md:
|
||||
id: 08dabde07c1d
|
||||
last_write_checksum: sha1:96f06eb8b68e44984b691338b99e746fef1253ac
|
||||
pristine_git_object: f3f07f26e47692dd4e6a728e45f32cfe5795082e
|
||||
docs/components/defaultparameters.md:
|
||||
id: a84477afcaec
|
||||
last_write_checksum: sha1:a20e8b576e341dbcdb91884b8fc83cf4316ab106
|
||||
@@ -2526,8 +2522,8 @@ trackedFiles:
|
||||
pristine_git_object: d5bbdc95f658be46eebf13f0ba8b9ae3716f72e2
|
||||
docs/components/model.md:
|
||||
id: 673ad57400cd
|
||||
last_write_checksum: sha1:ea20bf9ca8f49a181142f516f1b36758cf5ceac6
|
||||
pristine_git_object: edb000fc276b3eec0dbe0bb1e82c4f5d7a72e8c9
|
||||
last_write_checksum: sha1:517cbce221606bacb2cab7b97e53d316d09a5f17
|
||||
pristine_git_object: 8ce3d9d7c9ddc7c270da3a39df079148aa7ff207
|
||||
docs/components/modelarchitecture.md:
|
||||
id: 79816051e6e8
|
||||
last_write_checksum: sha1:158b04c79b7a32a2d95e3d3fda8fa6da0ab91cd9
|
||||
@@ -2552,14 +2548,10 @@ trackedFiles:
|
||||
id: 74607e6a173d
|
||||
last_write_checksum: sha1:445ec227b130763e2509d1a181dd5e3e6d71420a
|
||||
pristine_git_object: 317190772f743d2aba63c4dad770827b46688f6a
|
||||
docs/components/modelreasoning.md:
|
||||
id: 47976b46e5b9
|
||||
last_write_checksum: sha1:07deec55fe155257ef07086b6dc2fbc7e012e031
|
||||
pristine_git_object: 306c0aeb39047768e6c79975996240584a97525b
|
||||
docs/components/modelresponse.md:
|
||||
id: 9d48c3f335b1
|
||||
last_write_checksum: sha1:442bb6c4d21debbceb5a48a9563b07704983123f
|
||||
pristine_git_object: 2ad6e9dc16fa06d03318e98bc540c7aca0d497ed
|
||||
last_write_checksum: sha1:5d8890c41a9f448341037e9915dd6e93df9140cb
|
||||
pristine_git_object: 2a7433dc87413943d14220ffdfda8b25e59bc9c0
|
||||
docs/components/modelscountresponse.md:
|
||||
id: abdad0c1a02a
|
||||
last_write_checksum: sha1:50ae205604eddcbdced268b8cd3e1ac06f0dd7c0
|
||||
@@ -6050,8 +6042,8 @@ trackedFiles:
|
||||
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
|
||||
pyproject.toml:
|
||||
id: 5d07e7d72637
|
||||
last_write_checksum: sha1:8223abd8e7463dfa2b2c1097670bb28b2ec73e68
|
||||
pristine_git_object: b98c0280ffbb42638747b1064375fa36f467223c
|
||||
last_write_checksum: sha1:ccf5925a473a1eb527cec02639f862b79b601251
|
||||
pristine_git_object: 396bd51f9c1428f03560f3e7988edc99edc698e8
|
||||
scripts/prepare_readme.py:
|
||||
id: e0c5957a6035
|
||||
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
|
||||
@@ -6078,8 +6070,8 @@ trackedFiles:
|
||||
pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d
|
||||
src/openrouter/_version.py:
|
||||
id: d8d15ad6c586
|
||||
last_write_checksum: sha1:856bdf17b7de36f6e1abd0b56f55bbc6093e4c68
|
||||
pristine_git_object: ade61995259031f3789ff71f0cfd1d6ae4b39395
|
||||
last_write_checksum: sha1:017dc1ec43588b31eee23532d74d4421993dd874
|
||||
pristine_git_object: be619e3be1aa8d27deef5752ecc9ff09ccd4cd9f
|
||||
src/openrouter/analytics.py:
|
||||
id: cb406b5aaabb
|
||||
last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35
|
||||
@@ -6110,8 +6102,8 @@ trackedFiles:
|
||||
pristine_git_object: a1894915bd32aee65f019885634eb7908970a046
|
||||
src/openrouter/components/__init__.py:
|
||||
id: 81754e97b3f4
|
||||
last_write_checksum: sha1:a136f824b02becfa0584a28474bb5f308a6861dc
|
||||
pristine_git_object: 9df66e9e82ebd373652cc654f23b104ef315f3c5
|
||||
last_write_checksum: sha1:56e0c315ac8fe611bf70b465a91341acbbe34534
|
||||
pristine_git_object: 2c07302c12f51cdf053e306906ac30862e925246
|
||||
src/openrouter/components/aabenchmarkentry.py:
|
||||
id: e2e0f0b48c82
|
||||
last_write_checksum: sha1:1b6b66672fb80dccdc39843a98bdef6d7d804364
|
||||
@@ -7186,8 +7178,8 @@ trackedFiles:
|
||||
pristine_git_object: 1257b38d2001f34078cd1b052c20264e81a95e57
|
||||
src/openrouter/components/model.py:
|
||||
id: cef3adaa772b
|
||||
last_write_checksum: sha1:53f544fe39ae08cde33f99c5d0bb4b6cc1555301
|
||||
pristine_git_object: c0345109fb1717ea27010605984c27e1137426fd
|
||||
last_write_checksum: sha1:53eb4a044a7bf546225416bb08597df46a3b60a2
|
||||
pristine_git_object: 637b3fbe54ddcc454750d8de702045ee690c3333
|
||||
src/openrouter/components/modelarchitecture.py:
|
||||
id: b37ac27e512b
|
||||
last_write_checksum: sha1:e1dd41aa140b2ca2c3bbf15abf74e034d42b0166
|
||||
@@ -7204,10 +7196,6 @@ trackedFiles:
|
||||
id: b8759a1a4787
|
||||
last_write_checksum: sha1:69b2c991666848f4790e5136c67553733cc68a54
|
||||
pristine_git_object: c197cb2c527296adff2c3cfd9e49bcbc48087ce7
|
||||
src/openrouter/components/modelreasoning.py:
|
||||
id: 58bb3f2d75e0
|
||||
last_write_checksum: sha1:3da126ae596520b6d4f0edcc7fb8e4f786f686c7
|
||||
pristine_git_object: b71947b65e2054b23ff2094a270763720e740d96
|
||||
src/openrouter/components/modelresponse.py:
|
||||
id: 023136e6dedf
|
||||
last_write_checksum: sha1:af84587984cbe6341f59f176b08df43096ac48c6
|
||||
@@ -10055,9 +10043,4 @@ examples:
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
examplesVersion: 1.0.2
|
||||
releaseNotes: |
|
||||
## Python SDK Changes:
|
||||
* `open_router.embeddings.list_models()`: `response.data.[].reasoning` **Added**
|
||||
* `open_router.models.get()`: `response.data.reasoning` **Added**
|
||||
* `open_router.models.list()`: `response.data.[].reasoning` **Added**
|
||||
* `open_router.models.list_for_user()`: `response.data.[].reasoning` **Added**
|
||||
releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `open_router.presets.create_presets_responses()`: `request` **Changed** **Breaking** :warning:\n* `open_router.presets.create_presets_chat_completions()`: `request` **Changed** **Breaking** :warning:\n* `open_router.chat.send()`: `request` **Changed** **Breaking** :warning:\n* `open_router.workspaces.set_budget()`: **Added**\n* `open_router.o_auth.create_auth_code()`: \n * `request.workspace_id` **Added**\n * `error.status[403]` **Added**\n* `open_router.files.download()`: **Added**\n* `open_router.models.get()`: **Added**\n* `open_router.workspaces.list_budgets()`: **Added**\n* `open_router.workspaces.delete_budget()`: **Added**\n* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Added**\n* `open_router.beta.analytics.query_analytics()`: `response.data.warnings` **Added**\n* `open_router.files.delete()`: **Added**\n* `open_router.files.retrieve()`: **Added**\n* `open_router.files.upload()`: **Added**\n* `open_router.embeddings.list_models()`: `response.data.[].benchmarks` **Added**\n* `open_router.models.list()`: \n * `request` **Changed**\n * `response.data.[].benchmarks` **Added**\n* `open_router.models.list_for_user()`: `response.data.[].benchmarks` **Added**\n* `open_router.files.list()`: **Added**\n* `open_router.presets.create_presets_messages()`: `request` **Changed**\n* `open_router.datasets.get_benchmarks_design_arena()`: **Added**\n"
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ generation:
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.10.1
|
||||
version: 0.10.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
+399
-554
@@ -3644,350 +3644,6 @@ components:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ContainerAutoEnvironment'
|
||||
- $ref: '#/components/schemas/ContainerReferenceEnvironment'
|
||||
BenchmarkPricing:
|
||||
description: OpenRouter pricing per token for this model. Null if pricing is unavailable.
|
||||
example:
|
||||
completion: '0.000015'
|
||||
prompt: '0.000003'
|
||||
nullable: true
|
||||
properties:
|
||||
completion:
|
||||
description: Cost per output token (USD, decimal string).
|
||||
example: '0.000015'
|
||||
type: string
|
||||
prompt:
|
||||
description: Cost per input token (USD, decimal string).
|
||||
example: '0.000003'
|
||||
type: string
|
||||
required:
|
||||
- prompt
|
||||
- completion
|
||||
type: object
|
||||
BenchmarksAAItem:
|
||||
example:
|
||||
aa_name: GPT-4o
|
||||
agentic_index: 58.3
|
||||
coding_index: 65.8
|
||||
intelligence_index: 71.2
|
||||
model_permaslug: openai/gpt-4o
|
||||
pricing:
|
||||
completion: '0.00001'
|
||||
prompt: '0.0000025'
|
||||
properties:
|
||||
aa_name:
|
||||
description: Model name as listed on Artificial Analysis.
|
||||
example: GPT-4o
|
||||
type: string
|
||||
agentic_index:
|
||||
description: Artificial Analysis Agentic Index composite score. Higher is better.
|
||||
example: 58.3
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
coding_index:
|
||||
description: Artificial Analysis Coding Index composite score. Higher is better.
|
||||
example: 65.8
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
intelligence_index:
|
||||
description: Artificial Analysis Intelligence Index composite score. Higher is better.
|
||||
example: 71.2
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
model_permaslug:
|
||||
description: Stable OpenRouter model identifier.
|
||||
example: openai/gpt-4o
|
||||
type: string
|
||||
pricing:
|
||||
$ref: '#/components/schemas/BenchmarkPricing'
|
||||
required:
|
||||
- model_permaslug
|
||||
- aa_name
|
||||
- intelligence_index
|
||||
- coding_index
|
||||
- agentic_index
|
||||
- pricing
|
||||
type: object
|
||||
BenchmarksAAMeta:
|
||||
example:
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
model_count: 50
|
||||
source: artificial-analysis
|
||||
source_url: https://artificialanalysis.ai
|
||||
version: v1
|
||||
properties:
|
||||
as_of:
|
||||
description: ISO-8601 timestamp of when this data was last updated.
|
||||
example: '2026-06-03T12:00:00Z'
|
||||
type: string
|
||||
citation:
|
||||
description: Required attribution when republishing this data.
|
||||
example: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
type: string
|
||||
model_count:
|
||||
description: Number of unique models in the response.
|
||||
type: integer
|
||||
source:
|
||||
description: Data source identifier.
|
||||
enum:
|
||||
- artificial-analysis
|
||||
type: string
|
||||
source_url:
|
||||
description: URL of the upstream data source.
|
||||
enum:
|
||||
- https://artificialanalysis.ai
|
||||
type: string
|
||||
version:
|
||||
description: Dataset version.
|
||||
enum:
|
||||
- v1
|
||||
type: string
|
||||
required:
|
||||
- as_of
|
||||
- version
|
||||
- source
|
||||
- source_url
|
||||
- citation
|
||||
- model_count
|
||||
type: object
|
||||
BenchmarksAAResponse:
|
||||
example:
|
||||
data:
|
||||
- aa_name: GPT-4o
|
||||
agentic_index: 58.3
|
||||
coding_index: 65.8
|
||||
intelligence_index: 71.2
|
||||
model_permaslug: openai/gpt-4o
|
||||
pricing:
|
||||
completion: '0.00001'
|
||||
prompt: '0.0000025'
|
||||
meta:
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
model_count: 1
|
||||
source: artificial-analysis
|
||||
source_url: https://artificialanalysis.ai
|
||||
version: v1
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/BenchmarksAAItem'
|
||||
type: array
|
||||
meta:
|
||||
$ref: '#/components/schemas/BenchmarksAAMeta'
|
||||
required:
|
||||
- data
|
||||
- meta
|
||||
type: object
|
||||
BenchmarksDAItem:
|
||||
example:
|
||||
arena: models
|
||||
avg_generation_time_ms: 3200
|
||||
category: codecategories
|
||||
display_name: Claude Sonnet 4
|
||||
elo: 1423
|
||||
model_permaslug: anthropic/claude-sonnet-4
|
||||
pricing:
|
||||
completion: '0.000015'
|
||||
prompt: '0.000003'
|
||||
tournament_stats:
|
||||
first_place: 12
|
||||
fourth_place: 2
|
||||
second_place: 8
|
||||
third_place: 5
|
||||
total: 27
|
||||
win_rate: 72
|
||||
properties:
|
||||
arena:
|
||||
description: Arena this ranking belongs to.
|
||||
example: models
|
||||
type: string
|
||||
avg_generation_time_ms:
|
||||
description: Average generation time in milliseconds.
|
||||
example: 3200
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
category:
|
||||
description: Category within the arena.
|
||||
example: codecategories
|
||||
type: string
|
||||
display_name:
|
||||
description: Human-readable model name from Design Arena.
|
||||
example: Claude Sonnet 4
|
||||
type: string
|
||||
elo:
|
||||
description: ELO rating from head-to-head arena battles.
|
||||
example: 1423
|
||||
format: double
|
||||
type: number
|
||||
model_permaslug:
|
||||
description: >-
|
||||
Stable OpenRouter model identifier when the model is on OpenRouter; otherwise the upstream Design Arena
|
||||
model id. Use pricing != null to detect OpenRouter-mapped models.
|
||||
example: anthropic/claude-sonnet-4
|
||||
type: string
|
||||
pricing:
|
||||
$ref: '#/components/schemas/BenchmarkPricing'
|
||||
tournament_stats:
|
||||
description: Placement distribution from tournament matches.
|
||||
properties:
|
||||
first_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
fourth_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
second_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
third_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
total:
|
||||
nullable: true
|
||||
type: integer
|
||||
required:
|
||||
- first_place
|
||||
- second_place
|
||||
- third_place
|
||||
- fourth_place
|
||||
- total
|
||||
type: object
|
||||
win_rate:
|
||||
description: Win rate as a percentage (0–100).
|
||||
example: 72
|
||||
format: double
|
||||
type: number
|
||||
required:
|
||||
- model_permaslug
|
||||
- display_name
|
||||
- arena
|
||||
- category
|
||||
- elo
|
||||
- win_rate
|
||||
- avg_generation_time_ms
|
||||
- tournament_stats
|
||||
- pricing
|
||||
type: object
|
||||
BenchmarksDAMeta:
|
||||
example:
|
||||
arena: models
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
category: null
|
||||
citation: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
elo_bounds:
|
||||
max: 1600
|
||||
min: 900
|
||||
model_count: 50
|
||||
source: design-arena
|
||||
source_url: https://www.designarena.ai
|
||||
version: v1
|
||||
properties:
|
||||
arena:
|
||||
description: The arena filter applied.
|
||||
type: string
|
||||
as_of:
|
||||
description: ISO-8601 timestamp of when this data was generated.
|
||||
example: '2026-06-03T12:00:00Z'
|
||||
type: string
|
||||
category:
|
||||
description: The category filter applied, or null if showing all.
|
||||
nullable: true
|
||||
type: string
|
||||
citation:
|
||||
description: Required attribution when republishing this data.
|
||||
example: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
type: string
|
||||
elo_bounds:
|
||||
description: ELO range across all returned models for normalization.
|
||||
properties:
|
||||
max:
|
||||
description: Maximum ELO in the result set.
|
||||
format: double
|
||||
type: number
|
||||
min:
|
||||
description: Minimum ELO in the result set.
|
||||
format: double
|
||||
type: number
|
||||
required:
|
||||
- min
|
||||
- max
|
||||
type: object
|
||||
model_count:
|
||||
description: Number of unique models in the response.
|
||||
type: integer
|
||||
source:
|
||||
description: Data source identifier.
|
||||
enum:
|
||||
- design-arena
|
||||
type: string
|
||||
source_url:
|
||||
description: URL of the upstream data source.
|
||||
enum:
|
||||
- https://www.designarena.ai
|
||||
type: string
|
||||
version:
|
||||
description: Dataset version.
|
||||
enum:
|
||||
- v1
|
||||
type: string
|
||||
required:
|
||||
- as_of
|
||||
- version
|
||||
- source
|
||||
- source_url
|
||||
- citation
|
||||
- model_count
|
||||
- arena
|
||||
- category
|
||||
- elo_bounds
|
||||
type: object
|
||||
BenchmarksDAResponse:
|
||||
example:
|
||||
data:
|
||||
- arena: models
|
||||
avg_generation_time_ms: 3200
|
||||
category: codecategories
|
||||
display_name: Claude Sonnet 4
|
||||
elo: 1423
|
||||
model_permaslug: anthropic/claude-sonnet-4
|
||||
pricing:
|
||||
completion: '0.000015'
|
||||
prompt: '0.000003'
|
||||
tournament_stats:
|
||||
first_place: 12
|
||||
fourth_place: 2
|
||||
second_place: 8
|
||||
third_place: 5
|
||||
total: 27
|
||||
win_rate: 72
|
||||
meta:
|
||||
arena: models
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
category: null
|
||||
citation: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
elo_bounds:
|
||||
max: 1600
|
||||
min: 900
|
||||
model_count: 1
|
||||
source: design-arena
|
||||
source_url: https://www.designarena.ai
|
||||
version: v1
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/BenchmarksDAItem'
|
||||
type: array
|
||||
meta:
|
||||
$ref: '#/components/schemas/BenchmarksDAMeta'
|
||||
required:
|
||||
- data
|
||||
- meta
|
||||
type: object
|
||||
BigNumberUnion:
|
||||
description: Price per million prompt tokens
|
||||
example: 1000
|
||||
@@ -20562,6 +20218,263 @@ components:
|
||||
- code
|
||||
- message
|
||||
type: object
|
||||
UnifiedBenchmarkPricing:
|
||||
description: OpenRouter pricing per token for this model. Null if pricing is unavailable.
|
||||
example:
|
||||
completion: '0.000015'
|
||||
prompt: '0.000003'
|
||||
nullable: true
|
||||
properties:
|
||||
completion:
|
||||
description: Cost per output token (USD, decimal string).
|
||||
example: '0.000015'
|
||||
type: string
|
||||
prompt:
|
||||
description: Cost per input token (USD, decimal string).
|
||||
example: '0.000003'
|
||||
type: string
|
||||
required:
|
||||
- prompt
|
||||
- completion
|
||||
type: object
|
||||
UnifiedBenchmarksAAItem:
|
||||
example:
|
||||
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
|
||||
properties:
|
||||
agentic_index:
|
||||
description: Artificial Analysis Agentic Index composite score. Higher is better.
|
||||
example: 58.3
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
coding_index:
|
||||
description: Artificial Analysis Coding Index composite score. Higher is better.
|
||||
example: 65.8
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
display_name:
|
||||
description: Model name as listed on Artificial Analysis.
|
||||
example: GPT-4o
|
||||
type: string
|
||||
intelligence_index:
|
||||
description: Artificial Analysis Intelligence Index composite score. Higher is better.
|
||||
example: 71.2
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
model_permaslug:
|
||||
description: Stable OpenRouter model identifier.
|
||||
example: openai/gpt-4o
|
||||
type: string
|
||||
pricing:
|
||||
$ref: '#/components/schemas/UnifiedBenchmarkPricing'
|
||||
source:
|
||||
description: Benchmark source discriminator.
|
||||
enum:
|
||||
- artificial-analysis
|
||||
type: string
|
||||
required:
|
||||
- source
|
||||
- model_permaslug
|
||||
- display_name
|
||||
- intelligence_index
|
||||
- coding_index
|
||||
- agentic_index
|
||||
- pricing
|
||||
type: object
|
||||
UnifiedBenchmarksDAItem:
|
||||
example:
|
||||
arena: models
|
||||
avg_generation_time_ms: 3200
|
||||
category: codecategories
|
||||
display_name: Claude Sonnet 4
|
||||
elo: 1423
|
||||
model_permaslug: anthropic/claude-sonnet-4
|
||||
pricing:
|
||||
completion: '0.000015'
|
||||
prompt: '0.000003'
|
||||
source: design-arena
|
||||
tournament_stats:
|
||||
first_place: 12
|
||||
fourth_place: 2
|
||||
second_place: 8
|
||||
third_place: 5
|
||||
total: 27
|
||||
win_rate: 72
|
||||
properties:
|
||||
arena:
|
||||
description: Arena this ranking belongs to.
|
||||
example: models
|
||||
type: string
|
||||
avg_generation_time_ms:
|
||||
description: Average generation time in milliseconds.
|
||||
example: 3200
|
||||
format: double
|
||||
nullable: true
|
||||
type: number
|
||||
category:
|
||||
description: Category within the arena.
|
||||
example: codecategories
|
||||
type: string
|
||||
display_name:
|
||||
description: Human-readable model name from Design Arena.
|
||||
example: Claude Sonnet 4
|
||||
type: string
|
||||
elo:
|
||||
description: ELO rating from head-to-head arena battles.
|
||||
example: 1423
|
||||
format: double
|
||||
type: number
|
||||
model_permaslug:
|
||||
description: Stable OpenRouter model identifier when mapped; otherwise the upstream Design Arena model id.
|
||||
example: anthropic/claude-sonnet-4
|
||||
type: string
|
||||
pricing:
|
||||
$ref: '#/components/schemas/UnifiedBenchmarkPricing'
|
||||
source:
|
||||
description: Benchmark source discriminator.
|
||||
enum:
|
||||
- design-arena
|
||||
type: string
|
||||
tournament_stats:
|
||||
description: Placement distribution from tournament matches.
|
||||
properties:
|
||||
first_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
fourth_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
second_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
third_place:
|
||||
nullable: true
|
||||
type: integer
|
||||
total:
|
||||
nullable: true
|
||||
type: integer
|
||||
required:
|
||||
- first_place
|
||||
- second_place
|
||||
- third_place
|
||||
- fourth_place
|
||||
- total
|
||||
type: object
|
||||
win_rate:
|
||||
description: Win rate as a percentage (0–100).
|
||||
example: 72
|
||||
format: double
|
||||
type: number
|
||||
required:
|
||||
- source
|
||||
- model_permaslug
|
||||
- display_name
|
||||
- arena
|
||||
- category
|
||||
- elo
|
||||
- win_rate
|
||||
- avg_generation_time_ms
|
||||
- tournament_stats
|
||||
- pricing
|
||||
type: object
|
||||
UnifiedBenchmarksMeta:
|
||||
example:
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
model_count: 50
|
||||
source: artificial-analysis
|
||||
source_url: https://artificialanalysis.ai
|
||||
task_type: null
|
||||
version: v1
|
||||
properties:
|
||||
as_of:
|
||||
description: ISO-8601 timestamp of when this data was last updated.
|
||||
example: '2026-06-03T12:00:00Z'
|
||||
type: string
|
||||
citation:
|
||||
description: Required attribution when republishing this data.
|
||||
example: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
type: string
|
||||
model_count:
|
||||
description: Number of unique models in the response.
|
||||
type: integer
|
||||
source:
|
||||
description: The source filter applied.
|
||||
enum:
|
||||
- artificial-analysis
|
||||
- design-arena
|
||||
example: artificial-analysis
|
||||
type: string
|
||||
source_url:
|
||||
description: URL of the upstream data source.
|
||||
example: https://artificialanalysis.ai
|
||||
type: string
|
||||
task_type:
|
||||
description: The task_type filter applied, or null if showing all.
|
||||
nullable: true
|
||||
type: string
|
||||
version:
|
||||
description: Dataset version.
|
||||
enum:
|
||||
- v1
|
||||
type: string
|
||||
required:
|
||||
- as_of
|
||||
- version
|
||||
- source
|
||||
- source_url
|
||||
- citation
|
||||
- model_count
|
||||
- task_type
|
||||
type: object
|
||||
UnifiedBenchmarksResponse:
|
||||
example:
|
||||
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
|
||||
meta:
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
model_count: 1
|
||||
source: artificial-analysis
|
||||
source_url: https://artificialanalysis.ai
|
||||
task_type: null
|
||||
version: v1
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
discriminator:
|
||||
mapping:
|
||||
artificial-analysis: '#/components/schemas/UnifiedBenchmarksAAItem'
|
||||
design-arena: '#/components/schemas/UnifiedBenchmarksDAItem'
|
||||
propertyName: source
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/UnifiedBenchmarksAAItem'
|
||||
- $ref: '#/components/schemas/UnifiedBenchmarksDAItem'
|
||||
type: array
|
||||
meta:
|
||||
$ref: '#/components/schemas/UnifiedBenchmarksMeta'
|
||||
required:
|
||||
- data
|
||||
- meta
|
||||
type: object
|
||||
UnprocessableEntityResponse:
|
||||
description: Unprocessable Entity - Semantic validation failure
|
||||
example:
|
||||
@@ -23168,6 +23081,146 @@ paths:
|
||||
tags:
|
||||
- OAuth
|
||||
x-speakeasy-name-override: createAuthCode
|
||||
/benchmarks:
|
||||
get:
|
||||
description: >-
|
||||
Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design
|
||||
Arena). 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. 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.
|
||||
in: query
|
||||
name: source
|
||||
required: true
|
||||
schema:
|
||||
description: Benchmark source to query. Determines the shape of the returned items.
|
||||
enum:
|
||||
- artificial-analysis
|
||||
- design-arena
|
||||
example: artificial-analysis
|
||||
type: string
|
||||
- description: >-
|
||||
Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena,
|
||||
maps to the matching category.
|
||||
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.
|
||||
enum:
|
||||
- coding
|
||||
- intelligence
|
||||
- agentic
|
||||
example: coding
|
||||
type: string
|
||||
- description: 'Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.'
|
||||
in: query
|
||||
name: arena
|
||||
required: false
|
||||
schema:
|
||||
description: 'Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.'
|
||||
enum:
|
||||
- models
|
||||
- builders
|
||||
- agents
|
||||
example: models
|
||||
type: string
|
||||
- description: >-
|
||||
Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`,
|
||||
`dataviz`, `image`, `video`, `svg`). When omitted, returns all categories.
|
||||
in: query
|
||||
name: category
|
||||
required: false
|
||||
schema:
|
||||
description: >-
|
||||
Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`,
|
||||
`dataviz`, `image`, `video`, `svg`). When omitted, returns all categories.
|
||||
example: codecategories
|
||||
type: string
|
||||
- description: Max results to return (1–100, default 50).
|
||||
in: query
|
||||
name: max_results
|
||||
required: false
|
||||
schema:
|
||||
default: 50
|
||||
description: Max results to return (1–100, default 50).
|
||||
example: 20
|
||||
maximum: 100
|
||||
minimum: 1
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
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
|
||||
meta:
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
model_count: 1
|
||||
source: artificial-analysis
|
||||
source_url: https://artificialanalysis.ai
|
||||
task_type: null
|
||||
version: v1
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnifiedBenchmarksResponse'
|
||||
description: Benchmark results filtered by the specified source and optional task type.
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 400
|
||||
message: Invalid request parameters
|
||||
schema:
|
||||
$ref: '#/components/schemas/BadRequestResponse'
|
||||
description: Bad Request - Invalid request parameters or malformed input
|
||||
'401':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 401
|
||||
message: Missing Authentication header
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
description: Unauthorized - Authentication required or invalid credentials
|
||||
'429':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 429
|
||||
message: Rate limit exceeded
|
||||
schema:
|
||||
$ref: '#/components/schemas/TooManyRequestsResponse'
|
||||
description: Too Many Requests - Rate limit exceeded
|
||||
'500':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 500
|
||||
message: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
description: Internal Server Error - Unexpected server error
|
||||
summary: List Benchmarks
|
||||
tags:
|
||||
- Benchmarks
|
||||
/byok:
|
||||
get:
|
||||
description: >-
|
||||
@@ -24247,216 +24300,6 @@ paths:
|
||||
outputs:
|
||||
results: $.data
|
||||
type: offsetLimit
|
||||
/datasets/benchmarks/artificial-analysis:
|
||||
get:
|
||||
description: >-
|
||||
Returns composite index scores (Intelligence, Coding, Agentic) from Artificial Analysis for LLM models. Includes
|
||||
OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute
|
||||
per key and 500 requests/day per account.
|
||||
operationId: getBenchmarksArtificialAnalysis
|
||||
parameters:
|
||||
- description: Max results to return (1–100, default 50).
|
||||
in: query
|
||||
name: max_results
|
||||
required: false
|
||||
schema:
|
||||
default: 50
|
||||
description: Max results to return (1–100, default 50).
|
||||
example: 20
|
||||
maximum: 100
|
||||
minimum: 1
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
data:
|
||||
- aa_name: GPT-4o
|
||||
agentic_index: 58.3
|
||||
coding_index: 65.8
|
||||
intelligence_index: 71.2
|
||||
model_permaslug: openai/gpt-4o
|
||||
pricing:
|
||||
completion: '0.00001'
|
||||
prompt: '0.0000025'
|
||||
meta:
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
model_count: 1
|
||||
source: artificial-analysis
|
||||
source_url: https://artificialanalysis.ai
|
||||
version: v1
|
||||
schema:
|
||||
$ref: '#/components/schemas/BenchmarksAAResponse'
|
||||
description: Artificial Analysis composite index scores with pricing and attribution metadata.
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 400
|
||||
message: Invalid request parameters
|
||||
schema:
|
||||
$ref: '#/components/schemas/BadRequestResponse'
|
||||
description: Bad Request - Invalid request parameters or malformed input
|
||||
'401':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 401
|
||||
message: Missing Authentication header
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
description: Unauthorized - Authentication required or invalid credentials
|
||||
'429':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 429
|
||||
message: Rate limit exceeded
|
||||
schema:
|
||||
$ref: '#/components/schemas/TooManyRequestsResponse'
|
||||
description: Too Many Requests - Rate limit exceeded
|
||||
'500':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 500
|
||||
message: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
description: Internal Server Error - Unexpected server error
|
||||
summary: Artificial Analysis Benchmark Indices
|
||||
tags:
|
||||
- Datasets
|
||||
/datasets/benchmarks/design-arena:
|
||||
get:
|
||||
description: >-
|
||||
Returns ELO ratings from head-to-head arena battles on Design Arena. Filterable by arena
|
||||
(models/builders/agents) and category. Includes OpenRouter pricing per model. Authenticate with any valid
|
||||
OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account.
|
||||
operationId: getBenchmarksDesignArena
|
||||
parameters:
|
||||
- description: Arena to query. Defaults to `models`.
|
||||
in: query
|
||||
name: arena
|
||||
required: false
|
||||
schema:
|
||||
default: models
|
||||
description: Arena to query. Defaults to `models`.
|
||||
enum:
|
||||
- models
|
||||
- builders
|
||||
- agents
|
||||
example: models
|
||||
type: string
|
||||
- description: >-
|
||||
Category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`,
|
||||
`video`, `svg`). When omitted, returns all categories.
|
||||
in: query
|
||||
name: category
|
||||
required: false
|
||||
schema:
|
||||
description: >-
|
||||
Category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`,
|
||||
`video`, `svg`). When omitted, returns all categories.
|
||||
example: codecategories
|
||||
type: string
|
||||
- description: 'Max results to return: per category when no category filter is applied (1–100, default 50).'
|
||||
in: query
|
||||
name: max_results
|
||||
required: false
|
||||
schema:
|
||||
default: 50
|
||||
description: 'Max results to return: per category when no category filter is applied (1–100, default 50).'
|
||||
example: 20
|
||||
maximum: 100
|
||||
minimum: 1
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
data:
|
||||
- arena: models
|
||||
avg_generation_time_ms: 3200
|
||||
category: codecategories
|
||||
display_name: Claude Sonnet 4
|
||||
elo: 1423
|
||||
model_permaslug: anthropic/claude-sonnet-4
|
||||
pricing:
|
||||
completion: '0.000015'
|
||||
prompt: '0.000003'
|
||||
tournament_stats:
|
||||
first_place: 12
|
||||
fourth_place: 2
|
||||
second_place: 8
|
||||
third_place: 5
|
||||
total: 27
|
||||
win_rate: 72
|
||||
meta:
|
||||
arena: models
|
||||
as_of: '2026-06-03T12:00:00Z'
|
||||
category: null
|
||||
citation: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).'
|
||||
elo_bounds:
|
||||
max: 1600
|
||||
min: 900
|
||||
model_count: 1
|
||||
source: design-arena
|
||||
source_url: https://www.designarena.ai
|
||||
version: v1
|
||||
schema:
|
||||
$ref: '#/components/schemas/BenchmarksDAResponse'
|
||||
description: Design Arena ELO rankings with pricing and attribution metadata.
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 400
|
||||
message: Invalid request parameters
|
||||
schema:
|
||||
$ref: '#/components/schemas/BadRequestResponse'
|
||||
description: Bad Request - Invalid request parameters or malformed input
|
||||
'401':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 401
|
||||
message: Missing Authentication header
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
description: Unauthorized - Authentication required or invalid credentials
|
||||
'429':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 429
|
||||
message: Rate limit exceeded
|
||||
schema:
|
||||
$ref: '#/components/schemas/TooManyRequestsResponse'
|
||||
description: Too Many Requests - Rate limit exceeded
|
||||
'500':
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
error:
|
||||
code: 500
|
||||
message: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
description: Internal Server Error - Unexpected server error
|
||||
summary: Design Arena Benchmark Rankings
|
||||
tags:
|
||||
- Datasets
|
||||
/datasets/rankings-daily:
|
||||
get:
|
||||
description: |-
|
||||
@@ -32775,6 +32618,8 @@ tags:
|
||||
name: Anthropic Messages
|
||||
- description: BYOK endpoints
|
||||
name: BYOK
|
||||
- description: Benchmarks endpoints
|
||||
name: Benchmarks
|
||||
- description: Chat completion endpoints
|
||||
name: Chat
|
||||
- description: Credit management endpoints
|
||||
|
||||
@@ -12151,15 +12151,6 @@ components:
|
||||
image: '0'
|
||||
prompt: '0.00003'
|
||||
request: '0'
|
||||
reasoning:
|
||||
default_effort: medium
|
||||
default_enabled: true
|
||||
mandatory: false
|
||||
supported_efforts:
|
||||
- high
|
||||
- medium
|
||||
- low
|
||||
- minimal
|
||||
supported_parameters:
|
||||
- temperature
|
||||
- top_p
|
||||
@@ -12222,8 +12213,6 @@ components:
|
||||
$ref: '#/components/schemas/PerRequestLimits'
|
||||
pricing:
|
||||
$ref: '#/components/schemas/PublicPricing'
|
||||
reasoning:
|
||||
$ref: '#/components/schemas/ModelReasoning'
|
||||
supported_parameters:
|
||||
description: List of supported parameters for this model
|
||||
items:
|
||||
@@ -12388,43 +12377,6 @@ components:
|
||||
description: Model to use for completion
|
||||
example: openai/gpt-4
|
||||
type: string
|
||||
ModelReasoning:
|
||||
description: Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models.
|
||||
example:
|
||||
default_effort: medium
|
||||
default_enabled: true
|
||||
mandatory: false
|
||||
supported_efforts:
|
||||
- high
|
||||
- medium
|
||||
- low
|
||||
- minimal
|
||||
properties:
|
||||
default_effort:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ReasoningEffort'
|
||||
- description: >-
|
||||
Default reasoning effort when the client enables reasoning without specifying effort. Maps to `reasoning.effort` in chat requests. When `"none"`, prefer omitting effort unless the user explicitly disables reasoning.
|
||||
default_enabled:
|
||||
description: Default reasoning enabled state when the client does not set `reasoning.enabled`.
|
||||
type: boolean
|
||||
mandatory:
|
||||
description: When true, reasoning cannot be disabled and effort "none" is rejected.
|
||||
type: boolean
|
||||
supported_efforts:
|
||||
description: >-
|
||||
Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted.
|
||||
items:
|
||||
$ref: '#/components/schemas/ReasoningEffort'
|
||||
nullable: true
|
||||
type: array
|
||||
supports_max_tokens:
|
||||
description: >-
|
||||
Present and `true` when the model accepts `reasoning.max_tokens` in requests (Anthropic-style) instead of or in addition to `reasoning.effort`. Omitted otherwise.
|
||||
type: boolean
|
||||
required:
|
||||
- mandatory
|
||||
type: object
|
||||
ModelResponse:
|
||||
description: Single model response
|
||||
example:
|
||||
@@ -28773,7 +28725,7 @@ paths:
|
||||
id: openai/gpt-4
|
||||
knowledge_cutoff: null
|
||||
links:
|
||||
details: /api/v1/models/openai/gpt-4/endpoints
|
||||
details: /api/v1/models/openai/gpt-5.4/endpoints
|
||||
name: GPT-4
|
||||
per_request_limits: null
|
||||
pricing:
|
||||
|
||||
@@ -2,20 +2,20 @@ speakeasyVersion: 1.680.0
|
||||
sources:
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:b28471bf9c3ac9b7d9b816a09bfb5b5c58d98db2d82dbc971d64f5aa980f4e10
|
||||
sourceBlobDigest: sha256:8d445ea792f56fb2ebeb3f418757e6404802be1c21ab50520c66d10871bb960a
|
||||
sourceRevisionDigest: sha256:716ece4a1211eac2ee0e7e5836c7b484cff9bb002bd4e676d9ecad8317ee7941
|
||||
sourceBlobDigest: sha256:12d3dc8e7150ab2c4c5e3d613b01cb5e4dcce52b329eea89ca1fdc656d6fe045
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1781726096
|
||||
- speakeasy-sdk-regen-1781312282
|
||||
- 1.0.0
|
||||
targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:b28471bf9c3ac9b7d9b816a09bfb5b5c58d98db2d82dbc971d64f5aa980f4e10
|
||||
sourceBlobDigest: sha256:8d445ea792f56fb2ebeb3f418757e6404802be1c21ab50520c66d10871bb960a
|
||||
sourceRevisionDigest: sha256:716ece4a1211eac2ee0e7e5836c7b484cff9bb002bd4e676d9ecad8317ee7941
|
||||
sourceBlobDigest: sha256:12d3dc8e7150ab2c4c5e3d613b01cb5e4dcce52b329eea89ca1fdc656d6fe045
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:0bb2447eb2e776cdc9347c290ddcde4be0b9f9ded69c93e5b29231e2c54c3e5f
|
||||
codeSamplesRevisionDigest: sha256:e7d6f4de48a7c63cf15f3a8378f952277cd4c59373c28c61909497853fa769e2
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
|
||||
+1
-11
@@ -28,14 +28,4 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.10.0] .
|
||||
### Releases
|
||||
- [PyPI v0.10.0] https://pypi.org/project/openrouter/0.10.0 - .
|
||||
|
||||
## 2026-06-18 00:58:22
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.10.1] .
|
||||
### Releases
|
||||
- [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - .
|
||||
- [PyPI v0.10.0] https://pypi.org/project/openrouter/0.10.0 - .
|
||||
@@ -22,7 +22,6 @@ Information about an AI model available on OpenRouter
|
||||
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
|
||||
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"completion_tokens": 1000,<br/>"prompt_tokens": 1000<br/>} |
|
||||
| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>} |
|
||||
| `reasoning` | [Optional[components.ModelReasoning]](../components/modelreasoning.md) | :heavy_minus_sign: | Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. | {<br/>"default_effort": "medium",<br/>"default_enabled": true,<br/>"mandatory": false,<br/>"supported_efforts": [<br/>"high",<br/>"medium",<br/>"low",<br/>"minimal"<br/>]<br/>} |
|
||||
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
|
||||
| `supported_voices` | List[*str*] | :heavy_check_mark: | List of supported voice identifiers for TTS models. Null for non-TTS models. | <nil> |
|
||||
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>} |
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "openrouter"
|
||||
version = "0.10.1"
|
||||
version = "0.10.0"
|
||||
description = "Official Python Client SDK for OpenRouter."
|
||||
authors = [{ name = "OpenRouter" },]
|
||||
readme = "README-PYPI.md"
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.10.1"
|
||||
__version__: str = "0.10.0"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.788.4"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.10.1 2.788.4 1.0.0 openrouter"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.10.0 2.788.4 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -1436,7 +1436,6 @@ if TYPE_CHECKING:
|
||||
from .modelbenchmarks import ModelBenchmarks, ModelBenchmarksTypedDict
|
||||
from .modelgroup import ModelGroup
|
||||
from .modellinks import ModelLinks, ModelLinksTypedDict
|
||||
from .modelreasoning import DefaultEffort, ModelReasoning, ModelReasoningTypedDict
|
||||
from .modelresponse import ModelResponse, ModelResponseTypedDict
|
||||
from .modelscountresponse import (
|
||||
ModelsCountResponse,
|
||||
@@ -3077,7 +3076,6 @@ __all__ = [
|
||||
"DatetimeServerToolConfigTypedDict",
|
||||
"DatetimeServerToolType",
|
||||
"DatetimeServerToolTypedDict",
|
||||
"DefaultEffort",
|
||||
"DefaultParameters",
|
||||
"DefaultParametersTypedDict",
|
||||
"DeleteBYOKKeyResponse",
|
||||
@@ -3520,8 +3518,6 @@ __all__ = [
|
||||
"ModelGroup",
|
||||
"ModelLinks",
|
||||
"ModelLinksTypedDict",
|
||||
"ModelReasoning",
|
||||
"ModelReasoningTypedDict",
|
||||
"ModelResponse",
|
||||
"ModelResponseTypedDict",
|
||||
"ModelTypedDict",
|
||||
@@ -5463,9 +5459,6 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ModelGroup": ".modelgroup",
|
||||
"ModelLinks": ".modellinks",
|
||||
"ModelLinksTypedDict": ".modellinks",
|
||||
"DefaultEffort": ".modelreasoning",
|
||||
"ModelReasoning": ".modelreasoning",
|
||||
"ModelReasoningTypedDict": ".modelreasoning",
|
||||
"ModelResponse": ".modelresponse",
|
||||
"ModelResponseTypedDict": ".modelresponse",
|
||||
"ModelsCountResponse": ".modelscountresponse",
|
||||
|
||||
@@ -5,7 +5,6 @@ from .defaultparameters import DefaultParameters, DefaultParametersTypedDict
|
||||
from .modelarchitecture import ModelArchitecture, ModelArchitectureTypedDict
|
||||
from .modelbenchmarks import ModelBenchmarks, ModelBenchmarksTypedDict
|
||||
from .modellinks import ModelLinks, ModelLinksTypedDict
|
||||
from .modelreasoning import ModelReasoning, ModelReasoningTypedDict
|
||||
from .parameter import Parameter
|
||||
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
|
||||
from .publicpricing import PublicPricing, PublicPricingTypedDict
|
||||
@@ -63,8 +62,6 @@ class ModelTypedDict(TypedDict):
|
||||
r"""Hugging Face model identifier, if applicable"""
|
||||
knowledge_cutoff: NotRequired[Nullable[str]]
|
||||
r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
|
||||
reasoning: NotRequired[ModelReasoningTypedDict]
|
||||
r"""Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models."""
|
||||
|
||||
|
||||
class Model(BaseModel):
|
||||
@@ -126,9 +123,6 @@ class Model(BaseModel):
|
||||
knowledge_cutoff: OptionalNullable[str] = UNSET
|
||||
r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
|
||||
|
||||
reasoning: Optional[ModelReasoning] = None
|
||||
r"""Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = [
|
||||
@@ -137,7 +131,6 @@ class Model(BaseModel):
|
||||
"expiration_date",
|
||||
"hugging_face_id",
|
||||
"knowledge_cutoff",
|
||||
"reasoning",
|
||||
]
|
||||
nullable_fields = [
|
||||
"context_length",
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .reasoningeffort import ReasoningEffort
|
||||
from openrouter.types import (
|
||||
BaseModel,
|
||||
Nullable,
|
||||
OptionalNullable,
|
||||
UNSET,
|
||||
UNSET_SENTINEL,
|
||||
UnrecognizedStr,
|
||||
)
|
||||
from openrouter.utils import validate_open_enum
|
||||
from pydantic import model_serializer
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import List, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
DefaultEffort = Union[
|
||||
Literal[
|
||||
"xhigh",
|
||||
"high",
|
||||
"medium",
|
||||
"low",
|
||||
"minimal",
|
||||
"none",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Default reasoning effort when the client enables reasoning without specifying effort. Maps to `reasoning.effort` in chat requests. When `\"none\"`, prefer omitting effort unless the user explicitly disables reasoning."""
|
||||
|
||||
|
||||
class ModelReasoningTypedDict(TypedDict):
|
||||
r"""Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models."""
|
||||
|
||||
mandatory: bool
|
||||
r"""When true, reasoning cannot be disabled and effort \"none\" is rejected."""
|
||||
default_effort: NotRequired[Nullable[DefaultEffort]]
|
||||
default_enabled: NotRequired[bool]
|
||||
r"""Default reasoning enabled state when the client does not set `reasoning.enabled`."""
|
||||
supported_efforts: NotRequired[Nullable[List[Nullable[ReasoningEffort]]]]
|
||||
r"""Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted."""
|
||||
supports_max_tokens: NotRequired[bool]
|
||||
r"""Present and `true` when the model accepts `reasoning.max_tokens` in requests (Anthropic-style) instead of or in addition to `reasoning.effort`. Omitted otherwise."""
|
||||
|
||||
|
||||
class ModelReasoning(BaseModel):
|
||||
r"""Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models."""
|
||||
|
||||
mandatory: bool
|
||||
r"""When true, reasoning cannot be disabled and effort \"none\" is rejected."""
|
||||
|
||||
default_effort: Annotated[
|
||||
OptionalNullable[DefaultEffort], PlainValidator(validate_open_enum(False))
|
||||
] = UNSET
|
||||
|
||||
default_enabled: Optional[bool] = None
|
||||
r"""Default reasoning enabled state when the client does not set `reasoning.enabled`."""
|
||||
|
||||
supported_efforts: OptionalNullable[
|
||||
List[
|
||||
Annotated[
|
||||
Nullable[ReasoningEffort], PlainValidator(validate_open_enum(False))
|
||||
]
|
||||
]
|
||||
] = UNSET
|
||||
r"""Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted."""
|
||||
|
||||
supports_max_tokens: Optional[bool] = None
|
||||
r"""Present and `true` when the model accepts `reasoning.max_tokens` in requests (Anthropic-style) instead of or in addition to `reasoning.effort`. Omitted otherwise."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = [
|
||||
"default_effort",
|
||||
"default_enabled",
|
||||
"supported_efforts",
|
||||
"supports_max_tokens",
|
||||
]
|
||||
nullable_fields = ["default_effort", "supported_efforts"]
|
||||
null_default_fields = []
|
||||
|
||||
serialized = handler(self)
|
||||
|
||||
m = {}
|
||||
|
||||
for n, f in type(self).model_fields.items():
|
||||
k = f.alias or n
|
||||
val = serialized.get(k)
|
||||
serialized.pop(k, None)
|
||||
|
||||
optional_nullable = k in optional_fields and k in nullable_fields
|
||||
is_set = (
|
||||
self.__pydantic_fields_set__.intersection({n})
|
||||
or k in null_default_fields
|
||||
) # pylint: disable=no-member
|
||||
|
||||
if val is not None and val != UNSET_SENTINEL:
|
||||
m[k] = val
|
||||
elif val != UNSET_SENTINEL and (
|
||||
not k in optional_fields or (optional_nullable and is_set)
|
||||
):
|
||||
m[k] = val
|
||||
|
||||
return m
|
||||
Reference in New Issue
Block a user