Featured:AI tools directory– Discover the right AI for your next task

BUILDING SOFTWARE

OpenCode Local Models: Connect Ollama and Test a Repository

Use a local model in OpenCode. Check your version’s Ollama instructions, confirm the model in the picker, and test before letting it edit files.

vibeforthat editorial
Contents

How do you check that OpenCode is using a local model?

Start your local model server and check the provider instructions for your OpenCode version. Current v2 documentation describes discovery for Ollama, LM Studio and vLLM. If you use the older configuration path, follow its provider example and use the actual address of your server.

  • In the model picker, select the local provider and verify the model name.
  • Ask for a read-only explanation of one file before allowing an edit. Check the model’s response and the tool permissions separately.

Start with one repository task

The official setup walks through connecting a provider and initializing a project. Ask about a small area of the repository first, then request one change with a clear check for success.

Who should start here?

Consider OpenCode when you want a terminal workflow and need to check the model provider, project settings and permissions before editing. For a Git-centered comparison, run the same small change in Aider and review both diffs.

Check providers, permissions and costs

Review the provider’s pricing and the project’s permissions before enabling edits or commands. Read the changes and run the relevant checks before keeping the patch.

A few more details

Can I choose which model OpenCode uses?

OpenCode documents multiple provider options. Choose the provider and model that fit your setup and verify the account and cost conditions there.

Sources & maker notes

See also: related tools and guides

Categories