Skip to content

feat: add maxCharacters param for highlights, deprecate numSentences/highlightsPerUrl#118

Open
LiamHz wants to merge 1 commit intomasterfrom
devin/1769070865-highlights-maxcharacters
Open

feat: add maxCharacters param for highlights, deprecate numSentences/highlightsPerUrl#118
LiamHz wants to merge 1 commit intomasterfrom
devin/1769070865-highlights-maxcharacters

Conversation

@LiamHz
Copy link
Copy Markdown
Contributor

@LiamHz LiamHz commented Jan 22, 2026

Summary

Adds the new maxCharacters parameter to HighlightsContentsOptions type and marks numSentences and highlightsPerUrl as deprecated with JSDoc annotations. This aligns the TypeScript SDK with the API changes in claude/update-highlights-params-Rj1d8.

The new parameter controls the maximum total characters across all highlights per URL (default: 2000), replacing the sentence-based approach.

Review & Testing Checklist for Human

  • Verify backend PR is merged first - This SDK change depends on claude/update-highlights-params-Rj1d8 being deployed. SDK release should not happen before the API supports maxCharacters
  • Test with actual API call - Try exa.searchAndContents("test", { highlights: { maxCharacters: 1000 } }) against the updated backend to confirm it works

Notes

This is a type-only change with no runtime logic modifications. Backward compatibility is maintained - existing code using numSentences or highlightsPerUrl will continue to work.

Requested by @LiamHz

Link to Devin run: https://app.devin.ai/sessions/f82de373837142da8261ab1462c223eb

…highlightsPerUrl

- Add maxCharacters parameter to HighlightsContentsOptions type
- Mark numSentences and highlightsPerUrl as deprecated with JSDoc annotations
- Default is 2000 characters distributed across multiple highlights

Co-Authored-By: liam@exa.ai <liam.hinzman@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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