MCPcopy Create free account
hub / github.com/Noumena-Network/code / dedupeModelOptions

Function dedupeModelOptions

src/utils/model/modelOptions.ts:607–615  ·  view source on GitHub ↗
(options: ModelOption[])

Source from the content-addressed store, hash-verified

605}
606
607function dedupeModelOptions(options: ModelOption[]): ModelOption[] {
608 const seen = new Set<string>()
609 return options.filter(option => {
610 const key = option.value === null ? '__default__' : option.value
611 if (seen.has(key)) return false
612 seen.add(key)
613 return true
614 })
615}
616
617/**
618 * Filter model options by the availableModels allowlist.

Callers 2

getModelOptionsBaseFunction · 0.85

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected