omp packages

pi-ghcp-search0.2.1

Web and X search for Pi through your GitHub Copilot subscription — no extra API keys.

GitHub Actions Published 2 days ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-ghcp-search

Web and X search for Pi through your GitHub Copilot subscription. No extra API keys.

  • web_search: searches the public web with Copilot's hosted web_search (GPT, falling back to Grok).
  • x_search: searches X, or reads a post, its thread, and its images or video from an x.com URL, with Grok's x_search.

Both work whatever model the session uses. Pi supplies the Copilot credential: the refreshed token, the account's own endpoint (individual, business, or enterprise), and Copilot's headers. Each call forces a search and fails rather than return an answer the model wrote without searching.

Install

Log in once with /login github-copilot, then install the package:

pi install npm:pi-ghcp-search

Or try it for a single session without adding it to settings:

pi -e npm:pi-ghcp-search

Update later with:

pi update --extensions

To follow the latest main instead of npm releases, install git:github.com/Marvae/pi-ghcp-search.

Choose the models

Each tool tries Copilot models in order and uses the first one Pi knows:

Tool Default order
web_search gpt-6-luna, gpt-5.4-nano, grok-4.7
x_search grok-4.7

To use others, list them in ~/.pi/agent/ghcp-search.json. Either key can be left out to keep its defaults:

{
  "webModels": ["gpt-6-sol", "gpt-6-luna"],
  "xModels": ["grok-4.7"]
}

The file is read on every search, so changes apply without /reload. A model must be enabled for your Copilot plan.

Models that can search: cost, time, and accuracy

web_search, cheapest first:

Model Cost per search Time Right answers
gpt-5.4-nano $0 (no price listed) 6.5 s 3/3
mai-code-2-flash under $0.001 10.0 s 2/3
gpt-6-luna under $0.001 4.4 s 3/3
gpt-5.6-luna $0.001 4.2 s 3/3
mai-code-2 $0.006 11.4 s 2/3
gpt-6.1-terra $0.008 6.7 s 3/3
gpt-6.1-sol $0.013 6.7 s 3/3
gpt-6-sol $0.013 3.5 s 3/3
gpt-5.3-codex $0.013 7.3 s 3/3
gpt-6.2-sol $0.016 6.1 s 3/3
gpt-5.6-sol $0.027 4.6 s 2/3
grok-4.6 (retires 2026-12-14) $0.035 14.7 s 3/3
grok-4.7 $0.040 5.7 s 3/3
gpt-6.2-astra $0.041 6.1 s 3/3
gpt-6-astra $0.078 4.9 s 3/3

x_search (Grok only):

Model Cost per search Time
grok-4.7 $0.025 12.3 s
grok-4.6 (retires 2026-12-14) $0.027 32.2 s

One run on 2026-12-01 with Copilot's listed prices, three web questions with known answers; times vary from run to run. The wrong answers came from outdated pages.

Caveats

Copilot's hosted x_search is not documented by GitHub and may change.