Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ on:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/lmnt-com-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
Expand All @@ -33,13 +28,13 @@ jobs:
run: ./scripts/lint

build:
if: github.repository == 'stainless-sdks/lmnt-com-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -57,7 +52,7 @@ jobs:
test:
timeout-minutes: 10
name: test (py${{ matrix.python-version }})
runs-on: ${{ github.repository == 'stainless-sdks/lmnt-com-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
strategy:
fail-fast: false
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/post-merge-cleanup.yml

This file was deleted.

211 changes: 0 additions & 211 deletions .github/workflows/prepare-release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion _carbonsteel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.1",
"generated_at": "2026-05-09T20:32:16Z",
"generated_at": "2026-05-19T21:02:05Z",
"spec_sha": "4c822a78c44f68ac:cc7f4554e955f4fe",
"files": [
"api.md",
Expand Down
6 changes: 6 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Methods:
- <code title="post /v1/ai/speech/bytes">client.speech.<a href="./src/lmnt/resources/speech.py">generate</a>(\*\*<a href="src/lmnt/types/speech_generate_params.py">params</a>) -> BinaryAPIResponse</code>
- <code title="post /v1/ai/speech">client.speech.<a href="./src/lmnt/resources/speech.py">generate_detailed</a>(\*\*<a href="src/lmnt/types/speech_generate_detailed_params.py">params</a>) -> <a href="./src/lmnt/types/speech_generate_detailed_response.py">SpeechGenerateDetailedResponse</a></code>

## Sessions

Methods:

- <code>client.speech.sessions.<a href="./src/lmnt/resources/sessions.py">create</a>(\*\*params) -> SpeechSession</code>

# Voices

Types:
Expand Down
22 changes: 11 additions & 11 deletions src/lmnt/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,14 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0
# Don't set these headers if they were already set or removed by the caller. We check
# `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
lower_custom_headers = [header.lower() for header in custom_headers]
if "x-stainless-retry-count" not in lower_custom_headers:
headers["x-stainless-retry-count"] = str(retries_taken)
if "x-stainless-read-timeout" not in lower_custom_headers:
if "x-lmnt-retry-count" not in lower_custom_headers:
headers["x-lmnt-retry-count"] = str(retries_taken)
if "x-lmnt-read-timeout" not in lower_custom_headers:
timeout = self.timeout if isinstance(options.timeout, NotGiven) else options.timeout
if isinstance(timeout, Timeout):
timeout = timeout.read
if timeout is not None:
headers["x-stainless-read-timeout"] = str(timeout)
headers["x-lmnt-read-timeout"] = str(timeout)

return headers

Expand Down Expand Up @@ -793,7 +793,7 @@ def _should_retry(self, response: httpx.Response) -> bool:
return False

def _idempotency_key(self) -> str:
return f"stainless-python-retry-{uuid.uuid4()}"
return f"lmnt-python-retry-{uuid.uuid4()}"


class _DefaultHttpxClient(httpx.Client):
Expand Down Expand Up @@ -1934,12 +1934,12 @@ def get_platform() -> Platform:
@lru_cache(maxsize=None)
def platform_headers(version: str, *, platform: Platform | None) -> Dict[str, str]:
return {
"X-Stainless-Lang": "python",
"X-Stainless-Package-Version": version,
"X-Stainless-OS": str(platform or get_platform()),
"X-Stainless-Arch": str(get_architecture()),
"X-Stainless-Runtime": get_python_runtime(),
"X-Stainless-Runtime-Version": get_python_version(),
"X-Lmnt-Lang": "python",
"X-Lmnt-Package-Version": version,
"X-Lmnt-OS": str(platform or get_platform()),
"X-Lmnt-Arch": str(get_architecture()),
"X-Lmnt-Runtime": get_python_runtime(),
"X-Lmnt-Runtime-Version": get_python_version(),
}


Expand Down
4 changes: 2 additions & 2 deletions src/lmnt/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def auth_headers(self) -> dict[str, str]:
def default_headers(self) -> dict[str, str | Omit]:
return {
**super().default_headers,
"X-Stainless-Async": "false",
"X-Lmnt-Async": "false",
"lmnt-version": LMNT_API_VERSION,
**self._custom_headers,
}
Expand Down Expand Up @@ -290,7 +290,7 @@ def auth_headers(self) -> dict[str, str]:
def default_headers(self) -> dict[str, str | Omit]:
return {
**super().default_headers,
"X-Stainless-Async": f"async:{get_async_library()}",
"X-Lmnt-Async": f"async:{get_async_library()}",
"lmnt-version": LMNT_API_VERSION,
**self._custom_headers,
}
Expand Down
6 changes: 3 additions & 3 deletions src/lmnt/_constants.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
# Vendored runtime. See carbonsteel README for provenance.

import httpx

RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
RAW_RESPONSE_HEADER = "X-Lmnt-Raw-Response"
OVERRIDE_CAST_TO_HEADER = "____lmnt_override_cast_to"

# default timeout is 1 minute
DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
Expand Down
Loading
Loading