Class Model.Builder
- All Implemented Interfaces:
Model._FinalStage,Model.CreatedAtStage,Model.IdStage,Model.IsLangfuseManagedStage,Model.MatchPatternStage,Model.ModelNameStage,Model.TokenizerConfigStage
- Enclosing class:
Model
-
Method Summary
Modifier and TypeMethodDescriptionaddAllPricingTiers(List<PricingTier> pricingTiers) Array of pricing tiers with conditional pricing based on usage thresholds.additionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) addPricingTiers(PricingTier pricingTiers) Array of pricing tiers with conditional pricing based on usage thresholds.build()createdAt(OffsetDateTime createdAt) Timestamp when the model was createdinputPrice(Nullable<Double> inputPrice) Deprecated.inputPrice(Double inputPrice) Deprecated.inputPrice(Optional<Double> inputPrice) Deprecated.isLangfuseManaged(boolean isLangfuseManaged) matchPattern(String matchPattern) Regex pattern which matches this model definition to generation.model.Name of the model definition.outputPrice(Nullable<Double> outputPrice) Deprecated.outputPrice(Double outputPrice) Deprecated.outputPrice(Optional<Double> outputPrice) Deprecated.prices(String key, ModelPrice value) Deprecated.prices(Map<String, ModelPrice> prices) Deprecated.pricingTiers(List<PricingTier> pricingTiers) Array of pricing tiers with conditional pricing based on usage thresholds.putAllPrices(Map<String, ModelPrice> prices) Deprecated.startDate(Nullable<OffsetDateTime> startDate) Apply only to generations which are newer than this ISO date.startDate(OffsetDateTime startDate) Apply only to generations which are newer than this ISO date.startDate(Optional<OffsetDateTime> startDate) Apply only to generations which are newer than this ISO date.tokenizerConfig(Object tokenizerConfig) Optional.tokenizerId(Nullable<String> tokenizerId) Optional.tokenizerId(String tokenizerId) Optional.tokenizerId(Optional<String> tokenizerId) Optional.totalPrice(Nullable<Double> totalPrice) Deprecated.totalPrice(Double totalPrice) Deprecated.totalPrice(Optional<Double> totalPrice) Deprecated.unit(Nullable<ModelUsageUnit> unit) Unit used by this model.unit(ModelUsageUnit unit) Unit used by this model.unit(Optional<ModelUsageUnit> unit) Unit used by this model.
-
Method Details
-
from
- Specified by:
fromin interfaceModel.IdStage
-
id
- Specified by:
idin interfaceModel.IdStage
-
modelName
Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime
Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime
- Specified by:
modelNamein interfaceModel.ModelNameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
matchPattern
Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use
(?i)^modelname$Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use
(?i)^modelname$- Specified by:
matchPatternin interfaceModel.MatchPatternStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerConfig
Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
- Specified by:
tokenizerConfigin interfaceModel.TokenizerConfigStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
isLangfuseManaged
- Specified by:
isLangfuseManagedin interfaceModel.IsLangfuseManagedStage
-
createdAt
Timestamp when the model was created
Timestamp when the model was created
- Specified by:
createdAtin interfaceModel.CreatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addAllPricingTiers
Array of pricing tiers with conditional pricing based on usage thresholds.
Pricing tiers enable accurate cost tracking for models that charge different rates based on usage patterns (e.g., different rates for high-volume usage, large context windows, or cached tokens).
Each model must have exactly one default tier (isDefault=true, priority=0) that serves as a fallback. Additional conditional tiers can be defined with specific matching criteria.
If this array is empty, the model uses legacy flat pricing from the inputPrice/outputPrice/totalPrice fields.
- Specified by:
addAllPricingTiersin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addPricingTiers
Array of pricing tiers with conditional pricing based on usage thresholds.
Pricing tiers enable accurate cost tracking for models that charge different rates based on usage patterns (e.g., different rates for high-volume usage, large context windows, or cached tokens).
Each model must have exactly one default tier (isDefault=true, priority=0) that serves as a fallback. Additional conditional tiers can be defined with specific matching criteria.
If this array is empty, the model uses legacy flat pricing from the inputPrice/outputPrice/totalPrice fields.
- Specified by:
addPricingTiersin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
pricingTiers
Array of pricing tiers with conditional pricing based on usage thresholds.
Pricing tiers enable accurate cost tracking for models that charge different rates based on usage patterns (e.g., different rates for high-volume usage, large context windows, or cached tokens).
Each model must have exactly one default tier (isDefault=true, priority=0) that serves as a fallback. Additional conditional tiers can be defined with specific matching criteria.
If this array is empty, the model uses legacy flat pricing from the inputPrice/outputPrice/totalPrice fields.
- Specified by:
pricingTiersin interfaceModel._FinalStage
-
prices
Deprecated. Use 'pricingTiers' instead for models with usage-based pricing variations.
This field shows prices by usage type from the default pricing tier. Maintained for backward compatibility. If the model uses tiered pricing, this field will be populated from the default tier's prices.
- Specified by:
pricesin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
putAllPrices
Deprecated. Use 'pricingTiers' instead for models with usage-based pricing variations.
This field shows prices by usage type from the default pricing tier. Maintained for backward compatibility. If the model uses tiered pricing, this field will be populated from the default tier's prices.
- Specified by:
putAllPricesin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
prices
Deprecated. Use 'pricingTiers' instead for models with usage-based pricing variations.
This field shows prices by usage type from the default pricing tier. Maintained for backward compatibility. If the model uses tiered pricing, this field will be populated from the default tier's prices.
- Specified by:
pricesin interfaceModel._FinalStage
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
- Specified by:
tokenizerIdin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
- Specified by:
tokenizerIdin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
- Specified by:
tokenizerIdin interfaceModel._FinalStage
-
totalPrice
Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
- Specified by:
totalPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
totalPrice
Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
- Specified by:
totalPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
totalPrice
Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
- Specified by:
totalPricein interfaceModel._FinalStage
-
outputPrice
Deprecated. See 'prices' instead. Price (USD) per output unit
- Specified by:
outputPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
outputPrice
Deprecated. See 'prices' instead. Price (USD) per output unit
- Specified by:
outputPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
outputPrice
Deprecated. See 'prices' instead. Price (USD) per output unit
- Specified by:
outputPricein interfaceModel._FinalStage
-
inputPrice
Deprecated. See 'prices' instead. Price (USD) per input unit
- Specified by:
inputPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
inputPrice
Deprecated. See 'prices' instead. Price (USD) per input unit
- Specified by:
inputPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
inputPrice
Deprecated. See 'prices' instead. Price (USD) per input unit
- Specified by:
inputPricein interfaceModel._FinalStage
-
unit
Unit used by this model.
- Specified by:
unitin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
unit
Unit used by this model.
- Specified by:
unitin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
unit
Unit used by this model.
- Specified by:
unitin interfaceModel._FinalStage
-
startDate
Apply only to generations which are newer than this ISO date.
- Specified by:
startDatein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
startDate
Apply only to generations which are newer than this ISO date.
- Specified by:
startDatein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
startDate
Apply only to generations which are newer than this ISO date.
- Specified by:
startDatein interfaceModel._FinalStage
-
build
- Specified by:
buildin interfaceModel._FinalStage
-
additionalProperty
- Specified by:
additionalPropertyin interfaceModel._FinalStage
-
additionalProperties
- Specified by:
additionalPropertiesin interfaceModel._FinalStage
-