This repository was archived by the owner on Sep 23, 2026. It is now read-only.
Repository navigation
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.
feat(telemetry): align events with TS schema, add trace_id and missing events #2500
Uh oh!
There was an error while loading. Please reload this page.
feat(telemetry): align events with TS schema, add trace_id and missing events #2500
Changes from 1 commit
b749c3ef0d21852efd4ebbda758e1e11c8ed25ceb073da6faFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…g events Align the Python telemetry surface with the TS rewrite's event registry (agent-core-v2 events.ts), and attach the KFC x-trace-id response header to request-scoped events so they can join with server request logs. kosong: - Kimi provider captures x-trace-id via with_raw_response (stream and non-stream); trace_id carried on APIStatusError (openai + httpx paths) - StreamedMessage/GenerateResult/StepResult thread trace_id through - New on_trace_id callback fired when response headers arrive (before streaming, so events emitted mid-stream see the current request) kimi-cli: - Two-level current-trace holder (ContextVar per turn task + root mirror for UI) feeding trace_id into api_error, compaction_*, turn_interrupted, turn_ended, cancel, tool_call, tool_call_dedup_detected, tool_call_repeat, permission_approval_result, question_answered/dismissed - compaction_finished/failed renamed to TS property names (source/tokens_before/tokens_after/input_tokens/output_tokens) and gain round/thinking_effort/compacted_count - api_error gains retryable (TS isRetryableGenerateError table, incl. 408/409/529), provider_type/protocol and overloaded(529); the non-TS 'api' error_type folds into 'other' - tool_call gains tool_call_id, cancelled outcome and trace_id; error_type becomes the TS enum ('error'|'cancelled') with the exception class moved to error_class - tool_call_dedup_detected re-added at same-step/cross-step detection - turn_interrupted gains interrupt_reason; cancel gains from (streaming/compacting); question_answered gains answered - New events: turn_ended (unconditional at turn end) and permission_approval_result (all approval decision points; existing tool_approved/tool_rejected kept for compatibility)Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.