Getting "Forbidden" error when trying to init after logging in with claude pro subscription #110

Closed
opened 2026-02-16 17:25:14 -05:00 by yindo · 8 comments
Owner

Originally created by @mrsimb on GitHub (Jun 17, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Image

Originally created by @mrsimb on GitHub (Jun 17, 2025). Originally assigned to: @adamdotdevin on GitHub. ![Image](https://github.com/user-attachments/assets/38158d26-dca8-47a9-b424-39e876559934)
yindo closed this issue 2026-02-16 17:25:14 -05:00
Author
Owner

@mrsimb commented on GitHub (Jun 17, 2025):

Turns out the opencode/config wasn't updated after logging in, it still had amazon bedrock as provider. I thought i deleted everything before installing new version of opencode... Or it defaults to bedrock and doesn't respect the anthropic setting?

@mrsimb commented on GitHub (Jun 17, 2025): Turns out the opencode/config wasn't updated after logging in, it still had amazon bedrock as provider. I thought i deleted everything before installing new version of opencode... Or it defaults to bedrock and doesn't respect the anthropic setting?
Author
Owner

@thdxr commented on GitHub (Jun 17, 2025):

it auto detects bedrock if you have AWS_PROFILE or other aws credentials in environment

model info at the bottom should probably also show which provider you're using @adamdottv

@thdxr commented on GitHub (Jun 17, 2025): it auto detects bedrock if you have AWS_PROFILE or other aws credentials in environment model info at the bottom should probably also show which provider you're using @adamdottv
Author
Owner

@mrsimb commented on GitHub (Jun 18, 2025):

This is my config:

theme = "opencode"
provider = "anthropic"
model = "claude-sonnet-4-20250514"

And my auth.json:

{
  "anthropic": {
    "type": "oauth",
    "refresh": "...",
    "access": "...",
    "expires": 1750277460742
  }
}

And this is what i see when i type /model:
Image

@mrsimb commented on GitHub (Jun 18, 2025): This is my config: ``` theme = "opencode" provider = "anthropic" model = "claude-sonnet-4-20250514" ``` And my auth.json: ``` { "anthropic": { "type": "oauth", "refresh": "...", "access": "...", "expires": 1750277460742 } } ``` And this is what i see when i type `/model`: ![Image](https://github.com/user-attachments/assets/3132c095-b095-40e0-8928-31dc5f4ee1bf)
Author
Owner

@mrsimb commented on GitHub (Jun 18, 2025):

echo-ing AWS_PROFILE yields nothing, i don't have this variable set

@mrsimb commented on GitHub (Jun 18, 2025): `echo`-ing AWS_PROFILE yields nothing, i don't have this variable set
Author
Owner

@adamdotdevin commented on GitHub (Jun 19, 2025):

model info at the bottom should probably also show which provider you're using @adamdottv

provider is printed here in latest release

@adamdotdevin commented on GitHub (Jun 19, 2025): > model info at the bottom should probably also show which provider you're using [@adamdottv](https://github.com/adamdottv) provider is printed here in latest release
Author
Owner

@adamdotdevin commented on GitHub (Jun 19, 2025):

echo-ing AWS_PROFILE yields nothing, i don't have this variable set

do you have aws creds configured at all in your shell?

@adamdotdevin commented on GitHub (Jun 19, 2025): > `echo`-ing AWS_PROFILE yields nothing, i don't have this variable set do you have aws creds configured at all in your shell?
Author
Owner

@mrsimb commented on GitHub (Jun 19, 2025):

do you have aws creds configured at all in your shell?

i have AWS creds in my .env file in the project root
does it read those?

@mrsimb commented on GitHub (Jun 19, 2025): > do you have aws creds configured at all in your shell? i have AWS creds in my .env file in the project root does it read those?
Author
Owner

@adamdotdevin commented on GitHub (Jun 20, 2025):

do you have aws creds configured at all in your shell?

i have AWS creds in my .env file in the project root does it read those?

yeah, it will.

we need to add this to the docs, but you can explicitly disable providers in the config.

~/.config/opencode/config.json:

{
    "$schema": "https://opencode.ai/config.json",
    "disabled_providers": [
        "amazon-bedrock"
    ]
}

going to go ahead and close this, lmk if you have any further issues

@adamdotdevin commented on GitHub (Jun 20, 2025): > > do you have aws creds configured at all in your shell? > > i have AWS creds in my .env file in the project root does it read those? yeah, it will. we need to add this to the docs, but you can explicitly disable providers in the config. ~/.config/opencode/config.json: ```json { "$schema": "https://opencode.ai/config.json", "disabled_providers": [ "amazon-bedrock" ] } ``` going to go ahead and close this, lmk if you have any further issues
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#110