Skip to content

Repository files navigation

Copilot Page Assistant

A Chrome (Manifest V3) side-panel extension that reads the web page you're on and helps you understand it, brainstorm ideas, and write code. It supports several AI backends — you pick the provider and model:

  • GitHub Models — free, rate-limited catalog (GPT, Llama, DeepSeek, Phi, Mistral…).
  • Google Gemini — free tier (Gemini Flash/Pro) via a Google AI Studio API key.
  • Groq — free tier, very fast (Llama, DeepSeek-distill, Qwen, GPT-OSS, Gemma).
  • OpenRouter — one key unlocks many models, including free (:free) variants.
  • Cerebras — free tier, extremely fast inference (Llama, Qwen, GPT-OSS).
  • Mistral — free tier (Mistral, Codestral, and open models).
  • Anthropic — Claude models (Sonnet, Opus, Haiku) via your Anthropic API key (paid).
  • OpenAI — GPT models via your OpenAI API key (paid).

This is a personal-use browser extension. It is not a "GitHub Copilot Extension" (those run inside Copilot Chat). It talks directly to each provider's public API using your own credentials.

Why Claude isn't in the GitHub Models list: GitHub Models is Azure-backed and its catalog has no Anthropic models. To use Claude, switch the provider to Anthropic and supply an Anthropic API key.


What it does

  • 📄 Reads the current tab's title, URL, selected text, and visible content on demand.
  • 🧠 Sends that context plus your question to the chat model you selected.
  • 💬 Streams the answer into a side panel, with Markdown + copy buttons on code blocks.
  • 📋 Copies complete responses or individual code blocks with one click.
  • ⚡ Quick actions: Summarize, Suggest ideas, Explain selection.
  • 🔀 Switch provider (GitHub Models / Gemini / Groq / OpenRouter / Cerebras / Mistral / Anthropic / OpenAI) and model any time.
  • 🔐 Keeps new API keys in memory for the browser session unless you explicitly remember them.
  • 🛡️ Uses temporary activeTab access instead of permanent access to every website.

Requirements


1. Get a credential

You only need one. Every provider works the same way — create a key, paste it into Settings.

Provider Where to get a key Looks like Cost
GitHub Models Fine-grained token — set Account permissions → Models to Read-only. No repository access needed. github_pat_… Free, rate-limited
Google Gemini AI Studio AIza… Free tier
Groq console.groq.com/keys gsk_… Free tier, very fast
OpenRouter openrouter.ai/keys sk-or-… Free tier — the model list is filtered to :free
Cerebras cloud.cerebras.ai csk-… Free tier, very fast
Mistral console.mistral.ai/api-keys Free "Experiment" plan
Anthropic console.anthropic.com sk-ant-… Paid — no free tier
OpenAI platform.openai.com/api-keys sk-… Paid

Two things that catch people out:

  • Gemini — unrestricted "standard" keys stopped working on 19 June 2026. Create a fresh key rather than reusing an old one.
  • Free tiers are rate-limited. A 429 means wait and retry, or switch to a lighter model.

2. Load the extension

  1. Open chrome://extensions.
  2. Turn on Developer mode (top-right).
  3. Click Load unpacked and select this project folder (the one containing manifest.json).
  4. Pin the extension, then click its toolbar icon to open the side panel.

3. Configure

  1. In the side panel, open ⚙ Settings.
  2. Choose a Provider (GitHub Models / Gemini / Groq / OpenRouter / Cerebras / Mistral / Anthropic / OpenAI).
  3. Paste that provider's credential. Leave Remember this key off for session-only storage, or enable it to keep the key after Chrome closes.
  4. Click Load models, pick a model, then Save settings.
  5. Ask away. Toggle Read page to include/exclude the current page as context.

Each provider keeps its own credential, model list, and selection, so you can switch between them freely without re-entering anything.


