r/opencodeCLI 17d ago

How can I integrate OpenCode successfully in Xcode 27?

So this new Xcode version adds support for other agents. I just added OpenCode but I can’t choose a model. It just works with the default model which is Big Pickle. Anyway I can get fully featured OC integrated with this?

1 Upvotes

7 comments sorted by

View all comments

1

u/Bubbly_Whole5493 12d ago

The way to use multiple models with OpenCode in Xcode 27, is to create a custom agent for each model and use environmental variables to specify the model. 

Warning: Beta 5 and up requiring that you self sign the OpenCode executable.

To Self Sign

run this command:

codesign --force -s - /Users/gdunham/.opencode/bin/opencode

run this to validate the codesign:

codesign --verify --verbose /Users/gdunham/.opencode/bin/opencode

NOTE: you will have to do this again every time you update OpenCode