[Issue] Custom provider baseurl, return opencode.json is invalid Required provider.anthropic.models #3494

Closed
opened 2026-02-16 17:40:21 -05:00 by yindo · 4 comments
Owner

Originally created by @tomsun28 on GitHub (Dec 12, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Hi Team,

Thanks for the great product.
I use the config in doc show to custom base url.
In the old release, it works. But when i upgrade to the latest version 0.3.133 , it error Error: Config file at /Users/gongchao/.config/opencode/opencode.json is invalid ↳ Required provider.anthropic.models

Image
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://api.anthropic.com/v1"
      }
    }
  }
}

I have been using this method, hoping it can be fix. Thanks a lot.

OpenCode version

0.3.133

Steps to reproduce

  1. vim the opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://api.anthropic.com/v1"
      }
    }
  }
}
  1. Run the opencode

Screenshot and/or share link

Image

Operating System

macOS

Terminal

iTerm2

Originally created by @tomsun28 on GitHub (Dec 12, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Hi Team, Thanks for the great product. I use the config in doc show to custom base url. In the old release, it works. But when i upgrade to the latest version `0.3.133` , it error `Error: Config file at /Users/gongchao/.config/opencode/opencode.json is invalid ↳ Required provider.anthropic.models` <img width="1550" height="920" alt="Image" src="https://github.com/user-attachments/assets/7f43823d-d6dd-4cdb-97b4-0a0bd8ad67e4" /> ``` { "$schema": "https://opencode.ai/config.json", "provider": { "anthropic": { "options": { "baseURL": "https://api.anthropic.com/v1" } } } } ``` I have been using this method, hoping it can be fix. Thanks a lot. ### OpenCode version 0.3.133 ### Steps to reproduce 1. vim the opencode.json ``` { "$schema": "https://opencode.ai/config.json", "provider": { "anthropic": { "options": { "baseURL": "https://api.anthropic.com/v1" } } } } ``` 2. Run the opencode ### Screenshot and/or share link <img width="1218" height="224" alt="Image" src="https://github.com/user-attachments/assets/1400ebdb-331c-45c2-af2a-48be62839259" /> ### Operating System macOS ### Terminal iTerm2
yindo added the bug label 2026-02-16 17:40:21 -05:00
yindo closed this issue 2026-02-16 17:40:21 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 12, 2025):

This appears to be a configuration validation regression where the models field is incorrectly required for provider configurations. Users should be able to customize just the baseURL option without specifying models. This is likely a schema validation issue introduced in the recent version update.

@github-actions[bot] commented on GitHub (Dec 12, 2025): This appears to be a configuration validation regression where the `models` field is incorrectly required for provider configurations. Users should be able to customize just the `baseURL` option without specifying models. This is likely a schema validation issue introduced in the recent version update.
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

@tomsun28 you said upgrade to latest:

But when i upgrade to the latest version 0.3.133

Uhh that's not latest? Latest is 1.0.152 which is much more recent

@rekram1-node commented on GitHub (Dec 12, 2025): @tomsun28 you said upgrade to latest: > But when i upgrade to the latest version 0.3.133 Uhh that's not latest? Latest is 1.0.152 which is much more recent
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

This issue shouldn't happen on latest

@rekram1-node commented on GitHub (Dec 12, 2025): This issue shouldn't happen on latest
Author
Owner

@tomsun28 commented on GitHub (Dec 12, 2025):

Hi, sorry that was my mistake. The latest version is fine 👍

@tomsun28 commented on GitHub (Dec 12, 2025): Hi, sorry that was my mistake. The latest version is fine 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3494