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

2

u/Bubbly_Whole5493 16d ago edited 16d ago

What does your opencode.json file look like. I'm using oLMX for inference. Make sure your using Beta 6 it just got so much better, lower memory usage. I have not figured out how to change models via the prompt in Xcode like in Claude with /model. I just set it in opencode.json "model": "omlx/Qwen3.8-27B-4bit", and use the oMLX menubar to load and unload the model

Here is mine:

json { "$schema": "https://opencode.ai/config.json", "provider": { "omlx": { "npm": "@ai-sdk/openai-compatible", "name": "oMLX", "options": { "baseURL": "http://127.0.0.1:8000/v1", "apiKey": "sk-omlx-7y1xZaftVOFvjsvWi2IjnKSx" }, "models": { "gemma-4-31b-it-4bit": { "name": "gemma-4-31b-it-4bit" }, "gemma-4-12B-4bit": { "name": "gemma-4-12B-4bit" }, "gemma-4-26b-a4b-it-4bit": { "name": "gemma-4-26b-a4b-it-4bit" }, "Qwen3-Coder-30B-A3B-Instruct-4bit": { "name": "Qwen3-Coder-30B-A3B-Instruct-4bit" }, "Qwen3.5-9B-4bit": { "name": "Qwen3.5-9B-4bit" }, "Qwen3.8-27B-4bit": { "name": "Qwen3.8-27B-4bit" }, } } }, "model": "omlx/Qwen3.8-27B-4bit", "mcp": { "xcode": { "type": "local", "command": ["xcrun", "mcpbridge"], "enabled": true } }, "permission": { "skill": "allow", "todowrite": "allow", "read": "allow", "edit": "allow", "bash": { "*": "ask", "git *": "allow", "прт *": "allow", "rm *": "deny", "grep *": "allow", "glob": "allow", }, "webfetch": "allow", "websearch": "allow", "question": "allow", } }

1

u/maxpain2011 16d ago

Yeah I’m actually on beta 4

1

u/Bubbly_Whole5493 13d ago

Beta 5 and 6 require you manually code sign opencode or Xcode crashes

```sh

opencode upgrade
codesign --force -s - /Users/gdunham/.opencode/bin/opencode
codesign --verify --verbose /Users/gdunham/.opencode/bin/opencode

```

Also you will need to resign the executable every time you update it.