MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / removeLegacyOpenAICompatAPIKeys

Function removeLegacyOpenAICompatAPIKeys

internal/config/config.go:1945–1962  ·  view source on GitHub ↗
(root *yaml.Node)

Source from the content-addressed store, hash-verified

1943}
1944
1945func removeLegacyOpenAICompatAPIKeys(root *yaml.Node) {
1946 if root == nil || root.Kind != yaml.MappingNode {
1947 return
1948 }
1949 idx := findMapKeyIndex(root, "openai-compatibility")
1950 if idx < 0 || idx+1 >= len(root.Content) {
1951 return
1952 }
1953 seq := root.Content[idx+1]
1954 if seq == nil || seq.Kind != yaml.SequenceNode {
1955 return
1956 }
1957 for i := range seq.Content {
1958 if seq.Content[i] != nil && seq.Content[i].Kind == yaml.MappingNode {
1959 removeMapKey(seq.Content[i], "api-keys")
1960 }
1961 }
1962}
1963
1964func removeRemovedIntegrationKeys(root *yaml.Node) {
1965 if root == nil || root.Kind != yaml.MappingNode {

Callers 1

Calls 2

findMapKeyIndexFunction · 0.85
removeMapKeyFunction · 0.85

Tested by

no test coverage detected