diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9c3d6f29..26f95573 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: e73937be9d67b7086d2b9189ed94394d + docChecksum: a86fd69b34e5b92a3338d2e01b99781b docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.238 - configChecksum: 8991cb8f69d8ff8283ec2e934c1e5522 + releaseVersion: 1.3.239 + configChecksum: cfd9216068d53c3cc41cb940470e50c2 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 300f0c45-578b-49e8-96b5-2ade8973b2ac - pristine_commit_hash: 3cf68c2d50264d9463028e0bbddaf57bf148386a - pristine_tree_hash: 5d8644aa57cf4fbae073d20e23e9cf9cc1c966cf + generation_id: f0ff829b-b8d7-4216-9086-e1e1ba8e7bdb + pristine_commit_hash: 0e76eb76c15444e0832f4eb6026b17443bf42865 + pristine_tree_hash: fef9e03d43316c6aa26f0a3ead37016a4ef00ddf features: python: acceptHeaders: 3.0.0 @@ -7736,8 +7736,8 @@ trackedFiles: pristine_git_object: ccd8dc6bc983f75070daea91335d647dad6b3e0c docs/components/pricing.mdx: id: 6816d700f8b1 - last_write_checksum: sha1:4d677de7db8ef9dff32053a7594eda6420951e0b - pristine_git_object: bd2712655952f07012bb96c23ab0c8724e259f1e + last_write_checksum: sha1:4b9ec35cc1673f103724a88439246e5db70116b2 + pristine_git_object: 99cb4039db2375a76b3d73335f752187f677c03b docs/components/pricingoverride.mdx: id: 74675f38c1c6 last_write_checksum: sha1:52ae52e79a817f45081bd0ff109024acdd81d936 @@ -7932,8 +7932,8 @@ trackedFiles: pristine_git_object: 3def9b31d08d74324be28111b183ac748108b07e docs/components/publicpricing.mdx: id: 61fb18b7ff94 - last_write_checksum: sha1:6fd1d965f03b123c85969aeba88a88d1ece660c1 - pristine_git_object: 57c90de1e826f69202b6afce81b1710320444ad9 + last_write_checksum: sha1:dda7c4fd3a1286dc1643ab95eba2aea685960b9e + pristine_git_object: 1f63eaf054d0492278a0049be750c1dd98c17027 docs/components/publicservicetier.mdx: id: ffd85d9fcc2c last_write_checksum: sha1:78e406250f9bb607250b74952d4ac7c816bbf7ac @@ -12592,8 +12592,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:dd631604d1edc41757fbcade6b0ba2be184798a4 - pristine_git_object: c201d60002c95d6689e82e205c4d0c8b55d185a4 + last_write_checksum: sha1:45b9c92ef94777a91063e910c9cd243e2dafdc41 + pristine_git_object: 4f38b8941490be7a688dd55ba498ca70c54942f8 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -12620,8 +12620,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:7ff720fedf47043e7ad91352c0edee00db354fba - pristine_git_object: 210f6dad6923c2c78853e7e75a6a7c4d96d14537 + last_write_checksum: sha1:2adef3a3d650823f06638456d52317f0342cf735 + pristine_git_object: bea916fd64f9c5b4111114295739e434659357ab src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -15676,8 +15676,8 @@ trackedFiles: pristine_git_object: 90bdb267893360608210843a5da0d5d68e80d41e src/openrouter/components/pricing.py: id: 33122e4b4dda - last_write_checksum: sha1:54bc975ee0c553985b8e2f82a9a5d050f1c66588 - pristine_git_object: 5b6ba30d0a02ac74b07195571e9ead41d34121e5 + last_write_checksum: sha1:d560dbfdecf79778615dec9534c36400fbc2b917 + pristine_git_object: 26acaca014df9c33a070dadda66f25ffa1fef61a src/openrouter/components/pricingoverride.py: id: 8984e4cc7422 last_write_checksum: sha1:e12629320e02396a2aa1dfcbacd6873fba0d4aba @@ -15804,8 +15804,8 @@ trackedFiles: pristine_git_object: 62afd71386c722b497155417e4985441273c5c1c src/openrouter/components/publicpricing.py: id: 96d115d83cc5 - last_write_checksum: sha1:d353f3adcd8efbd639e6be4f1f8ee080fefcd83f - pristine_git_object: 70eb8ec280ce790aff7e6233133379eae9ef5c11 + last_write_checksum: sha1:48971bd6c5f1ff96d99e3970d9b2c9e37a0ab5b4 + pristine_git_object: c1b692f96b5335408ee63fe7b41aa29bb6a3a771 src/openrouter/components/publicservicetier.py: id: fc0a585024d6 last_write_checksum: sha1:a9d1074d4ce5c1fcb4cd2fb1ba593458d9174e5e @@ -23311,4 +23311,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.tts.create_speech()`: \n * `request.timestamp_granularities` **Added**\n * `error.status[504]` **Added**\n* `open_router.tts.list_models()`: `response.data[].endpoints[].output_modalities[].supported_parameters.timestamp_granularities` **Added**\n* `open_router.tts.get_model()`: `response.endpoints[].output_modalities[].supported_parameters.timestamp_granularities` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f0ec9eae..13d05054 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.238 + version: 1.3.239 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 2c927170..4abe7950 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -31872,7 +31872,7 @@ components: description: 'Price in USD per token for prompt (input) processing' type: 'string' request: - description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' + description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' type: 'string' web_search: description: 'Price in USD per web search' @@ -33929,7 +33929,7 @@ components: description: 'Price in USD per token for prompt (input) processing' type: 'string' request: - description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' + description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' type: 'string' web_search: description: 'Price in USD per web search' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2df224b9..fb494bac 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:856cf59619c47e9e8203ddcb9f2f4a5a228f5be9bdbd067a50e882e6d5cd868f - sourceBlobDigest: sha256:e1a5665e5f4d5bb0b440759e3787a270c901a6c3fa1f14a1f5a98dd83f7980a5 + sourceRevisionDigest: sha256:b449397bef66a2911564d32127ebfede6410da7f267d64d8ed2a7d1feccab8ee + sourceBlobDigest: sha256:8c442f998f818acea292dc01714f5505c983225285d5a70079dd3d6159383c87 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:856cf59619c47e9e8203ddcb9f2f4a5a228f5be9bdbd067a50e882e6d5cd868f - sourceBlobDigest: sha256:e1a5665e5f4d5bb0b440759e3787a270c901a6c3fa1f14a1f5a98dd83f7980a5 + sourceRevisionDigest: sha256:b449397bef66a2911564d32127ebfede6410da7f267d64d8ed2a7d1feccab8ee + sourceBlobDigest: sha256:8c442f998f818acea292dc01714f5505c983225285d5a70079dd3d6159383c87 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:460c2d5b51d2944f3d5d6f3e246919b8d1ec5030720512b77c26b0cfbdf1ddd3 + codeSamplesRevisionDigest: sha256:e37dcb5a8fc4cd7a863a8da8ec0b4bd2c033ec6ac95bd2042535448b313932f4 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 6a89e32f..671ef70b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5149,4 +5149,14 @@ Based on: ### Generated - [python v1.3.238] . ### Releases -- [PyPI v1.3.238] https://pypi.org/project/openrouter/1.3.238 - . \ No newline at end of file +- [PyPI v1.3.238] https://pypi.org/project/openrouter/1.3.238 - . + +## 2026-12-03 20:55:19 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.239] . +### Releases +- [PyPI v1.3.239] https://pypi.org/project/openrouter/1.3.239 - . \ No newline at end of file diff --git a/docs/components/pricing.mdx b/docs/components/pricing.mdx index bd271265..99cb4039 100644 --- a/docs/components/pricing.mdx +++ b/docs/components/pricing.mdx @@ -20,5 +20,5 @@ title: "Pricing" | `internal_reasoning` | *Optional[str]* | ➖ | Price in USD per internal reasoning token | | `overrides` | List[[components.PricingOverride](../components/pricingoverride.mdx)] | ➖ | Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. | | `prompt` | *str* | ✔️ | Price in USD per token for prompt (input) processing | -| `request` | *Optional[str]* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | +| `request` | *Optional[str]* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | | `web_search` | *Optional[str]* | ➖ | Price in USD per web search | \ No newline at end of file diff --git a/docs/components/publicpricing.mdx b/docs/components/publicpricing.mdx index 57c90de1..1f63eaf0 100644 --- a/docs/components/publicpricing.mdx +++ b/docs/components/publicpricing.mdx @@ -23,5 +23,5 @@ Pricing information for the model | `internal_reasoning` | *Optional[str]* | ➖ | Price in USD per internal reasoning token | | `overrides` | List[[components.PricingOverride](../components/pricingoverride.mdx)] | ➖ | Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. | | `prompt` | *str* | ✔️ | Price in USD per token for prompt (input) processing | -| `request` | *Optional[str]* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | +| `request` | *Optional[str]* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | | `web_search` | *Optional[str]* | ➖ | Price in USD per web search | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c201d600..4f38b894 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.238" +version = "1.3.239" 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 210f6dad..bea916fd 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.238" +__version__: str = "1.3.239" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.238 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.239 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/pricing.py b/src/openrouter/components/pricing.py index 5b6ba30d..26acaca0 100644 --- a/src/openrouter/components/pricing.py +++ b/src/openrouter/components/pricing.py @@ -38,7 +38,7 @@ class PricingTypedDict(TypedDict): overrides: NotRequired[List[PricingOverrideTypedDict]] r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" request: NotRequired[str] - r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" + r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" web_search: NotRequired[str] r"""Price in USD per web search""" @@ -87,7 +87,7 @@ class Pricing(BaseModel): r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" request: Optional[str] = None - r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" + r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" web_search: Optional[str] = None r"""Price in USD per web search""" diff --git a/src/openrouter/components/publicpricing.py b/src/openrouter/components/publicpricing.py index 70eb8ec2..c1b692f9 100644 --- a/src/openrouter/components/publicpricing.py +++ b/src/openrouter/components/publicpricing.py @@ -40,7 +40,7 @@ class PublicPricingTypedDict(TypedDict): overrides: NotRequired[List[PricingOverrideTypedDict]] r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" request: NotRequired[str] - r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" + r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" web_search: NotRequired[str] r"""Price in USD per web search""" @@ -91,7 +91,7 @@ class PublicPricing(BaseModel): r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" request: Optional[str] = None - r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" + r"""Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.""" web_search: Optional[str] = None r"""Price in USD per web search""" diff --git a/uv.lock b/uv.lock index 2847adf1..5d52a9ce 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.238" +version = "1.3.239" source = { editable = "." } dependencies = [ { name = "httpcore" },