{
  "version": 3,
  "sources": ["../../src/app/ai/agentModelConfig.ts"],
  "sourcesContent": ["import { assert } from \"@framerjs/shared/src/assert.ts\"\nimport { type LanguageModel, isLanguageModel } from \"app/ai/languageModels.ts\"\nimport { type AgentReasoningEffort, isAgentReasoningEffort, isValidEffortForModel } from \"app/ai/models.ts\"\n\nexport interface AgentModelConfig {\n\tmodel: LanguageModel\n\treasoningEffort?: AgentReasoningEffort\n}\n\nexport function parseAgentModelConfig(value: string, entryName = \"model config\"): AgentModelConfig {\n\tconst [modelValue, reasoningValue, extraValue] = value.split(\"=\")\n\tassert(modelValue !== undefined && extraValue === undefined, `Invalid ${entryName}: \"${value}\".`)\n\tconst model = modelValue.trim()\n\tassert(isLanguageModel(model), `Invalid model in ${entryName}: \"${value}\".`)\n\tif (reasoningValue === undefined) return { model }\n\tconst reasoningEffort = reasoningValue.trim()\n\tassert(isAgentReasoningEffort(reasoningEffort), `Invalid reasoning effort in ${entryName}: \"${value}\".`)\n\treturn { model, reasoningEffort }\n}\n\nexport function formatAgentModelConfig(config: AgentModelConfig): string {\n\tif (config.reasoningEffort === undefined) return config.model\n\treturn `${config.model}=${config.reasoningEffort}`\n}\n\nexport function assertValidAgentModelConfig(config: AgentModelConfig, entryName = \"model config\"): void {\n\tassert(\n\t\tconfig.reasoningEffort === undefined || isValidEffortForModel(config.reasoningEffort, config.model),\n\t\t`Unsupported ${entryName}: ${formatAgentModelConfig(config)}`,\n\t)\n}\n"],
  "mappings": ";;;;;;;;;;;;AASO,SAAS,sBAAsB,OAAe,YAAY,gBAAkC;AAClG,QAAM,CAAC,YAAY,gBAAgB,UAAU,IAAI,MAAM,MAAM,GAAG;AAChE,SAAO,eAAe,UAAa,eAAe,QAAW,WAAW,SAAS,MAAM,KAAK,IAAI;AAChG,QAAM,QAAQ,WAAW,KAAK;AAC9B,SAAO,gBAAgB,KAAK,GAAG,oBAAoB,SAAS,MAAM,KAAK,IAAI;AAC3E,MAAI,mBAAmB,OAAW,QAAO,EAAE,MAAM;AACjD,QAAM,kBAAkB,eAAe,KAAK;AAC5C,SAAO,uBAAuB,eAAe,GAAG,+BAA+B,SAAS,MAAM,KAAK,IAAI;AACvG,SAAO,EAAE,OAAO,gBAAgB;AACjC;AAEO,SAAS,uBAAuB,QAAkC;AACxE,MAAI,OAAO,oBAAoB,OAAW,QAAO,OAAO;AACxD,SAAO,GAAG,OAAO,KAAK,IAAI,OAAO,eAAe;AACjD;AAEO,SAAS,4BAA4B,QAA0B,YAAY,gBAAsB;AACvG;AAAA,IACC,OAAO,oBAAoB,UAAa,sBAAsB,OAAO,iBAAiB,OAAO,KAAK;AAAA,IAClG,eAAe,SAAS,KAAK,uBAAuB,MAAM,CAAC;AAAA,EAC5D;AACD;",
  "names": []
}
