Drop-in Perplexity Sonar Replacement with AWS Bedrock Nova Grounding

Published: (February 20, 2026 at 11:26 AM EST)
5 min read
Source: Dev.to

Source: Dev.to

Perplexity Sonar → Bedrock Nova Premier Proxy

If you’re running an AI assistant or agent framework that uses Perplexity’s Sonar API for web search, you’re paying per query — or burning through your monthly credit allocation faster than you’d like.

I’m on Perplexity Pro, which comes with $5/month in API credits. Sounds fine until you hit mid‑month and realize OpenClaw has quietly burned through all of it. I wanted something uncapped that didn’t add another bill. If you’re an AWS user with any credits sitting around — that $25 from a workshop, an event promo, or re:Invent swag — there’s a better option: route those queries through Amazon Bedrock’s Nova Premier grounding instead.

I built bedrock-web-search-proxy, a FastAPI proxy that makes Bedrock Nova Premier look exactly like the Perplexity Sonar API. Change one URL, keep everything else the same.


What is Nova Grounding?

Amazon Nova Premier supports a nova_grounding system tool that lets the model search the web in real‑time and return answers with citations — similar to Perplexity Sonar.

Difference: it runs on Bedrock, so it counts against your AWS credits rather than a separate Perplexity subscription.


Why Not Just Use Brave Search’s Free Tier?

Brave does have an AI Answers API that returns synthesized answers with citations — similar to Perplexity. Two catches though:

  1. Credit card required – even the $5/month free tier needs a card on file as an anti‑fraud measure.
  2. Undocumented model – Brave doesn’t clearly disclose which LLM powers the answers, so you’re trusting a black box.

With Nova grounding, you know exactly what’s running (Nova Premier on Bedrock), and it counts against AWS credits you likely already have. No new billing relationship, no mystery model.


Apps That Use the Perplexity API

The wrapper is a drop‑in for any app that supports Perplexity as a provider:

AppIntegration point
OpenClawtools.web.search.perplexity.baseUrl config
Open WebUIWeb search integration
LibreChatVia Perplexity MCP server
CursorPerplexity MCP for web research
Continue.devSonar models for codebase context
AnythingLLMPerplexity as cloud LLM provider
LiteLLMWeb search interception

Proof It’s Actually Grounded (Not Hallucinated)

Direct API call asking for the current Bitcoin price:

curl -s http://localhost:7000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nova-premier-web-grounding",
    "messages": [{"role": "user", "content": "What is the Bitcoin price right now?"}],
    "max_tokens": 200
  }'

Response

{
  "choices": [{
    "message": {
      "content": "The current price of Bitcoin (BTC) is $67,254.57 USD, reflecting a 0.54% increase in the last 24 hours. Last updated February 20, 2026 at 04:34 UTC."
    }
  }],
  "citations": [
    "https://www.latestly.com/technology/bitcoin-price-today-february-20-2026-btc-price-at-usd-67243-up-compared-to-yesterdays-usd-66941-mark-7321498.html",
    "https://www.binance.com/en/price/bitcoin"
  ]
}

The citation URLs contain today’s date in the slug. Not hallucinated — Nova Premier actually fetched and synthesized live web content.


Setup

1. Install & Run (one line, no cloning needed)

uvx --from git+https://github.com/gabrielkoo/bedrock-web-search-proxy bedrock-web-search-proxy

Requires uv and AWS credentials with bedrock:InvokeModel on us.amazon.nova-premier-v1:0.
Region defaults to us-east-1; override with AWS_DEFAULT_REGION if needed.

Or run directly from the raw script

uv run https://raw.githubusercontent.com/gabrielkoo/bedrock-web-search-proxy/main/main.py

2. Configure Your App

OpenClaw – update ~/.openclaw/openclaw.json:

{
  "tools": {
    "web": {
      "search": {
        "provider": "perplexity",
        "perplexity": {
          "baseUrl": "http://localhost:7000/v1",
          "apiKey": "nova-grounding",
          "model": "nova-premier-web-grounding"
        }
      }
    }
  }
}

⚠️ The apiKey must not be a real pplx- key — OpenClaw detects that prefix and overrides baseUrl back to Perplexity’s servers.

For other apps, simply point the Perplexity base URL to http://your-host:7000/v1 and use any model name; the wrapper routes everything to Nova Premier.


Model Aliases

All standard Perplexity model names are accepted and routed to Nova Premier (the only Nova model that currently supports the grounding tool):

Perplexity request modelBedrock model
nova-premier-web-groundingus.amazon.nova-premier-v1:0
sonar-pro, sonar-pro-onlineus.amazon.nova-premier-v1:0
sonar, sonar-mini, sonar-turbous.amazon.nova-premier-v1:0

Cost

Nova Premier usage counts against your AWS credits — so if you have any sitting around (a $25 promo from an AWS event, workshop, or re:Invent swag bag), this is effectively free. Check your Billing console — you might have more than you think.

AudienceCredit situation
AWS Community BuildersCovered by $500/year credits
Others with AWS creditsSame deal — credits apply
No creditsSee the Bedrock pricing page for current Nova Premier rates

Caveats

  • Streaming doesn’t return citations[] — Nova limitation. Non‑streaming works fine, and OpenClaw’s web_search tool uses non‑streaming.
  • MAX_CONCURRENT semaphore defaults to 5 — tune via env var if needed.
  • Region: Nova Premier grounding requires us-east-1.

Wrapping Up

If you’re already on an AWS credit plan (or can get a small promo), swapping Perplexity Sonar for Bedrock Nova Premier via this proxy gives you uncapped web‑search grounding without an extra bill. Just point your app at the proxy, and let Nova do the heavy lifting. Happy building!

WS Bedrock for Your LLM Workloads

There’s no reason to pay Perplexity separately for web‑grounded search when you’re already using WS Bedrock.

  • Lightweight wrapper – ~350 lines of Python
  • Well‑tested – 44 unit tests
  • OpenAI SDK‑compatible – works with any client that speaks the Perplexity or OpenAI chat‑completions API

Repository:
github.com/gabrielkoo/bedrock-web-search-proxy

0 views
Back to Blog

Related posts

Read more »

Warm Introduction

Introduction Hello everyone! I'm fascinated by the deep tech discussions here. It's truly amazing to see the community thrive. Project Overview I'm passionate...