@effect/ai-openai 4.0.0-beta.65 → 4.0.0-beta.67

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.
Files changed (47) hide show
  1. package/dist/Generated.d.ts +1 -1
  2. package/dist/Generated.js +1 -1
  3. package/dist/OpenAiClient.d.ts +18 -11
  4. package/dist/OpenAiClient.d.ts.map +1 -1
  5. package/dist/OpenAiClient.js +11 -9
  6. package/dist/OpenAiClient.js.map +1 -1
  7. package/dist/OpenAiClientGenerated.d.ts +5 -5
  8. package/dist/OpenAiClientGenerated.js +5 -5
  9. package/dist/OpenAiConfig.d.ts +43 -8
  10. package/dist/OpenAiConfig.d.ts.map +1 -1
  11. package/dist/OpenAiConfig.js +28 -4
  12. package/dist/OpenAiConfig.js.map +1 -1
  13. package/dist/OpenAiEmbeddingModel.d.ts +13 -9
  14. package/dist/OpenAiEmbeddingModel.d.ts.map +1 -1
  15. package/dist/OpenAiEmbeddingModel.js +8 -6
  16. package/dist/OpenAiEmbeddingModel.js.map +1 -1
  17. package/dist/OpenAiError.d.ts +124 -3
  18. package/dist/OpenAiError.d.ts.map +1 -1
  19. package/dist/OpenAiError.js +1 -1
  20. package/dist/OpenAiLanguageModel.d.ts +161 -10
  21. package/dist/OpenAiLanguageModel.d.ts.map +1 -1
  22. package/dist/OpenAiLanguageModel.js +9 -7
  23. package/dist/OpenAiLanguageModel.js.map +1 -1
  24. package/dist/OpenAiSchema.d.ts +108 -35
  25. package/dist/OpenAiSchema.d.ts.map +1 -1
  26. package/dist/OpenAiSchema.js +55 -18
  27. package/dist/OpenAiSchema.js.map +1 -1
  28. package/dist/OpenAiTelemetry.d.ts +13 -10
  29. package/dist/OpenAiTelemetry.d.ts.map +1 -1
  30. package/dist/OpenAiTelemetry.js +2 -2
  31. package/dist/OpenAiTelemetry.js.map +1 -1
  32. package/dist/OpenAiTool.d.ts +26 -26
  33. package/dist/OpenAiTool.js +10 -10
  34. package/dist/index.d.ts +11 -11
  35. package/dist/index.js +11 -11
  36. package/package.json +3 -3
  37. package/src/Generated.ts +1 -1
  38. package/src/OpenAiClient.ts +20 -13
  39. package/src/OpenAiClientGenerated.ts +6 -6
  40. package/src/OpenAiConfig.ts +43 -8
  41. package/src/OpenAiEmbeddingModel.ts +15 -11
  42. package/src/OpenAiError.ts +124 -3
  43. package/src/OpenAiLanguageModel.ts +163 -12
  44. package/src/OpenAiSchema.ts +109 -36
  45. package/src/OpenAiTelemetry.ts +14 -11
  46. package/src/OpenAiTool.ts +11 -11
  47. package/src/index.ts +11 -11
@@ -7,24 +7,24 @@ import * as Telemetry from "effect/unstable/ai/Telemetry";
7
7
  *
