Refresh default model IDs for current providers

Update auto-generated opencode.json defaults to model IDs that are
valid as of April 2026:

- anthropic: claude-sonnet-4-5 -> claude-sonnet-4-6
- openai:    gpt-4o (retired Apr 3 2026) -> gpt-5.4
- bedrock:   anthropic.claude-sonnet-4-5-v1 (invalid) ->
             global.anthropic.claude-sonnet-4-5-20250929-v1:0

The Bedrock ID now uses the global inference profile (no regional
10% premium) and includes the required date stamp and :0 suffix.
This commit is contained in:
2026-04-20 21:25:37 +02:00
parent b4d2f09e77
commit fffaeffb7a
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
OPENCODE_PROVIDER=anthropic
# Model override (optional, defaults per provider)
# OPENCODE_MODEL=anthropic/claude-sonnet-4-5
# OPENCODE_MODEL=anthropic/claude-sonnet-4-6
# ── API Keys (set the one matching your provider) ────────────────────
# ANTHROPIC_API_KEY=
+4 -4
View File
@@ -22,7 +22,7 @@ if [ ! -f "$CONFIG_FILE" ] && [ -n "${OPENCODE_PROVIDER:-}" ]; then
cat > "$CONFIG_FILE" <<EOF
{
"\$schema": "https://opencode.ai/config.json",
"model": "${OPENCODE_MODEL:-anthropic/claude-sonnet-4-5}",
"model": "${OPENCODE_MODEL:-anthropic/claude-sonnet-4-6}",
"share": "disabled",
"autoupdate": false
}
@@ -32,7 +32,7 @@ EOF
cat > "$CONFIG_FILE" <<EOF
{
"\$schema": "https://opencode.ai/config.json",
"model": "${OPENCODE_MODEL:-openai/gpt-4o}",
"model": "${OPENCODE_MODEL:-openai/gpt-5.4}",
"share": "disabled",
"autoupdate": false
}
@@ -42,7 +42,7 @@ EOF
cat > "$CONFIG_FILE" <<EOF
{
"\$schema": "https://opencode.ai/config.json",
"model": "${OPENCODE_MODEL:-amazon-bedrock/anthropic.claude-sonnet-4-5-v1}",
"model": "${OPENCODE_MODEL:-amazon-bedrock/global.anthropic.claude-sonnet-4-5-20250929-v1:0}",
"share": "disabled",
"autoupdate": false,
"provider": {
@@ -60,7 +60,7 @@ EOF
cat > "$CONFIG_FILE" <<EOF
{
"\$schema": "https://opencode.ai/config.json",
"model": "${OPENCODE_MODEL:-anthropic/claude-sonnet-4-5}",
"model": "${OPENCODE_MODEL:-anthropic/claude-sonnet-4-6}",
"share": "disabled",
"autoupdate": false
}