From 85fe8e61bf86aedf9502e67632cebd1657bb2866 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 25 Jun 2026 22:30:42 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.680.0 --- .speakeasy/gen.lock | 45 +++-- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 161 +++++++----------- .speakeasy/workflow.lock | 12 +- RELEASES.md | 12 +- docs/components/pricing.md | 32 ++-- docs/components/publicpricing.md | 32 ++-- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- .../components/providerpreferences.py | 12 +- src/openrouter/components/publicendpoint.py | 28 +++ src/openrouter/components/publicpricing.py | 28 +++ uv.lock | 2 +- 13 files changed, 208 insertions(+), 164 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5a7bc7e5..04626d99 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: 277b2709d437113b43fcdc406e3c4442 + docChecksum: e1b90a6bfd6ac5ba387e90d8bde5c5da docVersion: 1.0.0 speakeasyVersion: 1.680.0 generationVersion: 2.788.4 - releaseVersion: 0.10.1 - configChecksum: b1687c127d87a1ac114b35dd9b492f3c + releaseVersion: 0.10.2 + configChecksum: 673c177f4ade5ed7081f80e54b377efb repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 7445f129-ecfe-4ff4-b54d-4f9e27c9bb12 - pristine_commit_hash: 24e0fd81404ca9b9cd9afc377950218983fd639b - pristine_tree_hash: ab5a87f29d3595a758a09c58a6074bd453723e21 + generation_id: 0dfeefb4-3077-4ada-9493-b1c27db7302b + pristine_commit_hash: eaff66d4cff11e0b7fad3b3a37a4b91124c2443e + pristine_tree_hash: a917f83ab81dc35cd911b68dd0004e00797a509f features: python: acceptHeaders: 3.0.0 @@ -2526,8 +2526,8 @@ trackedFiles: pristine_git_object: cc928f671dcbde0ebe7ef10cef976333fa35cd68 docs/components/maxprice.md: id: 15ed956070c8 - last_write_checksum: sha1:a6b154896d64cb9feac8742b812bf40951867375 - pristine_git_object: b932c8f3988960414d7cd0f2ac795f1cc3b58884 + last_write_checksum: sha1:dcd7d78e509fde879074c55d18f52f244cd6bb35 + pristine_git_object: fdbe77b802746a777199ba4780a1f2981cc3f7c8 docs/components/mcpapprovalrequestitem.md: id: 0d3537b2e5c8 last_write_checksum: sha1:d2c00357d59374eee2845918d50ab5125d9583be @@ -3750,8 +3750,8 @@ trackedFiles: pristine_git_object: 685705c19f968d6408d3bfc3d398eddb2ef5e52a docs/components/pricing.md: id: 15dca753d9eb - last_write_checksum: sha1:11793d86b7506e8bfee21225071f1841bbb368ab - pristine_git_object: 084b83a2e83521084ef17c63e88007953e5d3170 + last_write_checksum: sha1:92a5a42a7f29a05c1921015aa66655376e70bc2b + pristine_git_object: f17583ae89f52fb3d7dadad5c0bc45c7a3f9c024 docs/components/promptinjectionscanscope.md: id: 285ea7802dcd last_write_checksum: sha1:0fff83f064f6699f5a86c5068423c646a9fca69e @@ -3798,8 +3798,8 @@ trackedFiles: pristine_git_object: 7d0edd22dafe693920f18e0c0c99b852c6b3bb57 docs/components/publicpricing.md: id: 9d43651da8ad - last_write_checksum: sha1:c066038e95bcbaec6cb1eeb3b5657102c37ee5a7 - pristine_git_object: b96d4af729e9e69d041122e88b11e82cd2db8878 + last_write_checksum: sha1:13014946ed9c08e7c36a2681efb896bedf068982 + pristine_git_object: 9a1cecc7d832d812bef93c49a9340c29cf4e816b docs/components/quantization.md: id: 0d17b4a78828 last_write_checksum: sha1:992ee3fdd0f4e09c9f6e6426c413841fe34a86a5 @@ -6338,8 +6338,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:8223abd8e7463dfa2b2c1097670bb28b2ec73e68 - pristine_git_object: b98c0280ffbb42638747b1064375fa36f467223c + last_write_checksum: sha1:4733c52f40b0a81f99ce289daf116a14cf25a2d6 + pristine_git_object: 80031d573d26edca6e5993a5df7e5c451257f494 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -6366,8 +6366,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:f4418a5cd8b01a66275a34ce883bde034a374b6f + pristine_git_object: e430f99bd620087545d621221f2edb100d471289 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35 @@ -7978,8 +7978,8 @@ trackedFiles: pristine_git_object: f3d7756851495a1f1cdbf62fd62d20ff0ea07bf8 src/openrouter/components/providerpreferences.py: id: cdd58c8d664d - last_write_checksum: sha1:6b45aaae052bcf64980242ec344fe385de94ebd3 - pristine_git_object: 5145815e6196470f3f5f24893afdc4415d27c53e + last_write_checksum: sha1:f3d54af0f02fd2ae3f2fd0aba05c77419f79562a + pristine_git_object: ce5d942a25ef1bda1af7d40e5c98418550fb34a3 src/openrouter/components/providerresponse.py: id: ad3887be54c5 last_write_checksum: sha1:17b2491e58fea36851d21b85298a3480d98b9c37 @@ -7994,12 +7994,12 @@ trackedFiles: pristine_git_object: 4e1073b4e3c10943c7035376f9984cd6559653a2 src/openrouter/components/publicendpoint.py: id: 848aa2ef9129 - last_write_checksum: sha1:a268ea8595c25267ae05b3a2ab9bc452b064c33f - pristine_git_object: 6761c9129979d95e6f44c955e77a2d412bf0eb1b + last_write_checksum: sha1:f47947e66b99be6c16bc081af2070cd7d6c7c0f3 + pristine_git_object: 7291ca05ec0df5d1d50be060b6c0298a1a2ec45e src/openrouter/components/publicpricing.py: id: 96d115d83cc5 - last_write_checksum: sha1:ccec3f6d6b07186a612c23561f2bbe6ecfd6839f - pristine_git_object: 42a29282d09996796b9e981b96a2772d08eea28c + last_write_checksum: sha1:0b8d39c8f1fda9cbc932a390d89e93b87105f35e + pristine_git_object: 8ee0045ca6378f37b87715e3bf39148a7a8f0ed4 src/openrouter/components/quantization.py: id: bde317b3d703 last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d @@ -10559,4 +10559,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n* `open_router.tts.create_speech()`: \n * `request.provider.options` **Changed**\n* `open_router.chat.send()`: `response` **Changed**\n* `open_router.images.list_models()`: **Added**\n* `open_router.images.list_model_endpoints()`: **Added**\n* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Deleted** **Breaking** :warning:\n* `open_router.datasets.get_benchmarks_design_arena()`: **Deleted** **Breaking** :warning:\n* `open_router.classifications.get_task_classifications()`: **Added**\n* `open_router.benchmarks.get_benchmarks()`: **Added**\n* `open_router.images.generate()`: **Added**\n* `open_router.stt.create_transcription()`: \n * `request.provider.options` **Changed**\n* `open_router.byok.list()`: `request.provider` **Changed**\n* `open_router.embeddings.generate()`: `response.usage` **Changed**\n* `open_router.embeddings.list_models()`: `response.data.[].reasoning` **Added**\n* `open_router.models.get()`: `response.data.reasoning` **Added**\n* `open_router.models.list()`: \n * `request.sort` **Changed**\n * `response.data.[].reasoning` **Added**\n* `open_router.models.list_for_user()`: `response.data.[].reasoning` **Added**\n* `open_router.presets.create_presets_responses()`: `request` **Changed**\n* `open_router.video_generation.generate()`: \n * `request.provider.options` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index dec9772a..25fc57f0 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true python: - version: 0.10.1 + version: 0.10.2 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index c9374d06..e74b2ec4 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -3676,10 +3676,6 @@ components: oneOf: - $ref: '#/components/schemas/ContainerAutoEnvironment' - $ref: '#/components/schemas/ContainerReferenceEnvironment' - BigNumberUnion: - description: Price per million prompt tokens - example: 1000 - type: string BooleanCapability: description: A supported-or-not flag. Present means the parameter is accepted. example: @@ -18433,23 +18429,20 @@ components: The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. properties: audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per audio unit + description: Maximum price in USD per audio unit + type: string completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per million completion tokens + description: Maximum price in USD per million completion tokens + type: string image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per image + description: Maximum price in USD per image + type: string prompt: - $ref: '#/components/schemas/BigNumberUnion' + description: Maximum price in USD per million prompt tokens + type: string request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per request + description: Maximum price in USD per request + type: string type: object only: description: >- @@ -18768,60 +18761,49 @@ components: pricing: properties: audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per audio input token + type: string audio_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per audio output token + type: string completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per token for completion (output) generation + type: string discount: + description: >- + Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) format: double type: number image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per input image + type: string image_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per output image + type: string image_token: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per image token + type: string input_audio_cache: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per cached audio input token + type: string input_cache_read: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per cached input token (read) + type: string input_cache_write: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per cached input token (write) + type: string internal_reasoning: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per internal reasoning token + type: string prompt: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per token for prompt (input) processing + type: string request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per request + type: string web_search: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per web search + type: string required: - prompt - completion @@ -18891,60 +18873,49 @@ components: request: '0' properties: audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per audio input token + type: string audio_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per audio output token + type: string completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per token for completion (output) generation + type: string discount: + description: >- + Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) format: double type: number image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per input image + type: string image_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per output image + type: string image_token: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per image token + type: string input_audio_cache: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per cached audio input token + type: string input_cache_read: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per cached input token (read) + type: string input_cache_write: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per cached input token (write) + type: string internal_reasoning: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per internal reasoning token + type: string prompt: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per token for prompt (input) processing + type: string request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per request + type: string web_search: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + description: Price in USD per web search + type: string required: - prompt - completion diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 41488d8e..9748eccb 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,20 +2,20 @@ speakeasyVersion: 1.680.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:8a4df86f3d3822da1bc0bd41158b6e2674f517dde9d9747c7fd6aeae92531d65 - sourceBlobDigest: sha256:6ced93728e355c985d439c194e9d8ee1593b92f6f809f1315be8847686c46174 + sourceRevisionDigest: sha256:200f4947503f8ac09ca9b8cfad127f20bd1f7afe489a3d08d562aaedea63b740 + sourceBlobDigest: sha256:6fd3f95fe103e9cbf7ed293aadaa0d7351e89bc1d6456536f09b0a645cbe3278 tags: - latest - - speakeasy-sdk-regen-1782424634 + - speakeasy-sdk-regen-1782426538 - 1.0.0 targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:8a4df86f3d3822da1bc0bd41158b6e2674f517dde9d9747c7fd6aeae92531d65 - sourceBlobDigest: sha256:6ced93728e355c985d439c194e9d8ee1593b92f6f809f1315be8847686c46174 + sourceRevisionDigest: sha256:200f4947503f8ac09ca9b8cfad127f20bd1f7afe489a3d08d562aaedea63b740 + sourceBlobDigest: sha256:6fd3f95fe103e9cbf7ed293aadaa0d7351e89bc1d6456536f09b0a645cbe3278 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:50757f7fdc830970d172346b5b1a7308c4861a13f531f093a629e1ac180687ee + codeSamplesRevisionDigest: sha256:b0d6c032910cacfbba687cc29e3a3d038cc68abb8de505bd25f44c5064263205 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.680.0 diff --git a/RELEASES.md b/RELEASES.md index 437e691e..47fc84ee 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -38,4 +38,14 @@ Based on: ### Generated - [python v0.10.1] . ### Releases -- [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - . \ No newline at end of file +- [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - . + +## 2026-06-25 22:28:38 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.10.2] . +### Releases +- [PyPI v0.10.2] https://pypi.org/project/openrouter/0.10.2 - . \ No newline at end of file diff --git a/docs/components/pricing.md b/docs/components/pricing.md index 084b83a2..f17583ae 100644 --- a/docs/components/pricing.md +++ b/docs/components/pricing.md @@ -3,19 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `completion` | *str* | :heavy_check_mark: | N/A | 1000 | -| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 | -| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token | +| `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token | +| `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation | +| `discount` | *Optional[float]* | :heavy_minus_sign: | Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) | +| `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image | +| `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image | +| `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token | +| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token | +| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) | +| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (write) | +| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token | +| `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing | +| `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request | +| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search | \ No newline at end of file diff --git a/docs/components/publicpricing.md b/docs/components/publicpricing.md index b96d4af7..9a1cecc7 100644 --- a/docs/components/publicpricing.md +++ b/docs/components/publicpricing.md @@ -5,19 +5,19 @@ Pricing information for the model ## Fields -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `completion` | *str* | :heavy_check_mark: | N/A | 1000 | -| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 | -| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token | +| `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token | +| `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation | +| `discount` | *Optional[float]* | :heavy_minus_sign: | Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) | +| `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image | +| `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image | +| `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token | +| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token | +| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) | +| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (write) | +| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token | +| `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing | +| `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request | +| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b98c0280..80031d57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "0.10.1" +version = "0.10.2" 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 ade61995..e430f99b 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "0.10.1" +__version__: str = "0.10.2" __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.2 2.788.4 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/providerpreferences.py b/src/openrouter/components/providerpreferences.py index 5145815e..ce5d942a 100644 --- a/src/openrouter/components/providerpreferences.py +++ b/src/openrouter/components/providerpreferences.py @@ -52,26 +52,34 @@ class MaxPriceTypedDict(TypedDict): r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" audio: NotRequired[str] + r"""Maximum price in USD per audio unit""" completion: NotRequired[str] + r"""Maximum price in USD per million completion tokens""" image: NotRequired[str] + r"""Maximum price in USD per image""" prompt: NotRequired[str] - r"""Price per million prompt tokens""" + r"""Maximum price in USD per million prompt tokens""" request: NotRequired[str] + r"""Maximum price in USD per request""" class MaxPrice(BaseModel): r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" audio: Optional[str] = None + r"""Maximum price in USD per audio unit""" completion: Optional[str] = None + r"""Maximum price in USD per million completion tokens""" image: Optional[str] = None + r"""Maximum price in USD per image""" prompt: Optional[str] = None - r"""Price per million prompt tokens""" + r"""Maximum price in USD per million prompt tokens""" request: Optional[str] = None + r"""Maximum price in USD per request""" OnlyTypedDict = TypeAliasType("OnlyTypedDict", Union[ProviderName, str]) diff --git a/src/openrouter/components/publicendpoint.py b/src/openrouter/components/publicendpoint.py index 6761c912..7291ca05 100644 --- a/src/openrouter/components/publicendpoint.py +++ b/src/openrouter/components/publicendpoint.py @@ -15,49 +15,77 @@ class PricingTypedDict(TypedDict): completion: str + r"""Price in USD per token for completion (output) generation""" prompt: str + r"""Price in USD per token for prompt (input) processing""" audio: NotRequired[str] + r"""Price in USD per audio input token""" audio_output: NotRequired[str] + r"""Price in USD per audio output token""" discount: NotRequired[float] + r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)""" image: NotRequired[str] + r"""Price in USD per input image""" image_output: NotRequired[str] + r"""Price in USD per output image""" image_token: NotRequired[str] + r"""Price in USD per image token""" input_audio_cache: NotRequired[str] + r"""Price in USD per cached audio input token""" input_cache_read: NotRequired[str] + r"""Price in USD per cached input token (read)""" input_cache_write: NotRequired[str] + r"""Price in USD per cached input token (write)""" internal_reasoning: NotRequired[str] + r"""Price in USD per internal reasoning token""" request: NotRequired[str] + r"""Price in USD per request""" web_search: NotRequired[str] + r"""Price in USD per web search""" class Pricing(BaseModel): completion: str + r"""Price in USD per token for completion (output) generation""" prompt: str + r"""Price in USD per token for prompt (input) processing""" audio: Optional[str] = None + r"""Price in USD per audio input token""" audio_output: Optional[str] = None + r"""Price in USD per audio output token""" discount: Optional[float] = None + r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)""" image: Optional[str] = None + r"""Price in USD per input image""" image_output: Optional[str] = None + r"""Price in USD per output image""" image_token: Optional[str] = None + r"""Price in USD per image token""" input_audio_cache: Optional[str] = None + r"""Price in USD per cached audio input token""" input_cache_read: Optional[str] = None + r"""Price in USD per cached input token (read)""" input_cache_write: Optional[str] = None + r"""Price in USD per cached input token (write)""" internal_reasoning: Optional[str] = None + r"""Price in USD per internal reasoning token""" request: Optional[str] = None + r"""Price in USD per request""" web_search: Optional[str] = None + r"""Price in USD per web search""" PublicEndpointQuantization = Union[ diff --git a/src/openrouter/components/publicpricing.py b/src/openrouter/components/publicpricing.py index 42a29282..8ee0045c 100644 --- a/src/openrouter/components/publicpricing.py +++ b/src/openrouter/components/publicpricing.py @@ -10,48 +10,76 @@ class PublicPricingTypedDict(TypedDict): r"""Pricing information for the model""" completion: str + r"""Price in USD per token for completion (output) generation""" prompt: str + r"""Price in USD per token for prompt (input) processing""" audio: NotRequired[str] + r"""Price in USD per audio input token""" audio_output: NotRequired[str] + r"""Price in USD per audio output token""" discount: NotRequired[float] + r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)""" image: NotRequired[str] + r"""Price in USD per input image""" image_output: NotRequired[str] + r"""Price in USD per output image""" image_token: NotRequired[str] + r"""Price in USD per image token""" input_audio_cache: NotRequired[str] + r"""Price in USD per cached audio input token""" input_cache_read: NotRequired[str] + r"""Price in USD per cached input token (read)""" input_cache_write: NotRequired[str] + r"""Price in USD per cached input token (write)""" internal_reasoning: NotRequired[str] + r"""Price in USD per internal reasoning token""" request: NotRequired[str] + r"""Price in USD per request""" web_search: NotRequired[str] + r"""Price in USD per web search""" class PublicPricing(BaseModel): r"""Pricing information for the model""" completion: str + r"""Price in USD per token for completion (output) generation""" prompt: str + r"""Price in USD per token for prompt (input) processing""" audio: Optional[str] = None + r"""Price in USD per audio input token""" audio_output: Optional[str] = None + r"""Price in USD per audio output token""" discount: Optional[float] = None + r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)""" image: Optional[str] = None + r"""Price in USD per input image""" image_output: Optional[str] = None + r"""Price in USD per output image""" image_token: Optional[str] = None + r"""Price in USD per image token""" input_audio_cache: Optional[str] = None + r"""Price in USD per cached audio input token""" input_cache_read: Optional[str] = None + r"""Price in USD per cached input token (read)""" input_cache_write: Optional[str] = None + r"""Price in USD per cached input token (write)""" internal_reasoning: Optional[str] = None + r"""Price in USD per internal reasoning token""" request: Optional[str] = None + r"""Price in USD per request""" web_search: Optional[str] = None + r"""Price in USD per web search""" diff --git a/uv.lock b/uv.lock index 0bfff321..567db3a8 100644 --- a/uv.lock +++ b/uv.lock @@ -220,7 +220,7 @@ wheels = [ [[package]] name = "openrouter" -version = "0.10.1" +version = "0.10.2" source = { editable = "." } dependencies = [ { name = "httpcore" }, From c51ca8092642b5f48fb71cb378c8daf655efbad6 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 22:30:59 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow