Skip to content

Commit 82345ae

Browse files
release: 3.6.0 (#64)
* feat(api): manual updates * fix: test setup needs all three access keys * fix: lints * release: 3.6.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Ben Batha <[email protected]>
1 parent 292da2b commit 82345ae

File tree

6 files changed

+40
-4
lines changed

6 files changed

+40
-4
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-
".": "3.5.0"
2+
".": "3.6.0"
33
}

CHANGELOG.md

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

3+
## 3.6.0 (2025-10-16)
4+
5+
Full Changelog: [v3.5.0...v3.6.0](https://github.com/digitalocean/gradient-python/compare/v3.5.0...v3.6.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([da88e9e](https://github.com/digitalocean/gradient-python/commit/da88e9eee0adc6152d0d8212305397483be0d686))
10+
11+
12+
### Bug Fixes
13+
14+
* lints ([a1b1fc6](https://github.com/digitalocean/gradient-python/commit/a1b1fc6b7747c00d9bfc2b86c6262e9c123416dc))
15+
* test setup needs all three access keys ([01ac735](https://github.com/digitalocean/gradient-python/commit/01ac735fb965686699df82ec8763b18ceb660972))
16+
317
## 3.5.0 (2025-10-14)
418

519
Full Changelog: [v3.4.0...v3.5.0](https://github.com/digitalocean/gradient-python/compare/v3.4.0...v3.5.0)

pyproject.toml

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

src/gradient/_client.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,16 @@ def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
291291
if isinstance(custom_headers.get("Authorization"), Omit):
292292
return
293293

294+
if self.model_access_key and headers.get("Authorization"):
295+
return
296+
if isinstance(custom_headers.get("Authorization"), Omit):
297+
return
298+
299+
if self.agent_access_key and headers.get("Authorization"):
300+
return
301+
if isinstance(custom_headers.get("Authorization"), Omit):
302+
return
303+
294304
raise TypeError(
295305
'"Could not resolve authentication method. Expected access_token, agent_access_key, or model_access_key to be set. Or for the `Authorization` headers to be explicitly omitted"'
296306
)
@@ -614,6 +624,16 @@ def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
614624
if isinstance(custom_headers.get("Authorization"), Omit):
615625
return
616626

627+
if self.model_access_key and headers.get("Authorization"):
628+
return
629+
if isinstance(custom_headers.get("Authorization"), Omit):
630+
return
631+
632+
if self.agent_access_key and headers.get("Authorization"):
633+
return
634+
if isinstance(custom_headers.get("Authorization"), Omit):
635+
return
636+
617637
raise TypeError(
618638
'"Could not resolve authentication method. Expected access_token, agent_access_key, or model_access_key to be set. Or for the `Authorization` headers to be explicitly omitted"'
619639
)

src/gradient/_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__ = "gradient"
4-
__version__ = "3.5.0" # x-release-please-version
4+
__version__ = "3.6.0" # x-release-please-version

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
from gradient._utils import is_dict
1515

1616
if TYPE_CHECKING:
17-
from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage]
17+
from _pytest.fixtures import (
18+
FixtureRequest, # pyright: ignore[reportPrivateImportUsage]
19+
)
1820

1921
pytest.register_assert_rewrite("tests.utils")
2022

0 commit comments

Comments
 (0)