Skip to content

Commit e9dd5d8

Browse files
cursoragentclaude
andcommitted
refactor(openai): remove unused streaming response timestamp
Co-Authored-By: gpt-5.3-codex-high <noreply@anthropic.com>
1 parent ddce37b commit e9dd5d8

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎packages/core/src/tracing/openai/streaming.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ interface StreamingState {
3636
responseId: string;
3737
/** The model name. */
3838
responseModel: string;
39-
/** The timestamp of the response. */
40-
responseTimestamp: number;
4139
/** Number of prompt/input tokens used. */
4240
promptTokens: number|undefined;
4341
/** Number of completion/output tokens used. */
@@ -99,7 +97,6 @@ function processChatCompletionToolCalls(toolCalls: ChatCompletionToolCall[], sta
9997
functionprocessChatCompletionChunk(chunk: ChatCompletionChunk,state: StreamingState,recordOutputs: boolean): void{
10098
state.responseId=chunk.id??state.responseId;
10199
state.responseModel=chunk.model??state.responseModel;
102-
state.responseTimestamp=chunk.created??state.responseTimestamp;
103100

104101
if(chunk.usage){
105102
// For stream responses, the input tokens remain constant across all events in the stream.
@@ -183,7 +180,6 @@ function processResponsesApiEvent(
183180
const{ response }=eventas{response: OpenAIResponseObject};
184181
state.responseId=response.id??state.responseId;
185182
state.responseModel=response.model??state.responseModel;
186-
state.responseTimestamp=response.created_at??state.responseTimestamp;
187183

188184
if(response.usage){
189185
// For stream responses, the input tokens remain constant across all events in the stream.
@@ -227,7 +223,6 @@ export async function* instrumentStream<T>(
227223
finishReasons: [],
228224
responseId: '',
229225
responseModel: '',
230-
responseTimestamp: 0,
231226
promptTokens: undefined,
232227
completionTokens: undefined,
233228
totalTokens: undefined,

0 commit comments

Comments
 (0)