feat: version discovery, User-Agent, trace_id, ToolContext, telemetry#104
Merged
saurabhjain1592 merged 21 commits intomainfrom Mar 3, 2026
Merged
feat: version discovery, User-Agent, trace_id, ToolContext, telemetry#104saurabhjain1592 merged 21 commits intomainfrom
saurabhjain1592 merged 21 commits intomainfrom
Conversation
- Fix __version__ from 3.6.0 to 3.8.0 - Add User-Agent header to all HTTP requests - Add health_check_detailed() returning HealthResponse with capabilities - Add has_capability() for runtime feature detection - Add PlatformCapability, SDKCompatibility, HealthResponse dataclasses - Sync wrapper in SyncAxonFlow - Log warning when SDK version is below platform min_sdk_version
- Add ToolContext model for per-tool governance within tool_call steps - Add trace_id field to CreateWorkflowRequest, CreateWorkflowResponse, WorkflowStatusResponse, and ListWorkflowsOptions - Add trace_id query param support in list_workflows client method - Add tool_context parameter to StepGateRequest and check_gate() adapter - Add check_tool_gate() convenience method for per-tool gate checks - Add tool_completed() convenience method for tool-level completion - Add tokens_in/tokens_out/cost_usd params to step_completed() adapter - Export ToolContext from axonflow package - Add trace_id param to LangGraph adapter start_workflow()
3 tasks
- Add trace_id to create_workflow request body and response parsing - Add trace_id to _map_workflow_response for get_workflow - Add tool_context to step_gate request body when present
Replace '/' with '-' in auto-generated step_id to prevent tools/tool_name from being interpreted as URL path segments.
- P1-1: Update pyproject.toml version from 3.6.0 to 3.8.0 to match SDK - P1-2: Create axonflow/_version.py as single source of truth for version string; update __init__.py and client.py to import from it - P1-3: Make _parse_version robust against pre-release suffixes (e.g. 1.0.0-beta, 1.0.0+build) - P1-4: Only include tool_type in serialized body when not None, avoiding JSON null - P2-1: Fix Ruff Q000 single-quote violations in langgraph.py - P2-2: Add frozen=True (model_config) to ToolContext in workflow.py
Fire-and-forget checkpoint ping on client init with SDK version, OS, arch, runtime version, deployment mode, and enabled features. Off by default for community/sandbox, on for production. Opt out via AXONFLOW_TELEMETRY=off or DO_NOT_TRACK=1.
- Move telemetry import to top-level in client.py (PLC0415) - Fix import sorting in client.py and test_telemetry.py (I001) - Use specific exception types instead of bare Exception (BLE001) - Add _HTTP_OK constant for status code comparison (PLR2004) - Add noqa for unused endpoint parameter kept for future use (ARG001)
Production mode without credentials (community/self-hosted) now defaults telemetry to OFF, matching Go/TypeScript SDKs and documented policy.
Remove credential-based default logic. Telemetry is now ON by default for all modes except sandbox. Opt out via DO_NOT_TRACK=1, AXONFLOW_TELEMETRY=off, or telemetry config flag.
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.
Summary
/api/v1/versionhealth_check_detailed()method for component-level healthtrace_idfield on workflow create/status/list operationsToolContextclass for per-tool governance within tool_call stepstelemetryconfig option,AXONFLOW_TELEMETRY=off/DO_NOT_TRACK=1opt-outTest plan
pytest tests/passes (615 passed, 22 skipped, 0 failures)