MCPcopy Create free account
hub / github.com/cel-expr/cel-go / CostModelVersion

Function CostModelVersion

cel/options.go:913–918  ·  view source on GitHub ↗

CostModelVersion pins cost estimation and runtime cost tracking to a revision of the cost model's rules. The pin applies to the standard models and to any model supplied via CostModel, for both estimation and tracking, so an environment's estimates and charges come from one consistent set of rules.

(version uint32)

Source from the content-addressed store, hash-verified

911// higher (or omit this option to use the latest revision) for improved soundness; see
912// cost.ModelVersion for the per-revision details.
913func CostModelVersion(version uint32) EnvOption {
914 return func(e *Env) (*Env, error) {
915 e.costConfig.version = &version
916 return e, nil
917 }
918}
919
920// CostTrackerOptions configures a set of options for cost-tracking.
921//

Calls

no outgoing calls