From dcb1cb489bc565828c16c327c5ab6b678b13c0fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 16:28:52 +0000 Subject: [PATCH 1/4] fix(client): add missing f-string prefix in file type error message --- src/agentex/_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agentex/_files.py b/src/agentex/_files.py index 0fdce17bf..76da9e085 100644 --- a/src/agentex/_files.py +++ b/src/agentex/_files.py @@ -99,7 +99,7 @@ async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles elif is_sequence_t(files): files = [(key, await _async_transform_file(file)) for key, file in files] else: - raise TypeError("Unexpected file type input {type(files)}, expected mapping or sequence") + raise TypeError(f"Unexpected file type input {type(files)}, expected mapping or sequence") return files From 870324e7bb87cefc20a79dc344d8603a836ca9b5 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Fri, 8 May 2026 15:01:20 -0400 Subject: [PATCH 2/4] fix: wire SGP_CLIENT_BASE_URL and silence openai-agents tracer in templates (#352) Co-authored-by: Claude Opus 4.7 (1M context) --- .../lib/cli/templates/default-langgraph/.env.example.j2 | 1 + src/agentex/lib/cli/templates/default/.env.example.j2 | 1 + .../lib/cli/templates/sync-langgraph/.env.example.j2 | 1 + .../lib/cli/templates/sync-openai-agents/.env.example.j2 | 1 + .../cli/templates/sync-openai-agents/project/acp.py.j2 | 9 ++++++++- src/agentex/lib/cli/templates/sync/.env.example.j2 | 1 + .../cli/templates/temporal-openai-agents/.env.example.j2 | 1 + .../temporal-openai-agents/project/workflow.py.j2 | 9 ++++++++- src/agentex/lib/cli/templates/temporal/.env.example.j2 | 1 + 9 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/agentex/lib/cli/templates/default-langgraph/.env.example.j2 b/src/agentex/lib/cli/templates/default-langgraph/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/default-langgraph/.env.example.j2 +++ b/src/agentex/lib/cli/templates/default-langgraph/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= diff --git a/src/agentex/lib/cli/templates/default/.env.example.j2 b/src/agentex/lib/cli/templates/default/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/default/.env.example.j2 +++ b/src/agentex/lib/cli/templates/default/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= diff --git a/src/agentex/lib/cli/templates/sync-langgraph/.env.example.j2 b/src/agentex/lib/cli/templates/sync-langgraph/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/sync-langgraph/.env.example.j2 +++ b/src/agentex/lib/cli/templates/sync-langgraph/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= diff --git a/src/agentex/lib/cli/templates/sync-openai-agents/.env.example.j2 b/src/agentex/lib/cli/templates/sync-openai-agents/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/sync-openai-agents/.env.example.j2 +++ b/src/agentex/lib/cli/templates/sync-openai-agents/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= diff --git a/src/agentex/lib/cli/templates/sync-openai-agents/project/acp.py.j2 b/src/agentex/lib/cli/templates/sync-openai-agents/project/acp.py.j2 index 2295eccb3..0b3b482fe 100644 --- a/src/agentex/lib/cli/templates/sync-openai-agents/project/acp.py.j2 +++ b/src/agentex/lib/cli/templates/sync-openai-agents/project/acp.py.j2 @@ -13,7 +13,12 @@ from agentex.types.task_message_update import TaskMessageUpdate, StreamTaskMessa from agentex.types.task_message_content import TaskMessageContent from agentex.types.text_content import TextContent from agentex.lib.utils.logging import make_logger -from agents import Agent, Runner, RunConfig, function_tool +from agents import Agent, Runner, RunConfig, function_tool, set_tracing_disabled + +# Disable the openai-agents SDK's native tracer so it doesn't ship traces to +# api.openai.com using OPENAI_API_KEY (which may be a LiteLLM proxy key). +# SGP tracing below still runs via the Agentex tracing manager. +set_tracing_disabled(True) logger = make_logger(__name__) @@ -25,12 +30,14 @@ if _litellm_key: SGP_API_KEY = os.environ.get("SGP_API_KEY", "") SGP_ACCOUNT_ID = os.environ.get("SGP_ACCOUNT_ID", "") +SGP_CLIENT_BASE_URL = os.environ.get("SGP_CLIENT_BASE_URL", "") if SGP_API_KEY and SGP_ACCOUNT_ID: add_tracing_processor_config( SGPTracingProcessorConfig( sgp_api_key=SGP_API_KEY, sgp_account_id=SGP_ACCOUNT_ID, + sgp_base_url=SGP_CLIENT_BASE_URL, ) ) diff --git a/src/agentex/lib/cli/templates/sync/.env.example.j2 b/src/agentex/lib/cli/templates/sync/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/sync/.env.example.j2 +++ b/src/agentex/lib/cli/templates/sync/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= diff --git a/src/agentex/lib/cli/templates/temporal-openai-agents/.env.example.j2 b/src/agentex/lib/cli/templates/temporal-openai-agents/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/temporal-openai-agents/.env.example.j2 +++ b/src/agentex/lib/cli/templates/temporal-openai-agents/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= diff --git a/src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 b/src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 index 94b5221fb..5b95d4479 100644 --- a/src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 +++ b/src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 @@ -10,7 +10,13 @@ from agentex.lib.core.temporal.types.workflow import SignalName from agentex.lib.utils.logging import make_logger from agentex.types.text_content import TextContent from agentex.lib.environment_variables import EnvironmentVariables -from agents import Agent, Runner +from agents import Agent, Runner, set_tracing_disabled + +# Disable the openai-agents SDK's native tracer so it doesn't ship traces to +# api.openai.com using OPENAI_API_KEY (which may be a LiteLLM proxy key). +# SGP tracing below still runs via the Agentex tracing manager. +set_tracing_disabled(True) + from agentex.lib.core.temporal.plugins.openai_agents.hooks.hooks import TemporalStreamingHooks from pydantic import BaseModel from typing import List, Dict, Any @@ -39,6 +45,7 @@ add_tracing_processor_config( SGPTracingProcessorConfig( sgp_api_key=os.environ.get("SGP_API_KEY", ""), sgp_account_id=os.environ.get("SGP_ACCOUNT_ID", ""), + sgp_base_url=os.environ.get("SGP_CLIENT_BASE_URL", ""), ) ) diff --git a/src/agentex/lib/cli/templates/temporal/.env.example.j2 b/src/agentex/lib/cli/templates/temporal/.env.example.j2 index 1e81b15dd..015f49ef7 100644 --- a/src/agentex/lib/cli/templates/temporal/.env.example.j2 +++ b/src/agentex/lib/cli/templates/temporal/.env.example.j2 @@ -10,3 +10,4 @@ LITELLM_API_KEY= # SGP Configuration (optional - for tracing) # SGP_API_KEY= # SGP_ACCOUNT_ID= +# SGP_CLIENT_BASE_URL= From 73eca7ad620a7e0a8bd0180b9dee02a7dde12dbb Mon Sep 17 00:00:00 2001 From: Stas Moreinis Date: Fri, 8 May 2026 14:15:54 -0700 Subject: [PATCH 3/4] feat!: remove AgentexTracingProcessor from default tracing processors (#349) --- .../core/tracing/tracing_processor_manager.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/agentex/lib/core/tracing/tracing_processor_manager.py b/src/agentex/lib/core/tracing/tracing_processor_manager.py index 14b0ce39b..07c440313 100644 --- a/src/agentex/lib/core/tracing/tracing_processor_manager.py +++ b/src/agentex/lib/core/tracing/tracing_processor_manager.py @@ -3,7 +3,7 @@ from typing import TYPE_CHECKING from threading import Lock -from agentex.lib.types.tracing import TracingProcessorConfig, AgentexTracingProcessorConfig +from agentex.lib.types.tracing import TracingProcessorConfig from agentex.lib.core.tracing.processors.sgp_tracing_processor import ( SGPSyncTracingProcessor, SGPAsyncTracingProcessor, @@ -73,22 +73,8 @@ def get_async_processors(self) -> list[AsyncTracingProcessor]: add_tracing_processor_config = GLOBAL_TRACING_PROCESSOR_MANAGER.add_processor_config set_tracing_processor_configs = GLOBAL_TRACING_PROCESSOR_MANAGER.set_processor_configs -# Lazy initialization to avoid circular imports -_default_initialized = False - -def _ensure_default_initialized(): - """Ensure default processor is initialized (lazy to avoid circular imports).""" - global _default_initialized - if not _default_initialized: - add_tracing_processor_config(AgentexTracingProcessorConfig()) - _default_initialized = True - def get_sync_tracing_processors(): - """Get sync processors, initializing defaults if needed.""" - _ensure_default_initialized() return GLOBAL_TRACING_PROCESSOR_MANAGER.get_sync_processors() def get_async_tracing_processors(): - """Get async processors, initializing defaults if needed.""" - _ensure_default_initialized() return GLOBAL_TRACING_PROCESSOR_MANAGER.get_async_processors() From ec02cb4f425a1652151059da3d8af8a21e22ee2c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 21:16:41 +0000 Subject: [PATCH 4/4] release: 0.12.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ pyproject.toml | 2 +- src/agentex/_version.py | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 78e7f271d..8032c17e8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.11.0" + ".": "0.12.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d9dc1f90..b68dab671 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 0.12.0 (2026-05-08) + +Full Changelog: [v0.11.0...v0.12.0](https://github.com/scaleapi/scale-agentex-python/compare/v0.11.0...v0.12.0) + +### ⚠ BREAKING CHANGES + +* remove AgentexTracingProcessor from default tracing processors ([#349](https://github.com/scaleapi/scale-agentex-python/issues/349)) + +### Features + +* remove AgentexTracingProcessor from default tracing processors ([#349](https://github.com/scaleapi/scale-agentex-python/issues/349)) ([73eca7a](https://github.com/scaleapi/scale-agentex-python/commit/73eca7ad620a7e0a8bd0180b9dee02a7dde12dbb)) + + +### Bug Fixes + +* **client:** add missing f-string prefix in file type error message ([dcb1cb4](https://github.com/scaleapi/scale-agentex-python/commit/dcb1cb489bc565828c16c327c5ab6b678b13c0fa)) +* render .env.example template in agentex init ([#351](https://github.com/scaleapi/scale-agentex-python/issues/351)) ([6092595](https://github.com/scaleapi/scale-agentex-python/commit/6092595fa8a267b2c305baba09e2682c04d593b3)) +* wire SGP_CLIENT_BASE_URL and silence openai-agents tracer in templates ([#352](https://github.com/scaleapi/scale-agentex-python/issues/352)) ([870324e](https://github.com/scaleapi/scale-agentex-python/commit/870324e7bb87cefc20a79dc344d8603a836ca9b5)) + ## 0.11.0 (2026-05-07) Full Changelog: [v0.10.5...v0.11.0](https://github.com/scaleapi/scale-agentex-python/compare/v0.10.5...v0.11.0) diff --git a/pyproject.toml b/pyproject.toml index 547fc9cf9..aff030d70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agentex-sdk" -version = "0.11.0" +version = "0.12.0" description = "The official Python library for the agentex API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/agentex/_version.py b/src/agentex/_version.py index 59720802a..80a336119 100644 --- a/src/agentex/_version.py +++ b/src/agentex/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "agentex" -__version__ = "0.11.0" # x-release-please-version +__version__ = "0.12.0" # x-release-please-version