PoorAI

Choose Your AI Coding Harness Before You Choose a Model

3 min de lecture

Before we chase cheap AI models, we need to choose the right coding harness. This decision matters because the harness controls how an AI agent reads your project, uses tools, keeps context, and repeats work. A cheap model can still cost more if the setup wastes tokens or needs constant retries.

First, understand the different parts

A coding setup has a few separate pieces:

  • Harness: the coding agent that manages the work, tools, context, and conversation. We'll start by comparing OpenCode (s'ouvre dans un nouvel onglet) and Pi (s'ouvre dans un nouvel onglet).

  • Model: the AI doing the reasoning and generating responses. Different models have different strengths, limits, and prices.

  • Provider: the service that runs the model and gives you access to it.

  • Model gateway: a service that lets one tool connect to models from different providers. OpenRouter (s'ouvre dans un nouvel onglet) is one example.

  • API key: a secret credential that lets your tool make requests through a provider or gateway. You create it in that service's dashboard, then connect it to your harness. Never publish it or commit it to a repository.

These pieces work together, but they are not the same thing.

OpenCode vs Pi

OpenCode (s'ouvre dans un nouvel onglet) is a full-featured open-source coding agent with terminal, desktop, and IDE options. It supports many model providers, and you can connect accounts or configure a model using its provider guide (s'ouvre dans un nouvel onglet).

Pi (s'ouvre dans un nouvel onglet) is a minimal terminal coding harness designed to be adapted to your workflow. You can extend it with skills, TypeScript extensions, prompt templates, and packages. Its README and quick start (s'ouvre dans un nouvel onglet) explain how to install it and connect a provider.

Neither is automatically the winner. We need to test what each one does with the same tasks, models, and tools.

Where OpenRouter and OpenCode Console fit

OpenRouter (s'ouvre dans un nouvel onglet) provides one API for accessing models from different providers. You create an OpenRouter account, generate an API key, and configure your harness to use it. Check the model's pricing and any account requirements before running tests.

OpenCode Console (s'ouvre dans un nouvel onglet) is an optional service for connecting providers or using its model inference, with usage tracking and budget controls. Its getting-started guide (s'ouvre dans un nouvel onglet) explains how to connect it to OpenCode. It is not another coding harness.

API keys, tokens, and cost

An API key is something you create. Tokens are the pieces of text a model processes and generates; you don't create them manually. Your prompt, project files, tool results, and the model's response can all use tokens. Providers generally charge based on input and output token usage, though plans and pricing differ.

A practical starting setup is:

  1. Choose OpenCode or Pi.

  2. Choose a provider or gateway, such as OpenRouter.

  3. Create an API key in that service's dashboard and connect it to the harness.

  4. Select a model and check its input/output prices.

  5. Run a small task first, inspect usage, and set a budget or usage limit where available.

Start with the official OpenCode model guide (s'ouvre dans un nouvel onglet) and OpenRouter quick start (s'ouvre dans un nouvel onglet). Keep API keys private and never paste them into public code or posts.

What Poor AI will test

We'll run comparable coding tasks through OpenCode and Pi, then compare:

  • Did the task work correctly?

  • How much input and output usage did it take?

  • How many retries and tool calls were needed?

  • What was the total cost, and how much manual fixing remained?

The goal is not to find the lowest token price on a chart. It's to find a setup that reliably gets useful work done for less than $10/month.

This is our starting point, not a verdict. Next, we'll build a repeatable eval so the results are based on actual work rather than guesses.

Commentaires

Se connecter pour rejoindre la conversation.

Aucun commentaire pour le moment.

Supprimer ce commentaire ?

Cette action est définitive.

Masquer les commentaires de  ?

Ses commentaires ne seront plus visibles, et cette personne ne pourra plus commenter vos publications et vos leçons. Vous pouvez la réafficher dans Réglages, sous Personnes masquées.