summaryrefslogtreecommitdiffhomepage
path: root/packages/web
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-15 14:57:50 -0400
committerDax Raad <[email protected]>2025-07-15 14:57:50 -0400
commit73b46c2bf9090094a5e31db62ef16fe1b08bb01e (patch)
tree1234da04f1b36b23d4e1be86299eedd5b1027d52 /packages/web
parent8bd250fb155dae9b569eda3e3eb59d0651f41257 (diff)
downloadopencode-73b46c2bf9090094a5e31db62ef16fe1b08bb01e.tar.gz
opencode-73b46c2bf9090094a5e31db62ef16fe1b08bb01e.zip
docs: document base URL
Diffstat (limited to 'packages/web')
-rw-r--r--packages/web/src/content/docs/docs/models.mdx32
1 files changed, 26 insertions, 6 deletions
diff --git a/packages/web/src/content/docs/docs/models.mdx b/packages/web/src/content/docs/docs/models.mdx
index 2462da8dc..524fddaa3 100644
--- a/packages/web/src/content/docs/docs/models.mdx
+++ b/packages/web/src/content/docs/docs/models.mdx
@@ -27,12 +27,13 @@ You can add custom providers by specifying the npm package for the provider and
{
"$schema": "https://opencode.ai/config.json",
"provider": {
- "openrouter": {
- "name": "OpenRouter",
+ "moonshot": {
+ "npm": "@ai-sdk/openai-compatible",
+ "options": {
+ "baseURL": "https://api.moonshot.ai/v1"
+ },
"models": {
- "weirdo/some-weird-model": {
- "name": "Claude 3.5 Sonnet"
- }
+ "kimi-k2-0711-preview": {}
}
}
}
@@ -41,10 +42,29 @@ You can add custom providers by specifying the npm package for the provider and
---
+### Base URL
+
+You can customize the base URL for any provider by setting the `baseURL` option. This is useful when using proxy services or custom endpoints.
+
+```json title="opencode.json" {6-7}
+{
+ "$schema": "https://opencode.ai/config.json",
+ "provider": {
+ "anthropic": {
+ "options": {
+ "baseURL": "https://api.anthropic.com/v1"
+ },
+ }
+ }
+}
+```
+
+---
+
### Local
You can configure local model like ones served through LM Studio or Ollama. To
-do so, you'll need to specify a couple of things.
+do so, you'll need to specify a couple of things.
Here's an example of configuring a local model from LM Studio: