MCPcopy Create free account
hub / github.com/ephraimduncan/opencode-cursor / makeUsageChunk

Function makeUsageChunk

src/proxy.ts:1190–1200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1188 });
1189
1190 const makeUsageChunk = () => {
1191 const { prompt_tokens, completion_tokens, total_tokens } = computeUsage(state);
1192 return {
1193 id: completionId,
1194 object: "chat.completion.chunk",
1195 created,
1196 model: modelId,
1197 choices: [],
1198 usage: { prompt_tokens, completion_tokens, total_tokens },
1199 };
1200 };
1201
1202 const state: StreamState = {
1203 toolCallIndex: 0,

Callers 1

startFunction · 0.85

Calls 1

computeUsageFunction · 0.85

Tested by

no test coverage detected