(root *yaml.Node)
| 1943 | } |
| 1944 | |
| 1945 | func 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 | |
| 1964 | func removeRemovedIntegrationKeys(root *yaml.Node) { |
| 1965 | if root == nil || root.Kind != yaml.MappingNode { |
no test coverage detected