MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / extractRequestMetadataWithN

Function extractRequestMetadataWithN

web/src/llm-api/openrouter.ts:117–126  ·  view source on GitHub ↗
(params: {
  body: unknown
  logger: Logger
})

Source from the content-addressed store, hash-verified

115}
116
117function extractRequestMetadataWithN(params: {
118 body: unknown
119 logger: Logger
120}) {
121 const { body, logger } = params
122 const { clientId, clientRequestId, costMode } = extractRequestMetadata({ body, logger })
123 const typedBody = body as ChatCompletionRequestBody | undefined
124 const n = typedBody?.codebuff_metadata?.n
125 return { clientId, clientRequestId, costMode, ...(n && { n }) }
126}
127
128export async function handleOpenRouterNonStream({
129 body,

Callers 1

Calls 1

extractRequestMetadataFunction · 0.90

Tested by

no test coverage detected