What is OpenCode? How an open-source coding agent connects different model providers
OpenCode project initialization, provider connections, model selection and permissions, distinguishing the client from local inference and a complete development environment.
Meet this tool
OpenCode is an open-source AI coding agent with terminal and other interfaces for reading projects, editing code and using tools. It connects model services with development operations rather than being a model called OpenCode. The client can run locally, while local or remote inference depends on its actual provider and environment.
Project initialization creates reusable guidance
Inside a project, /init can analyze the repository and generate AGENTS.md for guidance. This supports subsequent tasks without replacing source code. Review generated instructions rather than treat guessed build procedures as executed facts.
Start with explanations and then define specific changes. Version-controlled rules preserve conventions across sessions, not model training data or OS permissions. An instruction file does not unlock an inaccessible directory.
Provider connections differ from model selection
Provider connections determine request destinations and authentication; model selection chooses a configured model. /connect and /models serve different stages, and successful configuration still requires an available service. Connecting an account with several models does not establish the intended model was selected.
Official documentation also covers local model services, requiring separately prepared inference services, weights and hardware. Installing OpenCode does not run arbitrary models locally. Local and remote models can differ in tool-calling support and need task-specific checks.
Permission rules can allow, ask or deny
Permissions can allow, ask or deny by tool or command pattern. Matching order matters, including broad allowances and specific restrictions. Do not promise a confirmation for every command or treat provider credentials as authorization for every business resource.
For controlled edits, inspect actual policy and working directory as well as project guidance. External material remains reference content rather than automatically becoming execution instructions. A proposed action need not be authorized under current settings.
Check the client separately from the runnable project
OpenCode supplies configurable model connections rather than one fixed product-model pairing. Choose it for terminal workflows, provider support and project tools rather than assume open source includes models, hosting and dependencies.
Major versions can differ, so installation and settings must match the intended documentation without overwriting older environments. Preserve working trees and dependency instructions. Edited text does not establish a runnable project when runtimes or packages are missing.
Checked sources
These sources support the concepts and methods described here. Examples and test scope are labeled separately; check the version of the tools you use.