Skip to content

Commit c36bf82

Browse files
authored
Merge pull request #211 from scaleapi/release-please--branches--main--changes--next
release: 0.7.0
2 parents 3a64af1 + 3af5336 commit c36bf82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+263
-52
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-
".": "0.6.7"
2+
".": "0.7.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-17022011bf153e3ac9e20d23c5dca8a3072b0e735b47bb391b6e35b00348d5a5.yml
3-
openapi_spec_hash: 0927cdce49a6e6915d6060c2ab43b0d0
4-
config_hash: 0197f86ba1a4b1b5ce813d0e62138588
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-00b021144c274cce2211ea6c6f90b60b6f88f33a7286a6bf38f4f803ae4c1643.yml
3+
openapi_spec_hash: d48de43356b6d0edc3f7a44b5980f7a0
4+
config_hash: 32eb65911c08ac84d117cecdf2759869

CHANGELOG.md

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

3+
## 0.7.0 (2025-12-09)
4+
5+
Full Changelog: [v0.6.7...v0.7.0](https://github.com/scaleapi/scale-agentex-python/compare/v0.6.7...v0.7.0)
6+
7+
### Features
8+
9+
* **api:** add messages/paginated endpoint ([3e03aff](https://github.com/scaleapi/scale-agentex-python/commit/3e03aff8490e0556cb05052d385156eda8f28107))
10+
* **api:** add messages/paginated to stainless config ([2473ded](https://github.com/scaleapi/scale-agentex-python/commit/2473ded39274bcd0a16d7314667fcf7f55e829c2))
11+
* **api:** api update ([f6eccdf](https://github.com/scaleapi/scale-agentex-python/commit/f6eccdf975eaef9b257ef3f20f087f2f2f9b3665))
12+
* **api:** api update ([41067fb](https://github.com/scaleapi/scale-agentex-python/commit/41067fb79725787e0ceb20dcf16029998bcbca24))
13+
* **api:** api update ([cdc9c63](https://github.com/scaleapi/scale-agentex-python/commit/cdc9c636be6f26e84772d1d1ef9d47cddcd9dabc))
14+
* **api:** api update ([413d9c8](https://github.com/scaleapi/scale-agentex-python/commit/413d9c806d918d7c5da3d0249c0f11d4b9f0894e))
15+
* **api:** api update ([1b4bf7d](https://github.com/scaleapi/scale-agentex-python/commit/1b4bf7d3a11306a50ec0eb9c20764c585d0e98e4))
16+
* **api:** manual updates ([131e836](https://github.com/scaleapi/scale-agentex-python/commit/131e836b5bda8248f847b00308b6711a1ee84ee0))
17+
18+
19+
### Bug Fixes
20+
21+
* ensure streams are always closed ([7bb9db8](https://github.com/scaleapi/scale-agentex-python/commit/7bb9db851a213d261e585cd2f156046f05cf85db))
22+
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([9cfc9d6](https://github.com/scaleapi/scale-agentex-python/commit/9cfc9d66579a11f3eaf248bafbfddb422e878a58))
23+
24+
25+
### Chores
26+
27+
* add missing docstrings ([81f1fa9](https://github.com/scaleapi/scale-agentex-python/commit/81f1fa9b3c440d893b8ea8f773ab2592eb333d65))
28+
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([e20aaa4](https://github.com/scaleapi/scale-agentex-python/commit/e20aaa495384f547dd18c8d31496f70b4a37e0dd))
29+
* **docs:** use environment variables for authentication in code snippets ([a30f6ae](https://github.com/scaleapi/scale-agentex-python/commit/a30f6aebca8de5be72eb7bcf7a3b3ccea28479bc))
30+
* update lockfile ([a3a2e4f](https://github.com/scaleapi/scale-agentex-python/commit/a3a2e4fbcf6e6e4bcbadab50c6b9236e4514dae2))
31+
332
## 0.6.7 (2025-11-19)
433

534
Full Changelog: [v0.6.6...v0.6.7](https://github.com/scaleapi/scale-agentex-python/compare/v0.6.6...v0.6.7)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,15 @@ pip install agentex-sdk[aiohttp]
113113
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
114114

115115
```python
116+
import os
116117
import asyncio
117118
from agentex import DefaultAioHttpClient
118119
from agentex import AsyncAgentex
119120

120121

121122
async def main() -> None:
122123
async with AsyncAgentex(
123-
api_key="My API Key",
124+
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
124125
http_client=DefaultAioHttpClient(),
125126
) as client:
126127
tasks = await client.tasks.list()

pyproject.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
[project]
22
name = "agentex-sdk"
3-
version = "0.6.7"
3+
version = "0.7.0"
44
description = "The official Python library for the agentex API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
88
{ name = "Agentex", email = "[email protected]" },
99
]
10+
1011
dependencies = [
1112
"httpx>=0.27.2,<0.28",
1213
"pydantic>=2.0.0, <3",
13-
"typing-extensions>=4.10, <5",
14-
"anyio>=3.5.0, <5",
15-
"distro>=1.7.0, <2",
16-
"sniffio",
14+
"typing-extensions>=4.10, <5",
15+
"anyio>=3.5.0, <5",
16+
"distro>=1.7.0, <2",
17+
"sniffio",
1718
"typer>=0.16,<0.17",
1819
"questionary>=2.0.1,<3",
1920
"rich>=13.9.2,<14",
@@ -48,6 +49,7 @@ dependencies = [
4849
"claude-agent-sdk>=0.1.0",
4950
"anthropic>=0.40.0",
5051
]
52+
5153
requires-python = ">= 3.12,<4"
5254
classifiers = [
5355
"Typing :: Typed",
@@ -82,7 +84,7 @@ managed = true
8284
# version pins are in requirements-dev.lock
8385
dev-dependencies = [
8486
"pyright==1.1.399",
85-
"mypy",
87+
"mypy==1.17",
8688
"respx",
8789
"pytest",
8890
"pytest-asyncio",

requirements-dev.lock

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
-e file:.
1313
aiohappyeyeballs==2.6.1
1414
# via aiohttp
15-
aiohttp==3.12.8
15+
aiohttp==3.13.2
1616
# via agentex-sdk
1717
# via httpx-aiohttp
1818
# via litellm
1919
aiosignal==1.3.2
2020
# via aiohttp
21-
annotated-types==0.6.0
21+
annotated-types==0.7.0
2222
# via pydantic
2323
anyio==4.10.0
2424
# via agentex-sdk
@@ -74,7 +74,7 @@ decorator==5.2.1
7474
dirty-equals==0.6.0
7575
distlib==0.3.7
7676
# via virtualenv
77-
distro==1.8.0
77+
distro==1.9.0
7878
# via agentex-sdk
7979
# via openai
8080
# via scale-gp
@@ -90,7 +90,7 @@ fastapi==0.115.14
9090
filelock==3.12.4
9191
# via huggingface-hub
9292
# via virtualenv
93-
frozenlist==1.6.2
93+
frozenlist==1.8.0
9494
# via aiohttp
9595
# via aiosignal
9696
fsspec==2025.7.0
@@ -175,11 +175,11 @@ mcp==1.12.4
175175
# via openai-agents
176176
mdurl==0.1.2
177177
# via markdown-it-py
178-
multidict==6.4.4
178+
multidict==6.7.0
179179
# via aiohttp
180180
# via yarl
181-
mypy==1.14.1
182-
mypy-extensions==1.0.0
181+
mypy==1.17.0
182+
mypy-extensions==1.1.0
183183
# via mypy
184184
nest-asyncio==1.6.0
185185
# via ipykernel
@@ -204,14 +204,16 @@ packaging==23.2
204204
# via ipykernel
205205
# via nox
206206
# via pytest
207+
pathspec==0.12.1
208+
# via mypy
207209
parso==0.8.4
208210
# via jedi
209211
pexpect==4.9.0
210212
# via ipython
211213
platformdirs==3.11.0
212214
# via jupyter-core
213215
# via virtualenv
214-
pluggy==1.5.0
216+
pluggy==1.6.0
215217
# via pytest
216218
prompt-toolkit==3.0.51
217219
# via ipython
@@ -325,7 +327,7 @@ shellingham==1.5.4
325327
six==1.16.0
326328
# via kubernetes
327329
# via python-dateutil
328-
sniffio==1.3.0
330+
sniffio==1.3.1
329331
# via agentex-sdk
330332
# via anyio
331333
# via httpx
@@ -371,6 +373,7 @@ types-urllib3==1.26.25.14
371373
# via types-requests
372374
typing-extensions==4.12.2
373375
# via agentex-sdk
376+
# via aiosignal
374377
# via anyio
375378
# via fastapi
376379
# via huggingface-hub
@@ -389,7 +392,8 @@ typing-extensions==4.12.2
389392
# via temporalio
390393
# via typer
391394
# via typing-inspection
392-
typing-inspection==0.4.1
395+
# via virtualenv
396+
typing-inspection==0.4.2
393397
# via pydantic
394398
# via pydantic-settings
395399
tzdata==2025.2
@@ -414,5 +418,5 @@ wrapt==1.17.3
414418
# via ddtrace
415419
yarl==1.20.0
416420
# via aiohttp
417-
zipp==3.17.0
421+
zipp==3.23.0
418422
# via importlib-metadata

requirements.lock

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
-e file:.
1313
aiohappyeyeballs==2.6.1
1414
# via aiohttp
15-
aiohttp==3.12.8
15+
aiohttp==3.13.2
1616
# via agentex-sdk
1717
# via httpx-aiohttp
1818
# via litellm
1919
aiosignal==1.3.2
2020
# via aiohttp
21-
annotated-types==0.6.0
21+
annotated-types==0.7.0
2222
# via pydantic
2323
anyio==4.10.0
2424
# via agentex-sdk
@@ -200,6 +200,9 @@ prompt-toolkit==3.0.51
200200
propcache==0.3.1
201201
# via aiohttp
202202
# via yarl
203+
pydantic==2.12.5
204+
# via agentex-sdk
205+
pydantic-core==2.41.5
203206
protobuf==5.29.5
204207
# via ddtrace
205208
# via temporalio
@@ -214,18 +217,6 @@ pyasn1==0.6.1
214217
# via rsa
215218
pyasn1-modules==0.4.2
216219
# via google-auth
217-
pydantic==2.11.9
218-
# via agentex-sdk
219-
# via fastapi
220-
# via litellm
221-
# via mcp
222-
# via openai
223-
# via openai-agents
224-
# via pydantic-settings
225-
# via python-on-whales
226-
# via scale-gp
227-
# via scale-gp-beta
228-
pydantic-core==2.33.2
229220
# via pydantic
230221
pydantic-settings==2.10.1
231222
# via mcp
@@ -299,7 +290,7 @@ six==1.17.0
299290
# via python-dateutil
300291
sniffio==1.3.0
301292
# via agentex-sdk
302-
# via anyio
293+
typing-extensions==4.15.0
303294
# via httpx
304295
# via openai
305296
# via scale-gp
@@ -340,8 +331,8 @@ types-requests==2.31.0.6
340331
# via openai-agents
341332
types-urllib3==1.26.25.14
342333
# via types-requests
343-
typing-extensions==4.12.2
344334
# via agentex-sdk
335+
# via aiosignal
345336
# via anyio
346337
# via fastapi
347338
# via huggingface-hub
@@ -358,7 +349,7 @@ typing-extensions==4.12.2
358349
# via temporalio
359350
# via typer
360351
# via typing-inspection
361-
typing-inspection==0.4.1
352+
typing-inspection==0.4.2
362353
# via pydantic
363354
# via pydantic-settings
364355
tzdata==2025.2

src/agentex/_streaming.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ def __stream__(self) -> Iterator[_T]:
5454
process_data = self._client._process_response_data
5555
iterator = self._iter_events()
5656

57-
for sse in iterator:
58-
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59-
60-
# As we might not fully consume the response stream, we need to close it explicitly
61-
response.close()
57+
try:
58+
for sse in iterator:
59+
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
60+
finally:
61+
# Ensure the response is closed even if the consumer doesn't read all data
62+
response.close()
6263

6364
def __enter__(self) -> Self:
6465
return self
@@ -117,11 +118,12 @@ async def __stream__(self) -> AsyncIterator[_T]:
117118
process_data = self._client._process_response_data
118119
iterator = self._iter_events()
119120

120-
async for sse in iterator:
121-
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
122-
123-
# As we might not fully consume the response stream, we need to close it explicitly
124-
await response.aclose()
121+
try:
122+
async for sse in iterator:
123+
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
124+
finally:
125+
# Ensure the response is closed even if the consumer doesn't read all data
126+
await response.aclose()
125127

126128
async def __aenter__(self) -> Self:
127129
return self

src/agentex/_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False):
243243
if TYPE_CHECKING:
244244
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
245245
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
246+
#
247+
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
248+
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
246249
class SequenceNotStr(Protocol[_T_co]):
247250
@overload
248251
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
251254
def __contains__(self, value: object, /) -> bool: ...
252255
def __len__(self) -> int: ...
253256
def __iter__(self) -> Iterator[_T_co]: ...
254-
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
255-
def count(self, value: Any, /) -> int: ...
256257
def __reversed__(self) -> Iterator[_T_co]: ...
257258
else:
258259
# just point this to a normal `Sequence` at runtime to avoid having to special case

src/agentex/_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__ = "agentex"
4-
__version__ = "0.6.7" # x-release-please-version
4+
__version__ = "0.7.0" # x-release-please-version

0 commit comments

Comments
 (0)