Releases: scaleapi/scale-agentex-python
v0.10.3
0.10.3 (2026-04-30)
Full Changelog: v0.10.2...v0.10.3
Features
Bug Fixes
- adk: Always inject headers on execute activity (#337) (9d80e0b)
- allow litellm security patch (#336) (c980948)
- tests: repair test_streaming_model so all 28 tests run and pass (#334) (7e5e69c)
- use correct field name format for multipart file arrays (bd6d362)
Performance Improvements
Chores
- internal: more robust bootstrap script (f004301)
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Greptile Summary
This release bundles several independent fixes and one performance feature: a CoalescingBuffer that batches per-token Redis publishes into 50 ms / 128-char windows, three execute_activity_method → execute_activity corrections so headers are always injected, a BaseHTTPMiddleware → pure ASGI swap that fixes streaming response buffering, and an AGENTEX_CUSTOM_HEADERS env-var feature.
- The expanded header-injection scope in
context_interceptor.pynow fireslogger.warningfor every non-agentex activity that lacks_task_id, which will flood logs in multi-activity workflows. send_message(sync + async) silently discards JSON-RPC error payloads when the server returns an error envelope, returning an emptyresultlist instead.
Confidence Score: 4/5
Safe to merge with minor follow-up; no data loss or critical runtime failures introduced.
Both findings are P2: the warning log noise in the interceptor is annoying but not functionally breaking, and the silent error discard in send_message was a pre-existing gap now made slightly more likely to hit. All P0/P1 bugs (execute_activity fix, BaseHTTPMiddleware streaming fix, multipart field naming) are addressed with tests.
src/agentex/resources/agents.py (silent error swallowing in send_message) and src/agentex/lib/core/temporal/plugins/openai_agents/interceptors/context_interceptor.py (warning log level).
Important Files Changed
| Filename | Overview |
|---|---|
| src/agentex/lib/core/services/adk/streaming.py | Major addition: CoalescingBuffer (50ms/128-char windowed batching), StreamingMode literal, and delta merge helpers; StreamingTaskMessageContext updated to dispatch through the new buffer. |
| src/agentex/resources/agents.py | send_message (sync + async) refactored to consume a streaming response and reconstruct the final result; JSON-RPC error chunks are silently discarded with an empty task_messages list. |
| src/agentex/lib/core/temporal/plugins/openai_agents/interceptors/context_interceptor.py | Header injection scope widened from model-only activities to all activities; logger.warning fires for every non-agentex workflow activity that lacks _task_id/_trace_id/_parent_span_id. |
| src/agentex/lib/sdk/fastacp/base/base_acp_server.py | RequestIDMiddleware replaced from BaseHTTPMiddleware (which buffers streaming responses) to a pure ASGI middleware; fixes streaming response truncation. |
| src/agentex/_utils/_utils.py | extract_files now accepts an array_format parameter and delegates suffix generation to _array_suffix; fixes bracket/indices/repeat/comma naming for multipart file arrays. |
| src/agentex/_client.py | Added AGENTEX_CUSTOM_HEADERS env var support (newline-delimited key:value pairs) in both sync and async clients; env headers take precedence over default_headers argument. |
| src/agentex/lib/core/temporal/plugins/openai_agents/hooks/hooks.py | Switched execute_activity_method to execute_activity for stream_lifecycle_content calls; ensures header injection by the context interceptor. |
| pyproject.toml | Bumped httpx (0.27 → 0.28), litellm minimum (1.83.0 → 1.83.7 for security patch), pinned starlette>=0.49.1 and tornado>=6.5.5 explicitly, and relaxed fastapi upper bound. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[stream_update called] --> B{streaming_mode?}
B -->|off| C[Feed accumulator only\nno publish]
B -->|per_token| D[Publish immediately\nvia stream_update]
B -->|coalesced| E[CoalescingBuffer.add]
E --> F{first delta OR\nbuf_chars >= 128?}
F -->|yes| G[Signal flush_event]
F -->|no| H[Wait for ticker]
G --> I[_run background task\nawakens immediately]
H --> J[50ms timeout\nexpires]
I --> K[_drain_locked:\nmerge consecutive same-channel deltas]
J --> K
K --> L[Publish merged batch\nvia on_flush]
M[context.close] --> N[buffer.close:\ncancel ticker\ndrain remainder]
N --> L
L --> O[stream_update:\nStreamTaskMessageDone]v0.10.2
v0.10.1
0.10.1 (2026-04-17)
Full Changelog: v0.10.0...v0.10.1
v0.10.0
v0.9.10
v0.9.9
0.9.9 (2026-04-07)
Full Changelog: v0.9.8...v0.9.9
Bug Fixes
- client: preserve hardcoded query params when merging with user params (4a97659)
v0.9.8
v0.9.7
v0.9.6
0.9.6 (2026-03-30)
Full Changelog: v0.9.5...v0.9.6
Features
- api: add task state update methods (d699e24)
- api: keep backwards compatible models (3ec2a1e)
- api: use DeploymentHistory instead of DeploymentHistoryRetrieveResponse (4c63d9c)
- internal: implement indices array format for query and form serialization (3bf3db1)
Bug Fixes
- deps: bump minimum typing-extensions version (fd76bc9)
- pydantic: do not pass
by_aliasunless set (235636b) - sanitize endpoint path params (e6472be)
Chores
- ci: skip lint on metadata-only changes (f4d5053)
- ci: skip uploading artifacts on stainless-internal branches (45e7622)
- format all
api.mdfiles (e67fa69) - internal: add request options to SSE classes (b788da0)
- internal: bump dependencies (95112dd)
- internal: fix lint error on Python 3.14 (cb99db1)
- internal: make
test_proxy_environment_variablesmore resilient (7bfaa75) - internal: make
test_proxy_environment_variablesmore resilient to env (fd1a06e) - internal: remove mock server code (3a5ae0f)
- internal: tweak CI branches (2e74af0)
- internal: update gitignore (aba7c4f)
- internal: version bump (1ef69ed)
- internal: version bump (1132255)
- internal: version bump (60e5402)
- update mock server docs (8c5c6d3)
v0.9.5
0.9.5 (2026-03-24)
Full Changelog: v0.9.4...v0.9.5