Skip to content

feat(web-search): add optional You.com provider - #87

Merged
devanshrj merged 1 commit into
letta-ai:mainfrom
mouse-value-add:feat/youcom-search-provider
Sep 21, 2026
Merged

devanshrj merged 1 commit into
letta-ai:mainfrom
mouse-value-add:feat/youcom-search-provider

Conversation

@mouse-value-add

Copy link
Copy Markdown
Contributor

This adds You.com as an optional fifth provider for the @letta-ai/web-search mod's web_search tool, following the exact pattern used by the existing Exa, Tavily, Parallel, and Perplexity providers.

What changed

  • New provider entry: { id: "youcom", key: "YDC_API_KEY", label: "You.com" } appended to PROVIDERS — appended last, so the auto-selection order (Exa → Tavily → Parallel → Perplexity) is unchanged for existing users unless they set YDC_API_KEY.
  • runYoucomSearch(): POST https://ydc-index.io/v1/search with X-API-Key auth via plain fetch (no new dependencies, same as the other providers), reading ctx.secret("YDC_API_KEY", { envFallback: true }).
  • Result formatting mirrors the incumbents: title, url, published date, description, and query-relevant snippets per result.
  • Optional You.com-specific tool args: freshness (day|week|month|year), country (ISO 3166-1 alpha-2), safesearch (off|moderate|strict) — all optional, all no-ops for other providers.
  • README.md / MOD.md: YDC_API_KEY added to the supported-keys list, auto-order, and provider guidance; provider enum and descriptions updated.
  • Version bump 0.1.0 → 0.2.0 so the publish workflow publishes a new release of @letta-ai/web-search.

Setup

Same as the other providers — agent-scoped (recommended):

/secret set YDC_API_KEY <value>

or environment fallback:

export YDC_API_KEY=...
letta

API keys are available at you.com/platform/api-keys. No other configuration is needed; the tool remains fully functional with only the existing four providers.

Usage

web_search(query="letta code mod packages", provider="youcom")
web_search(query="latest letta release", provider="youcom", freshness="week", max_results=5)

Validation performed

  • npm run validate (manifests + catalog) passes.
  • Functional test of the provider path with the documented Search API response shape (results.web[] with url/title/description/snippets/page_age): formatting, API-error handling (returns a tool error result, does not throw), and missing-key handling (returns the /secret set YDC_API_KEY ... setup instructions) all pass.
  • Auto-selection regression check: with only EXA_API_KEY set, auto still selects Exa and You.com is never consulted — default behavior is unchanged for existing users.

Error handling

Missing key → tool error result with setup instructions (same copy pattern as the other providers). API errors → tool error result with status code and response detail, truncated to 2000 chars. No throwing for expected misconfiguration, per MOD.md semantics.

Happy to adjust the shape if you'd prefer the provider ordered differently or the You.com-specific args trimmed.

Tracking: youdotcom-oss/integration-tracking#358

Add You.com as a fifth web_search provider alongside Exa, Tavily,
Parallel, and Perplexity, following the existing provider pattern:

- YDC_API_KEY secret with env fallback, read via ctx.secret()
- POST https://ydc-index.io/v1/search with X-API-Key auth
- provider: "youcom" selection plus auto fallback appended last
- freshness / country / safesearch filters
- README.md and MOD.md key documentation
- version bump to 0.2.0 for the publish workflow
@devanshrj
devanshrj merged commit 442d1c2 into letta-ai:main Sep 21, 2026
1 check passed
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.

2 participants