@thinkai/tai-api-contract 2.186.0 → 2.187.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6955,13 +6955,52 @@ export interface components {
6955
6955
  generatedAt: string;
6956
6956
  contributors: components["schemas"]["AiUsageSpendAggregatedContributorRowDto"][];
6957
6957
  };
6958
+ /** @description Numeric evidence for `id=model_right_sizing` (Cost-to-Value insight #2). Premium share is `premiumSpendCents / totalModelSpendCents` against `thresholdPct` (Phase A default 40). */
6959
+ AiUsageSpendKeyInsightModelRightSizingEvidenceDto: {
6960
+ /** @description Premium-model share of model spend in the window (0–100). */
6961
+ premiumSharePct: number;
6962
+ /** @description Sum of spend_cents on premium-classified models (cents). */
6963
+ premiumSpendCents: number;
6964
+ /** @description Sum of spend_cents across all models in the window (cents). */
6965
+ totalModelSpendCents: number;
6966
+ /** @description Effective premium-share threshold used for this card (0–100). */
6967
+ thresholdPct: number;
6968
+ /** @description Distinct mapped person_id rows contributing to this card's sample (workspace rollup or the single person for a person-scoped card). */
6969
+ personCount: number;
6970
+ };
6971
+ /** @description Optional member drill-down for person-scoped `model_right_sizing` cards. Links to `GET …/integrations/ai-tool/{provider}/members/{externalId}`. */
6972
+ AiUsageSpendKeyInsightDrilldownDto: {
6973
+ /**
6974
+ * @description AI tool provider for the member detail route.
6975
+ * @enum {string}
6976
+ */
6977
+ provider: "cursor" | "claude";
6978
+ /** @description Provider member external id for the member detail route. */
6979
+ externalId: string;
6980
+ };
6981
+ /** @description One Key Insights panel card. Base fields (`id`, `tone`, `text`) apply to all insights. When `id` is `model_right_sizing`, clients MUST treat `dataQuality`, `limitation`, `recommendedAction`, and `evidence` as required; `scope` and `drilldown` are optional (person cards may set both). */
6958
6982
  AiUsageSpendKeyInsightItemDto: {
6959
- /** @description Stable insight key (e.g. spend-leader, spend-vs-output). */
6983
+ /** @description Stable insight key (e.g. spend-leader, spend-vs-output, model_right_sizing). */
6960
6984
  id: string;
6961
6985
  /** @enum {string} */
6962
6986
  tone: "positive" | "warning" | "neutral";
6963
6987
  /** @description Human-readable insight sentence for the UI panel. */
6964
6988
  text: string;
6989
+ /** @description Required when `id=model_right_sizing`. Phase A/B always `estimated` (model-mix heuristic; no task-complexity telemetry until Phase 3). */
6990
+ dataQuality?: components["schemas"]["AiAssistedCodeDataQuality"];
6991
+ /** @description Required when `id=model_right_sizing`. Fixed honesty string that the model mix is heuristic and does not encode task complexity. */
6992
+ limitation?: string;
6993
+ /** @description Required when `id=model_right_sizing`. Coaching copy for the card CTA (advisory only; not vendor enforcement). */
6994
+ recommendedAction?: string;
6995
+ /** @description Required when `id=model_right_sizing`. */
6996
+ evidence?: components["schemas"]["AiUsageSpendKeyInsightModelRightSizingEvidenceDto"];
6997
+ /**
6998
+ * @description Optional scope for `model_right_sizing` cards. Workspace default vs per-person personalized item.
6999
+ * @enum {string}
7000
+ */
7001
+ scope?: "workspace" | "person";
7002
+ /** @description Optional when `scope=person` for `model_right_sizing`; omitted on workspace cards. */
7003
+ drilldown?: components["schemas"]["AiUsageSpendKeyInsightDrilldownDto"];
6965
7004
  };
6966
7005
  AiUsageSpendKeyInsightsDto: {
6967
7006
  /** Format: uuid */
@@ -12900,6 +12939,8 @@ export type AiUsageSpendAggregatedTeamsDto = components['schemas']['AiUsageSpend
12900
12939
  export type AiUsageSpendAggregatedContributorRowDto = components['schemas']['AiUsageSpendAggregatedContributorRowDto'];
12901
12940
  export type AiUsageSpendAggregatedContributorsDto = components['schemas']['AiUsageSpendAggregatedContributorsDto'];
12902
12941
  export type AiUsageSpendContributorToolHeatmapDto = components['schemas']['AiUsageSpendContributorToolHeatmapDto'];
12942
+ export type AiUsageSpendKeyInsightModelRightSizingEvidenceDto = components['schemas']['AiUsageSpendKeyInsightModelRightSizingEvidenceDto'];
12943
+ export type AiUsageSpendKeyInsightDrilldownDto = components['schemas']['AiUsageSpendKeyInsightDrilldownDto'];
12903
12944
  export type AiUsageSpendKeyInsightItemDto = components['schemas']['AiUsageSpendKeyInsightItemDto'];
12904
12945
  export type AiUsageSpendKeyInsightsDto = components['schemas']['AiUsageSpendKeyInsightsDto'];
12905
12946
  export type AiAssistedCodeDataQuality = components['schemas']['AiAssistedCodeDataQuality'];