Skip to content

Commit 70221f4

Browse files
authored
internal/profiles: fix opencode + anthropic api (#12)
Fix incorrect base path env. var for Opencode + Anthropic API
1 parent 8fe7fdc commit 70221f4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/profiles/opencode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (o *OpenCodeProfile) Env(apertureHost string, b Backend) (map[string]string
7676
switch b.Type {
7777
case BackendAnthropic:
7878
return map[string]string{
79-
"ANTHROPIC_BASE_URL": apertureHost + "/bedrock",
79+
"ANTHROPIC_BASE_URL": apertureHost + "/v1",
8080
"ANTHROPIC_AUTH_TOKEN": "-",
8181
}, nil
8282
case BackendBedrock:

internal/profiles/profiles_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ func TestLauncher_OpenCode_Env_Anthropic(t *testing.T) {
137137
if err != nil {
138138
t.Fatalf("Env returned error: %v", err)
139139
}
140-
if got := env["ANTHROPIC_BASE_URL"]; got != testHost+"/bedrock" {
141-
t.Errorf("ANTHROPIC_BASE_URL = %q, want %q", got, testHost+"/bedrock")
140+
if got := env["ANTHROPIC_BASE_URL"]; got != testHost+"/v1" {
141+
t.Errorf("ANTHROPIC_BASE_URL = %q, want %q", got, testHost+"/v1")
142142
}
143143
}
144144

0 commit comments

Comments
 (0)