Menu

A harness for OpenCode that admits when it costs more
📰

A harness for OpenCode that admits when it costs more

DEV Community: opensource·Phạm Cảnh·3 days ago
#bkHPD6wM
#devtoopensource#devto#dev#model#harness
Reading 0:00
15s threshold

A coding harness is model-specific even when the tool is not. Context reserve, effort levels, temperature and privacy terms change with the provider. Re-answer those in a prompt and the model reads them once. Hard-code them and you fork the project.

opencode-harness-kit takes a different route: the model is data.

The problem

OpenCode lets you point the CLI at almost any provider. The hard part starts after that. A free route, a paid route and a local route each have different context limits, different reasoning controls and different terms about what happens to prompts. If you switch routes often, you end up maintaining the same model-specific answers in several places.

The design

oc-harness use <provider>/<model> reads the live models.dev record and writes a profile to ~/.config/opencode/profiles/<id>.json . The profile is compiled into opencode.jsonc as ten lanes:

plan

build

reviewer

locate

verify

vision

doc

schema

sweep

longform

Each lane gets its own model, output cap and fallback chain.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.