Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / parseModelRef

Function: parseModelRef()

ts
function parseModelRef(ref): {
  adapterId: string;
  model: string;
};

Defined in: packages/core/src/model/router.ts:46

ModelRef is strictly 'adapterId:model', no query parameters. The wire model id may itself contain colons (for example ollama tags), so only the FIRST colon splits.

Parameters

ParameterType
ref`${string}:${string}`

Returns

ts
{
  adapterId: string;
  model: string;
}
NameTypeDefined in
adapterIdstringpackages/core/src/model/router.ts:46
modelstringpackages/core/src/model/router.ts:46