diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 8cbe42862..296f0107a 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: fbc19ded47168ad2629bc5b2059ef27e
+ docChecksum: ae2908ff910a2684ada59e9c07ed8284
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
- releaseVersion: 1.3.179
- configChecksum: 370ebc4656b45ce24901d8ab99fd5a51
+ releaseVersion: 1.3.180
+ configChecksum: 73e9959ad4ed5bc6df16805c7600c19e
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 1166da70-3b47-43a4-a2b0-4c25384423e5
- pristine_commit_hash: 70525537d4b7a9784d83a635eff04a435cc70a1d
- pristine_tree_hash: da4f79c20dc771cb499f4d5e7077636cefa85371
+ generation_id: c7e7d4d0-d5d6-4248-b50b-b1f91e5fbaa5
+ pristine_commit_hash: fbb05217a15ac4a32108caceb7383bd028793476
+ pristine_tree_hash: 228104fb0ba6a4aa493bf2489006ed438872c217
features:
python:
acceptHeaders: 3.0.0
@@ -9724,8 +9724,8 @@ trackedFiles:
pristine_git_object: 0f9e2ec2bbf4a8cc0005cb5df17fce79f644f122
docs/operations/createauthkeyscoderequestbody.mdx:
id: 976d7ed7ca9e
- last_write_checksum: sha1:cf0f9db6c818b8007d9e506b2c394f7af51f1f20
- pristine_git_object: 0f56d8f2553c3edabe0a76d0261af886c73636c3
+ last_write_checksum: sha1:eead89f4af33c758004c6deaf102e204167a3ae2
+ pristine_git_object: c135132ada76670b2e93ef0b981e0a67050407e3
docs/operations/createauthkeyscoderesponse.mdx:
id: e1f782dea5e9
last_write_checksum: sha1:43e73d02d51260d666c236bfb5b4633d7eddd34b
@@ -10244,8 +10244,8 @@ trackedFiles:
pristine_git_object: 96831e7149e1cb5e7769a36202a22424e266b65e
docs/operations/exchangeauthcodeforapikeyrequestbody.mdx:
id: 8003f6bc3b51
- last_write_checksum: sha1:a413aace8345ac670b125fd7e4af8bde688cbd83
- pristine_git_object: bd6ec9fc9846904b4f47e51ab21355372086ec5c
+ last_write_checksum: sha1:944ec18e6155ec869cad3c6684bc568f60c88110
+ pristine_git_object: 1beb5a96809ac7ecb7f150a75cf902906fa719cc
docs/operations/exchangeauthcodeforapikeyresponse.mdx:
id: 64162c7ece40
last_write_checksum: sha1:03fbfbea35fe3c7f6cc596f6ce9703e532fe30f1
@@ -11608,8 +11608,8 @@ trackedFiles:
pristine_git_object: 24fda0f8e544cca9d93d6a83f0917927842041aa
docs/sdks/oauth/README.mdx:
id: 42b5079343d2
- last_write_checksum: sha1:c498029e7b36782afeeff53d390f48fe44bd26d5
- pristine_git_object: ccd01ea3052fba9ab4f07c91b0fc20fe96687715
+ last_write_checksum: sha1:0170965ade997a053d7051c86310ac34523bae9e
+ pristine_git_object: 17aed8efbc308172392fa975a064dcd9a4e6531d
docs/sdks/observability/README.mdx:
id: 75811527e651
last_write_checksum: sha1:b01bb09b9ef3543335bc1da6078de84ceaba3c14
@@ -11680,8 +11680,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:a15be9e149bd134f0af11f10208b3a9dee368b93
- pristine_git_object: a4507c4a1142b5e8b61805ceaa8190264cf6e1b4
+ last_write_checksum: sha1:d4f75b1116bc2a3e45c92f58f5fa2483d2d7973a
+ pristine_git_object: c3f61726b2b72747f0600e8c647492c14eabd9c8
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -11708,8 +11708,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:9af46a2fd30ffbd8080fdeb60723076157d1ee9b
- pristine_git_object: 4fe2e68419fed9fc38a884f8f580000ada687d86
+ last_write_checksum: sha1:39f2dc370de09b988b03fc872465f74d215a1cd5
+ pristine_git_object: 452307d486e045fab5552dd4032121a09e9eaa90
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
@@ -15784,8 +15784,8 @@ trackedFiles:
pristine_git_object: 4cea7bb4be88f162bd3783c7bdc32a035ed1f411
src/openrouter/oauth.py:
id: 1948ce27255b
- last_write_checksum: sha1:8173753ca74f6b449d6de21e3fc7f560c71e98c2
- pristine_git_object: 6f9385e6aa6f990eaad1ec72e4d8ddc793c1f42e
+ last_write_checksum: sha1:bf29baaa10fc7a91265eaa9083ffdfbe6dafd5a9
+ pristine_git_object: 1dc4771f8990fbc10ff86717db064c6ee50b3a16
src/openrouter/observability.py:
id: 6a17f32d3f33
last_write_checksum: sha1:9d7a47a0ac91ad487db2e304adf0f5b55bfded69
@@ -15860,8 +15860,8 @@ trackedFiles:
pristine_git_object: 62e0f114856f94fed418ea19cf5b279ea918bcd7
src/openrouter/operations/createauthkeyscode.py:
id: 4253a437de22
- last_write_checksum: sha1:8f496fd0e965aba76a0882a3af0382649d0f8c4d
- pristine_git_object: 1531c055f9e5aa9489c2ec5e885466ab1d11b65e
+ last_write_checksum: sha1:69075ec4cb208d6eb6f6085b48a301d38708d388
+ pristine_git_object: 005e9c70b8fb794552f2f3cc80a2270586626fd6
src/openrouter/operations/createbatches.py:
id: 8b0681b22b32
last_write_checksum: sha1:4271449fca1c83d652bc54ebb9d2fc4528362868
@@ -16052,8 +16052,8 @@ trackedFiles:
pristine_git_object: 4994f76e2e486e11137167c27ae95161c4c29699
src/openrouter/operations/exchangeauthcodeforapikey.py:
id: 37bdd1517a07
- last_write_checksum: sha1:fb531dadbabcc38e5a57b0bd3eda846790fac93a
- pristine_git_object: b6895f4b95be5ea3777e7b3004cd267795637bf9
+ last_write_checksum: sha1:a70e626339e8d6cd519eb5142c6abbb388d96deb
+ pristine_git_object: 05379e4e08435548f17c68ea016f636f83742b11
src/openrouter/operations/getanalyticsmeta.py:
id: 013673a37aa5
last_write_checksum: sha1:600dfdcb385f5116c32cdf6a6b53db925a1b6c72
@@ -21719,6 +21719,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()`: `error.status[503]` **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index c5905799c..f2ad8cf01 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.3.179
+ version: 1.3.180
additionalDependencies:
dev:
pytest: '>=8.3'
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 5f1a358dd..3f884a26d 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -41151,7 +41151,7 @@ paths:
- 'null'
x-speakeasy-unknown-values: allow
code_verifier:
- description: 'The code verifier if code_challenge was used in the authorization request'
+ description: 'The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request.'
example: 'dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk'
type: 'string'
required:
@@ -41247,7 +41247,7 @@ paths:
format: 'uri'
type: 'string'
code_challenge:
- description: 'PKCE code challenge for enhanced security'
+ description: 'PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`.'
example: 'E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM'
type: 'string'
code_challenge_method:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index bd6944843..8806c719d 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:a9978959a993c1a18a7599f6b4b07c941e94b097818dab1f663743a79d9eaf1c
- sourceBlobDigest: sha256:01ce211d7c686bd7e89c4e5168f47819367ff94fce10ede2572a403799f46667
+ sourceRevisionDigest: sha256:7552552148ef3bf6ed96b15b6dceae7cee753926acf81a3d773b61905bf4820e
+ sourceBlobDigest: sha256:7117c7df2d3ed8039afee18312cc151fdbdea80e09cdc5f0a31bbb5f4e704862
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:a9978959a993c1a18a7599f6b4b07c941e94b097818dab1f663743a79d9eaf1c
- sourceBlobDigest: sha256:01ce211d7c686bd7e89c4e5168f47819367ff94fce10ede2572a403799f46667
+ sourceRevisionDigest: sha256:7552552148ef3bf6ed96b15b6dceae7cee753926acf81a3d773b61905bf4820e
+ sourceBlobDigest: sha256:7117c7df2d3ed8039afee18312cc151fdbdea80e09cdc5f0a31bbb5f4e704862
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:c363fdc46998be30f1a2683ddba7fd14cb802e519e3b4a9468fe9d2aca98eb0c
+ codeSamplesRevisionDigest: sha256:2ff369285173d3f7787e380de21bafa32ce90387a78b43b3c32257ae1f190890
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
diff --git a/RELEASES.md b/RELEASES.md
index 95937a074..8fa70d8af 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -4559,4 +4559,14 @@ Based on:
### Generated
- [python v1.3.179] .
### Releases
-- [PyPI v1.3.179] https://pypi.org/project/openrouter/1.3.179 - .
\ No newline at end of file
+- [PyPI v1.3.179] https://pypi.org/project/openrouter/1.3.179 - .
+
+## 2026-11-16 07:49:29
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.3.180] .
+### Releases
+- [PyPI v1.3.180] https://pypi.org/project/openrouter/1.3.180 - .
\ No newline at end of file
diff --git a/docs/operations/createauthkeyscoderequestbody.mdx b/docs/operations/createauthkeyscoderequestbody.mdx
index 0f56d8f25..c135132ad 100644
--- a/docs/operations/createauthkeyscoderequestbody.mdx
+++ b/docs/operations/createauthkeyscoderequestbody.mdx
@@ -7,7 +7,7 @@ title: "CreateAuthKeysCodeRequestBody"
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `callback_url` | *str* | ✔️ | The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools. | https://myapp.com/auth/callback |
-| `code_challenge` | *Optional[str]* | ➖ | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
+| `code_challenge` | *Optional[str]* | ➖ | PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`. | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.mdx) | ➖ | The method used to generate the code challenge | S256 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | ➖ | Optional ISO 8601 UTC expiration timestamp. Must include seconds (YYYY-MM-DDTHH:MM:SSZ; fractional seconds allowed); minute-precision timestamps are rejected. | 2027-12-31T23:59:59Z |
| `key_label` | *Optional[str]* | ➖ | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
diff --git a/docs/operations/exchangeauthcodeforapikeyrequestbody.mdx b/docs/operations/exchangeauthcodeforapikeyrequestbody.mdx
index bd6ec9fc9..1beb5a968 100644
--- a/docs/operations/exchangeauthcodeforapikeyrequestbody.mdx
+++ b/docs/operations/exchangeauthcodeforapikeyrequestbody.mdx
@@ -8,4 +8,4 @@ title: "ExchangeAuthCodeForAPIKeyRequestBody"
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `code` | *str* | ✔️ | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../operations/exchangeauthcodeforapikeycodechallengemethod.mdx) | ➖ | The method used to generate the code challenge | S256 |
-| `code_verifier` | *Optional[str]* | ➖ | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
\ No newline at end of file
+| `code_verifier` | *Optional[str]* | ➖ | The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request. | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
\ No newline at end of file
diff --git a/docs/sdks/oauth/README.mdx b/docs/sdks/oauth/README.mdx
index ccd01ea30..17aed8efb 100644
--- a/docs/sdks/oauth/README.mdx
+++ b/docs/sdks/oauth/README.mdx
@@ -48,7 +48,7 @@ with OpenRouter(
| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../../operations/exchangeauthcodeforapikeycodechallengemethod.mdx) | ➖ | The method used to generate the code challenge | S256 |
-| `code_verifier` | *Optional[str]* | ➖ | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
+| `code_verifier` | *Optional[str]* | ➖ | The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request. | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
### Response
@@ -97,7 +97,7 @@ with OpenRouter(
| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `code_challenge` | *Optional[str]* | ➖ | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
+| `code_challenge` | *Optional[str]* | ➖ | PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`. | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.mdx) | ➖ | The method used to generate the code challenge | S256 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | ➖ | Optional ISO 8601 UTC expiration timestamp. Must include seconds (YYYY-MM-DDTHH:MM:SSZ; fractional seconds allowed); minute-precision timestamps are rejected. | 2027-12-31T23:59:59Z |
| `key_label` | *Optional[str]* | ➖ | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
diff --git a/pyproject.toml b/pyproject.toml
index a4507c4a1..c3f61726b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.3.179"
+version = "1.3.180"
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 4fe2e6841..452307d48 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.179"
+__version__: str = "1.3.180"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.950.13"
-__user_agent__: str = "speakeasy-sdk/python 1.3.179 2.950.13 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.3.180 2.950.13 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/oauth.py b/src/openrouter/oauth.py
index 6f9385e6a..1dc4771f8 100644
--- a/src/openrouter/oauth.py
+++ b/src/openrouter/oauth.py
@@ -42,7 +42,7 @@ def exchange_auth_code_for_api_key(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param code_challenge_method: The method used to generate the code challenge
- :param code_verifier: The code verifier if code_challenge was used in the authorization request
+ :param code_verifier: The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -189,7 +189,7 @@ async def exchange_auth_code_for_api_key_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param code_challenge_method: The method used to generate the code challenge
- :param code_verifier: The code verifier if code_challenge was used in the authorization request
+ :param code_verifier: The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -340,7 +340,7 @@ def create_auth_code(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param code_challenge: PKCE code challenge for enhanced security
+ :param code_challenge: PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`.
:param code_challenge_method: The method used to generate the code challenge
:param expires_at: Optional ISO 8601 UTC expiration timestamp. Must include seconds (YYYY-MM-DDTHH:MM:SSZ; fractional seconds allowed); minute-precision timestamps are rejected.
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
@@ -517,7 +517,7 @@ async def create_auth_code_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param code_challenge: PKCE code challenge for enhanced security
+ :param code_challenge: PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`.
:param code_challenge_method: The method used to generate the code challenge
:param expires_at: Optional ISO 8601 UTC expiration timestamp. Must include seconds (YYYY-MM-DDTHH:MM:SSZ; fractional seconds allowed); minute-precision timestamps are rejected.
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
diff --git a/src/openrouter/operations/createauthkeyscode.py b/src/openrouter/operations/createauthkeyscode.py
index 1531c055f..005e9c70b 100644
--- a/src/openrouter/operations/createauthkeyscode.py
+++ b/src/openrouter/operations/createauthkeyscode.py
@@ -106,7 +106,7 @@ class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
callback_url: str
r"""The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools."""
code_challenge: NotRequired[str]
- r"""PKCE code challenge for enhanced security"""
+ r"""PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`."""
code_challenge_method: NotRequired[CreateAuthKeysCodeCodeChallengeMethod]
r"""The method used to generate the code challenge"""
expires_at: NotRequired[Nullable[datetime]]
@@ -126,7 +126,7 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
r"""The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools."""
code_challenge: Optional[str] = None
- r"""PKCE code challenge for enhanced security"""
+ r"""PKCE code challenge: the base64url-encoded SHA-256 hash of your `code_verifier`. Send it with `code_challenge_method` set to `S256`."""
code_challenge_method: Optional[CreateAuthKeysCodeCodeChallengeMethod] = None
r"""The method used to generate the code challenge"""
diff --git a/src/openrouter/operations/exchangeauthcodeforapikey.py b/src/openrouter/operations/exchangeauthcodeforapikey.py
index b6895f4b9..05379e4e0 100644
--- a/src/openrouter/operations/exchangeauthcodeforapikey.py
+++ b/src/openrouter/operations/exchangeauthcodeforapikey.py
@@ -98,7 +98,7 @@ class ExchangeAuthCodeForAPIKeyRequestBodyTypedDict(TypedDict):
]
r"""The method used to generate the code challenge"""
code_verifier: NotRequired[str]
- r"""The code verifier if code_challenge was used in the authorization request"""
+ r"""The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request."""
class ExchangeAuthCodeForAPIKeyRequestBody(BaseModel):
@@ -111,7 +111,7 @@ class ExchangeAuthCodeForAPIKeyRequestBody(BaseModel):
r"""The method used to generate the code challenge"""
code_verifier: Optional[str] = None
- r"""The code verifier if code_challenge was used in the authorization request"""
+ r"""The `code_verifier` whose SHA-256 hash was sent as `code_challenge` in the authorization request."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
diff --git a/uv.lock b/uv.lock
index 0c998afa4..45d25ca52 100644
--- a/uv.lock
+++ b/uv.lock
@@ -231,7 +231,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.3.179"
+version = "1.3.180"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },