Project specific opencode.json is ignored #621

Closed
opened 2026-02-16 17:27:37 -05:00 by yindo · 1 comment
Owner

Originally created by @berenddeboer on GitHub (Jul 10, 2025).

Originally assigned to: @thdxr on GitHub.

I do not have a ~/.config/opencode/config.json.

I have created this opencode.json in my directory:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic.claude-sonnet-4-20250514-v1:0",
  "provider": {
    "bedrock": {
      "region": "ap-southeast-2",
      "models": {
        "anthropic.claude-sonnet-4-20250514-v1:0": {
          "name": "Claude Sonnet 4"
        }
      }
    }
  }
}

opencode still starts up with "Anthropic Claude Sonnet 4".

If I use /models and pick bedrock, opencode says "Amazon Bedrock Claude Sonnet 4". And I can then interact with it. It shows this as the model string: "anthropic.claude-sonnet-4-20250514-v1:0".

When using true Anthropic I have it spit out "claude-sonnet-4-20250514" when I ask it what model it is.

Also when I do opencode auth login and select "Amazon BedRock", it does not stick. When I exit and go back, it's Anthropic again.

Originally created by @berenddeboer on GitHub (Jul 10, 2025). Originally assigned to: @thdxr on GitHub. I do not have a `~/.config/opencode/config.json`. I have created this `opencode.json` in my directory: ``` { "$schema": "https://opencode.ai/config.json", "model": "anthropic.claude-sonnet-4-20250514-v1:0", "provider": { "bedrock": { "region": "ap-southeast-2", "models": { "anthropic.claude-sonnet-4-20250514-v1:0": { "name": "Claude Sonnet 4" } } } } } ``` opencode still starts up with "Anthropic Claude Sonnet 4". If I use `/models` and pick bedrock, opencode says "Amazon Bedrock Claude Sonnet 4". And I can then interact with it. It shows this as the model string: "anthropic.claude-sonnet-4-20250514-v1:0". When using true Anthropic I have it spit out "claude-sonnet-4-20250514" when I ask it what model it is. Also when I do `opencode auth login` and select "Amazon BedRock", it does not stick. When I exit and go back, it's Anthropic again.
yindo closed this issue 2026-02-16 17:27:37 -05:00
Author
Owner

@thdxr commented on GitHub (Jul 11, 2025):

model field needs the provider prefix - bedrock/xxxx

@thdxr commented on GitHub (Jul 11, 2025): `model` field needs the provider prefix - `bedrock/xxxx`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#621