Repository navigation
chore: merge main into dev (Python tests CI and the LiveKit fix) - #277
Merged
Merged
Conversation
Add OpenTelemetry instrumentation for MiniMax (https://www.minimax.io/), which provides an OpenAI-compatible API. This integration supports: - MiniMax-M2.5 and MiniMax-M2.5-highspeed models (204K context) - Sync and async chat completions - Streaming responses - Function/tool calling - Token usage tracking The implementation follows the same pattern as the existing DeepSeek integration, detecting MiniMax clients by their base_url (api.minimax.io) and wrapping OpenAI SDK calls accordingly. Changes: - New package: python/frameworks/minimax/ (traceai_minimax) - Added MINIMAX to FiLLMProviderValues enum - Updated README.md with MiniMax in supported frameworks - Includes comprehensive tests (19 passing) and usage examples
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list - Set MiniMax-M2.7 as default model - Keep all previous models as alternatives - Update related tests and documentation
- Remove protect wrapper entirely from MiniMaxInstrumentor (traced by other instrumentors), resolving both the __slots__ mismatch and the missing uninstrument restore - Fix dual OUTPUT_VALUE overwrite in both non-streaming and streaming response extractors by removing the unconditional raw JSON dump that silently overwrote human-readable content - Replace string constants with MiniMaxBaseURL enum in _utils.py and switch from substring matching to strict hostname matching via urlparse for safety - Clean up conftest.py to remove now-unnecessary protect/fi.evals mocks
…sor (#165) * otel: call super().shutdown() in exporter classes Both GRPCSpanExporter and HTTPSpanExporter close the session but skip the parent shutdown, which flushes buffered spans. This drops pending trace data on process exit. Fixes part of #164 Signed-off-by: pmady <[email protected]> * otel: guard shutdown snapshot with a lock The snapshot (line 445) and clear (line 458) in SimpleSpanProcessor.shutdown() can race with on_start writes from other threads. Lock only around those two operations per review feedback -- the hot path stays lock-free since dict insert/pop are atomic under GIL. Fixes part of #164 Signed-off-by: pmady <[email protected]> * otel: use logger instead of print() in shutdown paths The module-level logger is already defined at line 55 but the shutdown methods use print(). Switch to logger.warning and logger.error so platform teams can route these through their logging pipeline. Partially addresses #164 finding 5 Signed-off-by: pmady <[email protected]> --------- Signed-off-by: pmady <[email protected]>
release: @traceai/mastra v0.2.0 — Mastra v1 observability
feat: add MiniMax LLM provider instrumentation (M2.7 default)
…acy filter (TH-8665) With livekit-agents 1.8, traceAI-livekit sent no traces. register() marks its own exporter as a default that the next add_span_processor call replaces, and LiveKit's set_tracer_provider adds its privacy filter through add_span_processor, so the exporter was shut down and removed. enable_*_attribute_mapping() now clears that mark before handing the provider to LiveKit, so LiveKit's filter and the exporter both stay. fi_instrumentation and other frameworks' register() are unchanged. Release: traceAI-livekit 0.1.2 (version, __version__, a new CHANGELOG). Not published. The README says to let enable_* hand the provider to LiveKit, and how to keep conversation content out of traces. Signed-off-by: khushalsonawat <[email protected]>
…own dev setup (TH-8665) The dev group now pins livekit-agents and its two plugins to 1.8.x (Python 3.10+, which 1.8 needs) and adds pytest, so tests/test_integration.py runs after `poetry install` instead of skipping on the old 1.3.3 lock. Signed-off-by: khushalsonawat <[email protected]>
…nstrumentation's tests (TH-8673) A workflow runs fi_instrumentation's tests on every PR into main, plus the tests of each Python package the PR touches, each on its own dev dependencies (Python 3.11, Poetry or Hatch) with pytest added. A change to the CI files runs every package. One "Python tests" job sums up the result, to be marked required. Tests are kept off the real collector. fi_instrumentation's tests (198 now pass, none fail): test_otel.py no longer imports the removed SESSION_NAME; test_init.py restores the module it deletes, which had broken every later test that patches fi_instrumentation.otel; the context-attribute, headers and gRPC-default tests follow the current code. Draft: not yet reviewed; paused for TH-8665. Signed-off-by: khushalsonawat <[email protected]>
… never fail the mapping silently (TH-8665)
Since livekit-agents 1.7, LiveKit names its content attributes lk.pii.*
(lk.pii.user_input, lk.pii.chat_ctx, lk.pii.response.text, ...). The exporter
matched only the old names, so voice spans arrived with no input.value or
output.value. Both names are now read, the newer first. An empty function-call
list ("[]", set on every LLM node) is no longer output, so the reply alone is.
A mapping failure used to be swallowed; it is now logged once per process,
without attribute values, and the span is still exported. The
fi-instrumentation-otel floor goes from 0.1.14 to 1.1.0: before 1.0.0 the
attribute names the mapping uses are missing, and 1.0.0 fails inside
register() with OpenTelemetry 1.45 (livekit-agents 1.8.7+).
README gains a Compatibility section and a link to the attribute-name mapping;
the set_tracer_provider note now says a call after enable_* is safe. Tests:
pure mapping on both name sets, an end-to-end agent turn through the real
exporter to a local collector, the LIVEKIT_TELEMETRY_ALLOW_PII=false opt-out,
and LiveKit's module tracer restored after each test.
Signed-off-by: khushalsonawat <[email protected]>
… share (TH-8665) export() wrote the mapped attributes back onto the ReadableSpan it was handed. Every processor on the provider holds that same object, LiveKit Cloud's exporter among them, and LiveKit redacts by attribute name. With lk.pii.* now mapped, the conversation landed under input.value, output.value, metadata, gen_ai.conversation.id and user.id, which its redaction does not strip: on 1.8 for spans held until a session turns redaction on, on 1.7 for every span. The exporter now builds a new ReadableSpan with the mapped attributes, as LiveKit's own pii.redact() does, and sends that; on any failure it sends the original span unmapped. Empty user input, reply, text to speak and tool arguments or output no longer become the JSON text "". Tests: LiveKit's real gated Cloud exporter on the same provider, with job_registered(redacted=True), receives none of our copies; a second exporter on a plain provider sees the span untouched (covers 1.7); the copy keeps every other span field; every renamed attribute pair is pinned; the failure warning is checked against a value leak. Signed-off-by: khushalsonawat <[email protected]>
…-8673) .github/python-tests-known-broken.txt names each package whose tests fail on main, with the reason. Listed packages still run and show a warning, but don't fail the "Python tests" check; a listed package whose tests pass fails CI until its line is removed. 23 packages declared a Python range their dependencies can't meet, so Poetry could not resolve them: each now ends at <3.14 like fi-instrumentation-otel, starts at >3.9 where it started at 3.9 (fi-instrumentation-otel excludes 3.9.0), and autogen and claude-agent-sdk start at 3.10, which their own dependencies need. 8 lock files older than their pyproject are re-locked. Signed-off-by: khushalsonawat <[email protected]>
…idy the workflow (TH-8673) The 23 packages made installable in the previous commit now reach their tests; 15 of them fail on main and are added to the known-broken list with their reasons (29 entries). The list says a PR that makes a listed package pass must remove its line. Workflow: core test files run with python -P, so a package is tested against its own fi-instrumentation-otel, not the repo's source; Poetry installs the lock as resolved; push runs on main are no longer cancelled; checkouts drop their credentials; the test tools are pinned; clearer verdict messages. The plan script also reacts to python/tests/conftest.py and non-ASCII paths, and says so when the list file is missing. Tests: test_register_observe_mode checks the project type; the experiment-mode test, which only passed because of a removed argument, now checks the experiment project type. claude-agent-sdk drops its Python 3.9 classifier. Signed-off-by: khushalsonawat <[email protected]>
…the names they use (TH-8673) anthropic, crewai, google-adk and openai lock fi-instrumentation-otel 0.1.11 or 0.1.14, but their code and core tests use attribute names that exist from 1.0. They passed before only because the core tests ran against the repo's own fi_instrumentation source; with python -P they run against the package's own. Signed-off-by: khushalsonawat <[email protected]>
…and run core tests on core changes (TH-8673) 21 package locks still pinned fi-instrumentation-otel 0.1.11 or 0.1.14, while their code and core tests use attribute names that exist from 1.0; with the core tests now importing each package's own fi-instrumentation-otel, they could not even load. Their locks now resolve 1.1.0, the version a fresh install gets (livekit's lock is left to #273). The locks shrink because 1.1.0 made its evaluation libraries optional. Workflow: pytest, pytest-asyncio and pytest-mock are added only where a package's environment lacks them; a change to fi_instrumentation (or python/tests/pytest.ini) runs every package with core tests; a redundant line in the verdict step is gone. Signed-off-by: khushalsonawat <[email protected]>
…n list (TH-8673) With their locks on fi-instrumentation-otel 1.1.0 their tests pass, so the verdict step failed them until their lines were removed, as designed. Signed-off-by: khushalsonawat <[email protected]>
…TH-8673) python/traceai, the one-line setup SDK, sits outside python/frameworks/ and was never tested. The plan now treats it as a package; its Python range gets the same fix as the others (>3.9, which fi-instrumentation-otel needs), and its one failing test (how SemanticConvention prints on Python 3.11+) is listed. Reasons for smolagents, groq and instructor now match the CI log; the test-toolset comments say that adding a pinned pytest-asyncio can move an existing pytest. Signed-off-by: khushalsonawat <[email protected]>
…-8673) Most open traceAI PRs target dev, so the workflow now runs on pull requests and pushes for dev as well as main; the job name stays "Python tests". python/traceai's pyproject named a README.md that does not exist, so its install failed in CI and none of its tests ran; the line is removed. A listed package whose install fails now gets its own warning instead of its listed reason, and a core change also runs the traceai SDK, which wraps it. Signed-off-by: khushalsonawat <[email protected]>
… the check (TH-8673)
The known-broken verdict now looks at the Tests step first. Tests that
pass fail the job ("remove its line"), even after a failed install,
which the message names. Tests that fail after a failed install get a
warning that the results may not reflect the listed reason, instead of
claiming the tests did not run.
The header now says the workflow runs for main and dev, and that the
check can be required on dev only once this file is on dev.
Signed-off-by: khushalsonawat <[email protected]>
… cancelled job (TH-8673) When more than one install step fails, the verdict now lists them with commas. A listed package whose tests were skipped says they did not run because an earlier step failed or the job was cancelled, instead of blaming setup alone. Signed-off-by: khushalsonawat <[email protected]>
…TH-8673) The planner now runs git itself (--diff RANGE or --all) with --no-renames and -z: a moved file lists both paths, so the package it left is planned too, and names with tabs, quotes or backslashes come through intact. A change to python/fi_instrumentation/, python/pyproject.toml or python/poetry.lock now plans every package, each tested against the repo's core, instead of only those with core test files. The known-broken verdict moves to .github/scripts/known_broken_verdict.sh and fails on a Tests outcome it does not know. The Plan job runs .github/scripts/test_python_test_plan.py first: table-driven unittest cases for the planner, git paths, the verdict and the workflow wiring. Also: clean_env points the collector URLs at a closed local port instead of removing them, the concurrency comment is corrected, and an edited PR (such as a retargeted one) runs again. Signed-off-by: khushalsonawat <[email protected]>
…TH-8673) The planner fails when its input cannot be right: a range with no commits (the base or head SHA is wrong), --all with no files, a CI or core change that finds no packages, or a change in a framework folder with no pyproject.toml. Commits that net to no change plan nothing. The Python tests job now checks the package jobs against the planned matrix, so a miswired output or condition that skips them all fails instead of reading as green. Each package job fails if a test set it was given did not run. Everything under .github/scripts/ now counts as CI. A PR base missing from the clone is fetched, or every package runs. The core tests point the collector at a closed local port in every test (autouse). The planner's tests cover --all, the SHA wiring and these checks, and no longer run the user's git hooks. Signed-off-by: khushalsonawat <[email protected]>
ci: run each touched Python package's tests on every PR, and fix fi_instrumentation's tests (TH-8673)
Signed-off-by: khushalsonawat <[email protected]>
…rter fix(livekit): keep the Future AGI exporter when LiveKit adds its privacy filter (TH-8665)
atharva-bhange
approved these changes
Oct 19, 2026
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Brings
devup to date withmain, sodevgets the Python tests workflow (#274) and the LiveKit exporter fix (#273).devis behindmainand has no commits of its own (0 ahead, 28 behind), so this merges cleanly. Please merge it with a merge commit (not squash or rebase), sodevandmainkeep one history.Why?
GitHub runs a workflow only from the branch it is in.
devhas no workflow today, so PRs intodev(most open traceAI PRs) get no Python tests check. Once this merges, they pick up the check on their next push (or a close and reopen).After this merges, Python tests can be made required on
dev. Not before: a required check that never reports would leave every PR intodevwaiting.Linear: TH-8673 (CI) and TH-8665 (LiveKit).
What comes in
traceai-livekit0.1.2).maincommits thatdevdoes not have yet, including fix(otel): exporter shutdown data loss + thread safety in span processor #165 (exporter shutdown and span processor fixes).How was it tested?
python/fi_instrumentation/, the planner tests all 49 packages, each with this repo'sfi_instrumentationinstalled, plus fi_instrumentation's own tests.python3 .github/scripts/python_test_plan.py --diff origin/dev...origin/maingives 49 packages,run_allandcore_changedtrue.🤖 Generated with Claude Code