8
8
  * {@see https://opentelemetry.io/docs/specs/semconv/attributes-registry/gen-ai/}
9
9
  *
10
- * @since 1.0.0
11
10
  * @category models
11
+ * @since 4.0.0
12
12
  */
13
13
  export type OpenAiTelemetryAttributes = Simplify<Telemetry.GenAITelemetryAttributes & Telemetry.AttributesWithPrefix<RequestAttributes, "gen_ai.openai.request"> & Telemetry.AttributesWithPrefix<ResponseAttributes, "gen_ai.openai.request">>;
14
14
  /**
15
15
  * All telemetry attributes which are part of the GenAI specification,
16
16
  * including the OpenAi-specific attributes.
17
17
  *
18
- * @since 1.0.0
19
18
  * @category models
19
+ * @since 4.0.0
20
20
  */
21
21
  export type AllAttributes = Telemetry.AllAttributes & RequestAttributes & ResponseAttributes;
22
22
  /**
23
23
  * Telemetry attributes which are part of the GenAI specification and are
24
24
  * namespaced by `gen_ai.openai.request`.
25
25
  *
26
- * @since 1.0.0
27
26
  * @category models
27
+ * @since 4.0.0
28
28
  */
29
29
  export interface RequestAttributes {
30
30
  /**
@@ -40,8 +40,8 @@ export interface RequestAttributes {
40
40
  * Telemetry attributes which are part of the GenAI specification and are
41
41
  * namespaced by `gen_ai.openai.response`.
42
42
  *
43
- * @since 1.0.0
44
43
  * @category models
44
+ * @since 4.0.0
45
45
  */
46
46
  export interface ResponseAttributes {
47
47
  /**
@@ -61,8 +61,8 @@ export interface ResponseAttributes {
61
61
  * If one of them applies, then the respective value **MUST** be used;
62
62
  * otherwise, a custom value **MAY** be used.
63
63
  *
64
- * @since 1.0.0
65
64
  * @category models
65
+ * @since 4.0.0
66
66
  */
67
67
  export type WellKnownResponseFormat = "json_object" | "json_schema" | "text";
68
68
  /**
@@ -72,12 +72,15 @@ export type WellKnownResponseFormat = "json_object" | "json_schema" | "text";
72
72
  * If one of them applies, then the respective value **MUST** be used;
73
73
  * otherwise, a custom value **MAY** be used.
74
74
  *
75
- * @since 1.0.0
76
75
  * @category models
76
+ * @since 4.0.0
77
77
  */
78
78
  export type WellKnownServiceTier = "auto" | "default";
79
79
  /**
80
- * @since 1.0.0
80
+ * Options accepted by `addGenAIAnnotations`, combining standard GenAI
81
+ * telemetry attributes with optional OpenAI request and response attributes.
82
+ *
83
+ * @since 4.0.0
81
84
  * @since models
82
85
  */
83
86
  export type OpenAiTelemetryAttributeOptions = Telemetry.GenAITelemetryAttributeOptions & {
@@ -92,7 +95,7 @@ export type OpenAiTelemetryAttributeOptions = Telemetry.GenAITelemetryAttributeO
92
95
  *
93
96
  * **NOTE**: This method will mutate the `Span` **in-place**.
94
97
  *
95
- * @since 1.0.0
98
+ * @since 4.0.0
96
99
  * @since utilities
97
100
  */
98
101
  export declare const addGenAIAnnotations: {
@@ -102,7 +105,7 @@ export declare const addGenAIAnnotations: {
102
105
  *
103
106
  * **NOTE**: This method will mutate the `Span` **in-place**.
104
107
  *
105
- * @since 1.0.0
108
+ * @since 4.0.0
106
109
  * @since utilities
107
110
  */
108
111
  (options: OpenAiTelemetryAttributeOptions): (span: Span) => void;
@@ -112,7 +115,7 @@ export declare const addGenAIAnnotations: {
112
115
  *
113
116
  * **NOTE**: This method will mutate the `Span` **in-place**.
114
117
  *
115
- * @since 1.0.0
118
+ * @since 4.0.0
116
119
  * @since utilities
117
120
  */
118
121
  (span: Span, options: OpenAiTelemetryAttributeOptions): void;
@@ -1 +1 @@
1
- {"version":3,"file":"Open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;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAA;CAC/E;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACvD;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAC,8BAA8B,GAAG;IACvF,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;QACvC,QAAQ,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAA;KAC1C,GAAG,SAAS,CAAA;CACd,CAAA;AASD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAChC;;;;;;;;OAQG;IACH,CAAC,OAAO,EAAE,+BAA+B,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAChE;;;;;;;;OAQG;IACH,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,+BAA+B,GAAG,IAAI,CAAA;CAW5D,CAAA"}
@@ -5,7 +5,7 @@
5
5
  * semantic conventions, extending the base GenAI attributes with OpenAI-specific
6
6
  * request and response metadata.
7
7
  *
8
- * @since 1.0.0
8
+ * @since 4.0.0
9
9
  */
10
10
  import { dual } from "effect/Function";
11
11
  import * as String from "effect/String";
@@ -18,7 +18,7 @@ const addOpenAiResponseAttributes = /*#__PURE__*/Telemetry.addSpanAttributes("ge
18
18
  *
19
19
  * **NOTE**: This method will mutate the `Span` **in-place**.
20
20
  *
21
- * @since 1.0.0
21
+ * @since 4.0.0
22
22
  * @since utilities
23
23
  */
24
24
  export const addGenAIAnnotations = /*#__PURE__*/dual(2, (span, options) => {
@@ -1 +1 @@
1
- {"version":3,"file":"OpenAiTelemetry.js","names":["dual","String","Telemetry","addOpenAiRequestAttributes","addSpanAttributes","camelToSnake","addOpenAiResponseAttributes","addGenAIAnnotations","span","options","openai","request","response"],"sources":["../src/OpenAiTelemetry.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,SAASA,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAGvC,OAAO,KAAKC,SAAS,MAAM,8BAA8B;AAkGzD,MAAMC,0BAA0B,gBAAGD,SAAS,CAACE,iBAAiB,CAAC,uBAAuB,EAAEH,MAAM,CAACI,YAAY,CAE1G;AACD,MAAMC,2BAA2B,gBAAGJ,SAAS,CAACE,iBAAiB,CAAC,wBAAwB,EAAEH,MAAM,CAACI,YAAY,CAE5G;AAED;;;;;;;;;AASA,OAAO,MAAME,mBAAmB,gBAqB5BP,IAAI,CAAC,CAAC,EAAE,CAACQ,IAAU,EAAEC,OAAwC,KAAI;EACnEP,SAAS,CAACK,mBAAmB,CAACC,IAAI,EAAEC,OAAO,CAAC;EAC5C,IAAIA,OAAO,CAACC,MAAM,IAAI,IAAI,EAAE;IAC1B,IAAID,OAAO,CAACC,MAAM,CAACC,OAAO,IAAI,IAAI,EAAE;MAClCR,0BAA0B,CAACK,IAAI,EAAEC,OAAO,CAACC,MAAM,CAACC,OAAO,CAAC;IAC1D;IACA,IAAIF,OAAO,CAACC,MAAM,CAACE,QAAQ,IAAI,IAAI,EAAE;MACnCN,2BAA2B,CAACE,IAAI,EAAEC,OAAO,CAACC,MAAM,CAACE,QAAQ,CAAC;IAC5D;EACF;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"OpenAiTelemetry.js","names":["dual","String","Telemetry","addOpenAiRequestAttributes","addSpanAttributes","camelToSnake","addOpenAiResponseAttributes","addGenAIAnnotations","span","options","openai","request","response"],"sources":["../src/OpenAiTelemetry.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,SAASA,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAGvC,OAAO,KAAKC,SAAS,MAAM,8BAA8B;AAqGzD,MAAMC,0BAA0B,gBAAGD,SAAS,CAACE,iBAAiB,CAAC,uBAAuB,EAAEH,MAAM,CAACI,YAAY,CAE1G;AACD,MAAMC,2BAA2B,gBAAGJ,SAAS,CAACE,iBAAiB,CAAC,wBAAwB,EAAEH,MAAM,CAACI,YAAY,CAE5G;AAED;;;;;;;;;AASA,OAAO,MAAME,mBAAmB,gBAqB5BP,IAAI,CAAC,CAAC,EAAE,CAACQ,IAAU,EAAEC,OAAwC,KAAI;EACnEP,SAAS,CAACK,mBAAmB,CAACC,IAAI,EAAEC,OAAO,CAAC;EAC5C,IAAIA,OAAO,CAACC,MAAM,IAAI,IAAI,EAAE;IAC1B,IAAID,OAAO,CAACC,MAAM,CAACC,OAAO,IAAI,IAAI,EAAE;MAClCR,0BAA0B,CAACK,IAAI,EAAEC,OAAO,CAACC,MAAM,CAACC,OAAO,CAAC;IAC1D;IACA,IAAIF,OAAO,CAACC,MAAM,CAACE,QAAQ,IAAI,IAAI,EAAE;MACnCN,2BAA2B,CAACE,IAAI,EAAEC,OAAO,CAACC,MAAM,CAACE,QAAQ,CAAC;IAC5D;EACF;AACF,CAAC,CAAC","ignoreList":[]}
@@ -4,15 +4,15 @@
4
4
  * Provides tools that are natively supported by OpenAI's API, including
5
5
  * code interpreter, file search, and web search functionality.
6
6
  *
7
- * @since 1.0.0
7
+ * @since 4.0.0
8
8
  */
9
9
  import * as Schema from "effect/Schema";
10
10
  import * as Tool from "effect/unstable/ai/Tool";
11
11
  /**
12
12
  * Union of all OpenAI provider-defined tools.
13
13
  *
14
- * @since 1.0.0
15
14
  * @category models
15
+ * @since 4.0.0
16
16
  */
17
17
  export type OpenAiTool = ReturnType<typeof ApplyPatch> | ReturnType<typeof CodeInterpreter> | ReturnType<typeof FileSearch> | ReturnType<typeof Shell> | ReturnType<typeof ImageGeneration> | ReturnType<typeof LocalShell> | ReturnType<typeof Mcp> | ReturnType<typeof WebSearch> | ReturnType<typeof WebSearchPreview>;
18
18
  /**
@@ -22,8 +22,8 @@ export type OpenAiTool = ReturnType<typeof ApplyPatch> | ReturnType<typeof CodeI
22
22
  * This is a local tool that runs in your environment and requires a handler
23
23
  * to execute file operations.
24
24
  *
25
- * @since 1.0.0
26
25
  * @category tools
26
+ * @since 4.0.0
27
27
  */
28
28
  export declare const ApplyPatch: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
29
29
  readonly failureMode?: Mode | undefined;
@@ -56,12 +56,13 @@ export declare const ApplyPatch: <Mode extends Tool.FailureMode | undefined = un
56
56
  *
57
57
  * Allows the model to execute Python code in a sandboxed environment.
58
58
  *
59
- * @since 1.0.0
60
59
  * @category tools
60
+ * @since 4.0.0
61
61
  */
62
62
  export declare const CodeInterpreter: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
63
63
  readonly container: string | {
64
64
  readonly type: "auto";
65
+ readonly file_ids?: readonly string[];
65
66
  readonly memory_limit?: "1g" | "4g" | "16g" | "64g" | null;
66
67
  readonly network_policy?: {
67
68
  readonly type: "disabled";
@@ -69,12 +70,11 @@ export declare const CodeInterpreter: <Mode extends Tool.FailureMode | undefined
69
70
  readonly type: "allowlist";
70
71
  readonly allowed_domains: readonly string[];
71
72
  readonly domain_secrets?: readonly {
72
- readonly value: string;
73
- readonly name: string;
74
73
  readonly domain: string;
74
+ readonly name: string;
75
+ readonly value: string;
75
76
  }[];
76
77
  };
77
- readonly file_ids?: readonly string[];
78
78
  };
79
79
  }) => Tool.ProviderDefined<"openai.code_interpreter", "OpenAiCodeInterpreter", {
80
80
  readonly args: Schema.Struct<{
@@ -116,15 +116,15 @@ export declare const CodeInterpreter: <Mode extends Tool.FailureMode | undefined
116
116
  *
117
117
  * Enables the model to search through uploaded files and vector stores.
118
118
  *
119
- * @since 1.0.0
120
119
  * @category tools
120
+ * @since 4.0.0
121
121
  */
122
122
  export declare const FileSearch: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
123
123
  readonly vector_store_ids: readonly string[];
124
124
  readonly filters?: {
125
- readonly value: string | number | boolean | readonly (string | number)[];
126
125
  readonly type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin";
127
126
  readonly key: string;
127
+ readonly value: string | number | boolean | readonly (string | number)[];
128
128
  } | {
129
129
  readonly type: "and" | "or";
130
130
  readonly filters: readonly unknown[];
@@ -183,23 +183,23 @@ export declare const FileSearch: <Mode extends Tool.FailureMode | undefined = un
183
183
  *
184
184
  * Enables the model to generate images using the GPT image models.
185
185
  *
186
- * @since 1.0.0
187
186
  * @category tools
187
+ * @since 4.0.0
188
188
  */
189
189
  export declare const ImageGeneration: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
190
- readonly model?: string;
191
- readonly size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
192
- readonly quality?: "auto" | "low" | "high" | "medium";
193
190
  readonly background?: "auto" | "transparent" | "opaque";
194
- readonly output_format?: "png" | "webp" | "jpeg";
195
- readonly output_compression?: number;
196
- readonly partial_images?: number;
197
- readonly moderation?: "auto" | "low";
198
191
  readonly input_fidelity?: "low" | "high" | null;
199
192
  readonly input_image_mask?: {
200
- readonly file_id?: string;
201
193
  readonly image_url?: string;
194
+ readonly file_id?: string;
202
195
  };
196
+ readonly model?: string;
197
+ readonly moderation?: "auto" | "low";
198
+ readonly output_compression?: number;
199
+ readonly output_format?: "png" | "webp" | "jpeg";
200
+ readonly partial_images?: number;
201
+ readonly quality?: "auto" | "low" | "high" | "medium";
202
+ readonly size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
203
203
  }) => Tool.ProviderDefined<"openai.image_generation", "OpenAiImageGeneration", {
204
204
  readonly args: Schema.Struct<{
205
205
  readonly background: Schema.optionalKey<Schema.Literals<readonly ["transparent", "opaque", "auto"]>>;
@@ -229,8 +229,8 @@ export declare const ImageGeneration: <Mode extends Tool.FailureMode | undefined
229
229
  * Enables the model to run a command with a local shell. This is a local tool
230
230
  * that runs in your environment and requires a handler to execute commands.
231
231
  *
232
- * @since 1.0.0
233
232
  * @category tools
233
+ * @since 4.0.0
234
234
  */
235
235
  export declare const LocalShell: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
236
236
  readonly failureMode?: Mode | undefined;
@@ -258,8 +258,8 @@ export declare const LocalShell: <Mode extends Tool.FailureMode | undefined = un
258
258
  * Gives the model access to additional tools via remote Model Context Protocol
259
259
  * (MCP) servers
260
260
  *
261
- * @since 1.0.0
262
261
  * @category tools
262
+ * @since 4.0.0
263
263
  */
264
264
  export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
265
265
  readonly server_label: string;
@@ -267,10 +267,8 @@ export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined
267
267
  readonly tool_names?: readonly string[];
268
268
  readonly read_only?: boolean;
269
269
  } | null;
270
- readonly server_url?: string;
271
- readonly connector_id?: "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
272
270
  readonly authorization?: string;
273
- readonly server_description?: string;
271
+ readonly connector_id?: "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
274
272
  readonly require_approval?: "always" | "never" | {
275
273
  readonly always?: {
276
274
  readonly tool_names?: readonly string[];
@@ -281,6 +279,8 @@ export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined
281
279
  readonly read_only?: boolean;
282
280
  };
283
281
  } | null;
282
+ readonly server_description?: string;
283
+ readonly server_url?: string;
284
284
  }) => Tool.ProviderDefined<"openai.mcp", "OpenAiMcp", {
285
285
  readonly args: Schema.Struct<{
286
286
  readonly allowed_tools: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Struct<{
@@ -322,8 +322,8 @@ export declare const Mcp: <Mode extends Tool.FailureMode | undefined = undefined
322
322
  * environment. This is a local tool that runs in your environment and requires
323
323
  * a handler to execute commands.
324
324
  *
325
- * @since 1.0.0
326
325
  * @category tools
326
+ * @since 4.0.0
327
327
  */
328
328
  export declare const Shell: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
329
329
  readonly failureMode?: Mode | undefined;
@@ -357,8 +357,8 @@ export declare const Shell: <Mode extends Tool.FailureMode | undefined = undefin
357
357
  *
358
358
  * Enables the model to search the web for information.
359
359
  *
360
- * @since 1.0.0
361
360
  * @category tools
361
+ * @since 4.0.0
362
362
  */
363
363
  export declare const WebSearch: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
364
364
  readonly filters?: {
@@ -431,8 +431,8 @@ export declare const WebSearch: <Mode extends Tool.FailureMode | undefined = und
431
431
  *
432
432
  * Preview version of the web search tool with additional features.
433
433
  *
434
- * @since 1.0.0
435
434
  * @category tools
435
+ * @since 4.0.0
436
436
  */
437
437
  export declare const WebSearchPreview: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
438
438
  readonly user_location?: {
@@ -4,7 +4,7 @@
4
4
  * Provides tools that are natively supported by OpenAI's API, including
5
5
  * code interpreter, file search, and web search functionality.
6
6
  *
7
- * @since 1.0.0
7
+ * @since 4.0.0
8
8
  */
9
9
  import * as Schema from "effect/Schema";
10
10
  import * as Tool from "effect/unstable/ai/Tool";
@@ -16,8 +16,8 @@ import * as Generated from "./Generated.js";
16
16
  * This is a local tool that runs in your environment and requires a handler
17
17
  * to execute file operations.
18
18
  *
19
- * @since 1.0.0
20
19
  * @category tools
20
+ * @since 4.0.0
21
21
  */
22
22
  export const ApplyPatch = /*#__PURE__*/Tool.providerDefined({
23
23
  id: "openai.apply_patch",
@@ -38,8 +38,8 @@ export const ApplyPatch = /*#__PURE__*/Tool.providerDefined({
38
38
  *
39
39
  * Allows the model to execute Python code in a sandboxed environment.
40
40
  *
41
- * @since 1.0.0
42
41
  * @category tools
42
+ * @since 4.0.0
43
43
  */
44
44
  export const CodeInterpreter = /*#__PURE__*/Tool.providerDefined({
45
45
  id: "openai.code_interpreter",
@@ -61,8 +61,8 @@ export const CodeInterpreter = /*#__PURE__*/Tool.providerDefined({
61
61
  *
62
62
  * Enables the model to search through uploaded files and vector stores.
63
63
  *
64
- * @since 1.0.0
65
64
  * @category tools
65
+ * @since 4.0.0
66
66
  */
67
67
  export const FileSearch = /*#__PURE__*/Tool.providerDefined({
68
68
  id: "openai.file_search",
@@ -85,8 +85,8 @@ export const FileSearch = /*#__PURE__*/Tool.providerDefined({
85
85
  *
86
86
  * Enables the model to generate images using the GPT image models.
87
87
  *
88
- * @since 1.0.0
89
88
  * @category tools
89
+ * @since 4.0.0
90
90
  */
91
91
  export const ImageGeneration = /*#__PURE__*/Tool.providerDefined({
92
92
  id: "openai.image_generation",
@@ -114,8 +114,8 @@ export const ImageGeneration = /*#__PURE__*/Tool.providerDefined({
114
114
  * Enables the model to run a command with a local shell. This is a local tool
115
115
  * that runs in your environment and requires a handler to execute commands.
116
116
  *
117
- * @since 1.0.0
118
117
  * @category tools
118
+ * @since 4.0.0
119
119
  */
120
120
  export const LocalShell = /*#__PURE__*/Tool.providerDefined({
121
121
  id: "openai.local_shell",
@@ -135,8 +135,8 @@ export const LocalShell = /*#__PURE__*/Tool.providerDefined({
135
135
  * Gives the model access to additional tools via remote Model Context Protocol
136
136
  * (MCP) servers
137
137
  *
138
- * @since 1.0.0
139
138
  * @category tools
139
+ * @since 4.0.0
140
140
  */
141
141
  export const Mcp = /*#__PURE__*/Tool.providerDefined({
142
142
  id: "openai.mcp",
@@ -168,8 +168,8 @@ export const Mcp = /*#__PURE__*/Tool.providerDefined({
168
168
  * environment. This is a local tool that runs in your environment and requires
169
169
  * a handler to execute commands.
170
170
  *
171
- * @since 1.0.0
172
171
  * @category tools
172
+ * @since 4.0.0
173
173
  */
174
174
  export const Shell = /*#__PURE__*/Tool.providerDefined({
175
175
  id: "openai.shell",
@@ -188,8 +188,8 @@ export const Shell = /*#__PURE__*/Tool.providerDefined({
188
188
  *
189
189
  * Enables the model to search the web for information.
190
190
  *
191
- * @since 1.0.0
192
191
  * @category tools
192
+ * @since 4.0.0
193
193
  */
194
194
  export const WebSearch = /*#__PURE__*/Tool.providerDefined({
195
195
  id: "openai.web_search",
@@ -213,8 +213,8 @@ export const WebSearch = /*#__PURE__*/Tool.providerDefined({
213
213
  *
214
214
  * Preview version of the web search tool with additional features.
215
215
  *
216
- * @since 1.0.0
217
216
  * @category tools
217
+ * @since 4.0.0
218
218
  */
219
219
  export const WebSearchPreview = /*#__PURE__*/Tool.providerDefined({
220
220
  id: "openai.web_search_preview",
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
  /**
5
- * @since 1.0.0
5
+ * @since 4.0.0
6
6
  */
7
7
  export * as Generated from "./Generated.ts";
8
8
  /**
@@ -11,15 +11,15 @@ export * as Generated from "./Generated.ts";
11
11
  * Provides a type-safe, Effect-based client for OpenAI operations including
12
12
  * completions, embeddings, and streaming responses.
13
13
  *
14
- * @since 1.0.0
14
+ * @since 4.0.0
15
15
  */
16
16
  export * as OpenAiClient from "./OpenAiClient.ts";
17
17
  /**
18
- * @since 1.0.0
18
+ * @since 4.0.0
19
19
  */
20
20
  export * as OpenAiClientGenerated from "./OpenAiClientGenerated.ts";
21
21
  /**
22
- * @since 1.0.0
22
+ * @since 4.0.0
23
23
  */
24
24
  export * as OpenAiConfig from "./OpenAiConfig.ts";
25
25
  /**
@@ -27,7 +27,7 @@ export * as OpenAiConfig from "./OpenAiConfig.ts";
27
27
  *
28
28
  * Provides an EmbeddingModel implementation for OpenAI's embeddings API.
29
29
  *
30
- * @since 1.0.0
30
+ * @since 4.0.0
31
31
  */
32
32
  export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.ts";
33
33
  /**
@@ -36,7 +36,7 @@ export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.ts";
36
36
  * Provides OpenAI-specific metadata fields for AI error types through module
37
37
  * augmentation, enabling typed access to OpenAI error details.
38
38
  *
39
- * @since 1.0.0
39
+ * @since 4.0.0
40
40
  */
41
41
  export * as OpenAiError from "./OpenAiError.ts";
42
42
  /**
@@ -45,13 +45,13 @@ export * as OpenAiError from "./OpenAiError.ts";
45
45
  * Provides a LanguageModel implementation for OpenAI's responses API,
46
46
  * supporting text generation, structured output, tool calling, and streaming.
47
47
  *
48
- * @since 1.0.0
48
+ * @since 4.0.0
49
49
  */
50
50
  export * as OpenAiLanguageModel from "./OpenAiLanguageModel.ts";
51
51
  /**
52
52
  * Minimal local OpenAI schemas used by the handwritten Responses client path.
53
53
  *
54
- * @since 1.0.0
54
+ * @since 4.0.0
55
55
  */
56
56
  export * as OpenAiSchema from "./OpenAiSchema.ts";
57
57
  /**
@@ -61,7 +61,7 @@ export * as OpenAiSchema from "./OpenAiSchema.ts";
61
61
  * semantic conventions, extending the base GenAI attributes with OpenAI-specific
62
62
  * request and response metadata.
63
63
  *
64
- * @since 1.0.0
64
+ * @since 4.0.0
65
65
  */
66
66
  export * as OpenAiTelemetry from "./OpenAiTelemetry.ts";
67
67
  /**
@@ -70,7 +70,7 @@ export * as OpenAiTelemetry from "./OpenAiTelemetry.ts";
70
70
  * Provides tools that are natively supported by OpenAI's API, including
71
71
  * code interpreter, file search, and web search functionality.
72
72
  *
73
- * @since 1.0.0
73
+ * @since 4.0.0
74
74
  */
75
75
  export * as OpenAiTool from "./OpenAiTool.ts";
76
76
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
  // @barrel: Auto-generated exports. Do not edit manually.
5
5
  /**
6
- * @since 1.0.0
6
+ * @since 4.0.0
7
7
  */
8
8
  export * as Generated from "./Generated.js";
9
9
  /**
@@ -12,15 +12,15 @@ export * as Generated from "./Generated.js";
12
12
  * Provides a type-safe, Effect-based client for OpenAI operations including
13
13
  * completions, embeddings, and streaming responses.
14
14
  *
15
- * @since 1.0.0
15
+ * @since 4.0.0
16
16
  */
17
17
  export * as OpenAiClient from "./OpenAiClient.js";
18
18
  /**
19
- * @since 1.0.0
19
+ * @since 4.0.0
20
20
  */
21
21
  export * as OpenAiClientGenerated from "./OpenAiClientGenerated.js";
22
22
  /**
23
- * @since 1.0.0
23
+ * @since 4.0.0
24
24
  */
25
25
  export * as OpenAiConfig from "./OpenAiConfig.js";
26
26
  /**
@@ -28,7 +28,7 @@ export * as OpenAiConfig from "./OpenAiConfig.js";
28
28
  *
29
29
  * Provides an EmbeddingModel implementation for OpenAI's embeddings API.
30
30
  *
31
- * @since 1.0.0
31
+ * @since 4.0.0
32
32
  */
33
33
  export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.js";
34
34
  /**
@@ -37,7 +37,7 @@ export * as OpenAiEmbeddingModel from "./OpenAiEmbeddingModel.js";
37
37
  * Provides OpenAI-specific metadata fields for AI error types through module
38
38
  * augmentation, enabling typed access to OpenAI error details.
39
39
  *
40
- * @since 1.0.0
40
+ * @since 4.0.0
41
41
  */
42
42
  export * as OpenAiError from "./OpenAiError.js";
43
43
  /**
@@ -46,13 +46,13 @@ export * as OpenAiError from "./OpenAiError.js";
46
46
  * Provides a LanguageModel implementation for OpenAI's responses API,
47
47
  * supporting text generation, structured output, tool calling, and streaming.
48
48
  *
49
- * @since 1.0.0
49
+ * @since 4.0.0
50
50
  */
51
51
  export * as OpenAiLanguageModel from "./OpenAiLanguageModel.js";
52
52
  /**
53
53
  * Minimal local OpenAI schemas used by the handwritten Responses client path.
54
54
  *
55
- * @since 1.0.0
55
+ * @since 4.0.0
56
56
  */
57
57
  export * as OpenAiSchema from "./OpenAiSchema.js";
58
58
  /**
@@ -62,7 +62,7 @@ export * as OpenAiSchema from "./OpenAiSchema.js";
62
62
  * semantic conventions, extending the base GenAI attributes with OpenAI-specific
63
63
  * request and response metadata.
64
64
  *
65
- * @since 1.0.0
65
+ * @since 4.0.0
66
66
  */
67
67
  export * as OpenAiTelemetry from "./OpenAiTelemetry.js";
68
68
  /**
@@ -71,7 +71,7 @@ export * as OpenAiTelemetry from "./OpenAiTelemetry.js";
71
71
  * Provides tools that are natively supported by OpenAI's API, including
72
72
  * code interpreter, file search, and web search functionality.
73
73
  *
74
- * @since 1.0.0
74
+ * @since 4.0.0
75
75
  */
76
76
  export * as OpenAiTool from "./OpenAiTool.js";
77
77
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/ai-openai",
3
- "version": "4.0.0-beta.65",
3
+ "version": "4.0.0-beta.67",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "An OpenAI provider integration for Effect AI SDK",
@@ -43,10 +43,10 @@
43
43
  "provenance": true
44
44
  },
45
45
  "devDependencies": {
46
- "effect": "^4.0.0-beta.65"
46
+ "effect": "^4.0.0-beta.67"
47
47
  },
48
48
  "peerDependencies": {
49
- "effect": "^4.0.0-beta.65"
49
+ "effect": "^4.0.0-beta.67"
50
50
  },
51
51
  "scripts": {
52
52
  "codegen": "effect-utils codegen",
package/src/Generated.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
 
5
5
  import * as Data from "effect/Data"