diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 5f9b040d4..7ccf0a779 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -1360,7 +1360,7 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide Here's an example setting the `apiKey`, `headers`, and model `limit` options. -```json title="opencode.json" {9,11,17-20} +```json title="opencode.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1377,6 +1377,9 @@ Here's an example setting the `apiKey`, `headers`, and model `limit` options. "models": { "my-model-name": { "name": "My Model Display Name", + "options": { + "reasoningEffort": "high" + }, "limit": { "context": 200000, "output": 65536 @@ -1388,6 +1391,35 @@ Here's an example setting the `apiKey`, `headers`, and model `limit` options. } ``` +For Anthropic-compatible providers: + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "provider": { + "anthropic-provider": { + "npm": "@ai-sdk/anthropic", + "name": "My AI ProviderDisplay Name", + "options": { + "baseURL": "https://api.myprovider.com/v1", + "apiKey": "{env:ANTHROPIC_API_KEY}" + }, + "models": { + "my-model-name": { + "name": "My Model Display Name", + "options": { + "thinking": { + "type": "enabled", + "budgetTokens": 8000 + } + } + } + } + } + } +} +``` + Configuration details: - **apiKey**: Set using `env` variable syntax, [learn more](/docs/config#env-vars).