Skip to content

feat(tanstack-ai): add Parallel search tool package - #67

Draft
georgeatparallel wants to merge 1 commit into
parallel-web:mainfrom
georgeatparallel:feat/tanstack-ai-search
Draft

georgeatparallel wants to merge 1 commit into
parallel-web:mainfrom
georgeatparallel:feat/tanstack-ai-search

Conversation

@georgeatparallel

@georgeatparallel georgeatparallel commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

TanStack requested a separately maintained Parallel integration in TanStack/ai#1205. This adds the unpublished @parallel-web/tanstack-ai package here, exposing one server-side parallelSearchTool() for an existing chat({ tools }) call.

The runtime is 87 lines: toolDefinition().server() delegates to the Parallel SDK, preserves the prior result-cap and blank-objective fixes, forwards cancellation, and sends the existing package attribution header. Credentials and source policy stay application-controlled. There is no custom client wrapper or release-pipeline change.

Patterns checked before implementation:

  • Decart: provider-owned package, factory API, SDK dependency, TanStack peer, mocked tests.
  • Soniox: ESM-only exports and a scoped TanStack peer range. ESM matches TanStack 0.63.0's published exports; no unsupported CommonJS entry is advertised.
  • Cloudflare: monorepo integration package, peer dependency, factories and transport/abort tests. This search tool needs none of its model-adapter layers.
  • Internal LangChain conventions supply tsup/Vitest, SDK-client injection and attribution. The prior unpublished Parallel implementation supplies the tool shape and chat fixture.

Validation: 25 new offline tests pass, including a real TanStack chat loop with a fake model and mocked SDK transport. Workspace lint, formatting, typecheck, build and env -u PARALLEL_API_KEY pnpm test:ci pass (live tests skipped). Typecheck includes the new tests. Frozen-lockfile install passes. Packed tarball imports and executes with mocked HTTP on Node 22.13.0 and 24.18.0; consumer TypeScript passes NodeNext and bundler resolution. No paid API calls were made. The initial sandbox-only localhost failures passed when rerun with localhost access.

Exact-head CI run 37035423768 passed all seven jobs on fe062273ea6eddae5ce5c52e9c1a12c4efb5aac1.

Release decisions: confirm the npm/maintenance owner and proposed name (registry lookup returned 404), then have an npm organization owner perform the reviewed first release under the existing publishing guide. Tested versions are TanStack 0.63.0 and Parallel SDK 1.3.5; the TanStack peer range is deliberately ^0.63.0. After publication, submit the offered TanStack docs listing. This draft neither publishes to npm nor adds the upstream listing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant