MCPcopy Index your code
hub / github.com/anomalyco/opencode / formatModelLabel

Function formatModelLabel

packages/opencode/src/cli/cmd/run/variant.shared.ts:51–59  ·  view source on GitHub ↗
(
  model: NonNullable<RunInput["model"]>,
  variant: string | undefined,
  providers?: RunProvider[],
)

Source from the content-addressed store, hash-verified

49}
50
51export function formatModelLabel(
52 model: NonNullable<RunInput["model"]>,
53 variant: string | undefined,
54 providers?: RunProvider[],
55): string {
56 const names = modelInfo(providers, model)
57 const label = variant ? ` · ${variant}` : ""
58 return `${names.model} · ${names.provider}${label}`
59}
60
61export function cycleVariant(current: string | undefined, variants: string[]): string | undefined {
62 if (variants.length === 0) {

Callers 3

footerLabelsFunction · 0.90
runInteractiveRuntimeFunction · 0.90

Calls 1

modelInfoFunction · 0.70

Tested by

no test coverage detected