Skip to content

Commit 4419b37

Browse files
release: 1.1.2 (#50)
* fix: api key not optional for stainless sdk * release: 1.1.2 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 1025361 commit 4419b37

File tree

7 files changed

+14
-46
lines changed

7 files changed

+14
-46
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.1.1"
2+
".": "1.1.2"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 117
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/letta-ai%2Fletta-sdk-467b56c7f84bbc387cccfda48345431547f7e621bfb06f005ea5844de77f1858.yml
33
openapi_spec_hash: ad37dbb38f5802754d614f1bb51e1b21
4-
config_hash: b9227d561917304255fa4365a296d3b3
4+
config_hash: adc4dc768447fe1323ab69965879aef4

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.1.2 (2025-11-21)
4+
5+
Full Changelog: [v1.1.1...v1.1.2](https://github.com/letta-ai/letta-python/compare/v1.1.1...v1.1.2)
6+
7+
### Bug Fixes
8+
9+
* api key not optional for stainless sdk ([6ef0456](https://github.com/letta-ai/letta-python/commit/6ef04566b0e8a0924132684ab22d0a96620f2e28))
10+
311
## 1.1.1 (2025-11-21)
412

513
Full Changelog: [v1.1.0...v1.1.1](https://github.com/letta-ai/letta-python/compare/v1.1.0...v1.1.1)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "letta-client"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
description = "The official Python library for the letta API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/letta_client/_client.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,6 @@ def default_headers(self) -> dict[str, str | Omit]:
216216
**self._custom_headers,
217217
}
218218

219-
@override
220-
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
221-
if self.api_key and headers.get("Authorization"):
222-
return
223-
if isinstance(custom_headers.get("Authorization"), Omit):
224-
return
225-
226-
raise TypeError(
227-
'"Could not resolve authentication method. Expected the api_key to be set. Or for the `Authorization` headers to be explicitly omitted"'
228-
)
229-
230219
def copy(
231220
self,
232221
*,
@@ -482,17 +471,6 @@ def default_headers(self) -> dict[str, str | Omit]:
482471
**self._custom_headers,
483472
}
484473

485-
@override
486-
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
487-
if self.api_key and headers.get("Authorization"):
488-
return
489-
if isinstance(custom_headers.get("Authorization"), Omit):
490-
return
491-
492-
raise TypeError(
493-
'"Could not resolve authentication method. Expected the api_key to be set. Or for the `Authorization` headers to be explicitly omitted"'
494-
)
495-
496474
def copy(
497475
self,
498476
*,

src/letta_client/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "letta_client"
4-
__version__ = "1.1.1" # x-release-please-version
4+
__version__ = "1.1.2" # x-release-please-version

tests/test_client.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,7 @@ def test_validate_headers(self) -> None:
353353
with update_env(**{"LETTA_API_KEY": Omit()}):
354354
client2 = Letta(base_url=base_url, api_key=None, _strict_response_validation=True)
355355

356-
with pytest.raises(
357-
TypeError,
358-
match="Could not resolve authentication method. Expected the api_key to be set. Or for the `Authorization` headers to be explicitly omitted",
359-
):
360-
client2._build_request(FinalRequestOptions(method="get", url="/foo"))
361-
362-
request2 = client2._build_request(
363-
FinalRequestOptions(method="get", url="/foo", headers={"Authorization": Omit()})
364-
)
365-
assert request2.headers.get("Authorization") is None
356+
client2._build_request(FinalRequestOptions(method="get", url="/foo"))
366357

367358
def test_default_query_option(self) -> None:
368359
client = Letta(
@@ -1204,16 +1195,7 @@ def test_validate_headers(self) -> None:
12041195
with update_env(**{"LETTA_API_KEY": Omit()}):
12051196
client2 = AsyncLetta(base_url=base_url, api_key=None, _strict_response_validation=True)
12061197

1207-
with pytest.raises(
1208-
TypeError,
1209-
match="Could not resolve authentication method. Expected the api_key to be set. Or for the `Authorization` headers to be explicitly omitted",
1210-
):
1211-
client2._build_request(FinalRequestOptions(method="get", url="/foo"))
1212-
1213-
request2 = client2._build_request(
1214-
FinalRequestOptions(method="get", url="/foo", headers={"Authorization": Omit()})
1215-
)
1216-
assert request2.headers.get("Authorization") is None
1198+
client2._build_request(FinalRequestOptions(method="get", url="/foo"))
12171199

12181200
async def test_default_query_option(self) -> None:
12191201
client = AsyncLetta(

0 commit comments

Comments
 (0)