pi-copilot-web
GitHub Copilot web_search for Pi - reuses github-copilot OAuth, no extra API keys. Free plan works.
Package details
Install pi-copilot-web from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-copilot-web- Package
pi-copilot-web- Version
0.1.0- Published
- Aug 31, 2026
- Downloads
- 145/mo · 9/wk
- Author
- wassname2
- License
- MIT
- Types
- extension
- Size
- 19.7 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-copilot-web
Minimal GitHub Copilot web_search for Pi. Reuses the github-copilot OAuth token from pi (/login github-copilot) - no extra API keys.
copilot_search({query, queries, numResults, recencyFilter, domainFilter})-> answer +Sources:with citations- Picks best
github-copilot/openai-responsesmodel (gpt-5.6-terra>sol>luna> others) that has credentials - Base URL derived from token
proxy-ep=proxy.individual.githubcopilot.com->https://api.individual.githubcopilot.com(enterprise supported via storedbaseUrl) - Request:
POST {baseUrl}/responseswithtools:[{type:"web_search"}],tool_choice:"required", stream SSE, parseurl_citation+web_search_call.action.sources(same parser asnicobailon/pi-web-access)
Install
# local
cp -r pi-copilot-web ~/.pi/agent/extensions/
# or via pi install
pi install /home/code/pi-copilot-web
Login once:
# inside pi
/login github-copilot
Free plan (free_engaged_oss_quota) works - tested with 2k completions/50 chats limits, gpt-5.6-terra succeeds.
Use
copilot_search({"query":"github copilot free plan limits 2025"})
copilot_search({"queries":["typescript 5.7 release","rust 1.82 release"],"domainFilter":["github.com"]})
copilot_search({"query":"openai gpt-5 release","recencyFilter":"month","numResults":8})
Also: /copilot-search-status to check auth.
How it mirrors pi-web-access/pi-codex-search/ttttmr
- Auth:
ctx.modelRegistry.getApiKeyAndHeaders(model)loop overgithub-copilotmodels (likettttmr/src/api.ts:getAuth+Leechael/src/pi-auth.ts:resolveCodexAccountId) - Headers: merges
model.headers(Copilot'sUser-Agent: GitHubCopilotChat/0.35.0etc) +Authorization: Bearer <token> - SSE parsing: copied from
pi-web-access/openai-search.ts:parseOpenAIResponse/extractAnswer/extractSearchResults - Tool shape: same as
Leechael/pi-codex-searchbut singlecopilot_searchinstead ofcodex_search
Free tier notes
Free free_engaged_oss_quota token has availableModelIds including gpt-5.6-terra/luna/sol etc. Each copilot_search counts as one chat request (of 50/month). Avoid batching >5 queries at once.