Skip to content

Commit 202027f

Browse files
committed
do not store traces in bigquery
1 parent dc4c738 commit 202027f

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

packages/agent-runtime/src/find-files/request-files-prompt.ts

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { dirname, isAbsolute, normalize } from 'path'
22

3-
import { insertTrace } from '@codebuff/bigquery'
43
import {
54
finetunedVertexModels,
65
models,
@@ -17,10 +16,6 @@ import {
1716
} from '../util/messages'
1817

1918
import type { TextBlock } from '../llm-api/claude'
20-
import type {
21-
GetExpandedFileContextForTrainingTrace,
22-
GetRelevantFilesTrace,
23-
} from '@codebuff/bigquery'
2419
import type { PromptAiSdkFn } from '@codebuff/common/types/contracts/llm'
2520
import type { Logger } from '@codebuff/common/types/contracts/logger'
2621
import type { ParamsExcluding } from '@codebuff/common/types/function-params'
@@ -236,29 +231,6 @@ async function getRelevantFiles(
236231

237232
const files = validateFilePaths(response.split('\n'))
238233

239-
const trace: GetRelevantFilesTrace = {
240-
id: crypto.randomUUID(),
241-
agent_step_id: agentStepId,
242-
user_id: userId ?? '',
243-
created_at: new Date(),
244-
type: 'get-relevant-files',
245-
payload: {
246-
messages: messagesWithPrompt,
247-
system,
248-
output: response,
249-
request_type: requestType,
250-
user_input_id: userInputId,
251-
client_session_id: clientSessionId,
252-
fingerprint_id: fingerprintId,
253-
model: finetunedModel,
254-
repo_name: repoId, // Use repoId parameter for trace
255-
},
256-
}
257-
258-
insertTrace({ trace, logger }).catch((error: Error) => {
259-
logger.error({ error }, 'Failed to insert trace')
260-
})
261-
262234
return { files, duration, requestType, response }
263235
}
264236

@@ -317,29 +289,6 @@ async function getRelevantFilesForTraining(
317289

318290
const files = validateFilePaths(response.split('\n'))
319291

320-
const trace: GetExpandedFileContextForTrainingTrace = {
321-
id: crypto.randomUUID(),
322-
agent_step_id: agentStepId,
323-
user_id: userId ?? '',
324-
created_at: new Date(),
325-
type: 'get-expanded-file-context-for-training',
326-
payload: {
327-
messages: messagesWithPrompt,
328-
system,
329-
output: response,
330-
request_type: requestType,
331-
user_input_id: userInputId,
332-
client_session_id: clientSessionId,
333-
fingerprint_id: fingerprintId,
334-
model: models.ft_filepicker_005, // Use specific model for trace
335-
repo_name: repoId, // Use repoId parameter for trace
336-
},
337-
}
338-
339-
insertTrace({ trace, logger }).catch((error: Error) => {
340-
logger.error({ error }, 'Failed to insert trace')
341-
})
342-
343292
return { files, duration, requestType, response }
344293
}
345294

0 commit comments

Comments
 (0)