diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0364242b..4ee94bad 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: 7b6446f8c6e2e79ebb1bc7007ef04652 + docChecksum: 341e83b810f2326f376c9d8be4b692f8 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.216 - configChecksum: 090f2266475ce885760e5a5843003ffa + releaseVersion: 1.3.217 + configChecksum: 791fd0a9a929c71eec67f11ff0a3c823 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 56477e00-aff2-4711-b532-50caf993c3eb - pristine_commit_hash: 94fc42bb62f87e6a19355767b2660bf0adaf6835 - pristine_tree_hash: 077cf055bd772ffd088153edb993ff5a00da3502 + generation_id: 363d3d79-759a-499b-8bf4-a9b83bed2662 + pristine_commit_hash: 0a29d63bf29fc79ccef6a0ed9f868c03c5a68c0b + pristine_tree_hash: 26b6179f3945d68ea20a24cb543a62af431c2ba6 features: python: acceptHeaders: 3.0.0 @@ -7368,8 +7368,8 @@ trackedFiles: pristine_git_object: ccd8dc6bc983f75070daea91335d647dad6b3e0c docs/components/pricing.mdx: id: 6816d700f8b1 - last_write_checksum: sha1:14e0757819a171c2a41fee462ce4f098dbcbabd8 - pristine_git_object: 3fbee4c339681a96d542e9d63a1ef2c8f2385500 + last_write_checksum: sha1:7a906fdda9a562826d32cc271043e09d0da4c157 + pristine_git_object: 2e2df024569895487fe35c4e00bebf848ab7eaa0 docs/components/pricingoverride.mdx: id: 74675f38c1c6 last_write_checksum: sha1:52ae52e79a817f45081bd0ff109024acdd81d936 @@ -7564,8 +7564,8 @@ trackedFiles: pristine_git_object: 3def9b31d08d74324be28111b183ac748108b07e docs/components/publicpricing.mdx: id: 61fb18b7ff94 - last_write_checksum: sha1:981ee8d2b9e82542e458482083430337cc679f13 - pristine_git_object: 0d0fcc3cbc70fbb61061696ae98f35ffb9275a9b + last_write_checksum: sha1:7fefc281ef21a2f61424bdbd638b85165de6de6c + pristine_git_object: ae37e67844449236eb381d438dd893ba01df4a70 docs/components/publicservicetier.mdx: id: ffd85d9fcc2c last_write_checksum: sha1:78e406250f9bb607250b74952d4ac7c816bbf7ac @@ -11920,8 +11920,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:26019a4c5aecf7f59fd22e0a2fa1f281719460bc - pristine_git_object: 8a0f7d923a1cc0de01aab7e6fc85b2e4efd298d0 + last_write_checksum: sha1:db38399e66c0e1f0a937f59a4f9a3f566f304dfe + pristine_git_object: ca7e818a808ceed18e3c3c46a9cf82eeabe6a440 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11948,8 +11948,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:6a457dcd12041059a4922514b57a11a3748bb891 - pristine_git_object: e33123b1d16c259eeb0677fcb21c46f6e0864744 + last_write_checksum: sha1:2264790faa5e023c47e1b56a3929e21286bac2c3 + pristine_git_object: 565d4744de28c42036cd981bd325cabe9cf5f1c6 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -14920,8 +14920,8 @@ trackedFiles: pristine_git_object: 90bdb267893360608210843a5da0d5d68e80d41e src/openrouter/components/pricing.py: id: 33122e4b4dda - last_write_checksum: sha1:0f5b42e8b080ee41e906f4d920958ea5c498f2b7 - pristine_git_object: de6dc2a054ce1e1cb41c32a17c390e6999eee242 + last_write_checksum: sha1:a6133892eeeadf19550285dc5d52709ed404dcc7 + pristine_git_object: ba964a0d415104b64a749d3e4c13735677779315 src/openrouter/components/pricingoverride.py: id: 8984e4cc7422 last_write_checksum: sha1:e12629320e02396a2aa1dfcbacd6873fba0d4aba @@ -15048,8 +15048,8 @@ trackedFiles: pristine_git_object: 62afd71386c722b497155417e4985441273c5c1c src/openrouter/components/publicpricing.py: id: 96d115d83cc5 - last_write_checksum: sha1:fd8c320ac83b282eaf2405045329b55076d4311a - pristine_git_object: 34b9d18bf50bcce3c150fffff684f41e8e79a2bd + last_write_checksum: sha1:173128fd40d46435351cc807ab13f5142473032a + pristine_git_object: a572b56bc7401f96e211c90bb0b44d863e9ddf0e src/openrouter/components/publicservicetier.py: id: fc0a585024d6 last_write_checksum: sha1:a9d1074d4ce5c1fcb4cd2fb1ba593458d9174e5e @@ -22133,4 +22133,3 @@ examples: "500": application/json: {"error": {"code": 400, "message": "custom_id is required on requests[0]."}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.batch.create_batches()`: \n * `request.endpoint.enum(/v1/images/generations)` **Added**\n * `response.results[].response.body.union(BatchImageGenerationResponse)` **Added** (Breaking ⚠️)\n* `open_router.batch.get_batches()`: `response.results[].response.body.union(BatchImageGenerationResponse)` **Added** (Breaking ⚠️)\n* `open_router.batch.get_results()`: `response.data[].response.body.union(BatchImageGenerationResponse)` **Added** (Breaking ⚠️)\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 557b42e3..fd319912 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.216 + version: 1.3.217 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index d99bbb1a..c6912963 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -30422,7 +30422,7 @@ components: description: 'Price in USD per token for prompt (input) processing' type: 'string' request: - description: 'Price in USD per request' + description: 'Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate' type: 'string' web_search: description: 'Price in USD per web search' @@ -32463,7 +32463,7 @@ components: description: 'Price in USD per token for prompt (input) processing' type: 'string' request: - description: 'Price in USD per request' + description: 'Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate' type: 'string' web_search: description: 'Price in USD per web search' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8ba089d4..d893ef04 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:0ecd9e283bdee550f0cdb18c5f780da150a1569d408de2aa97303c6eb77fb3fb - sourceBlobDigest: sha256:b9cd38333d99b28f261692b00d44caeaa8d05750afdbb2e32f8a14ac7d7d0401 + sourceRevisionDigest: sha256:dc859b77ab4ffc9ed47c3fd53bcdbf02f39f263300a7ec08d079dd4fde93e18b + sourceBlobDigest: sha256:5acdbe1fd6200d14451171d8d9d4ed459beb69261d146f67d96c5148ca0c352e tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:0ecd9e283bdee550f0cdb18c5f780da150a1569d408de2aa97303c6eb77fb3fb - sourceBlobDigest: sha256:b9cd38333d99b28f261692b00d44caeaa8d05750afdbb2e32f8a14ac7d7d0401 + sourceRevisionDigest: sha256:dc859b77ab4ffc9ed47c3fd53bcdbf02f39f263300a7ec08d079dd4fde93e18b + sourceBlobDigest: sha256:5acdbe1fd6200d14451171d8d9d4ed459beb69261d146f67d96c5148ca0c352e codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:35794a6c0c9e8989643db4d05ba25dccce719d5d57224bd8c342abc824549bd3 + codeSamplesRevisionDigest: sha256:ff540aa59cb3207c7fc445f793c5b6e8ee4e505e1e3f7215b9d1aa68cacb663d workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 6e5cb6e9..26d4ab25 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4929,4 +4929,14 @@ Based on: ### Generated - [python v1.3.216] . ### Releases -- [PyPI v1.3.216] https://pypi.org/project/openrouter/1.3.216 - . \ No newline at end of file +- [PyPI v1.3.216] https://pypi.org/project/openrouter/1.3.216 - . + +## 2026-11-30 22:56:22 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.217] . +### Releases +- [PyPI v1.3.217] https://pypi.org/project/openrouter/1.3.217 - . \ No newline at end of file diff --git a/docs/components/pricing.mdx b/docs/components/pricing.mdx index 3fbee4c3..2e2df024 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 | +| `request` | *Optional[str]* | ➖ | Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate | | `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 0d0fcc3c..ae37e678 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 | +| `request` | *Optional[str]* | ➖ | Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate | | `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 8a0f7d92..ca7e818a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.216" +version = "1.3.217" 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 e33123b1..565d4744 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.216" +__version__: str = "1.3.217" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.216 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.217 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 de6dc2a0..ba964a0d 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""" + r"""Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate""" 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""" + r"""Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate""" 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 34b9d18b..a572b56b 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""" + r"""Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate""" 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""" + r"""Price in USD per request. For rerank models, price in USD per search unit: one query over up to 100 documents, so a call with more documents costs a multiple of this rate""" web_search: Optional[str] = None r"""Price in USD per web search""" diff --git a/uv.lock b/uv.lock index 1b01d4f7..25df5e8f 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.216" +version = "1.3.217" source = { editable = "." } dependencies = [ { name = "httpcore" },