Skip to content

Commit b83e6f2

Browse files
committed
fix: remove duplicated logic
1 parent 84b0462 commit b83e6f2

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

internal/watcher/watcher.go

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -864,34 +864,7 @@ func (w *Watcher) SnapshotCoreAuths() []*coreauth.Auth {
864864
}
865865
out = append(out, a)
866866
}
867-
// Vertex-compatible API keys -> synthesize auths
868-
for i := range cfg.VertexCompatAPIKey {
869-
entry := cfg.VertexCompatAPIKey[i]
870-
key := strings.TrimSpace(entry.APIKey)
871-
base := strings.TrimSpace(entry.BaseURL)
872-
if key == "" || base == "" {
873-
continue
874-
}
875-
proxyURL := strings.TrimSpace(entry.ProxyURL)
876-
id, token := idGen.next("vertex-compat:apikey", key, base)
877-
attrs := map[string]string{
878-
"source": fmt.Sprintf("config:vertex-compat[%s]", token),
879-
"api_key": key,
880-
"base_url": base,
881-
}
882-
addConfigHeadersToAttrs(entry.Headers, attrs)
883-
a := &coreauth.Auth{
884-
ID: id,
885-
Provider: "vertex-compat",
886-
Label: fmt.Sprintf("vertex-compat-%s", token),
887-
Status: coreauth.StatusActive,
888-
ProxyURL: proxyURL,
889-
Attributes: attrs,
890-
CreatedAt: now,
891-
UpdatedAt: now,
892-
}
893-
out = append(out, a)
894-
}
867+
895868
// Claude API keys -> synthesize auths
896869
for i := range cfg.ClaudeKey {
897870
ck := cfg.ClaudeKey[i]

0 commit comments

Comments
 (0)