# Changelog ## 1.1.0 ### Added - `createTransport(options)` and the `TavilyTransport` type: authenticated `post`, `get`, and `stream` calls that resolve with the raw, untouched response body. Handles credentials, keyless mode, identity headers, proxies, base URL, and timeouts. The typed client methods now use it. - `TavilyRequestError`, thrown for non-2xx responses, with `status` and `body`. - `TavilyKeylessLimitError` now extends `TavilyRequestError`, so it also carries `status` and `body`, and gains `window`: the cap window from the keyless-limit envelope, or `null`. ### Changed - `TavilyContinuationPath` declares the fields the API sends (`resource`, `instruction`, and `params`, which for `bonus_credits` holds `questions` and `credits_on_completion`) and names the known `type` values while still accepting any string and any extra field. - `bonusEligible` is true when a `bonus_credits` continuation path is present; the server sends no `eligible` flag. - A keyless-limit envelope is recognized only when `error.code` is a string and `error.next_actions` is an array, so other `{ error: { code } }` bodies (for example a 400 validation error) throw `TavilyRequestError` instead of `TavilyKeylessLimitError`. - Error messages are unchanged from 1.0.0, except that bodies of the form `{ error: { message } }` now surface `error.message` instead of the JSON dump. - `npm test` now runs `npm run typecheck` (`tsc --noEmit`) before building. - `https-proxy-agent` is bundled into dist; the package's only runtime dependency is axios. - Keyless mode now honors `clientSource` for `X-Client-Source`; the default stays `tavily-js-keyless`. - Streaming research errors now carry the parsed error body instead of an unread stream. ## 1.0.0 (unreleased) ### Added - Search options: `safeSearch`, `includePublishedDate`, and `filterByPublishedDate`. - Reusable Search field definitions and JSON Schema from `@tavily/core/parameters`, and optional Zod 4 schemas from `@tavily/core/agent-schemas`. ### Compatibility - Optional agent inputs accept `null` and normalize it to `undefined`. - The new package subpaths support legacy TypeScript `node`/`node10` resolution. ### Removed - Deprecated `searchQNA()` and `searchContext()` methods and their associated `TavilyQNASearchFuncton` and `TavilyContextSearchFuncton` types. ### Migrating from 0.x Use `search()` to request an answer or build context from the returned results: ```javascript import { tavily } from "@tavily/core"; const client = tavily(); const response = await client.search("Battery recycling methods", { searchDepth: "advanced", includeAnswer: true, }); const answer = response.answer; const context = JSON.stringify( response.results.map(({ url, content }) => ({ url, content })) ); ``` `searchDepth: "advanced"` preserves the old Q&A helper's default; keep any other search depth you previously configured. For context-only requests, omit `includeAnswer`. Context is no longer truncated to `maxTokens` (previously 4,000 by default); apply your token budget before passing it to a model.