gitmyhub

opencode-raven

TypeScript ★ 31 updated 6d ago

Opencode-Raven keeps noisy tool work behind a focused Raven agent, so your main model gets compact answers instead of raw search results, docs pages, GitHub examples, MCP output, or large MCP schemas.

An opencode plugin that intercepts all AI search operations and hands them to a cheap model, so your expensive main coding AI only uses its context window for actual coding and reasoning.

TypeScriptopencodeContext7Exa AIGrep.appsetup: easycomplexity 2/5

Opencode is an AI coding tool, and when you work with it, the AI agent frequently runs searches: looking through your local files, fetching documentation, scanning the web. Each of those searches consumes tokens and takes up space in the context window the AI uses to keep track of your conversation. Raven is a plugin for opencode that intercepts all those search operations and hands them off to a separate, cheaper AI model instead, so your main expensive model stays focused on actually writing and reasoning about code.

The way it works is that Raven blocks the built-in search tools for your main agent and any sub-agents you are running. When those agents need to search something, they call a single unified tool called raven_seek instead. Raven then handles the search using a free or low-cost model, with access to your local filesystem plus three external research services: Context7 for library documentation, Exa AI for web search, and Grep.app for searching GitHub code. The main agent only sees the final result, not the internal steps Raven took to get there.

Installing it takes two steps: add the package with npm or bun, then add one line to your opencode configuration file. After a restart it is active. You can turn interception on or off with slash commands, change which model Raven uses, adjust how long it waits before timing out, and check how many tokens it has processed for you across the current session and all time.

The plugin is configurable enough to exclude specific agents or specific tools from being intercepted, which matters if you have a custom agent that needs direct search access. The three external MCP services it connects to all work without API keys at the default rate limits, though you can add keys to increase those limits.

The core use case is cost and focus: run a capable free model for search, and let your paid model spend its context on the work that actually requires it.

Where it fits