MCPcopy Index your code
hub / github.com/simstudioai/sim / getProviderForTokenization

Function getProviderForTokenization

apps/sim/lib/tokenization/utils.ts:37–47  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

35 * Extracts provider ID from model name
36 */
37export function getProviderForTokenization(model: string): string {
38 try {
39 return getProviderFromModel(model)
40 } catch (error) {
41 logger.warn(`Failed to get provider for model ${model}, using default`, {
42 model,
43 error: toError(error).message,
44 })
45 return TOKENIZATION_CONFIG.defaults.provider
46 }
47}
48
49/**
50 * Checks if a block type should be tokenized

Callers 2

calculateStreamingCostFunction · 0.90

Calls 3

getProviderFromModelFunction · 0.90
toErrorFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected