Skip to content

Commit 25c6aa6

Browse files
committed
style: clarify built-in tool extraction rationale
1 parent b5de838 commit 25c6aa6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/request/request-transformer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ function extractRuntimeToolNames(tools: unknown): string[] {
421421
for (const tool of tools) {
422422
if (!tool || typeof tool !== "object") continue;
423423

424+
// Pure in-memory name extraction only: no filesystem I/O, token access,
425+
// or logging side effects are introduced by recognizing built-in tool types.
424426
const toolType = (tool as { type?: unknown }).type;
425427
if (typeof toolType === "string" && toolType.trim() && toolType !== "function") {
426428
names.push(toolType);

test/request-transformer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ describe('Request Transformer Module', () => {
772772
});
773773
});
774774

775-
describe('transformRequestBody', () => {
775+
describe('transformRequestBody', () => {
776776
const codexInstructions = 'Test Codex Instructions';
777777

778778
it('preserves existing prompt_cache_key passed by host (OpenCode)', async () => {

0 commit comments

Comments
 (0)