aps_compute_compute_axis_weights
Normalizes inference billing records into a C-axis weight vector by combining prompt and completion tokens, scaled with a default multiplier of 3.0, for use in attribution primitives.
Instructions
Compute the C-axis fractional weight vector from a list of inference billing records (prompt_tokens, completion_tokens). Returns canonical ComputeAxisEntry[] with 6-digit decimal compute_share strings that sum to ~1.0 and feed directly into aps_construct_attribution_primitive. Weights = prompt_tokens + completion_tokens × COMPLETION_MULTIPLIER (default 3.0), normalized per spec BUILD-B §'The C-axis formula'. Parameter names match the SDK: providers, optional profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Optional WeightProfile override; defaults to DEFAULT_WEIGHT_PROFILE | |
| providers | Yes | Per-provider billing records |