undefined: The provided model identifier is invalid #7873

Closed
opened 2026-02-16 18:08:32 -05:00 by yindo · 22 comments
Owner

Originally created by @LeeWong on GitHub (Jan 28, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

opencode cannot identify AWS bedrock: Deepseek v3.1 and Qwen3-Coder-480B

Plugins

No response

OpenCode version

1.1.39

Steps to reproduce

  1. Use AWS bedrock api key and select two models
  2. Run any prompt.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @LeeWong on GitHub (Jan 28, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description opencode cannot identify AWS bedrock: Deepseek v3.1 and Qwen3-Coder-480B ### Plugins _No response_ ### OpenCode version 1.1.39 ### Steps to reproduce 1. Use AWS bedrock api key and select two models 2. Run any prompt. ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:08:32 -05:00
yindo closed this issue 2026-02-16 18:08:32 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 28, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4784: Opus 4.5 in AWS Bedrock "undefined: The provided model identifier is invalid." - Same error message when using AWS Bedrock models

Feel free to ignore if your specific case involves different model configurations.

@github-actions[bot] commented on GitHub (Jan 28, 2026): This issue might be a duplicate of existing issues. Please check: - #4784: Opus 4.5 in AWS Bedrock "undefined: The provided model identifier is invalid." - Same error message when using AWS Bedrock models Feel free to ignore if your specific case involves different model configurations.
Author
Owner

@cravenceiling commented on GitHub (Jan 28, 2026):

Those models are probably not in the models.dev database.

https://models.dev/?search=bedrock

@cravenceiling commented on GitHub (Jan 28, 2026): Those models are probably not in the models.dev database. https://models.dev/?search=bedrock
Author
Owner

@LeeWong commented on GitHub (Jan 28, 2026):

They are in model.dev database:

qwen.qwen3-coder-480b-a35b-v1:0

deepseek.v3-v1:0

@LeeWong commented on GitHub (Jan 28, 2026): They are in model.dev database: qwen.qwen3-coder-480b-a35b-v1:0 deepseek.v3-v1:0
Author
Owner

@cravenceiling commented on GitHub (Jan 28, 2026):

What is the output when you run with opencode --print-logs?

@cravenceiling commented on GitHub (Jan 28, 2026): What is the output when you run with `opencode --print-logs`?
Author
Owner

@LeeWong commented on GitHub (Jan 28, 2026):

undefined: The provided model identifier is invalid.

@LeeWong commented on GitHub (Jan 28, 2026): undefined: The provided model identifier is invalid.
Author
Owner

@LeeWong commented on GitHub (Jan 28, 2026):

from the log file:

ERROR 2026-01-28T19:10:26 +7ms service=session.processor error=undefined: The provided model identifier is invalid. stack="AI_APICallError: undefined: The provided model identifier is invalid.\n at (../../node_modules/.bun/@ai-sdk+provider-utils@3.0.20+d6123d32214422cb/node_modules/@ai-sdk/provider-utils/dist/index.mjs:936:18)\n at processTicksAndRejections (native:7:39)" process

@LeeWong commented on GitHub (Jan 28, 2026): from the log file: ERROR 2026-01-28T19:10:26 +7ms service=session.processor error=undefined: The provided model identifier is invalid. stack="AI_APICallError: undefined: The provided model identifier is invalid.\n at <anonymous> (../../node_modules/.bun/@ai-sdk+provider-utils@3.0.20+d6123d32214422cb/node_modules/@ai-sdk/provider-utils/dist/index.mjs:936:18)\n at processTicksAndRejections (native:7:39)" process
Author
Owner

@Solidsilver commented on GitHub (Jan 29, 2026):

I'm getting the same error - at least with DeepSeek v3.1 on Amazon Bedrock. The region is set to us-west-2 in my opencode config

Here is a truncated version of the logs I'm seeing:

INFO  2026-01-29T15:52:44 +1ms service=llm providerID=amazon-bedrock modelID=deepseek.v3-v1:0 sessionID=ses_3f58b041fffeqa4doq4EzNEXGm small=false agent=build mode=primary stream
INFO  2026-01-29T15:52:44 +0ms service=llm providerID=amazon-bedrock modelID=deepseek.v3-v1:0 sessionID=ses_3f58b041fffeqa4doq4EzNEXGm small=false agent=build mode=primary tokens=32000 modelOptions={} outputLimit=81920 max_output_tokens
sessionID=ses_3f58b041fffeqa4doq4EzNEXGm small=true agent=title mode=primary error={"error":{"name":"AI_APICallError","url":"https://bedrock-runtime.us-west-2.amazonaws.com/model/us.deepseek.v3-v1%3A0/converse-stream","requestBodyValues":{"system"... <prompts>
"statusCode":400,"responseHeaders":{"connection":"keep-alive","content-length":"55","content-type":"application/json","date":"Thu, 29 Jan 2026 15:52:45 GMT","x-amzn-errortype":"ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/","x-amzn-requestid":"<redact>"},"responseBody":"{\"message\":\"The provided model identifier is invalid.\"}","isRetryable":false,"data":{"message":"The provided model identifier is invalid."}}} stream error
@Solidsilver commented on GitHub (Jan 29, 2026): I'm getting the same error - at least with DeepSeek v3.1 on Amazon Bedrock. The region is set to `us-west-2` in my opencode config Here is a truncated version of the logs I'm seeing: ``` INFO 2026-01-29T15:52:44 +1ms service=llm providerID=amazon-bedrock modelID=deepseek.v3-v1:0 sessionID=ses_3f58b041fffeqa4doq4EzNEXGm small=false agent=build mode=primary stream INFO 2026-01-29T15:52:44 +0ms service=llm providerID=amazon-bedrock modelID=deepseek.v3-v1:0 sessionID=ses_3f58b041fffeqa4doq4EzNEXGm small=false agent=build mode=primary tokens=32000 modelOptions={} outputLimit=81920 max_output_tokens sessionID=ses_3f58b041fffeqa4doq4EzNEXGm small=true agent=title mode=primary error={"error":{"name":"AI_APICallError","url":"https://bedrock-runtime.us-west-2.amazonaws.com/model/us.deepseek.v3-v1%3A0/converse-stream","requestBodyValues":{"system"... <prompts> "statusCode":400,"responseHeaders":{"connection":"keep-alive","content-length":"55","content-type":"application/json","date":"Thu, 29 Jan 2026 15:52:45 GMT","x-amzn-errortype":"ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/","x-amzn-requestid":"<redact>"},"responseBody":"{\"message\":\"The provided model identifier is invalid.\"}","isRetryable":false,"data":{"message":"The provided model identifier is invalid."}}} stream error ```
Author
Owner

@Solidsilver commented on GitHub (Jan 29, 2026):

I think I figured out the issue. deepseek.v3-v1 is an on-demand model (unlike R1) - so it should not have the us. prefix when calling the api. For context, this is on opencode tag v1.1.42.
packages/opencode/src/provider/provider.ts:311, I commented out "deepseek" in the modelRequiresPrefix array, then re-built opencode and deepseek.v3-v1 worked perfectly.
Hope this helps.

@Solidsilver commented on GitHub (Jan 29, 2026): I think I figured out the issue. deepseek.v3-v1 is an on-demand model (unlike R1) - so it should not have the `us.` prefix when calling the api. For context, this is on opencode tag `v1.1.42`. `packages/opencode/src/provider/provider.ts:311`, I commented out "deepseek" in the `modelRequiresPrefix` array, then re-built opencode and deepseek.v3-v1 worked perfectly. Hope this helps.
Author
Owner

@rekram1-node commented on GitHub (Jan 29, 2026):

Thx @Solidsilver will look

@rekram1-node commented on GitHub (Jan 29, 2026): Thx @Solidsilver will look
Author
Owner

@neshreve commented on GitHub (Feb 4, 2026):

I also just started encountering this behavior today. every Anthropic model we have access to via our corporate AWS is flagged as invalid in opencode.

macOS Sequoia 15.6.1
opencode 1.1.50, installed via homebrew

This behavior was not present yesterday (2026-02-03); I did not manually upgrade before encountering, and upgrading from 1.1.30 -> 1.1.50 did not change behavior.

Full log output on a failed prompt:

$ AWS_PROFILE=default opencode --print-logs
INFO  2026-02-04T13:06:24 +242ms service=default version=1.1.50 args=["--print-logs"] opencode
INFO  2026-02-04T13:06:24 +1ms service=config path=/Users/nshreve/.config/opencode/config.json loading
INFO  2026-02-04T13:06:24 +0ms service=config path=/Users/nshreve/.config/opencode/opencode.json loading
INFO  2026-02-04T13:06:24 +1ms service=config path=/Users/nshreve/.config/opencode/opencode.jsonc loading

  █▀▀█  New session - 2026-02-04T13:06:31.922Z
  █  █  opencode -s ses_3d73d088dffeW8hv7UBg3aMQ84
  ▀▀▀▀
@neshreve commented on GitHub (Feb 4, 2026): I also just started encountering this behavior today. every Anthropic model we have access to via our corporate AWS is flagged as invalid in opencode. macOS Sequoia 15.6.1 opencode 1.1.50, installed via homebrew This behavior was not present yesterday (2026-02-03); I did not manually upgrade before encountering, and upgrading from 1.1.30 -> 1.1.50 did not change behavior. Full log output on a failed prompt: ```sh $ AWS_PROFILE=default opencode --print-logs INFO 2026-02-04T13:06:24 +242ms service=default version=1.1.50 args=["--print-logs"] opencode INFO 2026-02-04T13:06:24 +1ms service=config path=/Users/nshreve/.config/opencode/config.json loading INFO 2026-02-04T13:06:24 +0ms service=config path=/Users/nshreve/.config/opencode/opencode.json loading INFO 2026-02-04T13:06:24 +1ms service=config path=/Users/nshreve/.config/opencode/opencode.jsonc loading █▀▀█ New session - 2026-02-04T13:06:31.922Z █ █ opencode -s ses_3d73d088dffeW8hv7UBg3aMQ84 ▀▀▀▀ ```
Author
Owner

@R44VC0RP commented on GitHub (Feb 4, 2026):

@neshreve where did you see the message showing it as invalid?

was that in the session?

@R44VC0RP commented on GitHub (Feb 4, 2026): @neshreve where did you see the message showing it as invalid? was that in the session?
Author
Owner

@neshreve commented on GitHub (Feb 4, 2026):

@R44VC0RP yes, my conversations look like this:

# New session - 2026-02-04T13:24:35.018Z
test
undefined: The provided model identifier is invalid.
▣  Build · us.anthropic.claude-sonnet-4-5-20250929-v1:0

I know my model identifiers are valid as far as AWS is concerned:

$ aws bedrock-runtime invoke-model \
    --model-id us.anthropic.claude-sonnet-4-5-20250929-v1:0 \
    --body '{"anthropic_version": "bedrock-2023-05-31","messages":[{"role":"user","content":"Tell me a joke."}],"max_tokens":200}' \
    --cli-binary-format raw-in-base64-out \
    /dev/stdout | jq -r '.content[]?.text?'
Why don't scientists trust atoms?

Because they make up everything!
@neshreve commented on GitHub (Feb 4, 2026): @R44VC0RP yes, my conversations look like this: ``` # New session - 2026-02-04T13:24:35.018Z test undefined: The provided model identifier is invalid. ▣ Build · us.anthropic.claude-sonnet-4-5-20250929-v1:0 ``` I know my model identifiers are valid as far as AWS is concerned: ```sh $ aws bedrock-runtime invoke-model \ --model-id us.anthropic.claude-sonnet-4-5-20250929-v1:0 \ --body '{"anthropic_version": "bedrock-2023-05-31","messages":[{"role":"user","content":"Tell me a joke."}],"max_tokens":200}' \ --cli-binary-format raw-in-base64-out \ /dev/stdout | jq -r '.content[]?.text?' Why don't scientists trust atoms? Because they make up everything! ```
Author
Owner

@R44VC0RP commented on GitHub (Feb 4, 2026):

can you run opencode export > session.json after you open a new session in TUI and try again, want to see if it can provide any other information

@R44VC0RP commented on GitHub (Feb 4, 2026): can you run `opencode export > session.json` after you open a new session in TUI and try again, want to see if it can provide any other information
Author
Owner

@neshreve commented on GitHub (Feb 4, 2026):

absolutely, does the session have to be open at the time of export or is the workflow open oc -> failed prompt -> close oc -> export ?

@neshreve commented on GitHub (Feb 4, 2026): absolutely, does the session have to be open at the time of export or is the workflow `open oc -> failed prompt -> close oc -> export` ?
Author
Owner

@R44VC0RP commented on GitHub (Feb 4, 2026):

nah, you can

  1. opencode
  2. fail a session
  3. opencode export >session.json
  4. profit
@R44VC0RP commented on GitHub (Feb 4, 2026): nah, you can 1. `opencode` 2. fail a session 3. `opencode export >session.json` 4. profit
Author
Owner

@neshreve commented on GitHub (Feb 4, 2026):

ready for profit

{
  "info": {
    "id": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
    "slug": "mighty-planet",
    "version": "1.1.50",
    "projectID": "64266c7adf47bf10de2a7a4974d6497447962c15",
    "directory": "/Users/nshreve/.dotfiles/opencode",
    "title": "New session - 2026-02-04T13:24:35.018Z",
    "time": {
      "created": 1770211475018,
      "updated": 1770212290712
    },
    "summary": {
      "additions": 0,
      "deletions": 0,
      "files": 0
    }
  },
  "messages": [
    {
      "info": {
        "id": "msg_c28d37e51001Gpipk7y2FmZ5Dd",
        "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
        "role": "user",
        "time": {
          "created": 1770211475037
        },
        "summary": {
          "diffs": []
        },
        "agent": "build",
        "model": {
          "providerID": "amazon-bedrock",
          "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
        }
      },
      "parts": [
        {
          "id": "prt_c28d37e52001nersXvPHuuuIEl",
          "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
          "messageID": "msg_c28d37e51001Gpipk7y2FmZ5Dd",
          "type": "text",
          "text": "test"
        }
      ]
    },
    {
      "info": {
        "id": "msg_c28d37e6d001glVV7Xe8TtHM05",
        "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
        "role": "assistant",
        "time": {
          "created": 1770211475053,
          "completed": 1770211477048
        },
        "error": {
          "name": "APIError",
          "data": {
            "message": "undefined: The provided model identifier is invalid.",
            "statusCode": 400,
            "isRetryable": false,
            "responseHeaders": {
              "connection": "keep-alive",
              "content-length": "55",
              "content-type": "application/json",
              "date": "Wed, 04 Feb 2026 13:24:37 GMT",
              "x-amzn-errortype": "ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/",
              "x-amzn-requestid": "42ef7a7e-9172-4f8f-8629-8732ffccb1cd"
            },
            "responseBody": "{\"message\":\"The provided model identifier is invalid.\"}",
            "metadata": {
              "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse-stream"
            }
          }
        },
        "parentID": "msg_c28d37e51001Gpipk7y2FmZ5Dd",
        "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
        "providerID": "amazon-bedrock",
        "mode": "build",
        "agent": "build",
        "path": {
          "cwd": "/Users/nshreve/.dotfiles/opencode",
          "root": "/Users/nshreve/.dotfiles"
        },
        "cost": 0,
        "tokens": {
          "input": 0,
          "output": 0,
          "reasoning": 0,
          "cache": {
            "read": 0,
            "write": 0
          }
        }
      },
      "parts": []
    },
    {
      "info": {
        "id": "msg_c28dff014001AXWA6OICj5xUXK",
        "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
        "role": "user",
        "time": {
          "created": 1770212290599
        },
        "summary": {
          "diffs": []
        },
        "agent": "build",
        "model": {
          "providerID": "amazon-bedrock",
          "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
        }
      },
      "parts": [
        {
          "id": "prt_c28dff014002U1Av1R32QeGQDw",
          "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
          "messageID": "msg_c28dff014001AXWA6OICj5xUXK",
          "type": "text",
          "text": "test"
        }
      ]
    },
    {
      "info": {
        "id": "msg_c28dff03d001MSfboHggUnGyu4",
        "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE",
        "role": "assistant",
        "time": {
          "created": 1770212290621,
          "completed": 1770212292627
        },
        "error": {
          "name": "APIError",
          "data": {
            "message": "undefined: The provided model identifier is invalid.",
            "statusCode": 400,
            "isRetryable": false,
            "responseHeaders": {
              "connection": "keep-alive",
              "content-length": "55",
              "content-type": "application/json",
              "date": "Wed, 04 Feb 2026 13:38:12 GMT",
              "x-amzn-errortype": "ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/",
              "x-amzn-requestid": "664fb90d-9188-4628-8d4b-e4d39ade3a8d"
            },
            "responseBody": "{\"message\":\"The provided model identifier is invalid.\"}",
            "metadata": {
              "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse-stream"
            }
          }
        },
        "parentID": "msg_c28dff014001AXWA6OICj5xUXK",
        "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
        "providerID": "amazon-bedrock",
        "mode": "build",
        "agent": "build",
        "path": {
          "cwd": "/Users/nshreve/.dotfiles/opencode",
          "root": "/Users/nshreve/.dotfiles"
        },
        "cost": 0,
        "tokens": {
          "input": 0,
          "output": 0,
          "reasoning": 0,
          "cache": {
            "read": 0,
            "write": 0
          }
        }
      },
      "parts": []
    }
  ]
}
@neshreve commented on GitHub (Feb 4, 2026): ready for profit ```json { "info": { "id": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "slug": "mighty-planet", "version": "1.1.50", "projectID": "64266c7adf47bf10de2a7a4974d6497447962c15", "directory": "/Users/nshreve/.dotfiles/opencode", "title": "New session - 2026-02-04T13:24:35.018Z", "time": { "created": 1770211475018, "updated": 1770212290712 }, "summary": { "additions": 0, "deletions": 0, "files": 0 } }, "messages": [ { "info": { "id": "msg_c28d37e51001Gpipk7y2FmZ5Dd", "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "role": "user", "time": { "created": 1770211475037 }, "summary": { "diffs": [] }, "agent": "build", "model": { "providerID": "amazon-bedrock", "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0" } }, "parts": [ { "id": "prt_c28d37e52001nersXvPHuuuIEl", "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "messageID": "msg_c28d37e51001Gpipk7y2FmZ5Dd", "type": "text", "text": "test" } ] }, { "info": { "id": "msg_c28d37e6d001glVV7Xe8TtHM05", "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "role": "assistant", "time": { "created": 1770211475053, "completed": 1770211477048 }, "error": { "name": "APIError", "data": { "message": "undefined: The provided model identifier is invalid.", "statusCode": 400, "isRetryable": false, "responseHeaders": { "connection": "keep-alive", "content-length": "55", "content-type": "application/json", "date": "Wed, 04 Feb 2026 13:24:37 GMT", "x-amzn-errortype": "ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/", "x-amzn-requestid": "42ef7a7e-9172-4f8f-8629-8732ffccb1cd" }, "responseBody": "{\"message\":\"The provided model identifier is invalid.\"}", "metadata": { "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse-stream" } } }, "parentID": "msg_c28d37e51001Gpipk7y2FmZ5Dd", "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0", "providerID": "amazon-bedrock", "mode": "build", "agent": "build", "path": { "cwd": "/Users/nshreve/.dotfiles/opencode", "root": "/Users/nshreve/.dotfiles" }, "cost": 0, "tokens": { "input": 0, "output": 0, "reasoning": 0, "cache": { "read": 0, "write": 0 } } }, "parts": [] }, { "info": { "id": "msg_c28dff014001AXWA6OICj5xUXK", "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "role": "user", "time": { "created": 1770212290599 }, "summary": { "diffs": [] }, "agent": "build", "model": { "providerID": "amazon-bedrock", "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0" } }, "parts": [ { "id": "prt_c28dff014002U1Av1R32QeGQDw", "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "messageID": "msg_c28dff014001AXWA6OICj5xUXK", "type": "text", "text": "test" } ] }, { "info": { "id": "msg_c28dff03d001MSfboHggUnGyu4", "sessionID": "ses_3d72c81b5ffeNjisPvsJ7jNjcE", "role": "assistant", "time": { "created": 1770212290621, "completed": 1770212292627 }, "error": { "name": "APIError", "data": { "message": "undefined: The provided model identifier is invalid.", "statusCode": 400, "isRetryable": false, "responseHeaders": { "connection": "keep-alive", "content-length": "55", "content-type": "application/json", "date": "Wed, 04 Feb 2026 13:38:12 GMT", "x-amzn-errortype": "ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/", "x-amzn-requestid": "664fb90d-9188-4628-8d4b-e4d39ade3a8d" }, "responseBody": "{\"message\":\"The provided model identifier is invalid.\"}", "metadata": { "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse-stream" } } }, "parentID": "msg_c28dff014001AXWA6OICj5xUXK", "modelID": "us.anthropic.claude-sonnet-4-5-20250929-v1:0", "providerID": "amazon-bedrock", "mode": "build", "agent": "build", "path": { "cwd": "/Users/nshreve/.dotfiles/opencode", "root": "/Users/nshreve/.dotfiles" }, "cost": 0, "tokens": { "input": 0, "output": 0, "reasoning": 0, "cache": { "read": 0, "write": 0 } } }, "parts": [] } ] } ```
Author
Owner

@neshreve commented on GitHub (Feb 4, 2026):

@R44VC0RP this is probably related, in the metadata of the error, the model designation in the url has us.us. at the beginning

            "metadata": {
              "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse-stream"
            }
@neshreve commented on GitHub (Feb 4, 2026): @R44VC0RP this is probably related, in the metadata of the error, the model designation in the url has `us.us.` at the beginning ```json "metadata": { "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse-stream" } ```
Author
Owner

@R44VC0RP commented on GitHub (Feb 4, 2026):

Yeah saw that, investigating now

@R44VC0RP commented on GitHub (Feb 4, 2026): Yeah saw that, investigating now
Author
Owner

@R44VC0RP commented on GitHub (Feb 4, 2026):

Thanks for the detailed debug info @neshreve! You correctly identified the issue - the us.us. in the URL shows the region prefix was being added twice.

Good news: This was already fixed in v1.1.51 (commit b942e0b4d - "fix: prevent double-prefixing of Bedrock cross-region inference models").

The fix adds us., eu., jp., apac., and au. to the list of cross-region prefixes that are checked before adding a region prefix. If the model ID already starts with one of these prefixes, it skips adding another one.

Resolution: Update to v1.1.51 or later and the issue should be resolved. You can update with:

npm install -g opencode-ai@latest
# or
bun install -g opencode-ai@latest

Let us know if you still experience issues after updating!

@R44VC0RP commented on GitHub (Feb 4, 2026): Thanks for the detailed debug info @neshreve! You correctly identified the issue - the `us.us.` in the URL shows the region prefix was being added twice. **Good news:** This was already fixed in v1.1.51 (commit b942e0b4d - "fix: prevent double-prefixing of Bedrock cross-region inference models"). The fix adds `us.`, `eu.`, `jp.`, `apac.`, and `au.` to the list of cross-region prefixes that are checked before adding a region prefix. If the model ID already starts with one of these prefixes, it skips adding another one. **Resolution:** Update to v1.1.51 or later and the issue should be resolved. You can update with: ```bash npm install -g opencode-ai@latest # or bun install -g opencode-ai@latest ``` Let us know if you still experience issues after updating!
Author
Owner

@neshreve commented on GitHub (Feb 4, 2026):

thank you so much for your help @R44VC0RP!

for what it's worth, npm install failed with the below error, but brew install anomalyco/tap/opencode got me where I needed to be.

very much appreciate your swift responses <3

$ npm install -g opencode@latest
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/opencode@latest - Not found
npm error 404
npm error 404  The requested resource 'opencode@latest' could not be found or you do not have permission to access it.
...
@neshreve commented on GitHub (Feb 4, 2026): thank you so much for your help @R44VC0RP! for what it's worth, npm install failed with the below error, but `brew install anomalyco/tap/opencode` got me where I needed to be. very much appreciate your swift responses <3 ```sh $ npm install -g opencode@latest npm error code E404 npm error 404 Not Found - GET https://registry.npmjs.org/opencode@latest - Not found npm error 404 npm error 404 The requested resource 'opencode@latest' could not be found or you do not have permission to access it. ... ```
Author
Owner

@R44VC0RP commented on GitHub (Feb 4, 2026):

That was a typo on my end, our npm namespace is opencode-ai

@R44VC0RP commented on GitHub (Feb 4, 2026): That was a typo on my end, our npm namespace is `opencode-ai`
Author
Owner

@igor-elbert commented on GitHub (Feb 4, 2026):

@R44VC0RP, I'm getting the same error in v1.1.51 with any model. I'm in EU AWS region.

session.json

@igor-elbert commented on GitHub (Feb 4, 2026): @R44VC0RP, I'm getting the same error in v1.1.51 with any model. I'm in EU AWS region. [session.json](https://github.com/user-attachments/files/25086575/session.json)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7873