Skip to content

Update happy with opencode support#459

Open
vinnymac wants to merge 4 commits intoslopus:mainfrom
vinnymac:vt/opencode
Open

Update happy with opencode support#459
vinnymac wants to merge 4 commits intoslopus:mainfrom
vinnymac:vt/opencode

Conversation

@vinnymac
Copy link
Copy Markdown

@vinnymac vinnymac commented Jan 23, 2026

This integrates OpenCode into happy, following the patterns established in the Claude Code and Gemini PRs. The PR was dogfooded - built entirely using OpenCode itself (alternating between Opus 4.5 and Sonnet 4.5).

What's included:

New happy opencode command for both CLI and expo-app
Support for OpenCode's build and plan modes (the only two that exist currently)
Model selection via --model flag or fallback to opencode config
Full integration with models.dev's model registry

Model selection:

Run opencode models --refresh to fetch the current list, then opencode models to view available options. Fair warning: there are 160+ models in that list. Suggestions welcome on how to make this more user-friendly.

Example:

Usage: happy opencode [options]

Run OpenCode agent with Happy integration.

Options:
  --model <provider/model>  Model to use (e.g., anthropic/claude-sonnet-4-20250514)
  --started-by <source>     Internal: who started this session (daemon|terminal)
  -h, --help                Show this help message

Examples:
  happy opencode
  happy opencode --model anthropic/claude-sonnet-4-20250514
  happy opencode --model openai/gpt-4o

OpenCode supports multiple AI providers. Run 'opencode auth login' to configure.
Visit https://opencode.ai/docs/cli/ for more information.
image image

Feedback warmly welcomed 🤗

Closes #265

@akaihola
Copy link
Copy Markdown

Hi @vinnymac, great to see OpenCode support on the way!

I haven't tested your branch yet, but one thing caught my eye: supporting only the build and plan modes. I assume this means the oh-my-opencode plugin isn't supported since it adds its own modes?

Is it not possible to dynamically look up available models from OpenCode?

@vinnymac
Copy link
Copy Markdown
Author

vinnymac commented Jan 24, 2026

I haven't tested your branch yet, but one thing caught my eye: supporting only the build and plan modes. I assume this means the oh-my-opencode plugin isn't supported since it adds its own modes?

Unfortunately I can’t answer this question, as I don't use this plugin. Not sure if supporting third party plugins is a goal of Happy Coder, but if it is, I can certainly look into it. Officially supported modes is always going to be easier to maintain though.

Is it not possible to dynamically look up available models from OpenCode?

Yes and no. I mention this in the PR description. Opencode has a models command, which simply fetches from models.dev. We could either try using the models command or models.dev, but either way, it’s easier for now to just have the user specify the model they want to use. If Happy has an existing pattern for controlling models via the Web / Mobile UI, I can steer this PR toward customizing that with OpenCode supported models. If it doesn’t exist that would be a separate goal from this pull request.

Regardless this PR should support all of the models that OpenCode supports, even if it doesn’t currently show the user all of those (160+) options.

Cheers

@Cally99
Copy link
Copy Markdown

Cally99 commented Feb 3, 2026

@akaihola is there any timeline for adding in opencode and merging this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCode Support

3 participants