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

Function cloneModelInfos

internal/registry/model_definitions.go:257–266  ·  view source on GitHub ↗

cloneModelInfos returns a shallow copy of the slice with each element deep-cloned.

(models []*ModelInfo)

Source from the content-addressed store, hash-verified

255
256// cloneModelInfos returns a shallow copy of the slice with each element deep-cloned.
257func cloneModelInfos(models []*ModelInfo) []*ModelInfo {
258 if len(models) == 0 {
259 return nil
260 }
261 out := make([]*ModelInfo, len(models))
262 for i, m := range models {
263 out[i] = cloneModelInfo(m)
264 }
265 return out
266}
267
268// GetStaticModelDefinitionsByChannel returns static model definitions for a given channel/provider.
269// It returns nil when the channel is unknown.

Callers 11

GetClaudeModelsFunction · 0.85
GetGeminiModelsFunction · 0.85
GetGeminiVertexModelsFunction · 0.85
GetAIStudioModelsFunction · 0.85
GetCodexFreeModelsFunction · 0.85
GetCodexTeamModelsFunction · 0.85
GetCodexPlusModelsFunction · 0.85
GetCodexProModelsFunction · 0.85
GetKimiModelsFunction · 0.85
GetAntigravityModelsFunction · 0.85
GetXAIModelsFunction · 0.85

Calls 1

cloneModelInfoFunction · 0.85

Tested by

no test coverage detected