Complete toolkit for configuring and extending OpenCode: agent creation, custom slash commands, configuration management, plugin development, and SDK usage.
75
94%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Set up OpenCode to use Anthropic Claude claude-sonnet-4-5 as the default model. The user's API key is stored in the ANTHROPIC_API_KEY environment variable. Show both the opencode.json configuration and how to verify it works.
baseEnv: 'ANTHROPIC_API_KEY' in the provider configuration — never hardcode the actual key valueopencode.json, not in AGENTS.md or any other filedefault: truejq . opencode.json or opencode run 'test') to verify the configuration is correctproviders array containing id, baseEnv, and models fieldsbaseEnv: 'ANTHROPIC_API_KEY' — NOT the actual key value in the configopencode.json, not in AGENTS.mddefault: truejq . opencode.json or opencode run 'test' to verify configurationproviders array containing id, baseEnv, modelsopencode.json instead of referencing the environment variable nameAGENTS.md or a non-JSON config filedefault: true from the model configurationprovider singular instead of providers array)