@zuplo/runtime 6.60.28 → 6.60.30

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.
@@ -2,6 +2,26 @@ import { KeyLike } from "jose";
2
2
  import { RequestGeneric as RequestGeneric_2 } from "../../request.js";
3
3
  import type { ValidateFunction } from "ajv";
4
4
 
5
+ /**
6
+ * Converts Anthropic Messages API format requests to OpenAI Chat Completions format.
7
+ * This policy translates between the two formats to allow seamless routing to different providers.
8
+ *
9
+ * @hidden
10
+ * @title Anthropic to OpenAI Format Translator
11
+ * @param request - The incoming ZuploRequest
12
+ * @param context - The ZuploContext
13
+ * @param options - The policy configuration options
14
+ * @param policyName - The name of the policy instance
15
+ * @returns A modified ZuploRequest with translated body format
16
+ */
17
+ export declare const AIGatewayAnthropicToOpenAIInboundPolicy: InboundPolicyHandler<AIGatewayAnthropicToOpenAIInboundPolicyOptions>;
18
+
19
+ /**
20
+ * Options for the AI Gateway Anthropic to OpenAI format translator policy.
21
+ * @public
22
+ */
23
+ export declare interface AIGatewayAnthropicToOpenAIInboundPolicyOptions {}
24
+
5
25
  /**
6
26
  * Authenticates an AI Gateway Application requests based on Application API Keys
7
27
  * using Zuplo's Gateway service.
@@ -189,6 +209,27 @@ export declare interface AIGatewayMeteringInboundPolicyOptions {
189
209
  throwOnFailure?: boolean;
190
210
  }
191
211
 
212
+ /**
213
+ * Converts OpenAI Chat Completions format responses back to Anthropic Messages format.
214
+ * This policy translates the response when the original request was in Anthropic format.
215
+ *
216
+ * @hidden
217
+ * @title OpenAI to Anthropic Format Translator
218
+ * @param response - The response from the upstream service
219
+ * @param request - The incoming ZuploRequest
220
+ * @param context - The ZuploContext
221
+ * @param options - The policy configuration options
222
+ * @param policyName - The name of the policy instance
223
+ * @returns A modified Response with translated body format
224
+ */
225
+ export declare const AIGatewayOpenAIToAnthropicOutboundPolicy: OutboundPolicyHandler<AIGatewayOpenAIToAnthropicOutboundPolicyOptions>;
226
+
227
+ /**
228
+ * Options for the AI Gateway OpenAI to Anthropic format translator policy.
229
+ * @public
230
+ */
231
+ export declare interface AIGatewayOpenAIToAnthropicOutboundPolicyOptions {}
232
+
192
233
  /**
193
234
  * AI Gateway Semantic Cache policy for caching chat completion responses
194
235
  * based on semantic similarity of user messages.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.60.28",
4
+ "version": "6.60.30",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {