@zuplo/runtime 6.59.13 → 6.59.17

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.
@@ -125,7 +125,9 @@ export declare function aiGatewayHandler(
125
125
  /* Excluded from this release type: AIGatewayMeterIncrements */
126
126
 
127
127
  /**
128
- * AI Gateway Metering policy for quota enforcement
128
+ * AI Gateway Metering policy for quota enforcement.
129
+ * This policy is meant to be used as singleton.
130
+ * You should only have one for your entire Gateway.
129
131
  *
130
132
  * @title AI Gateway Metering
131
133
  * @hidden
@@ -156,7 +158,20 @@ export declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGate
156
158
  context: ZuploContext
157
159
  ): Promise<Response | ZuploRequest<RequestGeneric_2>>;
158
160
  private fetchCurrentMeters;
159
- private incrementMeters;
161
+ /**
162
+ * Increment meters via API. Can be used by providers for streaming responses.
163
+ *
164
+ * @param configurationId - The AI Gateway configuration ID
165
+ * @param increments - The meter increments to send
166
+ * @param context - The ZuploContext for logging
167
+ * @returns Promise that resolves when meters are incremented
168
+ */
169
+ static incrementMeters(
170
+ configurationId: string,
171
+ increments: AIGatewayMeterIncrements,
172
+ context: ZuploContext
173
+ ): Promise<void>;
174
+ private static incrementMetersInternal;
160
175
  private checkQuotas;
161
176
  private checkQuotaLimit;
162
177
  private createQuotaExceededResponse;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.59.13",
4
+ "version": "6.59.17",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {