diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index be414da6..f5070b56 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: b4c802a90b9a216deeaff44a52c2357a
+ docChecksum: 8c6c755a832cf81f0e52bec68a043505
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.1.45
- configChecksum: 7ca5bb9842bd6cb37efcb3bbaa5b1855
+ releaseVersion: 1.1.46
+ configChecksum: 1e329bd0661c5ce4441af4fac2a32e66
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: b03c4396-b2bc-48aa-86c6-98130db36529
- pristine_commit_hash: fff7fca5c6ba772a88e7b2a29634d67a5e098a26
- pristine_tree_hash: cc67c4656f2f0e02d468801620f418c4922f4adf
+ generation_id: e0fdf525-30a7-4295-a44e-8ad7897e3e87
+ pristine_commit_hash: 4491767147bb4a43c2fea15b23e0bb7a1e757ca5
+ pristine_tree_hash: 94c6df7a499ada1e321cd4e1b95a7253da96cd45
features:
python:
acceptHeaders: 3.0.0
@@ -638,8 +638,8 @@ trackedFiles:
pristine_git_object: 08cc35c0a08268f89507a8e05432b7c3a075d3b2
docs/components/apprankingsresponse.mdx:
id: a88c9a36c7ae
- last_write_checksum: sha1:d6e4d441acee693ade65d6c24bc94884d6305ac8
- pristine_git_object: 06ea87da92af18eb4cef9c2ea501ff57045e121f
+ last_write_checksum: sha1:03c0a38db6a3899ca82b34f87a3ba3724aac8ade
+ pristine_git_object: dd7310f00814cd4c49e32be330683a25fe23a711
docs/components/architecture.mdx:
id: 2092a26b770f
last_write_checksum: sha1:24138ca8d82a454360a8a7cfc058bc00dc14d4c3
@@ -4374,16 +4374,16 @@ trackedFiles:
pristine_git_object: b2e760295879653eb491f6b171ad5f2399b3e1e0
docs/components/rankingsdailymeta.mdx:
id: d6d04480acfd
- last_write_checksum: sha1:53f7947281343750c6a014c66887c583d0186248
- pristine_git_object: cdc00fcf749f1108164269a8db7ad76b5d623a46
+ last_write_checksum: sha1:fdeb0922d0bc90bb0609c157c1e2d18a9450f589
+ pristine_git_object: de87408be59c7a67a16c78eebca9aa3c2867abca
docs/components/rankingsdailymetaversion.mdx:
id: 1de73fde8cce
last_write_checksum: sha1:990f056c1ab068eddecea25d1e8b54d4e27d5e02
pristine_git_object: 274452757b0df087a5fca9c903df92ca7d59eb9a
docs/components/rankingsdailyresponse.mdx:
id: eaa8d80ab494
- last_write_checksum: sha1:01550caa8b17d53d661fb8eec86f7dd6536f3e2a
- pristine_git_object: 13cf299dbc8c505fbc8e691add26341779a692af
+ last_write_checksum: sha1:aa9ee8b3680fc576b4b295e8f46798ef61bedffe
+ pristine_git_object: ff97dff4ba45e4a271b653e7722fca01e78af328
docs/components/reason.mdx:
id: 0c3e75430162
last_write_checksum: sha1:d46f2a9cba528c56bafb3150b3debcb7a138c2d8
@@ -6242,8 +6242,8 @@ trackedFiles:
pristine_git_object: fb3afc125353560dfa1cb2fafa8faeff795d2f41
docs/operations/getapprankingsresponse.mdx:
id: 78ec0c166748
- last_write_checksum: sha1:76d20b72282d029ef416eb608a3e63c176d09364
- pristine_git_object: 8353352de1664ea1c2e14ef7350ddc487dc796e2
+ last_write_checksum: sha1:349b68babafad0f3fbd91756358dca46a861c4d6
+ pristine_git_object: 4d8e0195d1114c0c6f7b86e36a6ba0af3b3efa79
docs/operations/getapprankingssort.mdx:
id: 4d4c5fa80b4c
last_write_checksum: sha1:f32d425d8631ebfeb88abcb8f7e3a80e2559e51e
@@ -7198,8 +7198,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:c0690cb780257bb8812899d9164ad0ad80eb186a
- pristine_git_object: 975fb5a58ae9ffc5ac42c92c5000484ca535fe39
+ last_write_checksum: sha1:b232ad5a7b04b39c5fd67426f9efe328e4457d4e
+ pristine_git_object: 39b709c31305e7606840039b7a9fc552ed300bed
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7226,8 +7226,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:5258379a3f8f8ab4a170e1a1eebca76f22071757
- pristine_git_object: ad84bcae12afe6d5fa7d04d77a6b71180dd4b275
+ last_write_checksum: sha1:822c2ddae35878f8e420bb1f4d76571cc566351c
+ pristine_git_object: 23d6f3f71a975e3fcdf8d95603e9ac76576e4ed1
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a
@@ -11261,7 +11261,7 @@ examples:
offset: 0
responses:
"200":
- application/json: {"data": [{"app_id": 12345, "app_name": "Cline", "rank": 1, "total_requests": 4321, "total_tokens": "12345678"}, {"app_id": 67890, "app_name": "Roo Code", "rank": 2, "total_requests": 2109, "total_tokens": "9876543"}], "meta": {"as_of": "2026-05-12T02:00:00Z", "end_date": "2026-05-11", "start_date": "2026-04-12", "version": "v1"}}
+ application/json: {"data": [{"app_id": 12345, "app_name": "Cline", "rank": 1, "total_requests": 4321, "total_tokens": "12345678"}, {"app_id": 67890, "app_name": "Roo Code", "rank": 2, "total_requests": 2109, "total_tokens": "9876543"}], "meta": {"as_of": "2026-05-12T02:00:00.000Z", "end_date": "2026-05-11", "start_date": "2026-04-12", "version": "v1"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -11274,7 +11274,7 @@ examples:
speakeasy-default-get-rankings-daily:
responses:
"200":
- application/json: {"data": [{"date": "2026-05-11", "model_permaslug": "openai/gpt-4o-2024-05-13", "total_tokens": "12345678"}, {"date": "2026-05-11", "model_permaslug": "anthropic/claude-3.5-sonnet-20241022", "total_tokens": "9876543"}], "meta": {"as_of": "2026-05-12T02:00:00Z", "end_date": "2026-05-11", "start_date": "2026-04-12", "version": "v1"}}
+ application/json: {"data": [{"date": "2026-05-11", "model_permaslug": "openai/gpt-4o-2024-05-13", "total_tokens": "12345678"}, {"date": "2026-05-11", "model_permaslug": "anthropic/claude-3.5-sonnet-20241022", "total_tokens": "9876543"}], "meta": {"as_of": "2026-05-12T02:00:00.000Z", "end_date": "2026-05-11", "start_date": "2026-04-12", "version": "v1"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -12082,6 +12082,3 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
-releaseNotes: |
- ## Python SDK Changes:
- * `open_router.generations.list_generation_content()`: `response.data.error` **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 61ef256d..d5989722 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.1.45
+ version: 1.1.46
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 631ba9a4..86bf5a7c 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -2952,7 +2952,7 @@ components:
total_requests: 2109
total_tokens: '9876543'
meta:
- as_of: '2026-05-12T02:00:00Z'
+ as_of: '2026-05-12T02:00:00.000Z'
end_date: '2026-05-11'
start_date: '2026-04-12'
version: 'v1'
@@ -21551,14 +21551,14 @@ components:
type: 'object'
RankingsDailyMeta:
example:
- as_of: '2026-05-12T02:00:00Z'
+ as_of: '2026-05-12T02:00:00.000Z'
end_date: '2026-05-11'
start_date: '2026-04-12'
version: 'v1'
properties:
as_of:
description: 'ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events.'
- example: '2026-05-12T02:00:00Z'
+ example: '2026-05-12T02:00:00.000Z'
type: 'string'
end_date:
description: 'Resolved end of the date window (UTC, inclusive).'
@@ -21589,7 +21589,7 @@ components:
model_permaslug: 'anthropic/claude-3.5-sonnet-20241022'
total_tokens: '9876543'
meta:
- as_of: '2026-05-12T02:00:00Z'
+ as_of: '2026-05-12T02:00:00.000Z'
end_date: '2026-05-11'
start_date: '2026-04-12'
version: 'v1'
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 7e82c90b..7ba91dfa 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:816e23f17fb6ac302f7a907e82281ed5dea91a00943de092bc90062ddc764970
- sourceBlobDigest: sha256:fb2a15f75e22611c599bd706978add5c56a2a3cfe767e28b50cf87f027f803be
+ sourceRevisionDigest: sha256:b1702858e7f6f50ce70f909d829820ffe5f841e3f76fb7605734683e12bde594
+ sourceBlobDigest: sha256:f266c94b4b092838e05ecb0a6f5fa3c88827911376d83e6f6afd52316aa8a1a6
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:816e23f17fb6ac302f7a907e82281ed5dea91a00943de092bc90062ddc764970
- sourceBlobDigest: sha256:fb2a15f75e22611c599bd706978add5c56a2a3cfe767e28b50cf87f027f803be
+ sourceRevisionDigest: sha256:b1702858e7f6f50ce70f909d829820ffe5f841e3f76fb7605734683e12bde594
+ sourceBlobDigest: sha256:f266c94b4b092838e05ecb0a6f5fa3c88827911376d83e6f6afd52316aa8a1a6
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:8ae3982d471f05e246e090e902923ef9c0b30e8adfc19eae33176cefa37fe19b
+ codeSamplesRevisionDigest: sha256:40a6fe64ff133720f666fcd9a1748ab7f40638b9afbb8e5fb0d225a64bddd41f
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 570be75c..dfa2b89c 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1239,4 +1239,14 @@ Based on:
### Generated
- [python v1.1.45] .
### Releases
-- [PyPI v1.1.45] https://pypi.org/project/openrouter/1.1.45 - .
\ No newline at end of file
+- [PyPI v1.1.45] https://pypi.org/project/openrouter/1.1.45 - .
+
+## 2026-08-11 19:08:15
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.1.46] .
+### Releases
+- [PyPI v1.1.46] https://pypi.org/project/openrouter/1.1.46 - .
\ No newline at end of file
diff --git a/docs/components/apprankingsresponse.mdx b/docs/components/apprankingsresponse.mdx
index 06ea87da..dd7310f0 100644
--- a/docs/components/apprankingsresponse.mdx
+++ b/docs/components/apprankingsresponse.mdx
@@ -7,4 +7,4 @@ title: "AppRankingsResponse"
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `data` | List[[components.AppRankingsItem](../components/apprankingsitem.mdx)] | :heavy_check_mark: | Apps ranked per the requested `sort`, re-numbered 1..N after category filtering. `popular` sorts by `total_tokens` descending; `trending` sorts by absolute excess token growth descending and may return fewer than `limit` rows when few apps are growing. | |
-| `meta` | [components.RankingsDailyMeta](../components/rankingsdailymeta.mdx) | :heavy_check_mark: | N/A | \{
"as_of": "2026-05-12T02:00:00Z",
"end_date": "2026-05-11",
"start_date": "2026-04-12",
"version": "v1"
} |
\ No newline at end of file
+| `meta` | [components.RankingsDailyMeta](../components/rankingsdailymeta.mdx) | :heavy_check_mark: | N/A | \{
"as_of": "2026-05-12T02:00:00.000Z",
"end_date": "2026-05-11",
"start_date": "2026-04-12",
"version": "v1"
} |
\ No newline at end of file
diff --git a/docs/components/rankingsdailymeta.mdx b/docs/components/rankingsdailymeta.mdx
index cdc00fcf..de87408b 100644
--- a/docs/components/rankingsdailymeta.mdx
+++ b/docs/components/rankingsdailymeta.mdx
@@ -6,7 +6,7 @@ title: "RankingsDailyMeta"
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `as_of` | *str* | :heavy_check_mark: | ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events. | 2026-05-12T02:00:00Z |
+| `as_of` | *str* | :heavy_check_mark: | ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events. | 2026-05-12T02:00:00.000Z |
| `end_date` | *str* | :heavy_check_mark: | Resolved end of the date window (UTC, inclusive). | 2026-05-11 |
| `start_date` | *str* | :heavy_check_mark: | Resolved start of the date window (UTC, inclusive). | 2026-04-12 |
| `version` | [components.RankingsDailyMetaVersion](../components/rankingsdailymetaversion.mdx) | :heavy_check_mark: | Dataset version. Field names and grain are stable for the life of `v1`. | |
\ No newline at end of file
diff --git a/docs/components/rankingsdailyresponse.mdx b/docs/components/rankingsdailyresponse.mdx
index 13cf299d..ff97dff4 100644
--- a/docs/components/rankingsdailyresponse.mdx
+++ b/docs/components/rankingsdailyresponse.mdx
@@ -7,4 +7,4 @@ title: "RankingsDailyResponse"
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | List[[components.RankingsDailyItem](../components/rankingsdailyitem.mdx)] | :heavy_check_mark: | Up to 51 rows per day — the top 50 public models by `total_tokens` for each UTC calendar date in the window, plus one aggregated `other` row summing every model outside that top 50 (omitted when the long tail is empty). Rows are sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date. Ties between real models break alphabetically on `model_permaslug` so the order is stable across requests. | |
-| `meta` | [components.RankingsDailyMeta](../components/rankingsdailymeta.mdx) | :heavy_check_mark: | N/A | \{
"as_of": "2026-05-12T02:00:00Z",
"end_date": "2026-05-11",
"start_date": "2026-04-12",
"version": "v1"
} |
\ No newline at end of file
+| `meta` | [components.RankingsDailyMeta](../components/rankingsdailymeta.mdx) | :heavy_check_mark: | N/A | \{
"as_of": "2026-05-12T02:00:00.000Z",
"end_date": "2026-05-11",
"start_date": "2026-04-12",
"version": "v1"
} |
\ No newline at end of file
diff --git a/docs/operations/getapprankingsresponse.mdx b/docs/operations/getapprankingsresponse.mdx
index 8353352d..4d8e0195 100644
--- a/docs/operations/getapprankingsresponse.mdx
+++ b/docs/operations/getapprankingsresponse.mdx
@@ -4,6 +4,6 @@ title: "GetAppRankingsResponse"
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `result` | [components.AppRankingsResponse](../components/apprankingsresponse.mdx) | :heavy_check_mark: | N/A | \{
"data": [
\{
"app_id": 12345,
"app_name": "Cline",
"rank": 1,
"total_requests": 4321,
"total_tokens": "12345678"
},
\{
"app_id": 67890,
"app_name": "Roo Code",
"rank": 2,
"total_requests": 2109,
"total_tokens": "9876543"
}
],
"meta": \{
"as_of": "2026-05-12T02:00:00Z",
"end_date": "2026-05-11",
"start_date": "2026-04-12",
"version": "v1"
}
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.AppRankingsResponse](../components/apprankingsresponse.mdx) | :heavy_check_mark: | N/A | \{
"data": [
\{
"app_id": 12345,
"app_name": "Cline",
"rank": 1,
"total_requests": 4321,
"total_tokens": "12345678"
},
\{
"app_id": 67890,
"app_name": "Roo Code",
"rank": 2,
"total_requests": 2109,
"total_tokens": "9876543"
}
],
"meta": \{
"as_of": "2026-05-12T02:00:00.000Z",
"end_date": "2026-05-11",
"start_date": "2026-04-12",
"version": "v1"
}
} |
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 975fb5a5..39b709c3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.1.45"
+version = "1.1.46"
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 ad84bcae..23d6f3f7 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "1.1.45"
+__version__: str = "1.1.46"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.1.45 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.1.46 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/uv.lock b/uv.lock
index fa6c0c97..f40854eb 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.1.45"
+version = "1.1.46"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },