[exa-js]: expose search output schema for all search types#149
Draft
[exa-js]: expose search output schema for all search types#149
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates
exa-jsso the public/searchSDK surface matches the new Vulcan behavior whereoutputSchemaworks across all search types, not only deep variants.The runtime request path already forwarded
outputSchema, so the main changes are in the exported TypeScript surface and user-facing docs.RegularSearchOptionsnow allowsoutputSchemafor any/searchtype,SearchResponse.outputis documented generically instead of as deep-only output, and the SDK exports genericSearchOutputSchema/SearchOutputaliases while keeping the existing deep-named aliases for compatibility. The README example and explanatory copy were updated to show structured output on a non-deep search, and the package version was bumped from2.8.0to2.9.0.User Impact
JavaScript SDK users can now write
exa.search(..., { type: "auto", outputSchema: ... })without fighting the type system, and the docs no longer tell them they need deep search just to request structured output. Existing deep-search code keeps working unchanged.Validation
npm test -- test/unit/search.test.tsnpm run buildnpm run typecheckcurrently fails in this repo for pre-existing unrelated issues inscripts/generate-docs.ts,findSimilar.integration.test.ts, and multiplewebsetstests; none of those failures were introduced by this diff.