How it works

  • GitHub Models, OpenAI, Gemini, Groq, OpenRouter, Cerebras & Mistral use the OpenAI-style chat API:
    • Catalog: GET .../catalog/models (GitHub), GET .../v1/models (OpenAI), or GET .../v1beta/openai/models (Gemini).
    • Inference: POST .../chat/completions, streamed via server-sent events.
    • Auth: Authorization: Bearer <token-or-key>.
    • Gemini uses Google's OpenAI-compatible endpoint at https://generativelanguage.googleapis.com/v1beta/openai/.
    • Groq, OpenRouter, Cerebras & Mistral use their OpenAI-compatible base URLs (api.groq.com/openai/v1, openrouter.ai/api/v1, api.cerebras.ai/v1, api.mistral.ai/v1). OpenRouter's list is filtered to free (:free) models.
  • Anthropic uses the Messages API:
    • Catalog: GET https://api.anthropic.com/v1/models.
    • Inference: POST https://api.anthropic.com/v1/messages (SSE text_delta events).
    • Auth: x-api-key + anthropic-version headers, plus anthropic-dangerous-direct-browser-access: true (required by Anthropic to allow direct browser/extension calls).
  • Page reading: when Read page is on, the extension uses Chrome's temporary activeTab permission and injects a small extraction function into that tab — only when you send a message. It does not request permanent access to every website.

Privacy & security

  • New credentials are kept in chrome.storage.session by default and disappear when Chrome closes. If you enable Remember this key, that provider's key is stored in chrome.storage.local (this Chrome profile only, unencrypted). Existing keys from an older version remain remembered until you clear them or turn Remember off and save.
  • Provider/model settings are stored locally. Conversations stay in the side panel's memory and are not saved after it closes.
  • Page content leaves your browser only when you send a message with "Read page" on, and it goes to the API of the provider you selected (whichever provider's key you're using). Review a page before sending sensitive content.
  • Page text is truncated to ~12,000 characters per request (configurable in sidepanel.js via MAX_PAGE_CHARS).
  • Browser pages (chrome://, the Chrome Web Store, etc.) can't be read — that's a Chrome restriction.

Customize

  • System prompt: edit it in ⚙ Settings to change the assistant's behavior.
  • Context size / model filter: tweak MAX_PAGE_CHARS and the catalog filter in sidepanel.js.
  • Model list: click Load models again to refresh the cached catalog.

Troubleshooting

Symptom Fix
401 Unauthorized Wrong/expired credential (GitHub token needs Models: Read).
403 Forbidden Credential lacks access, or an org/policy is blocking the provider.
404 Not Found Re-load models and reselect; the model id may have changed.
429 Rate limited GitHub/Gemini free-tier limit, or you're out of Anthropic/OpenAI credits. Wait, or pick a lighter model (e.g. a Flash/mini).
No Claude in the list Switch Provider to Anthropic — Claude isn't in GitHub Models.
Gemini key rejected Create a new key at AI Studio — old unrestricted "standard" keys stopped working in June 2026.
Anthropic call blocked Ensure the key is valid; the extension sends the required browser-access header automatically.
"Can't read this page" Browser/Web Store pages are blocked. Otherwise, click the extension toolbar icon on that tab to grant temporary access, then retry.
Side panel won't open Reload the extension at chrome://extensions.

Files

manifest.json     MV3 manifest (side panel, scripting, storage)
background.js     Opens the side panel on toolbar click
sidepanel.html    UI shell
sidepanel.css     Styling (light/dark aware)
sidepanel.js      Settings, catalog, page reading, streaming chat, Markdown
icons/            16 / 32 / 48 / 128 px icons
.gitignore        Keeps secrets and local cruft out of git
.gitattributes    Normalizes line endings
LICENSE           MIT
PRIVACY.md        Data handling and Chrome permission details
SECURITY.md       Vulnerability reporting and key-safety guidance

There is no build step — the files in the repository are the extension.

Security

This repository contains no credentials. Read PRIVACY.md for data handling details and SECURITY.md for safe vulnerability reporting.

Licence

MIT.

About

Chrome Manifest V3 side-panel extension that reads the current page and answers questions about it. Switch between 8 AI providers (GitHub Models, Gemini, Groq, OpenRouter, Cerebras, Mistral, Anthropic, OpenAI) with streamed responses and session-only key storage.

Topics

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages