Skip to content

Conversation

KoushikBaagh
Copy link
Contributor

Description

Chromium browser patch that natively integrates Perplexity’s Sonar API to provide:

  • Omnibox Answers: Type sonar <your query> in the address bar for instant AI-powered autocomplete suggestions.
  • Context-menu Summarization: Select text on any webpage, right-click Summarize with Sonar, and view a concise summary in a new tab.

Type of Contribution

  • Example Tutorial
  • Showcase Project
  • Article/Integration Guide
  • Documentation Update
  • Bug Fix
  • Other (please describe)

Checklist

  • My code follows the cookbook’s style guidelines
  • I have included comprehensive documentation
  • I have tested my code and it works as expected
  • I have included all necessary dependencies and setup instructions
  • My MDX file includes proper frontmatter (title, description, keywords)
  • I have linked to any external repositories or live demos

Project Details

What problem does this solve?
Developers often need quick answers or summaries without leaving their browser. This patch embeds AI responses directly into Chromium’s omnibox and context-menu, streamlining research and browsing workflows.

What makes this contribution valuable to other developers?

  • Demonstrates how to hook into Chromium’s omnibox and context-menu APIs.
  • Provides a real-world example of integrating Perplexity Sonar models (sonar-pro for omnibox, sonar for summaries).
  • Offers a starting point for customizing browser builds with AI features.

External Links:

Testing

  1. Applied patches in a WSL2 Ubuntu 22.04 Chromium checkout.
  2. Built Chromium (Version 138.0.7160.0).
  3. Verified omnibox suggestions by typing sonar what is quantum tunneling?.
  4. Selected page text, right-clicked Summarize with Sonar, and confirmed the summary tab loads correctly.

Additional Notes

  • Ensure you replace the placeholder API_KEY in both sonar_autocomplete_provider.cc and render_view_context_menu.cc with your Perplexity Sonar API key before building.
  • This repository includes only the modified files; to replicate, apply these patches into a full Chromium src/ checkout as described in the README.

@kesku kesku merged commit 2329d27 into perplexityai:main Aug 17, 2025
1 check passed
@kesku
Copy link
Collaborator

kesku commented Aug 19, 2025

@KoushikBaagh
Copy link
Contributor Author

Thanks @kesku bro

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