(input: { agent: Agent | undefined; model: Model | undefined })
| 19 | } |
| 20 | |
| 21 | export function getConfiguredAgentVariant(input: { agent: Agent | undefined; model: Model | undefined }) { |
| 22 | if (!input.agent?.variant) return undefined |
| 23 | if (!input.agent.model) return undefined |
| 24 | if (!input.model?.variants) return undefined |
| 25 | if (input.agent.model.providerID !== input.model.providerID) return undefined |
| 26 | if (input.agent.model.modelID !== input.model.modelID) return undefined |
| 27 | if (!(input.agent.variant in input.model.variants)) return undefined |
| 28 | return input.agent.variant |
| 29 | } |
| 30 | |
| 31 | export function resolveModelVariant(input: VariantInput) { |
| 32 | if (input.selected === null) return undefined |
no outgoing calls
no test coverage detected