跪拜 Guibai
← All articles
Backend · Java · Programmer

OC Ferry Bridges OpenCode's Free Models Into WorkBuddy and Other Agents

By SimonKing ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

OpenCode's free pool stops being locked inside one client: any OpenAI-compatible agent can consume those models through OC Ferry's local relay, with no API key and no per-agent integration. The price-based filter and approval-fenced local port are what make that transfer safe enough for daily use, though Windows still depends on a community launcher.

Summary

OC Ferry bridges OpenCode's free model catalog into WorkBuddy through a local OpenAI-compatible relay. OpenCode recently expanded its free lineup to 10 models, but those models live inside OpenCode's own client, and many agents only accept custom model configurations. OC Ferry runs as a tray app that reads the OpenCode catalog, filters out non-free models, and exposes them on a local port at 127.0.0.1:41980. WorkBuddy picks up the models automatically, with no login, registration, or API key.

The filter logic is strict on purpose. A model counts as free only when input, output, and cache read/write prices are all zero; a 'free' label in the name is not enough, and deprecated models are excluded. Verified models are cached for six hours, so restarts are nearly instant instead of triggering a full rescan. The config writer is equally careful: it touches only entries it tagged, backs up before writing, locks the file, and replaces it atomically, so hand-written settings survive.

The local relay is OpenAI-compatible and listens only on loopback, with an approval fence that stops models from taking local machine actions on their own. Any OpenAI-compatible agent can use the same bridge, and CodeBuddy can reuse the models by copying WorkBuddy's models.json. Official support is Mac-only; Windows users get a separately maintained launcher. OC Ferry must keep running as long as the imported models are in use.

Takeaways
— OpenCode has 10 free models, and OC Ferry makes them available to WorkBuddy without requiring an account or API key.
— OC Ferry defines free strictly by price fields: input, output, and cache read/write must all be 0; model names containing 'free' are ignored and deprecated models are skipped.
— Models that pass inspection are cached for 6 hours, so relaunching OC Ferry is nearly instant.
— OC Ferry writes config by adding or removing only its own tagged entries; user-written settings remain untouched, and writes are backed up, locked, and atomic.
— A local OpenAI-compatible relay listens only on 127.0.0.1:41980 behind an approval fence that blocks unsanctioned local actions.
— WorkBuddy receives the models automatically as a JSON import; CodeBuddy needs WorkBuddy's models.json copied into its own config.
— OC Ferry only ships a Mac build; a separate Windows launcher repo covers Windows.
— The OC Ferry bridge process must stay running; stopping it makes the imported models unavailable.
Conclusions

A model catalog becomes more useful when it is exposed as an OpenAI-compatible API instead of locked inside one vendor's desktop client.

Price fields are a safer signal than model names for detecting free models, because names reflect marketing while pricing tables are structured data.

The caching and atomic-write details are what make this tool practical for daily use; without them, every launch would rescan models and a config merge could destroy manual edits.

Mac-first support with a separate Windows launcher means the cross-platform claim is only half true in practice; Windows users depend on a community maintainer.

Concepts & terms
OpenCode
An AI coding client with a built-in model catalog; in this setup OC Ferry reads its free models and exposes them to other tools.
WorkBuddy
A desktop AI coding client that supports custom models; it can import models supplied by OC Ferry's local relay.
OC Ferry
The tray application described in the source; it detects OpenCode's free models, caches the results, and serves them through a local OpenAI-compatible endpoint.
OpenAI-compatible forwarding port
A local HTTP endpoint that speaks the same API shape as OpenAI's model endpoints, letting any compatible agent share models without a native integration.
approval fence
A safety mechanism in OC Ferry that requires approval before a model can perform local machine actions, preventing autonomous model-triggered actions.
models.json
The config file WorkBuddy and CodeBuddy use to register custom models; OC Ferry updates it for WorkBuddy, and CodeBuddy can reuse the same file by copying it.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