Skip to content

[DISCO-3583] Add client for Merino Suggest#7314

Open
misaniwere wants to merge 2 commits intomainfrom
DISCO-3583
Open

[DISCO-3583] Add client for Merino Suggest#7314
misaniwere wants to merge 2 commits intomainfrom
DISCO-3583

Conversation

@misaniwere
Copy link
Copy Markdown
Contributor

@misaniwere misaniwere commented Apr 8, 2026

  • [DISCO-3583]
  • This PR adds a new suggest module to the merino crate with a SuggestClient that calls the Merino /api/v1/suggest endpoint and is exposed to iOS and Android through UniFFI
  • Also added a suggest subcommand to merino-cli for local testing.

Changes

  • SuggestClient: the public UniFFI object exposed to iOS/Android. Takes a SuggestConfig (optional base host override) and exposes a get_suggestions(query, options) method that returns the raw JSON response body as a string.
  • SuggestOptions: a UniFFI record mapping all merino suggest query parameters (providers, source, country, region, city, client_variants, request_type, accept_language). All fields are optional and omitted fields are not sent.
  • uses viaduct's send_sync with an OHTTP channel ( "merino")

QA

  • Can be QA'd be running tests: cargo test -p merino suggest
  • Also locally hitting the endpoint using prod and ohttp: cargo run -p merino-cli -- suggest --query "apple"
  • Confirm curated recommendations command still works:
    cargo run --bin merino-cli -- recommendations --user-agent "my-cli/1.0" --json '{ "locale": "en", "region": "US", "count": 4, "topics": ["tech"], "feeds": ["sections"] }'

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@misaniwere misaniwere requested a review from a team April 8, 2026 20:17
@misaniwere misaniwere force-pushed the DISCO-3583 branch 4 times, most recently from 2833ba5 to 118ee34 Compare April 8, 2026 21:30
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