v0.11.1
0.11.1 (2026-05-13)
Full Changelog: v0.11.0...v0.11.1
⚠ BREAKING CHANGES
- remove AgentexTracingProcessor from default tracing processors (#349)
Features
- api: add models for event requests, surface created_at for messages (1998d73)
- api: api update (da06505)
- api: revert model additions (a02c15b)
- internal/types: support eagerly validating pydantic iterators (2c528c6)
- remove AgentexTracingProcessor from default tracing processors (#349) (73eca7a)
- streaming: emit OTel metrics for ttft, tps, token counts (#347) (3bf7d1f)
Bug Fixes
- client: add missing f-string prefix in file type error message (dcb1cb4)
- render .env.example template in agentex init (#351) (6092595)
- tracing: make SGP processor stateless to stop dropping span closes (#354) (5e9f28d)
- wire SGP_CLIENT_BASE_URL and silence openai-agents tracer in templates (#352) (870324e)
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
- Adds OTel LLM metrics (
ttft,ttat,tps, token counters, request counter with status) centralized inllm_metrics.py;TemporalStreamingHooksnow extendsLLMMetricsHooksso token/request metrics fire consistently across streaming and (future) sync paths. - Refactors
SGPSyncTracingProcessorandSGPAsyncTracingProcessorto be stateless — per-span_spansdict removed and replaced with an idempotent_build_sgp_span()helper, fixing a silent span-drop bug on Temporal cross-pod deployments where START and END land on different workers. - API surface additions:
created_atparameter onmessages.createandmessages.batch.create;set_tracing_disabled(True)added to generated templates to stop the openai-agents SDK from shipping traces toapi.openai.comviaOPENAI_API_KEY.
Confidence Score: 4/5
Safe to merge; only a P2 monitoring gap and a pre-existing template issue already flagged in prior reviews
No P0/P1 bugs in the changed code. The stateless SGP processor refactor is well-tested and fixes a real cross-pod drop issue. The one P2 finding (sync ACP error path not wired to record_llm_failure) is a monitoring completeness gap, not a runtime failure.
src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 (unconditional SGP tracing, already flagged in prior reviews); src/agentex/lib/core/observability/llm_metrics_hooks.py (no error hook for sync path)
Important Files Changed
| Filename | Overview |
|---|---|
| src/agentex/lib/core/observability/llm_metrics.py | New OTel metric instruments for LLM calls (requests, ttft, ttat, tps, token counters); singleton get_llm_metrics() and classify_status() helper with bounded status labels. |
| src/agentex/lib/core/observability/llm_metrics_hooks.py | LLMMetricsHooks emits success request counter + token counters via on_llm_end; record_llm_failure covers error path for temporal streaming only — sync ACP error path is untracked. |
| src/agentex/lib/core/temporal/plugins/openai_agents/models/temporal_streaming_model.py | Adds ttft/ttat/tps OTel metric recording to streaming loop; record_llm_failure wired in except block; stream_start_perf captured before await for accurate latency. |
| src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py | Stateless refactor: per-span _spans dict removed; _build_sgp_span() builds SGPSpan idempotently on both start and end, fixing cross-pod span-drop for Temporal deployments. |
| src/agentex/lib/core/tracing/tracing_processor_manager.py | Removes AgentexTracingProcessor from default tracing processors (breaking change per CHANGELOG); lazy-init logic dropped. |
| src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 | Adds set_tracing_disabled(True) and SGP_CLIENT_BASE_URL wiring; add_tracing_processor_config is still called unconditionally (no SGP_API_KEY/SGP_ACCOUNT_ID guard), unlike the sibling acp.py.j2 template. |
| src/agentex/lib/cli/templates/sync-openai-agents/project/acp.py.j2 | Adds set_tracing_disabled(True) and SGP_CLIENT_BASE_URL wiring; tracing processor correctly guarded by if SGP_API_KEY and SGP_ACCOUNT_ID. |
| src/agentex/_models.py | Adds EagerIterable / _EagerIterable for eager pydantic validation of generator inputs; type reconstruction, str-subclass guard, and serialize-as-list serializer are all correct. |
| src/agentex/lib/core/temporal/plugins/openai_agents/hooks/hooks.py | TemporalStreamingHooks now inherits from LLMMetricsHooks, wiring token/request metrics into the async temporal path. |
| src/agentex/_files.py | Adds missing f-string prefix to file-type error message — was emitting a literal placeholder string before this fix. |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.