{"agent":"claude","input":"Write unit tests for this LangChain.js app's route handlers and tools. Read package.json, tsconfig.json, the README's test section, utils/integrations.test.mjs, utils/calculator.ts, utils/supabase-vector-store.ts and every route.ts under app/api first, and say what is tested today and how it is run. No test may call OpenAI, Tavily or Supabase or need a real key. The handlers build their model inside POST: do not refactor them to accept one. Instead stub globalThis.fetch with OpenAI-shaped responses built from the helpers in @langchain/core/utils/testing, set dummy keys in the test environment, and restore both after each test. Reuse the fake Supabase client and embeddings pattern from the existing test for the retrieval and ingest routes. If node:test cannot import the routes because of the @/ path alias, add one devDependency for a runner that resolves it and explain the choice; keep the existing test file passing either way. Cover for each route: the happy path's status, headers and body or stream; an empty messages array; an upstream error status; and for the agents routes the filtering of system messages, the streaming branch and the show_intermediate_steps branch with a tool call. Cover demo mode on the ingest route. Assert on what a caller receives, not on prompt text. Where a handler's behaviour looks wrong, test what it does today and list it. Add a test script to package.json, run it with yarn lint and yarn build, and open a pull request with the output and a table of routes and cases.","resources":[{"url":"https://github.com/your-org/your-app"}]}