@rodrigobeber/patoai-dtos 4.6.55 → 4.6.56

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.
@@ -1,5 +1,6 @@
1
1
  export declare enum ProviderEnum {
2
2
  ELEVEN_LABS = "elevenlabs",
3
3
  GOOGLE_CLOUD = "googlecloud",
4
- OPENAI = "openai"
4
+ OPENAI = "openai",
5
+ OPENROUTER = "openrouter"
5
6
  }
@@ -6,4 +6,5 @@ var ProviderEnum;
6
6
  ProviderEnum["ELEVEN_LABS"] = "elevenlabs";
7
7
  ProviderEnum["GOOGLE_CLOUD"] = "googlecloud";
8
8
  ProviderEnum["OPENAI"] = "openai";
9
+ ProviderEnum["OPENROUTER"] = "openrouter";
9
10
  })(ProviderEnum || (exports.ProviderEnum = ProviderEnum = {}));
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Provider-agnostic AI types.
3
+ * These replace direct OpenAI SDK imports across the monorepo.
4
+ * Only patoai-openai should import from the `openai` package.
5
+ */
6
+ export interface AIFunctionTool {
7
+ type: 'function';
8
+ name: string;
9
+ description?: string | null;
10
+ parameters: Record<string, unknown> | null;
11
+ strict: boolean | null;
12
+ }
13
+ export type AITool = AIFunctionTool;
14
+ export interface AIFunctionCallOutput {
15
+ type: 'function_call_output';
16
+ call_id: string;
17
+ output: string;
18
+ }
19
+ export interface AIFunctionCallItem {
20
+ type: 'function_call';
21
+ call_id: string;
22
+ name: string;
23
+ arguments: string;
24
+ id?: string;
25
+ status?: 'in_progress' | 'completed' | 'incomplete';
26
+ }
27
+ export interface AIMessageItem {
28
+ type: 'message';
29
+ [key: string]: unknown;
30
+ }
31
+ export type AIOutputItem = AIFunctionCallItem | AIMessageItem | {
32
+ type: string;
33
+ [key: string]: unknown;
34
+ };
35
+ export interface AITextConfig {
36
+ format?: Record<string, unknown>;
37
+ [key: string]: unknown;
38
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Provider-agnostic AI types.
4
+ * These replace direct OpenAI SDK imports across the monorepo.
5
+ * Only patoai-openai should import from the `openai` package.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { ResponseTextConfig } from "openai/resources/responses/responses";
1
+ import { AITextConfig } from "./ai-types";
2
2
  import { InputMessageDto } from "./input-message.dto";
3
3
  import { ProviderDto } from "../core";
4
4
  export interface CompletionRequestDto {
@@ -9,6 +9,6 @@ export interface CompletionRequestDto {
9
9
  maxOutputTokens?: number;
10
10
  temperature: number;
11
11
  effort: string;
12
- outputConfig?: ResponseTextConfig;
12
+ outputConfig?: AITextConfig;
13
13
  userId: string;
14
14
  }
@@ -1,3 +1,4 @@
1
+ export * from './ai-types';
1
2
  export * from './completion-request.dto';
2
3
  export * from './completion.dto';
3
4
  export * from './input-message.dto';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ai-types"), exports);
17
18
  __exportStar(require("./completion-request.dto"), exports);
18
19
  __exportStar(require("./completion.dto"), exports);
19
20
  __exportStar(require("./input-message.dto"), exports);
@@ -1,20 +1,28 @@
1
- import { ResponseInputItem, ResponseTextConfig, Tool } from "openai/resources/responses/responses";
1
+ import { AIFunctionCallOutput, AITextConfig, AITool } from "./ai-types";
2
2
  import { InputMessageDto } from "./input-message.dto";
3
3
  import { ProviderDto } from "../core/provider.dto";
4
+ export interface ResponseCreateFallbackDto {
5
+ provider: ProviderDto;
6
+ model: string;
7
+ temperature: number;
8
+ maxOutputTokens: number;
9
+ effort?: string;
10
+ }
4
11
  export interface ResponseCreateDto {
5
12
  provider: ProviderDto;
6
13
  model: string;
7
14
  background: boolean;
8
15
  instructions: string;
9
16
  messages: InputMessageDto[];
10
- toolOutputs: ResponseInputItem.FunctionCallOutput[];
17
+ toolOutputs: AIFunctionCallOutput[];
11
18
  temperature: number;
12
19
  effort: string;
13
20
  parallelToolCalls: boolean;
14
21
  maxOutputTokens: number;
15
- outputConfig?: ResponseTextConfig;
16
- tools: Tool[];
22
+ outputConfig?: AITextConfig;
23
+ tools: AITool[];
17
24
  userId: string;
18
25
  previousResponseId?: string;
19
26
  includeFileSearchResults?: boolean;
27
+ fallback?: ResponseCreateFallbackDto;
20
28
  }
@@ -1,9 +1,9 @@
1
- import { ResponseOutputItem } from "openai/resources/responses/responses";
1
+ import { AIOutputItem } from "./ai-types";
2
2
  export interface ResponseDto {
3
3
  id: string;
4
4
  status: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
5
5
  outputText: string;
6
- outputItems: Array<ResponseOutputItem>;
6
+ outputItems: AIOutputItem[];
7
7
  error: string | null;
8
8
  truncationReason: 'max_output_tokens' | 'content_filter' | null;
9
9
  tokensIn: number | null;
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "@rodrigobeber/patoai-dtos",
3
- "version": "4.6.55",
3
+ "version": "4.6.56",
4
4
  "description": "Data Transfer Objects for PatoAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
8
- "dependencies": {
9
- "openai": "^6.16.0"
10
- },
11
8
  "devDependencies": {
12
9
  "@types/node": "^24.3.1",
13
10
  "typescript": "5.9.2"