> @braintrust/openai-agents@0.1.3 test /Users/caitlinpinn/braintrust/sdk/integrations/openai-agents-js > vitest run The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.  RUN  v2.1.9 /Users/caitlinpinn/braintrust/sdk/integrations/openai-agents-js [?25l · src/openai-agents-integration.test.ts (14) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠙ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠹ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠸ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠼ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠴ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠦ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠧ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠇ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠏ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠋ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠙ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠹ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠸ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠼ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ⠴ [ beforeAll ] · OpenAIAgentsTraceProcessor is instantiable · simple agent run with tracing · agent with function calling · Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully · LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded · Span hierarchy and storage validation - ensures proper parent-child relationships · currentSpan() detection creates proper span hierarchy with actual OpenAI SDK · processor without parentSpan creates root spans (backward compatibility) · onTraceEnd logs trace metadata properly · response span with image generation converts base64 to attachments · Response span extracts cached tokens from usage · Response span handles zero cached tokens correctly · Response span handles missing cached tokens gracefully · Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) [?25l ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ✓ OpenAIAgentsTraceProcessor is instantiable × simple agent run with tracing (retry x3) × agent with function calling (retry x3) ✓ Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully ✓ LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded ✓ Span hierarchy and storage validation - ensures proper parent-child relationships × currentSpan() detection creates proper span hierarchy with actual OpenAI SDK (retry x3) × processor without parentSpan creates root spans (backward compatibility) (retry x3) ✓ onTraceEnd logs trace metadata properly ✓ response span with image generation converts base64 to attachments ✓ Response span extracts cached tokens from usage ✓ Response span handles zero cached tokens correctly ✓ Response span handles missing cached tokens gracefully ✓ Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2)  ❯ src/openai-agents-integration.test.ts (14) ❯ OpenAI Agents tracing processor integration tests (14) ✓ OpenAIAgentsTraceProcessor is instantiable × simple agent run with tracing (retry x3) × agent with function calling (retry x3) ✓ Cleanup behavior - traces are cleaned up properly and orphaned spans are handled gracefully ✓ LRU eviction behavior - oldest traces are evicted when maxTraces is exceeded ✓ Span hierarchy and storage validation - ensures proper parent-child relationships × currentSpan() detection creates proper span hierarchy with actual OpenAI SDK (retry x3) × processor without parentSpan creates root spans (backward compatibility) (retry x3) ✓ onTraceEnd logs trace metadata properly ✓ response span with image generation converts base64 to attachments ✓ Response span extracts cached tokens from usage ✓ Response span handles zero cached tokens correctly ✓ Response span handles missing cached tokens gracefully ✓ Generation span extracts cached tokens from usage ✓ src/openai-agents-trace-processor.test.ts (2) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > simple agent run with tracing  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > simple agent run with tracing  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > simple agent run with tracing  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > simple agent run with tracing  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > agent with function calling  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > agent with function calling  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > agent with function calling  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > agent with function calling  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > currentSpan() detection creates proper span hierarchy with actual OpenAI SDK  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > currentSpan() detection creates proper span hierarchy with actual OpenAI SDK  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > currentSpan() detection creates proper span hierarchy with actual OpenAI SDK  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > currentSpan() detection creates proper span hierarchy with actual OpenAI SDK  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > processor without parentSpan creates root spans (backward compatibility)  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > processor without parentSpan creates root spans (backward compatibility)  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > processor without parentSpan creates root spans (backward compatibility)  FAIL  src/openai-agents-integration.test.ts > OpenAI Agents tracing processor integration tests > processor without parentSpan creates root spans (backward compatibility) Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).  ❯ new OpenAI ../../node_modules/.pnpm/openai@5.11.0_ws@8.18.3_zod@3.25.76/node_modules/openai/src/client.ts:336:13  ❯ OpenAIProvider.#getClient ../../node_modules/.pnpm/@openai+agents-openai@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-openai/src/openaiProvider.ts:57:9  ❯ OpenAIProvider.getModel ../../node_modules/.pnpm/@openai+agents-openai@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-openai/src/openaiProvider.ts:72:54  ❯ ../../node_modules/.pnpm/@openai+agents-core@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-core/src/run.ts:259:53  ❯ withNewSpanContext ../../node_modules/.pnpm/@openai+agents-core@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-core/src/tracing/context.ts:187:40  ❯ Runner.#runIndividualNonStream ../../node_modules/.pnpm/@openai+agents-core@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-core/src/run.ts:240:12  ❯ getOrCreateTrace.traceId ../../node_modules/.pnpm/@openai+agents-core@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-core/src/run.ts:971:46  ❯ ../../node_modules/.pnpm/@openai+agents-core@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-core/src/tracing/context.ts:60:26  ❯ run ../../node_modules/.pnpm/@openai+agents-core@0.0.15_ws@8.18.3_zod@3.25.76/node_modules/@openai/agents-core/src/run.ts:1029:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/16]⎯  Test Files  1 failed | 1 passed (2)  Tests  4 failed | 12 passed (16)  Start at  16:15:29  Duration  1.33s (transform 413ms, setup 0ms, collect 1.49s, tests 269ms, environment 0ms, prepare 169ms) [?25h[?25h ELIFECYCLE  Test failed. See above for more details.