Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions api/spec/packages/aip/src/features/feature.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ using TypeSpec.JsonSchema;

namespace Features;

@friendlyName("FeatureMeterReference")
model FeatureMeterReference {
/**
* The ID of the meter to associate with this feature.
*/
@visibility(Lifecycle.Read, Lifecycle.Create)
@summary("Meter ID")
id: Shared.ULID;

/**
* Filters to apply to the dimensions of the meter.
*/
@maxProperties(10)
@summary("Meter dimensions filters")
filters?: Record<Shared.QueryFilterStringMapItem>;
}

/**
* A capability or billable dimension offered by a provider.
*/
Expand All @@ -20,28 +37,15 @@ model Feature {
*/
@summary("Meter reference")
@visibility(Lifecycle.Read, Lifecycle.Create)
meter?: {
/**
* The ID of the meter to associate with this feature.
*/
@visibility(Lifecycle.Read, Lifecycle.Create)
id: Shared.ULID;

/**
* Filters to apply to the dimensions of the meter.
*/
@maxProperties(10)
@summary("Meter dimensions filters")
filters?: Record<Shared.QueryFilterStringMapItem>;
};
meter?: FeatureMeterReference;

/**
* Optional per-unit cost configuration.
* Use "manual" for a fixed per-unit cost, or "llm" to look up cost
* from the LLM cost database based on meter group-by properties.
*/
@summary("Unit cost")
@visibility(Lifecycle.Read, Lifecycle.Create)
@visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)
unit_cost?: FeatureUnitCost;
}

Expand Down
Loading
Loading