Problem
Agent platforms need more model routing choices without breaking their own workflow model. The hard part is not calling a model API; it is preserving the host application's issue lifecycle, tool contract, comments, status updates, and runtime accounting.
What I Built
Paperclip OpenRouter Adapter registers a new Paperclip adapter type, resolves OpenRouter configuration, turns a Paperclip heartbeat into an issue-aware prompt, runs a chat-completions tool loop, exposes Paperclip board tools to the model, and writes the result back as issue comments and status changes.
System Architecture
Technical Decisions
- Keep the adapter scoped to Paperclip board tools rather than pretending it can edit local files.
- Support any OpenRouter model id while providing sane defaults and a cheap profile.
- Return model, provider, token, cost, generation, and turn metadata when OpenRouter reports it.
- Package the adapter through normal npm exports so the UI parser and server entrypoint can load cleanly.
What This Proves
This is clean developer-tooling proof: adapter contracts, model-provider integration, tool-loop execution, typed API boundaries, and package discipline in a small public repo.