We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Cost Effectiveness

With each new prompt, you can quickly switch models with /models and variants with ctrl+t. Those are your two main levers for controlling cost.

  • More complex task? Smarter model, higher reasoning.
  • Less complex task? Cheaper model, lower reasoning.

You can waste a lot of time micromanaging this on every prompt. I just use a sane default for most work.

Monitoring Costs

As you're watching OpenCode do its thing, keep an eye on the right sidebar's "Context" section. You'll see something like this:

Context
147,529 tokens
37% used
$5.56 spent

This tells me that my current session, OpenCode's term for a conversation, has an estimated token (API) cost of $5.56 so far, which is not necessarily what you pay under a subscription due to the subsidy.

I/O and Compute Aren't Expensive

Many developers new to AI assume time = money in coding sessions. Not really. OpenCode can spend a lot of time on a task without creating a huge inference bill. You pay for tokens, not time.

For example, these things can take a while without adding much inference cost:

  • Running computationally heavy test suites
  • Executing SQL queries that take a long time to return
  • Making many long-running network calls