eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 691 B
JavaScript
function formatLanguageModelGatewayId(e){return typeof e==`string`?e:`${e.provider.split(`.`)[0]}/${e.modelId.replace(/^(claude-[a-z]+-\d+)-(\d+)$/,`$1.$2`)}`}function isRuntimeLanguageModel(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.specificationVersion===`v2`||t.specificationVersion===`v3`||t.specificationVersion===`v4`)&&typeof t.provider==`string`&&typeof t.modelId==`string`&&typeof t.doGenerate==`function`&&typeof t.doStream==`function`}function isAgentReasoningDefinition(e){return typeof e==`string`&&[`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`].includes(e)}export{formatLanguageModelGatewayId,isAgentReasoningDefinition,isRuntimeLanguageModel};