@opencode/ai 0.0.0-reserved → 2.0.1
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.
- package/README.md +879 -2
- package/dist/cache-policy.d.ts +2 -0
- package/dist/cache-policy.js +129 -0
- package/dist/image-client.d.ts +19 -0
- package/dist/image-client.js +28 -0
- package/dist/image.d.ts +110 -0
- package/dist/image.js +103 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +12 -0
- package/dist/llm.d.ts +252 -0
- package/dist/llm.js +74 -0
- package/dist/protocols/alibaba-chat.d.ts +225 -0
- package/dist/protocols/alibaba-chat.js +75 -0
- package/dist/protocols/alibaba-messages.d.ts +350 -0
- package/dist/protocols/alibaba-messages.js +40 -0
- package/dist/protocols/alibaba-responses.d.ts +255 -0
- package/dist/protocols/alibaba-responses.js +80 -0
- package/dist/protocols/anthropic-messages.d.ts +980 -0
- package/dist/protocols/anthropic-messages.js +1460 -0
- package/dist/protocols/bedrock-converse.d.ts +499 -0
- package/dist/protocols/bedrock-converse.js +643 -0
- package/dist/protocols/bedrock-event-stream.d.ts +9 -0
- package/dist/protocols/bedrock-event-stream.js +97 -0
- package/dist/protocols/gemini.d.ts +285 -0
- package/dist/protocols/gemini.js +671 -0
- package/dist/protocols/google-images.d.ts +30 -0
- package/dist/protocols/google-images.js +181 -0
- package/dist/protocols/index.d.ts +12 -0
- package/dist/protocols/index.js +12 -0
- package/dist/protocols/meta-images.d.ts +26 -0
- package/dist/protocols/meta-images.js +89 -0
- package/dist/protocols/meta-messages.d.ts +356 -0
- package/dist/protocols/meta-messages.js +41 -0
- package/dist/protocols/meta-responses.d.ts +473 -0
- package/dist/protocols/meta-responses.js +173 -0
- package/dist/protocols/mistral-chat.d.ts +540 -0
- package/dist/protocols/mistral-chat.js +624 -0
- package/dist/protocols/open-responses-channel.d.ts +25 -0
- package/dist/protocols/open-responses-channel.js +141 -0
- package/dist/protocols/open-responses-continuation.d.ts +16 -0
- package/dist/protocols/open-responses-continuation.js +170 -0
- package/dist/protocols/open-responses.d.ts +1715 -0
- package/dist/protocols/open-responses.js +1228 -0
- package/dist/protocols/openai-chat.d.ts +860 -0
- package/dist/protocols/openai-chat.js +966 -0
- package/dist/protocols/openai-compatible-chat.d.ts +109 -0
- package/dist/protocols/openai-compatible-chat.js +19 -0
- package/dist/protocols/openai-compatible-responses.d.ts +172 -0
- package/dist/protocols/openai-compatible-responses.js +18 -0
- package/dist/protocols/openai-images.d.ts +32 -0
- package/dist/protocols/openai-images.js +183 -0
- package/dist/protocols/openai-responses.d.ts +1389 -0
- package/dist/protocols/openai-responses.js +260 -0
- package/dist/protocols/shared.d.ts +193 -0
- package/dist/protocols/shared.js +290 -0
- package/dist/protocols/utils/bedrock-auth.d.ts +60 -0
- package/dist/protocols/utils/bedrock-auth.js +85 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +19 -0
- package/dist/protocols/utils/bedrock-cache.js +49 -0
- package/dist/protocols/utils/bedrock-media.d.ts +55 -0
- package/dist/protocols/utils/bedrock-media.js +73 -0
- package/dist/protocols/utils/cache.d.ts +6 -0
- package/dist/protocols/utils/cache.js +5 -0
- package/dist/protocols/utils/gemini-tool-schema.d.ts +2 -0
- package/dist/protocols/utils/gemini-tool-schema.js +103 -0
- package/dist/protocols/utils/image-input.d.ts +21 -0
- package/dist/protocols/utils/image-input.js +20 -0
- package/dist/protocols/utils/lifecycle.d.ts +24 -0
- package/dist/protocols/utils/lifecycle.js +72 -0
- package/dist/protocols/utils/meta-image.d.ts +2 -0
- package/dist/protocols/utils/meta-image.js +13 -0
- package/dist/protocols/utils/open-responses-options.d.ts +56 -0
- package/dist/protocols/utils/open-responses-options.js +61 -0
- package/dist/protocols/utils/openai-image.d.ts +5 -0
- package/dist/protocols/utils/openai-image.js +18 -0
- package/dist/protocols/utils/openai-options.d.ts +16 -0
- package/dist/protocols/utils/openai-options.js +14 -0
- package/dist/protocols/utils/partial-json-options.d.ts +62 -0
- package/dist/protocols/utils/partial-json-options.js +52 -0
- package/dist/protocols/utils/partial-json.d.ts +8 -0
- package/dist/protocols/utils/partial-json.js +279 -0
- package/dist/protocols/utils/responses-checkpoint.d.ts +4 -0
- package/dist/protocols/utils/responses-checkpoint.js +107 -0
- package/dist/protocols/utils/responses-compaction.d.ts +4 -0
- package/dist/protocols/utils/responses-compaction.js +129 -0
- package/dist/protocols/utils/responses-hosted-tools.d.ts +26 -0
- package/dist/protocols/utils/responses-hosted-tools.js +32 -0
- package/dist/protocols/utils/tool-schema.d.ts +8 -0
- package/dist/protocols/utils/tool-schema.js +54 -0
- package/dist/protocols/utils/tool-stream.d.ts +710 -0
- package/dist/protocols/utils/tool-stream.js +155 -0
- package/dist/protocols/xai-images.d.ts +26 -0
- package/dist/protocols/xai-images.js +106 -0
- package/dist/protocols/xai-responses.d.ts +250 -0
- package/dist/protocols/xai-responses.js +81 -0
- package/dist/protocols/zai-chat.d.ts +202 -0
- package/dist/protocols/zai-chat.js +49 -0
- package/dist/protocols/zai-images.d.ts +22 -0
- package/dist/protocols/zai-images.js +79 -0
- package/dist/protocols/zai-messages.d.ts +344 -0
- package/dist/protocols/zai-messages.js +27 -0
- package/dist/protocols.d.ts +1 -0
- package/dist/protocols.js +1 -0
- package/dist/provider-error.d.ts +15 -0
- package/dist/provider-error.js +125 -0
- package/dist/provider-package.d.ts +15 -0
- package/dist/provider-package.js +1 -0
- package/dist/provider.d.ts +23 -0
- package/dist/provider.js +2 -0
- package/dist/providers/alibaba/chat.d.ts +1 -0
- package/dist/providers/alibaba/chat.js +1 -0
- package/dist/providers/alibaba/messages.d.ts +3 -0
- package/dist/providers/alibaba/messages.js +1 -0
- package/dist/providers/alibaba/responses.d.ts +3 -0
- package/dist/providers/alibaba/responses.js +1 -0
- package/dist/providers/alibaba.d.ts +711 -0
- package/dist/providers/alibaba.js +94 -0
- package/dist/providers/amazon-bedrock/mantle/chat.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle/chat.js +1 -0
- package/dist/providers/amazon-bedrock/mantle/responses.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle/responses.js +1 -0
- package/dist/providers/amazon-bedrock/mantle.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle.js +1 -0
- package/dist/providers/amazon-bedrock-mantle.d.ts +313 -0
- package/dist/providers/amazon-bedrock-mantle.js +79 -0
- package/dist/providers/amazon-bedrock.d.ts +173 -0
- package/dist/providers/amazon-bedrock.js +41 -0
- package/dist/providers/anthropic-compatible.d.ts +309 -0
- package/dist/providers/anthropic-compatible.js +50 -0
- package/dist/providers/anthropic.d.ts +307 -0
- package/dist/providers/anthropic.js +42 -0
- package/dist/providers/azure/chat.d.ts +2 -0
- package/dist/providers/azure/chat.js +1 -0
- package/dist/providers/azure/responses.d.ts +2 -0
- package/dist/providers/azure/responses.js +1 -0
- package/dist/providers/azure.d.ts +598 -0
- package/dist/providers/azure.js +115 -0
- package/dist/providers/baseten.d.ts +228 -0
- package/dist/providers/baseten.js +38 -0
- package/dist/providers/cerebras.d.ts +227 -0
- package/dist/providers/cerebras.js +40 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +237 -0
- package/dist/providers/cloudflare-ai-gateway.js +65 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +231 -0
- package/dist/providers/cloudflare-workers-ai.js +51 -0
- package/dist/providers/deepinfra.d.ts +227 -0
- package/dist/providers/deepinfra.js +43 -0
- package/dist/providers/deepseek.d.ts +228 -0
- package/dist/providers/deepseek.js +41 -0
- package/dist/providers/fireworks.d.ts +228 -0
- package/dist/providers/fireworks.js +38 -0
- package/dist/providers/google-vertex/chat.d.ts +2 -0
- package/dist/providers/google-vertex/chat.js +1 -0
- package/dist/providers/google-vertex/gemini.d.ts +2 -0
- package/dist/providers/google-vertex/gemini.js +1 -0
- package/dist/providers/google-vertex/messages.d.ts +2 -0
- package/dist/providers/google-vertex/messages.js +1 -0
- package/dist/providers/google-vertex/responses.d.ts +2 -0
- package/dist/providers/google-vertex/responses.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +132 -0
- package/dist/providers/google-vertex-chat.js +55 -0
- package/dist/providers/google-vertex-messages.d.ts +306 -0
- package/dist/providers/google-vertex-messages.js +75 -0
- package/dist/providers/google-vertex-responses.d.ts +197 -0
- package/dist/providers/google-vertex-responses.js +56 -0
- package/dist/providers/google-vertex-shared.d.ts +22 -0
- package/dist/providers/google-vertex-shared.js +72 -0
- package/dist/providers/google-vertex.d.ts +119 -0
- package/dist/providers/google-vertex.js +98 -0
- package/dist/providers/google.d.ts +114 -0
- package/dist/providers/google.js +42 -0
- package/dist/providers/groq.d.ts +314 -0
- package/dist/providers/groq.js +81 -0
- package/dist/providers/index.d.ts +31 -0
- package/dist/providers/index.js +31 -0
- package/dist/providers/meta/chat.d.ts +2 -0
- package/dist/providers/meta/chat.js +1 -0
- package/dist/providers/meta/messages.d.ts +2 -0
- package/dist/providers/meta/messages.js +1 -0
- package/dist/providers/meta/responses.d.ts +2 -0
- package/dist/providers/meta/responses.js +1 -0
- package/dist/providers/meta.d.ts +636 -0
- package/dist/providers/meta.js +113 -0
- package/dist/providers/minimax/chat.d.ts +4 -0
- package/dist/providers/minimax/chat.js +8 -0
- package/dist/providers/minimax/messages.d.ts +1 -0
- package/dist/providers/minimax/messages.js +1 -0
- package/dist/providers/minimax/responses.d.ts +4 -0
- package/dist/providers/minimax/responses.js +8 -0
- package/dist/providers/minimax.d.ts +598 -0
- package/dist/providers/minimax.js +89 -0
- package/dist/providers/mistral.d.ts +207 -0
- package/dist/providers/mistral.js +28 -0
- package/dist/providers/moonshot/chat.d.ts +1 -0
- package/dist/providers/moonshot/chat.js +1 -0
- package/dist/providers/moonshot/messages.d.ts +4 -0
- package/dist/providers/moonshot/messages.js +8 -0
- package/dist/providers/moonshot/responses.d.ts +4 -0
- package/dist/providers/moonshot/responses.js +8 -0
- package/dist/providers/moonshot.d.ts +596 -0
- package/dist/providers/moonshot.js +90 -0
- package/dist/providers/open-responses-options.d.ts +6 -0
- package/dist/providers/open-responses-options.js +1 -0
- package/dist/providers/openai/chat.d.ts +2 -0
- package/dist/providers/openai/chat.js +1 -0
- package/dist/providers/openai/responses.d.ts +2 -0
- package/dist/providers/openai/responses.js +1 -0
- package/dist/providers/openai-compatible/responses.d.ts +1 -0
- package/dist/providers/openai-compatible/responses.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +195 -0
- package/dist/providers/openai-compatible-responses.js +32 -0
- package/dist/providers/openai-compatible.d.ts +130 -0
- package/dist/providers/openai-compatible.js +33 -0
- package/dist/providers/openai-options.d.ts +26 -0
- package/dist/providers/openai-options.js +41 -0
- package/dist/providers/openai.d.ts +404 -0
- package/dist/providers/openai.js +82 -0
- package/dist/providers/openrouter.d.ts +563 -0
- package/dist/providers/openrouter.js +114 -0
- package/dist/providers/togetherai.d.ts +227 -0
- package/dist/providers/togetherai.js +40 -0
- package/dist/providers/xai.d.ts +163 -0
- package/dist/providers/xai.js +88 -0
- package/dist/providers/zai/chat.d.ts +1 -0
- package/dist/providers/zai/chat.js +1 -0
- package/dist/providers/zai-coding-plan/chat.d.ts +1 -0
- package/dist/providers/zai-coding-plan/chat.js +1 -0
- package/dist/providers/zai-coding-plan/messages.d.ts +4 -0
- package/dist/providers/zai-coding-plan/messages.js +8 -0
- package/dist/providers/zai-coding-plan/responses.d.ts +4 -0
- package/dist/providers/zai-coding-plan/responses.js +8 -0
- package/dist/providers/zai-coding-plan.d.ts +577 -0
- package/dist/providers/zai-coding-plan.js +63 -0
- package/dist/providers/zai.d.ts +149 -0
- package/dist/providers/zai.js +53 -0
- package/dist/providers.d.ts +1 -0
- package/dist/providers.js +1 -0
- package/dist/route/auth-options.d.ts +34 -0
- package/dist/route/auth-options.js +14 -0
- package/dist/route/auth.d.ts +51 -0
- package/dist/route/auth.js +87 -0
- package/dist/route/client.d.ts +430 -0
- package/dist/route/client.js +307 -0
- package/dist/route/endpoint.d.ts +28 -0
- package/dist/route/endpoint.js +21 -0
- package/dist/route/executor.d.ts +27 -0
- package/dist/route/executor.js +183 -0
- package/dist/route/framing.d.ts +29 -0
- package/dist/route/framing.js +14 -0
- package/dist/route/index.d.ts +16 -0
- package/dist/route/index.js +9 -0
- package/dist/route/protocol.d.ts +76 -0
- package/dist/route/protocol.js +16 -0
- package/dist/route/transport/http.d.ts +34 -0
- package/dist/route/transport/http.js +68 -0
- package/dist/route/transport/index.d.ts +41 -0
- package/dist/route/transport/index.js +4 -0
- package/dist/route/transport/websocket-channel.d.ts +57 -0
- package/dist/route/transport/websocket-channel.js +1 -0
- package/dist/route/transport/websocket.d.ts +56 -0
- package/dist/route/transport/websocket.js +370 -0
- package/dist/route.d.ts +1 -0
- package/dist/route.js +1 -0
- package/dist/schema/errors.d.ts +170 -0
- package/dist/schema/errors.js +131 -0
- package/dist/schema/events.d.ts +8123 -0
- package/dist/schema/events.js +550 -0
- package/dist/schema/ids.d.ts +17 -0
- package/dist/schema/ids.js +10 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.js +5 -0
- package/dist/schema/messages.d.ts +646 -0
- package/dist/schema/messages.js +301 -0
- package/dist/schema/options.d.ts +159 -0
- package/dist/schema/options.js +189 -0
- package/dist/testing.d.ts +1693 -0
- package/dist/testing.js +129 -0
- package/dist/tool-history.d.ts +2 -0
- package/dist/tool-history.js +84 -0
- package/dist/tool-runtime.d.ts +15 -0
- package/dist/tool-runtime.js +62 -0
- package/dist/tool.d.ts +136 -0
- package/dist/tool.js +66 -0
- package/dist/utils/record.d.ts +2 -0
- package/dist/utils/record.js +2 -0
- package/dist/utils/sanitize.d.ts +1 -0
- package/dist/utils/sanitize.js +12 -0
- package/package.json +43 -10
|
@@ -0,0 +1,1389 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Route } from "../route/client.js";
|
|
3
|
+
import { Protocol } from "../route/protocol.js";
|
|
4
|
+
import { HttpTransport } from "../route/transport/index.js";
|
|
5
|
+
import { OpenResponses } from "./open-responses.js";
|
|
6
|
+
export declare const DEFAULT_BASE_URL = "https://api.openai.com/v1";
|
|
7
|
+
export declare const PATH = "/responses";
|
|
8
|
+
export declare const ContextManagement: Schema.$Array<Schema.Struct<{
|
|
9
|
+
readonly type: Schema.Literal<"compaction">;
|
|
10
|
+
readonly compactThreshold: Schema.optional<Schema.Int>;
|
|
11
|
+
}>>;
|
|
12
|
+
export type ContextManagement = typeof ContextManagement.Type;
|
|
13
|
+
declare const OpenAIResponsesBody: Schema.Struct<{
|
|
14
|
+
readonly stream: Schema.Literal<true>;
|
|
15
|
+
readonly input: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
16
|
+
readonly type: Schema.Literal<"compaction">;
|
|
17
|
+
readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
18
|
+
readonly encrypted_content: Schema.String;
|
|
19
|
+
}>, Schema.Struct<{
|
|
20
|
+
readonly role: Schema.tag<"system">;
|
|
21
|
+
readonly content: Schema.String;
|
|
22
|
+
}>, Schema.Struct<{
|
|
23
|
+
readonly role: Schema.tag<"developer">;
|
|
24
|
+
readonly content: Schema.String;
|
|
25
|
+
}>, Schema.Struct<{
|
|
26
|
+
readonly role: Schema.tag<"user">;
|
|
27
|
+
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
28
|
+
readonly type: Schema.tag<"input_text">;
|
|
29
|
+
readonly text: Schema.String;
|
|
30
|
+
}>, Schema.Union<readonly [Schema.Struct<{
|
|
31
|
+
readonly type: Schema.tag<"input_image">;
|
|
32
|
+
readonly image_url: Schema.String;
|
|
33
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
readonly type: Schema.tag<"input_file">;
|
|
36
|
+
readonly filename: Schema.String;
|
|
37
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
38
|
+
readonly file_data: Schema.optional<Schema.String>;
|
|
39
|
+
readonly file_url: Schema.optional<Schema.String>;
|
|
40
|
+
}>]>]>>;
|
|
41
|
+
readonly type: Schema.optional<Schema.Literal<"message">>;
|
|
42
|
+
readonly id: Schema.optional<Schema.String>;
|
|
43
|
+
readonly status: Schema.optional<Schema.String>;
|
|
44
|
+
}>, Schema.Struct<{
|
|
45
|
+
readonly type: Schema.tag<"message">;
|
|
46
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
47
|
+
readonly role: Schema.tag<"assistant">;
|
|
48
|
+
readonly content: Schema.$Array<Schema.Struct<{
|
|
49
|
+
readonly type: Schema.tag<"output_text">;
|
|
50
|
+
readonly text: Schema.String;
|
|
51
|
+
}>>;
|
|
52
|
+
readonly phase: Schema.optionalKey<Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>>;
|
|
53
|
+
readonly status: Schema.optional<Schema.String>;
|
|
54
|
+
}>, Schema.Struct<{
|
|
55
|
+
readonly type: Schema.tag<"reasoning">;
|
|
56
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
57
|
+
readonly summary: Schema.$Array<Schema.Struct<{
|
|
58
|
+
readonly type: Schema.tag<"summary_text">;
|
|
59
|
+
readonly text: Schema.String;
|
|
60
|
+
}>>;
|
|
61
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
62
|
+
}>, Schema.Struct<{
|
|
63
|
+
readonly type: Schema.tag<"function_call">;
|
|
64
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
65
|
+
readonly call_id: Schema.String;
|
|
66
|
+
readonly name: Schema.String;
|
|
67
|
+
readonly namespace: Schema.optional<Schema.String>;
|
|
68
|
+
readonly arguments: Schema.String;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
readonly type: Schema.tag<"function_call_output">;
|
|
71
|
+
readonly call_id: Schema.String;
|
|
72
|
+
readonly output: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
73
|
+
readonly type: Schema.tag<"input_text">;
|
|
74
|
+
readonly text: Schema.String;
|
|
75
|
+
}>, Schema.Struct<{
|
|
76
|
+
readonly type: Schema.tag<"input_image">;
|
|
77
|
+
readonly image_url: Schema.String;
|
|
78
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
79
|
+
}>, Schema.Struct<{
|
|
80
|
+
readonly type: Schema.tag<"input_file">;
|
|
81
|
+
readonly filename: Schema.String;
|
|
82
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
83
|
+
readonly file_data: Schema.optional<Schema.String>;
|
|
84
|
+
readonly file_url: Schema.optional<Schema.String>;
|
|
85
|
+
}>, Schema.Struct<{
|
|
86
|
+
readonly type: Schema.tag<"input_video">;
|
|
87
|
+
readonly video_url: Schema.String;
|
|
88
|
+
}>]>>]>;
|
|
89
|
+
}>, Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
90
|
+
readonly type: Schema.tag<"web_search_call">;
|
|
91
|
+
readonly id: Schema.String;
|
|
92
|
+
readonly status: Schema.optional<Schema.String>;
|
|
93
|
+
readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
94
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
95
|
+
readonly type: Schema.tag<"file_search_call">;
|
|
96
|
+
readonly id: Schema.String;
|
|
97
|
+
readonly status: Schema.optional<Schema.String>;
|
|
98
|
+
readonly queries: Schema.optional<Schema.$Array<Schema.String>>;
|
|
99
|
+
readonly results: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
|
|
100
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
101
|
+
readonly type: Schema.tag<"code_interpreter_call">;
|
|
102
|
+
readonly id: Schema.String;
|
|
103
|
+
readonly status: Schema.optional<Schema.String>;
|
|
104
|
+
readonly code: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
105
|
+
readonly container_id: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
106
|
+
readonly outputs: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
|
|
107
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
108
|
+
readonly type: Schema.tag<"mcp_call">;
|
|
109
|
+
readonly id: Schema.String;
|
|
110
|
+
readonly status: Schema.optional<Schema.String>;
|
|
111
|
+
readonly server_label: Schema.optional<Schema.String>;
|
|
112
|
+
readonly name: Schema.optional<Schema.String>;
|
|
113
|
+
readonly arguments: Schema.optional<Schema.String>;
|
|
114
|
+
readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
115
|
+
readonly error: Schema.optional<Schema.Unknown>;
|
|
116
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>]>, Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
117
|
+
readonly type: Schema.tag<"computer_call">;
|
|
118
|
+
readonly id: Schema.String;
|
|
119
|
+
readonly status: Schema.optional<Schema.String>;
|
|
120
|
+
readonly call_id: Schema.optional<Schema.String>;
|
|
121
|
+
readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
122
|
+
readonly pending_safety_checks: Schema.optional<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
123
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
124
|
+
readonly type: Schema.tag<"web_search_preview_call">;
|
|
125
|
+
readonly id: Schema.String;
|
|
126
|
+
readonly status: Schema.optional<Schema.String>;
|
|
127
|
+
readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
128
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
129
|
+
readonly type: Schema.tag<"image_generation_call">;
|
|
130
|
+
readonly id: Schema.String;
|
|
131
|
+
readonly status: Schema.optional<Schema.String>;
|
|
132
|
+
readonly result: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
133
|
+
readonly output_format: Schema.optional<Schema.Literals<readonly ["png", "jpeg", "webp"]>>;
|
|
134
|
+
readonly revised_prompt: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
135
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>]>>;
|
|
136
|
+
readonly tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
137
|
+
readonly type: Schema.tag<"function">;
|
|
138
|
+
readonly name: Schema.String;
|
|
139
|
+
readonly description: Schema.String;
|
|
140
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
141
|
+
readonly strict: Schema.optional<Schema.Boolean>;
|
|
142
|
+
}>, Schema.Struct<{
|
|
143
|
+
readonly type: Schema.tag<"namespace">;
|
|
144
|
+
readonly name: Schema.String;
|
|
145
|
+
readonly description: Schema.String;
|
|
146
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
147
|
+
readonly type: Schema.tag<"function">;
|
|
148
|
+
readonly name: Schema.String;
|
|
149
|
+
readonly description: Schema.String;
|
|
150
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
151
|
+
readonly strict: Schema.optional<Schema.Boolean>;
|
|
152
|
+
}>>;
|
|
153
|
+
}>, Schema.Struct<{
|
|
154
|
+
readonly type: Schema.tag<"image_generation">;
|
|
155
|
+
readonly action: Schema.optional<Schema.Literals<readonly ["auto", "generate", "edit"]>>;
|
|
156
|
+
readonly background: Schema.optional<Schema.Literals<readonly ["auto", "opaque", "transparent"]>>;
|
|
157
|
+
readonly input_fidelity: Schema.optional<Schema.Literals<readonly ["low", "high"]>>;
|
|
158
|
+
readonly output_compression: Schema.optional<Schema.Int>;
|
|
159
|
+
readonly output_format: Schema.optional<Schema.Literals<readonly ["png", "jpeg", "webp"]>>;
|
|
160
|
+
readonly partial_images: Schema.optional<Schema.Int>;
|
|
161
|
+
readonly quality: Schema.optional<Schema.Literals<readonly ["auto", "low", "medium", "high"]>>;
|
|
162
|
+
readonly size: Schema.optional<Schema.String>;
|
|
163
|
+
}>]>>>;
|
|
164
|
+
readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
|
|
165
|
+
readonly type: Schema.tag<"function">;
|
|
166
|
+
readonly name: Schema.String;
|
|
167
|
+
}>, Schema.Struct<{
|
|
168
|
+
readonly type: Schema.tag<"allowed_tools">;
|
|
169
|
+
readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
|
|
170
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
171
|
+
readonly type: Schema.tag<"function">;
|
|
172
|
+
readonly name: Schema.String;
|
|
173
|
+
}>>;
|
|
174
|
+
}>]>, Schema.Struct<{
|
|
175
|
+
readonly type: Schema.tag<"image_generation">;
|
|
176
|
+
}>]>>;
|
|
177
|
+
readonly context_management: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
178
|
+
readonly type: Schema.Literal<"compaction">;
|
|
179
|
+
readonly compact_threshold: Schema.optional<Schema.Int>;
|
|
180
|
+
}>>>;
|
|
181
|
+
readonly model: Schema.String;
|
|
182
|
+
readonly instructions: Schema.optional<Schema.String>;
|
|
183
|
+
readonly store: Schema.optional<Schema.Boolean>;
|
|
184
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
185
|
+
readonly safety_identifier: Schema.optional<Schema.String>;
|
|
186
|
+
readonly stream_options: Schema.optional<Schema.Struct<{
|
|
187
|
+
readonly include_obfuscation: Schema.optional<Schema.Boolean>;
|
|
188
|
+
}>>;
|
|
189
|
+
readonly top_logprobs: Schema.optional<Schema.Int>;
|
|
190
|
+
readonly truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
|
|
191
|
+
readonly service_tier: Schema.optional<Schema.declare<import("./utils/open-responses-options.js").ServiceTier, import("./utils/open-responses-options.js").ServiceTier>>;
|
|
192
|
+
readonly prompt_cache_key: Schema.optional<Schema.String>;
|
|
193
|
+
readonly include: Schema.optional<Schema.$Array<Schema.declare<import("./utils/open-responses-options.js").ResponseIncludable, import("./utils/open-responses-options.js").ResponseIncludable>>>;
|
|
194
|
+
readonly reasoning: Schema.optional<Schema.Struct<{
|
|
195
|
+
readonly effort: Schema.optional<Schema.declare<import("./utils/open-responses-options.js").ReasoningEffort, import("./utils/open-responses-options.js").ReasoningEffort>>;
|
|
196
|
+
readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
|
|
197
|
+
}>>;
|
|
198
|
+
readonly text: Schema.optional<Schema.Struct<{
|
|
199
|
+
readonly verbosity: Schema.optional<Schema.declare<import("./utils/open-responses-options.js").TextVerbosity, import("./utils/open-responses-options.js").TextVerbosity>>;
|
|
200
|
+
}>>;
|
|
201
|
+
readonly max_output_tokens: Schema.optional<Schema.Number>;
|
|
202
|
+
readonly max_tool_calls: Schema.optional<Schema.Int>;
|
|
203
|
+
readonly parallel_tool_calls: Schema.optional<Schema.Boolean>;
|
|
204
|
+
readonly temperature: Schema.optional<Schema.Number>;
|
|
205
|
+
readonly top_p: Schema.optional<Schema.Number>;
|
|
206
|
+
readonly presence_penalty: Schema.optional<Schema.Number>;
|
|
207
|
+
readonly frequency_penalty: Schema.optional<Schema.Number>;
|
|
208
|
+
}>;
|
|
209
|
+
export type OpenAIResponsesBody = Schema.Schema.Type<typeof OpenAIResponsesBody>;
|
|
210
|
+
/** Request control, never conversation content. */
|
|
211
|
+
export declare const CompactionTrigger: Schema.Struct<{
|
|
212
|
+
readonly type: Schema.Literal<"compaction_trigger">;
|
|
213
|
+
}>;
|
|
214
|
+
export declare const protocol: Protocol<{
|
|
215
|
+
readonly input: readonly ({
|
|
216
|
+
readonly [x: string]: unknown;
|
|
217
|
+
readonly id: string;
|
|
218
|
+
readonly type: "web_search_call";
|
|
219
|
+
readonly status?: string | undefined;
|
|
220
|
+
readonly action?: {
|
|
221
|
+
readonly [x: string]: unknown;
|
|
222
|
+
} | null | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
readonly [x: string]: unknown;
|
|
225
|
+
readonly id: string;
|
|
226
|
+
readonly type: "file_search_call";
|
|
227
|
+
readonly status?: string | undefined;
|
|
228
|
+
readonly queries?: readonly string[] | undefined;
|
|
229
|
+
readonly results?: readonly {
|
|
230
|
+
readonly [x: string]: unknown;
|
|
231
|
+
}[] | null | undefined;
|
|
232
|
+
} | {
|
|
233
|
+
readonly [x: string]: unknown;
|
|
234
|
+
readonly id: string;
|
|
235
|
+
readonly type: "code_interpreter_call";
|
|
236
|
+
readonly status?: string | undefined;
|
|
237
|
+
readonly code?: string | null | undefined;
|
|
238
|
+
readonly container_id?: string | null | undefined;
|
|
239
|
+
readonly outputs?: readonly {
|
|
240
|
+
readonly [x: string]: unknown;
|
|
241
|
+
}[] | null | undefined;
|
|
242
|
+
} | {
|
|
243
|
+
readonly [x: string]: unknown;
|
|
244
|
+
readonly id: string;
|
|
245
|
+
readonly type: "mcp_call";
|
|
246
|
+
readonly status?: string | undefined;
|
|
247
|
+
readonly name?: string | undefined;
|
|
248
|
+
readonly output?: string | null | undefined;
|
|
249
|
+
readonly error?: unknown;
|
|
250
|
+
readonly arguments?: string | undefined;
|
|
251
|
+
readonly server_label?: string | undefined;
|
|
252
|
+
} | {
|
|
253
|
+
readonly type: "reasoning";
|
|
254
|
+
readonly summary: readonly {
|
|
255
|
+
readonly type: "summary_text";
|
|
256
|
+
readonly text: string;
|
|
257
|
+
}[];
|
|
258
|
+
readonly id?: string | undefined;
|
|
259
|
+
readonly encrypted_content?: string | null | undefined;
|
|
260
|
+
} | {
|
|
261
|
+
readonly type: "compaction";
|
|
262
|
+
readonly encrypted_content: string;
|
|
263
|
+
readonly id?: string | null | undefined;
|
|
264
|
+
} | {
|
|
265
|
+
readonly role: "system";
|
|
266
|
+
readonly content: string;
|
|
267
|
+
} | {
|
|
268
|
+
readonly role: "developer";
|
|
269
|
+
readonly content: string;
|
|
270
|
+
} | {
|
|
271
|
+
readonly content: readonly ({
|
|
272
|
+
readonly type: "input_image";
|
|
273
|
+
readonly image_url: string;
|
|
274
|
+
readonly detail?: string | undefined;
|
|
275
|
+
} | {
|
|
276
|
+
readonly type: "input_file";
|
|
277
|
+
readonly filename: string;
|
|
278
|
+
readonly detail?: string | undefined;
|
|
279
|
+
readonly file_data?: string | undefined;
|
|
280
|
+
readonly file_url?: string | undefined;
|
|
281
|
+
} | {
|
|
282
|
+
readonly type: "input_text";
|
|
283
|
+
readonly text: string;
|
|
284
|
+
})[];
|
|
285
|
+
readonly role: "user";
|
|
286
|
+
readonly id?: string | undefined;
|
|
287
|
+
readonly type?: "message" | undefined;
|
|
288
|
+
readonly status?: string | undefined;
|
|
289
|
+
} | {
|
|
290
|
+
readonly type: "message";
|
|
291
|
+
readonly content: readonly {
|
|
292
|
+
readonly type: "output_text";
|
|
293
|
+
readonly text: string;
|
|
294
|
+
}[];
|
|
295
|
+
readonly role: "assistant";
|
|
296
|
+
readonly id?: string | undefined;
|
|
297
|
+
readonly status?: string | undefined;
|
|
298
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
299
|
+
} | {
|
|
300
|
+
readonly type: "function_call";
|
|
301
|
+
readonly name: string;
|
|
302
|
+
readonly arguments: string;
|
|
303
|
+
readonly call_id: string;
|
|
304
|
+
readonly id?: string | undefined;
|
|
305
|
+
readonly namespace?: string | undefined;
|
|
306
|
+
} | {
|
|
307
|
+
readonly type: "function_call_output";
|
|
308
|
+
readonly call_id: string;
|
|
309
|
+
readonly output: string | readonly ({
|
|
310
|
+
readonly type: "input_image";
|
|
311
|
+
readonly image_url: string;
|
|
312
|
+
readonly detail?: string | undefined;
|
|
313
|
+
} | {
|
|
314
|
+
readonly type: "input_file";
|
|
315
|
+
readonly filename: string;
|
|
316
|
+
readonly detail?: string | undefined;
|
|
317
|
+
readonly file_data?: string | undefined;
|
|
318
|
+
readonly file_url?: string | undefined;
|
|
319
|
+
} | {
|
|
320
|
+
readonly type: "input_text";
|
|
321
|
+
readonly text: string;
|
|
322
|
+
} | {
|
|
323
|
+
readonly type: "input_video";
|
|
324
|
+
readonly video_url: string;
|
|
325
|
+
})[];
|
|
326
|
+
} | {
|
|
327
|
+
readonly [x: string]: unknown;
|
|
328
|
+
readonly id: string;
|
|
329
|
+
readonly type: "computer_call";
|
|
330
|
+
readonly status?: string | undefined;
|
|
331
|
+
readonly action?: {
|
|
332
|
+
readonly [x: string]: unknown;
|
|
333
|
+
} | null | undefined;
|
|
334
|
+
readonly call_id?: string | undefined;
|
|
335
|
+
readonly pending_safety_checks?: readonly {
|
|
336
|
+
readonly [x: string]: unknown;
|
|
337
|
+
}[] | undefined;
|
|
338
|
+
} | {
|
|
339
|
+
readonly [x: string]: unknown;
|
|
340
|
+
readonly id: string;
|
|
341
|
+
readonly type: "web_search_preview_call";
|
|
342
|
+
readonly status?: string | undefined;
|
|
343
|
+
readonly action?: {
|
|
344
|
+
readonly [x: string]: unknown;
|
|
345
|
+
} | null | undefined;
|
|
346
|
+
} | {
|
|
347
|
+
readonly [x: string]: unknown;
|
|
348
|
+
readonly id: string;
|
|
349
|
+
readonly type: "image_generation_call";
|
|
350
|
+
readonly status?: string | undefined;
|
|
351
|
+
readonly result?: string | null | undefined;
|
|
352
|
+
readonly revised_prompt?: string | null | undefined;
|
|
353
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
354
|
+
})[];
|
|
355
|
+
readonly model: string;
|
|
356
|
+
readonly stream: true;
|
|
357
|
+
readonly metadata?: {
|
|
358
|
+
readonly [x: string]: string;
|
|
359
|
+
} | undefined;
|
|
360
|
+
readonly instructions?: string | undefined;
|
|
361
|
+
readonly reasoning?: {
|
|
362
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
363
|
+
readonly effort?: import("./utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
364
|
+
} | undefined;
|
|
365
|
+
readonly tools?: readonly ({
|
|
366
|
+
readonly type: "function";
|
|
367
|
+
readonly description: string;
|
|
368
|
+
readonly name: string;
|
|
369
|
+
readonly parameters: {
|
|
370
|
+
readonly [x: string]: unknown;
|
|
371
|
+
};
|
|
372
|
+
readonly strict?: boolean | undefined;
|
|
373
|
+
} | {
|
|
374
|
+
readonly type: "image_generation";
|
|
375
|
+
readonly size?: string | undefined;
|
|
376
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
377
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
378
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
379
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
380
|
+
readonly output_compression?: number | undefined;
|
|
381
|
+
readonly input_fidelity?: "low" | "high" | undefined;
|
|
382
|
+
readonly partial_images?: number | undefined;
|
|
383
|
+
} | {
|
|
384
|
+
readonly type: "namespace";
|
|
385
|
+
readonly name: string;
|
|
386
|
+
readonly description: string;
|
|
387
|
+
readonly tools: readonly {
|
|
388
|
+
readonly type: "function";
|
|
389
|
+
readonly description: string;
|
|
390
|
+
readonly name: string;
|
|
391
|
+
readonly parameters: {
|
|
392
|
+
readonly [x: string]: unknown;
|
|
393
|
+
};
|
|
394
|
+
readonly strict?: boolean | undefined;
|
|
395
|
+
}[];
|
|
396
|
+
})[] | undefined;
|
|
397
|
+
readonly text?: {
|
|
398
|
+
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
399
|
+
} | undefined;
|
|
400
|
+
readonly temperature?: number | undefined;
|
|
401
|
+
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
402
|
+
readonly context_management?: readonly {
|
|
403
|
+
readonly type: "compaction";
|
|
404
|
+
readonly compact_threshold?: number | undefined;
|
|
405
|
+
}[] | undefined;
|
|
406
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
407
|
+
readonly type: "function";
|
|
408
|
+
readonly name: string;
|
|
409
|
+
} | {
|
|
410
|
+
readonly type: "allowed_tools";
|
|
411
|
+
readonly mode: "required" | "auto" | "none";
|
|
412
|
+
readonly tools: readonly {
|
|
413
|
+
readonly type: "function";
|
|
414
|
+
readonly name: string;
|
|
415
|
+
}[];
|
|
416
|
+
} | {
|
|
417
|
+
readonly type: "image_generation";
|
|
418
|
+
} | undefined;
|
|
419
|
+
readonly top_p?: number | undefined;
|
|
420
|
+
readonly frequency_penalty?: number | undefined;
|
|
421
|
+
readonly presence_penalty?: number | undefined;
|
|
422
|
+
readonly prompt_cache_key?: string | undefined;
|
|
423
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
424
|
+
readonly store?: boolean | undefined;
|
|
425
|
+
readonly include?: readonly import("./utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
426
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
427
|
+
readonly stream_options?: {
|
|
428
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
readonly safety_identifier?: string | undefined;
|
|
431
|
+
readonly top_logprobs?: number | undefined;
|
|
432
|
+
readonly max_output_tokens?: number | undefined;
|
|
433
|
+
readonly max_tool_calls?: number | undefined;
|
|
434
|
+
}, string, {
|
|
435
|
+
readonly [x: string]: unknown;
|
|
436
|
+
readonly type: string;
|
|
437
|
+
readonly status?: unknown;
|
|
438
|
+
readonly code?: string | null | undefined;
|
|
439
|
+
readonly message?: string | undefined;
|
|
440
|
+
readonly headers?: unknown;
|
|
441
|
+
readonly text?: string | undefined;
|
|
442
|
+
readonly error?: {
|
|
443
|
+
readonly type?: string | null | undefined;
|
|
444
|
+
readonly code?: string | null | undefined;
|
|
445
|
+
readonly message?: string | null | undefined;
|
|
446
|
+
readonly param?: string | null | undefined;
|
|
447
|
+
} | null | undefined;
|
|
448
|
+
readonly item?: {
|
|
449
|
+
readonly [x: string]: unknown;
|
|
450
|
+
readonly type: string;
|
|
451
|
+
readonly id?: string | undefined;
|
|
452
|
+
readonly name?: string | undefined;
|
|
453
|
+
readonly namespace?: string | undefined;
|
|
454
|
+
readonly arguments?: string | undefined;
|
|
455
|
+
readonly encrypted_content?: string | null | undefined;
|
|
456
|
+
readonly call_id?: string | undefined;
|
|
457
|
+
} | null | undefined;
|
|
458
|
+
readonly delta?: string | undefined;
|
|
459
|
+
readonly response?: {
|
|
460
|
+
readonly [x: string]: unknown;
|
|
461
|
+
readonly id?: string | undefined;
|
|
462
|
+
readonly output?: readonly {
|
|
463
|
+
readonly [x: string]: unknown;
|
|
464
|
+
readonly type: string;
|
|
465
|
+
readonly id?: string | undefined;
|
|
466
|
+
readonly name?: string | undefined;
|
|
467
|
+
readonly namespace?: string | undefined;
|
|
468
|
+
readonly arguments?: string | undefined;
|
|
469
|
+
readonly encrypted_content?: string | null | undefined;
|
|
470
|
+
readonly call_id?: string | undefined;
|
|
471
|
+
}[] | undefined;
|
|
472
|
+
readonly error?: {
|
|
473
|
+
readonly type?: string | null | undefined;
|
|
474
|
+
readonly code?: string | null | undefined;
|
|
475
|
+
readonly message?: string | null | undefined;
|
|
476
|
+
readonly param?: string | null | undefined;
|
|
477
|
+
} | null | undefined;
|
|
478
|
+
readonly usage?: {
|
|
479
|
+
readonly input_tokens?: number | undefined;
|
|
480
|
+
readonly output_tokens?: number | undefined;
|
|
481
|
+
readonly output_tokens_details?: {
|
|
482
|
+
readonly reasoning_tokens?: number | undefined;
|
|
483
|
+
} | null | undefined;
|
|
484
|
+
readonly total_tokens?: number | undefined;
|
|
485
|
+
readonly input_tokens_details?: {
|
|
486
|
+
readonly cached_tokens?: number | undefined;
|
|
487
|
+
readonly cache_write_tokens?: number | undefined;
|
|
488
|
+
} | null | undefined;
|
|
489
|
+
} | null | undefined;
|
|
490
|
+
readonly service_tier?: string | null | undefined;
|
|
491
|
+
readonly incomplete_details?: {
|
|
492
|
+
readonly reason?: string | undefined;
|
|
493
|
+
} | null | undefined;
|
|
494
|
+
} | undefined;
|
|
495
|
+
readonly arguments?: string | undefined;
|
|
496
|
+
readonly param?: string | null | undefined;
|
|
497
|
+
readonly status_code?: unknown;
|
|
498
|
+
readonly item_id?: string | undefined;
|
|
499
|
+
readonly output_index?: number | undefined;
|
|
500
|
+
readonly summary_index?: number | undefined;
|
|
501
|
+
}, OpenResponses.ParserState>;
|
|
502
|
+
export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
503
|
+
readonly input: readonly ({
|
|
504
|
+
readonly [x: string]: unknown;
|
|
505
|
+
readonly id: string;
|
|
506
|
+
readonly type: "web_search_call";
|
|
507
|
+
readonly status?: string | undefined;
|
|
508
|
+
readonly action?: {
|
|
509
|
+
readonly [x: string]: unknown;
|
|
510
|
+
} | null | undefined;
|
|
511
|
+
} | {
|
|
512
|
+
readonly [x: string]: unknown;
|
|
513
|
+
readonly id: string;
|
|
514
|
+
readonly type: "file_search_call";
|
|
515
|
+
readonly status?: string | undefined;
|
|
516
|
+
readonly queries?: readonly string[] | undefined;
|
|
517
|
+
readonly results?: readonly {
|
|
518
|
+
readonly [x: string]: unknown;
|
|
519
|
+
}[] | null | undefined;
|
|
520
|
+
} | {
|
|
521
|
+
readonly [x: string]: unknown;
|
|
522
|
+
readonly id: string;
|
|
523
|
+
readonly type: "code_interpreter_call";
|
|
524
|
+
readonly status?: string | undefined;
|
|
525
|
+
readonly code?: string | null | undefined;
|
|
526
|
+
readonly container_id?: string | null | undefined;
|
|
527
|
+
readonly outputs?: readonly {
|
|
528
|
+
readonly [x: string]: unknown;
|
|
529
|
+
}[] | null | undefined;
|
|
530
|
+
} | {
|
|
531
|
+
readonly [x: string]: unknown;
|
|
532
|
+
readonly id: string;
|
|
533
|
+
readonly type: "mcp_call";
|
|
534
|
+
readonly status?: string | undefined;
|
|
535
|
+
readonly name?: string | undefined;
|
|
536
|
+
readonly output?: string | null | undefined;
|
|
537
|
+
readonly error?: unknown;
|
|
538
|
+
readonly arguments?: string | undefined;
|
|
539
|
+
readonly server_label?: string | undefined;
|
|
540
|
+
} | {
|
|
541
|
+
readonly type: "reasoning";
|
|
542
|
+
readonly summary: readonly {
|
|
543
|
+
readonly type: "summary_text";
|
|
544
|
+
readonly text: string;
|
|
545
|
+
}[];
|
|
546
|
+
readonly id?: string | undefined;
|
|
547
|
+
readonly encrypted_content?: string | null | undefined;
|
|
548
|
+
} | {
|
|
549
|
+
readonly type: "compaction";
|
|
550
|
+
readonly encrypted_content: string;
|
|
551
|
+
readonly id?: string | null | undefined;
|
|
552
|
+
} | {
|
|
553
|
+
readonly role: "system";
|
|
554
|
+
readonly content: string;
|
|
555
|
+
} | {
|
|
556
|
+
readonly role: "developer";
|
|
557
|
+
readonly content: string;
|
|
558
|
+
} | {
|
|
559
|
+
readonly content: readonly ({
|
|
560
|
+
readonly type: "input_image";
|
|
561
|
+
readonly image_url: string;
|
|
562
|
+
readonly detail?: string | undefined;
|
|
563
|
+
} | {
|
|
564
|
+
readonly type: "input_file";
|
|
565
|
+
readonly filename: string;
|
|
566
|
+
readonly detail?: string | undefined;
|
|
567
|
+
readonly file_data?: string | undefined;
|
|
568
|
+
readonly file_url?: string | undefined;
|
|
569
|
+
} | {
|
|
570
|
+
readonly type: "input_text";
|
|
571
|
+
readonly text: string;
|
|
572
|
+
})[];
|
|
573
|
+
readonly role: "user";
|
|
574
|
+
readonly id?: string | undefined;
|
|
575
|
+
readonly type?: "message" | undefined;
|
|
576
|
+
readonly status?: string | undefined;
|
|
577
|
+
} | {
|
|
578
|
+
readonly type: "message";
|
|
579
|
+
readonly content: readonly {
|
|
580
|
+
readonly type: "output_text";
|
|
581
|
+
readonly text: string;
|
|
582
|
+
}[];
|
|
583
|
+
readonly role: "assistant";
|
|
584
|
+
readonly id?: string | undefined;
|
|
585
|
+
readonly status?: string | undefined;
|
|
586
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
587
|
+
} | {
|
|
588
|
+
readonly type: "function_call";
|
|
589
|
+
readonly name: string;
|
|
590
|
+
readonly arguments: string;
|
|
591
|
+
readonly call_id: string;
|
|
592
|
+
readonly id?: string | undefined;
|
|
593
|
+
readonly namespace?: string | undefined;
|
|
594
|
+
} | {
|
|
595
|
+
readonly type: "function_call_output";
|
|
596
|
+
readonly call_id: string;
|
|
597
|
+
readonly output: string | readonly ({
|
|
598
|
+
readonly type: "input_image";
|
|
599
|
+
readonly image_url: string;
|
|
600
|
+
readonly detail?: string | undefined;
|
|
601
|
+
} | {
|
|
602
|
+
readonly type: "input_file";
|
|
603
|
+
readonly filename: string;
|
|
604
|
+
readonly detail?: string | undefined;
|
|
605
|
+
readonly file_data?: string | undefined;
|
|
606
|
+
readonly file_url?: string | undefined;
|
|
607
|
+
} | {
|
|
608
|
+
readonly type: "input_text";
|
|
609
|
+
readonly text: string;
|
|
610
|
+
} | {
|
|
611
|
+
readonly type: "input_video";
|
|
612
|
+
readonly video_url: string;
|
|
613
|
+
})[];
|
|
614
|
+
} | {
|
|
615
|
+
readonly [x: string]: unknown;
|
|
616
|
+
readonly id: string;
|
|
617
|
+
readonly type: "computer_call";
|
|
618
|
+
readonly status?: string | undefined;
|
|
619
|
+
readonly action?: {
|
|
620
|
+
readonly [x: string]: unknown;
|
|
621
|
+
} | null | undefined;
|
|
622
|
+
readonly call_id?: string | undefined;
|
|
623
|
+
readonly pending_safety_checks?: readonly {
|
|
624
|
+
readonly [x: string]: unknown;
|
|
625
|
+
}[] | undefined;
|
|
626
|
+
} | {
|
|
627
|
+
readonly [x: string]: unknown;
|
|
628
|
+
readonly id: string;
|
|
629
|
+
readonly type: "web_search_preview_call";
|
|
630
|
+
readonly status?: string | undefined;
|
|
631
|
+
readonly action?: {
|
|
632
|
+
readonly [x: string]: unknown;
|
|
633
|
+
} | null | undefined;
|
|
634
|
+
} | {
|
|
635
|
+
readonly [x: string]: unknown;
|
|
636
|
+
readonly id: string;
|
|
637
|
+
readonly type: "image_generation_call";
|
|
638
|
+
readonly status?: string | undefined;
|
|
639
|
+
readonly result?: string | null | undefined;
|
|
640
|
+
readonly revised_prompt?: string | null | undefined;
|
|
641
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
642
|
+
})[];
|
|
643
|
+
readonly model: string;
|
|
644
|
+
readonly stream: true;
|
|
645
|
+
readonly metadata?: {
|
|
646
|
+
readonly [x: string]: string;
|
|
647
|
+
} | undefined;
|
|
648
|
+
readonly instructions?: string | undefined;
|
|
649
|
+
readonly reasoning?: {
|
|
650
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
651
|
+
readonly effort?: import("./utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
652
|
+
} | undefined;
|
|
653
|
+
readonly tools?: readonly ({
|
|
654
|
+
readonly type: "function";
|
|
655
|
+
readonly description: string;
|
|
656
|
+
readonly name: string;
|
|
657
|
+
readonly parameters: {
|
|
658
|
+
readonly [x: string]: unknown;
|
|
659
|
+
};
|
|
660
|
+
readonly strict?: boolean | undefined;
|
|
661
|
+
} | {
|
|
662
|
+
readonly type: "image_generation";
|
|
663
|
+
readonly size?: string | undefined;
|
|
664
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
665
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
666
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
667
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
668
|
+
readonly output_compression?: number | undefined;
|
|
669
|
+
readonly input_fidelity?: "low" | "high" | undefined;
|
|
670
|
+
readonly partial_images?: number | undefined;
|
|
671
|
+
} | {
|
|
672
|
+
readonly type: "namespace";
|
|
673
|
+
readonly name: string;
|
|
674
|
+
readonly description: string;
|
|
675
|
+
readonly tools: readonly {
|
|
676
|
+
readonly type: "function";
|
|
677
|
+
readonly description: string;
|
|
678
|
+
readonly name: string;
|
|
679
|
+
readonly parameters: {
|
|
680
|
+
readonly [x: string]: unknown;
|
|
681
|
+
};
|
|
682
|
+
readonly strict?: boolean | undefined;
|
|
683
|
+
}[];
|
|
684
|
+
})[] | undefined;
|
|
685
|
+
readonly text?: {
|
|
686
|
+
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
687
|
+
} | undefined;
|
|
688
|
+
readonly temperature?: number | undefined;
|
|
689
|
+
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
690
|
+
readonly context_management?: readonly {
|
|
691
|
+
readonly type: "compaction";
|
|
692
|
+
readonly compact_threshold?: number | undefined;
|
|
693
|
+
}[] | undefined;
|
|
694
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
695
|
+
readonly type: "function";
|
|
696
|
+
readonly name: string;
|
|
697
|
+
} | {
|
|
698
|
+
readonly type: "allowed_tools";
|
|
699
|
+
readonly mode: "required" | "auto" | "none";
|
|
700
|
+
readonly tools: readonly {
|
|
701
|
+
readonly type: "function";
|
|
702
|
+
readonly name: string;
|
|
703
|
+
}[];
|
|
704
|
+
} | {
|
|
705
|
+
readonly type: "image_generation";
|
|
706
|
+
} | undefined;
|
|
707
|
+
readonly top_p?: number | undefined;
|
|
708
|
+
readonly frequency_penalty?: number | undefined;
|
|
709
|
+
readonly presence_penalty?: number | undefined;
|
|
710
|
+
readonly prompt_cache_key?: string | undefined;
|
|
711
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
712
|
+
readonly store?: boolean | undefined;
|
|
713
|
+
readonly include?: readonly import("./utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
714
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
715
|
+
readonly stream_options?: {
|
|
716
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
717
|
+
} | undefined;
|
|
718
|
+
readonly safety_identifier?: string | undefined;
|
|
719
|
+
readonly top_logprobs?: number | undefined;
|
|
720
|
+
readonly max_output_tokens?: number | undefined;
|
|
721
|
+
readonly max_tool_calls?: number | undefined;
|
|
722
|
+
}, string>;
|
|
723
|
+
export declare const channelTransport: (options: import("./open-responses-channel.js").Options) => import("../route/transport/index.js").Transport<{
|
|
724
|
+
readonly input: readonly ({
|
|
725
|
+
readonly [x: string]: unknown;
|
|
726
|
+
readonly id: string;
|
|
727
|
+
readonly type: "web_search_call";
|
|
728
|
+
readonly status?: string | undefined;
|
|
729
|
+
readonly action?: {
|
|
730
|
+
readonly [x: string]: unknown;
|
|
731
|
+
} | null | undefined;
|
|
732
|
+
} | {
|
|
733
|
+
readonly [x: string]: unknown;
|
|
734
|
+
readonly id: string;
|
|
735
|
+
readonly type: "file_search_call";
|
|
736
|
+
readonly status?: string | undefined;
|
|
737
|
+
readonly queries?: readonly string[] | undefined;
|
|
738
|
+
readonly results?: readonly {
|
|
739
|
+
readonly [x: string]: unknown;
|
|
740
|
+
}[] | null | undefined;
|
|
741
|
+
} | {
|
|
742
|
+
readonly [x: string]: unknown;
|
|
743
|
+
readonly id: string;
|
|
744
|
+
readonly type: "code_interpreter_call";
|
|
745
|
+
readonly status?: string | undefined;
|
|
746
|
+
readonly code?: string | null | undefined;
|
|
747
|
+
readonly container_id?: string | null | undefined;
|
|
748
|
+
readonly outputs?: readonly {
|
|
749
|
+
readonly [x: string]: unknown;
|
|
750
|
+
}[] | null | undefined;
|
|
751
|
+
} | {
|
|
752
|
+
readonly [x: string]: unknown;
|
|
753
|
+
readonly id: string;
|
|
754
|
+
readonly type: "mcp_call";
|
|
755
|
+
readonly status?: string | undefined;
|
|
756
|
+
readonly name?: string | undefined;
|
|
757
|
+
readonly output?: string | null | undefined;
|
|
758
|
+
readonly error?: unknown;
|
|
759
|
+
readonly arguments?: string | undefined;
|
|
760
|
+
readonly server_label?: string | undefined;
|
|
761
|
+
} | {
|
|
762
|
+
readonly type: "reasoning";
|
|
763
|
+
readonly summary: readonly {
|
|
764
|
+
readonly type: "summary_text";
|
|
765
|
+
readonly text: string;
|
|
766
|
+
}[];
|
|
767
|
+
readonly id?: string | undefined;
|
|
768
|
+
readonly encrypted_content?: string | null | undefined;
|
|
769
|
+
} | {
|
|
770
|
+
readonly type: "compaction";
|
|
771
|
+
readonly encrypted_content: string;
|
|
772
|
+
readonly id?: string | null | undefined;
|
|
773
|
+
} | {
|
|
774
|
+
readonly role: "system";
|
|
775
|
+
readonly content: string;
|
|
776
|
+
} | {
|
|
777
|
+
readonly role: "developer";
|
|
778
|
+
readonly content: string;
|
|
779
|
+
} | {
|
|
780
|
+
readonly content: readonly ({
|
|
781
|
+
readonly type: "input_image";
|
|
782
|
+
readonly image_url: string;
|
|
783
|
+
readonly detail?: string | undefined;
|
|
784
|
+
} | {
|
|
785
|
+
readonly type: "input_file";
|
|
786
|
+
readonly filename: string;
|
|
787
|
+
readonly detail?: string | undefined;
|
|
788
|
+
readonly file_data?: string | undefined;
|
|
789
|
+
readonly file_url?: string | undefined;
|
|
790
|
+
} | {
|
|
791
|
+
readonly type: "input_text";
|
|
792
|
+
readonly text: string;
|
|
793
|
+
})[];
|
|
794
|
+
readonly role: "user";
|
|
795
|
+
readonly id?: string | undefined;
|
|
796
|
+
readonly type?: "message" | undefined;
|
|
797
|
+
readonly status?: string | undefined;
|
|
798
|
+
} | {
|
|
799
|
+
readonly type: "message";
|
|
800
|
+
readonly content: readonly {
|
|
801
|
+
readonly type: "output_text";
|
|
802
|
+
readonly text: string;
|
|
803
|
+
}[];
|
|
804
|
+
readonly role: "assistant";
|
|
805
|
+
readonly id?: string | undefined;
|
|
806
|
+
readonly status?: string | undefined;
|
|
807
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
808
|
+
} | {
|
|
809
|
+
readonly type: "function_call";
|
|
810
|
+
readonly name: string;
|
|
811
|
+
readonly arguments: string;
|
|
812
|
+
readonly call_id: string;
|
|
813
|
+
readonly id?: string | undefined;
|
|
814
|
+
readonly namespace?: string | undefined;
|
|
815
|
+
} | {
|
|
816
|
+
readonly type: "function_call_output";
|
|
817
|
+
readonly call_id: string;
|
|
818
|
+
readonly output: string | readonly ({
|
|
819
|
+
readonly type: "input_image";
|
|
820
|
+
readonly image_url: string;
|
|
821
|
+
readonly detail?: string | undefined;
|
|
822
|
+
} | {
|
|
823
|
+
readonly type: "input_file";
|
|
824
|
+
readonly filename: string;
|
|
825
|
+
readonly detail?: string | undefined;
|
|
826
|
+
readonly file_data?: string | undefined;
|
|
827
|
+
readonly file_url?: string | undefined;
|
|
828
|
+
} | {
|
|
829
|
+
readonly type: "input_text";
|
|
830
|
+
readonly text: string;
|
|
831
|
+
} | {
|
|
832
|
+
readonly type: "input_video";
|
|
833
|
+
readonly video_url: string;
|
|
834
|
+
})[];
|
|
835
|
+
} | {
|
|
836
|
+
readonly [x: string]: unknown;
|
|
837
|
+
readonly id: string;
|
|
838
|
+
readonly type: "computer_call";
|
|
839
|
+
readonly status?: string | undefined;
|
|
840
|
+
readonly action?: {
|
|
841
|
+
readonly [x: string]: unknown;
|
|
842
|
+
} | null | undefined;
|
|
843
|
+
readonly call_id?: string | undefined;
|
|
844
|
+
readonly pending_safety_checks?: readonly {
|
|
845
|
+
readonly [x: string]: unknown;
|
|
846
|
+
}[] | undefined;
|
|
847
|
+
} | {
|
|
848
|
+
readonly [x: string]: unknown;
|
|
849
|
+
readonly id: string;
|
|
850
|
+
readonly type: "web_search_preview_call";
|
|
851
|
+
readonly status?: string | undefined;
|
|
852
|
+
readonly action?: {
|
|
853
|
+
readonly [x: string]: unknown;
|
|
854
|
+
} | null | undefined;
|
|
855
|
+
} | {
|
|
856
|
+
readonly [x: string]: unknown;
|
|
857
|
+
readonly id: string;
|
|
858
|
+
readonly type: "image_generation_call";
|
|
859
|
+
readonly status?: string | undefined;
|
|
860
|
+
readonly result?: string | null | undefined;
|
|
861
|
+
readonly revised_prompt?: string | null | undefined;
|
|
862
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
863
|
+
})[];
|
|
864
|
+
readonly model: string;
|
|
865
|
+
readonly stream: true;
|
|
866
|
+
readonly metadata?: {
|
|
867
|
+
readonly [x: string]: string;
|
|
868
|
+
} | undefined;
|
|
869
|
+
readonly instructions?: string | undefined;
|
|
870
|
+
readonly reasoning?: {
|
|
871
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
872
|
+
readonly effort?: import("./utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
873
|
+
} | undefined;
|
|
874
|
+
readonly tools?: readonly ({
|
|
875
|
+
readonly type: "function";
|
|
876
|
+
readonly description: string;
|
|
877
|
+
readonly name: string;
|
|
878
|
+
readonly parameters: {
|
|
879
|
+
readonly [x: string]: unknown;
|
|
880
|
+
};
|
|
881
|
+
readonly strict?: boolean | undefined;
|
|
882
|
+
} | {
|
|
883
|
+
readonly type: "image_generation";
|
|
884
|
+
readonly size?: string | undefined;
|
|
885
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
886
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
887
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
888
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
889
|
+
readonly output_compression?: number | undefined;
|
|
890
|
+
readonly input_fidelity?: "low" | "high" | undefined;
|
|
891
|
+
readonly partial_images?: number | undefined;
|
|
892
|
+
} | {
|
|
893
|
+
readonly type: "namespace";
|
|
894
|
+
readonly name: string;
|
|
895
|
+
readonly description: string;
|
|
896
|
+
readonly tools: readonly {
|
|
897
|
+
readonly type: "function";
|
|
898
|
+
readonly description: string;
|
|
899
|
+
readonly name: string;
|
|
900
|
+
readonly parameters: {
|
|
901
|
+
readonly [x: string]: unknown;
|
|
902
|
+
};
|
|
903
|
+
readonly strict?: boolean | undefined;
|
|
904
|
+
}[];
|
|
905
|
+
})[] | undefined;
|
|
906
|
+
readonly text?: {
|
|
907
|
+
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
908
|
+
} | undefined;
|
|
909
|
+
readonly temperature?: number | undefined;
|
|
910
|
+
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
911
|
+
readonly context_management?: readonly {
|
|
912
|
+
readonly type: "compaction";
|
|
913
|
+
readonly compact_threshold?: number | undefined;
|
|
914
|
+
}[] | undefined;
|
|
915
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
916
|
+
readonly type: "function";
|
|
917
|
+
readonly name: string;
|
|
918
|
+
} | {
|
|
919
|
+
readonly type: "allowed_tools";
|
|
920
|
+
readonly mode: "required" | "auto" | "none";
|
|
921
|
+
readonly tools: readonly {
|
|
922
|
+
readonly type: "function";
|
|
923
|
+
readonly name: string;
|
|
924
|
+
}[];
|
|
925
|
+
} | {
|
|
926
|
+
readonly type: "image_generation";
|
|
927
|
+
} | undefined;
|
|
928
|
+
readonly top_p?: number | undefined;
|
|
929
|
+
readonly frequency_penalty?: number | undefined;
|
|
930
|
+
readonly presence_penalty?: number | undefined;
|
|
931
|
+
readonly prompt_cache_key?: string | undefined;
|
|
932
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
933
|
+
readonly store?: boolean | undefined;
|
|
934
|
+
readonly include?: readonly import("./utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
935
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
936
|
+
readonly stream_options?: {
|
|
937
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
938
|
+
} | undefined;
|
|
939
|
+
readonly safety_identifier?: string | undefined;
|
|
940
|
+
readonly top_logprobs?: number | undefined;
|
|
941
|
+
readonly max_output_tokens?: number | undefined;
|
|
942
|
+
readonly max_tool_calls?: number | undefined;
|
|
943
|
+
}, import("./open-responses-channel.js").Prepared, string>;
|
|
944
|
+
export declare const transport: import("../route/transport/index.js").Transport<{
|
|
945
|
+
readonly input: readonly ({
|
|
946
|
+
readonly [x: string]: unknown;
|
|
947
|
+
readonly id: string;
|
|
948
|
+
readonly type: "web_search_call";
|
|
949
|
+
readonly status?: string | undefined;
|
|
950
|
+
readonly action?: {
|
|
951
|
+
readonly [x: string]: unknown;
|
|
952
|
+
} | null | undefined;
|
|
953
|
+
} | {
|
|
954
|
+
readonly [x: string]: unknown;
|
|
955
|
+
readonly id: string;
|
|
956
|
+
readonly type: "file_search_call";
|
|
957
|
+
readonly status?: string | undefined;
|
|
958
|
+
readonly queries?: readonly string[] | undefined;
|
|
959
|
+
readonly results?: readonly {
|
|
960
|
+
readonly [x: string]: unknown;
|
|
961
|
+
}[] | null | undefined;
|
|
962
|
+
} | {
|
|
963
|
+
readonly [x: string]: unknown;
|
|
964
|
+
readonly id: string;
|
|
965
|
+
readonly type: "code_interpreter_call";
|
|
966
|
+
readonly status?: string | undefined;
|
|
967
|
+
readonly code?: string | null | undefined;
|
|
968
|
+
readonly container_id?: string | null | undefined;
|
|
969
|
+
readonly outputs?: readonly {
|
|
970
|
+
readonly [x: string]: unknown;
|
|
971
|
+
}[] | null | undefined;
|
|
972
|
+
} | {
|
|
973
|
+
readonly [x: string]: unknown;
|
|
974
|
+
readonly id: string;
|
|
975
|
+
readonly type: "mcp_call";
|
|
976
|
+
readonly status?: string | undefined;
|
|
977
|
+
readonly name?: string | undefined;
|
|
978
|
+
readonly output?: string | null | undefined;
|
|
979
|
+
readonly error?: unknown;
|
|
980
|
+
readonly arguments?: string | undefined;
|
|
981
|
+
readonly server_label?: string | undefined;
|
|
982
|
+
} | {
|
|
983
|
+
readonly type: "reasoning";
|
|
984
|
+
readonly summary: readonly {
|
|
985
|
+
readonly type: "summary_text";
|
|
986
|
+
readonly text: string;
|
|
987
|
+
}[];
|
|
988
|
+
readonly id?: string | undefined;
|
|
989
|
+
readonly encrypted_content?: string | null | undefined;
|
|
990
|
+
} | {
|
|
991
|
+
readonly type: "compaction";
|
|
992
|
+
readonly encrypted_content: string;
|
|
993
|
+
readonly id?: string | null | undefined;
|
|
994
|
+
} | {
|
|
995
|
+
readonly role: "system";
|
|
996
|
+
readonly content: string;
|
|
997
|
+
} | {
|
|
998
|
+
readonly role: "developer";
|
|
999
|
+
readonly content: string;
|
|
1000
|
+
} | {
|
|
1001
|
+
readonly content: readonly ({
|
|
1002
|
+
readonly type: "input_image";
|
|
1003
|
+
readonly image_url: string;
|
|
1004
|
+
readonly detail?: string | undefined;
|
|
1005
|
+
} | {
|
|
1006
|
+
readonly type: "input_file";
|
|
1007
|
+
readonly filename: string;
|
|
1008
|
+
readonly detail?: string | undefined;
|
|
1009
|
+
readonly file_data?: string | undefined;
|
|
1010
|
+
readonly file_url?: string | undefined;
|
|
1011
|
+
} | {
|
|
1012
|
+
readonly type: "input_text";
|
|
1013
|
+
readonly text: string;
|
|
1014
|
+
})[];
|
|
1015
|
+
readonly role: "user";
|
|
1016
|
+
readonly id?: string | undefined;
|
|
1017
|
+
readonly type?: "message" | undefined;
|
|
1018
|
+
readonly status?: string | undefined;
|
|
1019
|
+
} | {
|
|
1020
|
+
readonly type: "message";
|
|
1021
|
+
readonly content: readonly {
|
|
1022
|
+
readonly type: "output_text";
|
|
1023
|
+
readonly text: string;
|
|
1024
|
+
}[];
|
|
1025
|
+
readonly role: "assistant";
|
|
1026
|
+
readonly id?: string | undefined;
|
|
1027
|
+
readonly status?: string | undefined;
|
|
1028
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1029
|
+
} | {
|
|
1030
|
+
readonly type: "function_call";
|
|
1031
|
+
readonly name: string;
|
|
1032
|
+
readonly arguments: string;
|
|
1033
|
+
readonly call_id: string;
|
|
1034
|
+
readonly id?: string | undefined;
|
|
1035
|
+
readonly namespace?: string | undefined;
|
|
1036
|
+
} | {
|
|
1037
|
+
readonly type: "function_call_output";
|
|
1038
|
+
readonly call_id: string;
|
|
1039
|
+
readonly output: string | readonly ({
|
|
1040
|
+
readonly type: "input_image";
|
|
1041
|
+
readonly image_url: string;
|
|
1042
|
+
readonly detail?: string | undefined;
|
|
1043
|
+
} | {
|
|
1044
|
+
readonly type: "input_file";
|
|
1045
|
+
readonly filename: string;
|
|
1046
|
+
readonly detail?: string | undefined;
|
|
1047
|
+
readonly file_data?: string | undefined;
|
|
1048
|
+
readonly file_url?: string | undefined;
|
|
1049
|
+
} | {
|
|
1050
|
+
readonly type: "input_text";
|
|
1051
|
+
readonly text: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
readonly type: "input_video";
|
|
1054
|
+
readonly video_url: string;
|
|
1055
|
+
})[];
|
|
1056
|
+
} | {
|
|
1057
|
+
readonly [x: string]: unknown;
|
|
1058
|
+
readonly id: string;
|
|
1059
|
+
readonly type: "computer_call";
|
|
1060
|
+
readonly status?: string | undefined;
|
|
1061
|
+
readonly action?: {
|
|
1062
|
+
readonly [x: string]: unknown;
|
|
1063
|
+
} | null | undefined;
|
|
1064
|
+
readonly call_id?: string | undefined;
|
|
1065
|
+
readonly pending_safety_checks?: readonly {
|
|
1066
|
+
readonly [x: string]: unknown;
|
|
1067
|
+
}[] | undefined;
|
|
1068
|
+
} | {
|
|
1069
|
+
readonly [x: string]: unknown;
|
|
1070
|
+
readonly id: string;
|
|
1071
|
+
readonly type: "web_search_preview_call";
|
|
1072
|
+
readonly status?: string | undefined;
|
|
1073
|
+
readonly action?: {
|
|
1074
|
+
readonly [x: string]: unknown;
|
|
1075
|
+
} | null | undefined;
|
|
1076
|
+
} | {
|
|
1077
|
+
readonly [x: string]: unknown;
|
|
1078
|
+
readonly id: string;
|
|
1079
|
+
readonly type: "image_generation_call";
|
|
1080
|
+
readonly status?: string | undefined;
|
|
1081
|
+
readonly result?: string | null | undefined;
|
|
1082
|
+
readonly revised_prompt?: string | null | undefined;
|
|
1083
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
1084
|
+
})[];
|
|
1085
|
+
readonly model: string;
|
|
1086
|
+
readonly stream: true;
|
|
1087
|
+
readonly metadata?: {
|
|
1088
|
+
readonly [x: string]: string;
|
|
1089
|
+
} | undefined;
|
|
1090
|
+
readonly instructions?: string | undefined;
|
|
1091
|
+
readonly reasoning?: {
|
|
1092
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1093
|
+
readonly effort?: import("./utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
1094
|
+
} | undefined;
|
|
1095
|
+
readonly tools?: readonly ({
|
|
1096
|
+
readonly type: "function";
|
|
1097
|
+
readonly description: string;
|
|
1098
|
+
readonly name: string;
|
|
1099
|
+
readonly parameters: {
|
|
1100
|
+
readonly [x: string]: unknown;
|
|
1101
|
+
};
|
|
1102
|
+
readonly strict?: boolean | undefined;
|
|
1103
|
+
} | {
|
|
1104
|
+
readonly type: "image_generation";
|
|
1105
|
+
readonly size?: string | undefined;
|
|
1106
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
1107
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
1108
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
1109
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
1110
|
+
readonly output_compression?: number | undefined;
|
|
1111
|
+
readonly input_fidelity?: "low" | "high" | undefined;
|
|
1112
|
+
readonly partial_images?: number | undefined;
|
|
1113
|
+
} | {
|
|
1114
|
+
readonly type: "namespace";
|
|
1115
|
+
readonly name: string;
|
|
1116
|
+
readonly description: string;
|
|
1117
|
+
readonly tools: readonly {
|
|
1118
|
+
readonly type: "function";
|
|
1119
|
+
readonly description: string;
|
|
1120
|
+
readonly name: string;
|
|
1121
|
+
readonly parameters: {
|
|
1122
|
+
readonly [x: string]: unknown;
|
|
1123
|
+
};
|
|
1124
|
+
readonly strict?: boolean | undefined;
|
|
1125
|
+
}[];
|
|
1126
|
+
})[] | undefined;
|
|
1127
|
+
readonly text?: {
|
|
1128
|
+
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
1129
|
+
} | undefined;
|
|
1130
|
+
readonly temperature?: number | undefined;
|
|
1131
|
+
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
1132
|
+
readonly context_management?: readonly {
|
|
1133
|
+
readonly type: "compaction";
|
|
1134
|
+
readonly compact_threshold?: number | undefined;
|
|
1135
|
+
}[] | undefined;
|
|
1136
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1137
|
+
readonly type: "function";
|
|
1138
|
+
readonly name: string;
|
|
1139
|
+
} | {
|
|
1140
|
+
readonly type: "allowed_tools";
|
|
1141
|
+
readonly mode: "required" | "auto" | "none";
|
|
1142
|
+
readonly tools: readonly {
|
|
1143
|
+
readonly type: "function";
|
|
1144
|
+
readonly name: string;
|
|
1145
|
+
}[];
|
|
1146
|
+
} | {
|
|
1147
|
+
readonly type: "image_generation";
|
|
1148
|
+
} | undefined;
|
|
1149
|
+
readonly top_p?: number | undefined;
|
|
1150
|
+
readonly frequency_penalty?: number | undefined;
|
|
1151
|
+
readonly presence_penalty?: number | undefined;
|
|
1152
|
+
readonly prompt_cache_key?: string | undefined;
|
|
1153
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1154
|
+
readonly store?: boolean | undefined;
|
|
1155
|
+
readonly include?: readonly import("./utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
1156
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1157
|
+
readonly stream_options?: {
|
|
1158
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
1159
|
+
} | undefined;
|
|
1160
|
+
readonly safety_identifier?: string | undefined;
|
|
1161
|
+
readonly top_logprobs?: number | undefined;
|
|
1162
|
+
readonly max_output_tokens?: number | undefined;
|
|
1163
|
+
readonly max_tool_calls?: number | undefined;
|
|
1164
|
+
}, import("./open-responses-channel.js").Prepared, string>;
|
|
1165
|
+
export declare const route: Route<{
|
|
1166
|
+
readonly input: readonly ({
|
|
1167
|
+
readonly [x: string]: unknown;
|
|
1168
|
+
readonly id: string;
|
|
1169
|
+
readonly type: "web_search_call";
|
|
1170
|
+
readonly status?: string | undefined;
|
|
1171
|
+
readonly action?: {
|
|
1172
|
+
readonly [x: string]: unknown;
|
|
1173
|
+
} | null | undefined;
|
|
1174
|
+
} | {
|
|
1175
|
+
readonly [x: string]: unknown;
|
|
1176
|
+
readonly id: string;
|
|
1177
|
+
readonly type: "file_search_call";
|
|
1178
|
+
readonly status?: string | undefined;
|
|
1179
|
+
readonly queries?: readonly string[] | undefined;
|
|
1180
|
+
readonly results?: readonly {
|
|
1181
|
+
readonly [x: string]: unknown;
|
|
1182
|
+
}[] | null | undefined;
|
|
1183
|
+
} | {
|
|
1184
|
+
readonly [x: string]: unknown;
|
|
1185
|
+
readonly id: string;
|
|
1186
|
+
readonly type: "code_interpreter_call";
|
|
1187
|
+
readonly status?: string | undefined;
|
|
1188
|
+
readonly code?: string | null | undefined;
|
|
1189
|
+
readonly container_id?: string | null | undefined;
|
|
1190
|
+
readonly outputs?: readonly {
|
|
1191
|
+
readonly [x: string]: unknown;
|
|
1192
|
+
}[] | null | undefined;
|
|
1193
|
+
} | {
|
|
1194
|
+
readonly [x: string]: unknown;
|
|
1195
|
+
readonly id: string;
|
|
1196
|
+
readonly type: "mcp_call";
|
|
1197
|
+
readonly status?: string | undefined;
|
|
1198
|
+
readonly name?: string | undefined;
|
|
1199
|
+
readonly output?: string | null | undefined;
|
|
1200
|
+
readonly error?: unknown;
|
|
1201
|
+
readonly arguments?: string | undefined;
|
|
1202
|
+
readonly server_label?: string | undefined;
|
|
1203
|
+
} | {
|
|
1204
|
+
readonly type: "reasoning";
|
|
1205
|
+
readonly summary: readonly {
|
|
1206
|
+
readonly type: "summary_text";
|
|
1207
|
+
readonly text: string;
|
|
1208
|
+
}[];
|
|
1209
|
+
readonly id?: string | undefined;
|
|
1210
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1211
|
+
} | {
|
|
1212
|
+
readonly type: "compaction";
|
|
1213
|
+
readonly encrypted_content: string;
|
|
1214
|
+
readonly id?: string | null | undefined;
|
|
1215
|
+
} | {
|
|
1216
|
+
readonly role: "system";
|
|
1217
|
+
readonly content: string;
|
|
1218
|
+
} | {
|
|
1219
|
+
readonly role: "developer";
|
|
1220
|
+
readonly content: string;
|
|
1221
|
+
} | {
|
|
1222
|
+
readonly content: readonly ({
|
|
1223
|
+
readonly type: "input_image";
|
|
1224
|
+
readonly image_url: string;
|
|
1225
|
+
readonly detail?: string | undefined;
|
|
1226
|
+
} | {
|
|
1227
|
+
readonly type: "input_file";
|
|
1228
|
+
readonly filename: string;
|
|
1229
|
+
readonly detail?: string | undefined;
|
|
1230
|
+
readonly file_data?: string | undefined;
|
|
1231
|
+
readonly file_url?: string | undefined;
|
|
1232
|
+
} | {
|
|
1233
|
+
readonly type: "input_text";
|
|
1234
|
+
readonly text: string;
|
|
1235
|
+
})[];
|
|
1236
|
+
readonly role: "user";
|
|
1237
|
+
readonly id?: string | undefined;
|
|
1238
|
+
readonly type?: "message" | undefined;
|
|
1239
|
+
readonly status?: string | undefined;
|
|
1240
|
+
} | {
|
|
1241
|
+
readonly type: "message";
|
|
1242
|
+
readonly content: readonly {
|
|
1243
|
+
readonly type: "output_text";
|
|
1244
|
+
readonly text: string;
|
|
1245
|
+
}[];
|
|
1246
|
+
readonly role: "assistant";
|
|
1247
|
+
readonly id?: string | undefined;
|
|
1248
|
+
readonly status?: string | undefined;
|
|
1249
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1250
|
+
} | {
|
|
1251
|
+
readonly type: "function_call";
|
|
1252
|
+
readonly name: string;
|
|
1253
|
+
readonly arguments: string;
|
|
1254
|
+
readonly call_id: string;
|
|
1255
|
+
readonly id?: string | undefined;
|
|
1256
|
+
readonly namespace?: string | undefined;
|
|
1257
|
+
} | {
|
|
1258
|
+
readonly type: "function_call_output";
|
|
1259
|
+
readonly call_id: string;
|
|
1260
|
+
readonly output: string | readonly ({
|
|
1261
|
+
readonly type: "input_image";
|
|
1262
|
+
readonly image_url: string;
|
|
1263
|
+
readonly detail?: string | undefined;
|
|
1264
|
+
} | {
|
|
1265
|
+
readonly type: "input_file";
|
|
1266
|
+
readonly filename: string;
|
|
1267
|
+
readonly detail?: string | undefined;
|
|
1268
|
+
readonly file_data?: string | undefined;
|
|
1269
|
+
readonly file_url?: string | undefined;
|
|
1270
|
+
} | {
|
|
1271
|
+
readonly type: "input_text";
|
|
1272
|
+
readonly text: string;
|
|
1273
|
+
} | {
|
|
1274
|
+
readonly type: "input_video";
|
|
1275
|
+
readonly video_url: string;
|
|
1276
|
+
})[];
|
|
1277
|
+
} | {
|
|
1278
|
+
readonly [x: string]: unknown;
|
|
1279
|
+
readonly id: string;
|
|
1280
|
+
readonly type: "computer_call";
|
|
1281
|
+
readonly status?: string | undefined;
|
|
1282
|
+
readonly action?: {
|
|
1283
|
+
readonly [x: string]: unknown;
|
|
1284
|
+
} | null | undefined;
|
|
1285
|
+
readonly call_id?: string | undefined;
|
|
1286
|
+
readonly pending_safety_checks?: readonly {
|
|
1287
|
+
readonly [x: string]: unknown;
|
|
1288
|
+
}[] | undefined;
|
|
1289
|
+
} | {
|
|
1290
|
+
readonly [x: string]: unknown;
|
|
1291
|
+
readonly id: string;
|
|
1292
|
+
readonly type: "web_search_preview_call";
|
|
1293
|
+
readonly status?: string | undefined;
|
|
1294
|
+
readonly action?: {
|
|
1295
|
+
readonly [x: string]: unknown;
|
|
1296
|
+
} | null | undefined;
|
|
1297
|
+
} | {
|
|
1298
|
+
readonly [x: string]: unknown;
|
|
1299
|
+
readonly id: string;
|
|
1300
|
+
readonly type: "image_generation_call";
|
|
1301
|
+
readonly status?: string | undefined;
|
|
1302
|
+
readonly result?: string | null | undefined;
|
|
1303
|
+
readonly revised_prompt?: string | null | undefined;
|
|
1304
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
1305
|
+
})[];
|
|
1306
|
+
readonly model: string;
|
|
1307
|
+
readonly stream: true;
|
|
1308
|
+
readonly metadata?: {
|
|
1309
|
+
readonly [x: string]: string;
|
|
1310
|
+
} | undefined;
|
|
1311
|
+
readonly instructions?: string | undefined;
|
|
1312
|
+
readonly reasoning?: {
|
|
1313
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1314
|
+
readonly effort?: import("./utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
1315
|
+
} | undefined;
|
|
1316
|
+
readonly tools?: readonly ({
|
|
1317
|
+
readonly type: "function";
|
|
1318
|
+
readonly description: string;
|
|
1319
|
+
readonly name: string;
|
|
1320
|
+
readonly parameters: {
|
|
1321
|
+
readonly [x: string]: unknown;
|
|
1322
|
+
};
|
|
1323
|
+
readonly strict?: boolean | undefined;
|
|
1324
|
+
} | {
|
|
1325
|
+
readonly type: "image_generation";
|
|
1326
|
+
readonly size?: string | undefined;
|
|
1327
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
1328
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
1329
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
1330
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
1331
|
+
readonly output_compression?: number | undefined;
|
|
1332
|
+
readonly input_fidelity?: "low" | "high" | undefined;
|
|
1333
|
+
readonly partial_images?: number | undefined;
|
|
1334
|
+
} | {
|
|
1335
|
+
readonly type: "namespace";
|
|
1336
|
+
readonly name: string;
|
|
1337
|
+
readonly description: string;
|
|
1338
|
+
readonly tools: readonly {
|
|
1339
|
+
readonly type: "function";
|
|
1340
|
+
readonly description: string;
|
|
1341
|
+
readonly name: string;
|
|
1342
|
+
readonly parameters: {
|
|
1343
|
+
readonly [x: string]: unknown;
|
|
1344
|
+
};
|
|
1345
|
+
readonly strict?: boolean | undefined;
|
|
1346
|
+
}[];
|
|
1347
|
+
})[] | undefined;
|
|
1348
|
+
readonly text?: {
|
|
1349
|
+
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
1350
|
+
} | undefined;
|
|
1351
|
+
readonly temperature?: number | undefined;
|
|
1352
|
+
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
1353
|
+
readonly context_management?: readonly {
|
|
1354
|
+
readonly type: "compaction";
|
|
1355
|
+
readonly compact_threshold?: number | undefined;
|
|
1356
|
+
}[] | undefined;
|
|
1357
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1358
|
+
readonly type: "function";
|
|
1359
|
+
readonly name: string;
|
|
1360
|
+
} | {
|
|
1361
|
+
readonly type: "allowed_tools";
|
|
1362
|
+
readonly mode: "required" | "auto" | "none";
|
|
1363
|
+
readonly tools: readonly {
|
|
1364
|
+
readonly type: "function";
|
|
1365
|
+
readonly name: string;
|
|
1366
|
+
}[];
|
|
1367
|
+
} | {
|
|
1368
|
+
readonly type: "image_generation";
|
|
1369
|
+
} | undefined;
|
|
1370
|
+
readonly top_p?: number | undefined;
|
|
1371
|
+
readonly frequency_penalty?: number | undefined;
|
|
1372
|
+
readonly presence_penalty?: number | undefined;
|
|
1373
|
+
readonly prompt_cache_key?: string | undefined;
|
|
1374
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1375
|
+
readonly store?: boolean | undefined;
|
|
1376
|
+
readonly include?: readonly import("./utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
1377
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1378
|
+
readonly stream_options?: {
|
|
1379
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
1380
|
+
} | undefined;
|
|
1381
|
+
readonly safety_identifier?: string | undefined;
|
|
1382
|
+
readonly top_logprobs?: number | undefined;
|
|
1383
|
+
readonly max_output_tokens?: number | undefined;
|
|
1384
|
+
readonly max_tool_calls?: number | undefined;
|
|
1385
|
+
}, import("./open-responses-channel.js").Prepared, {
|
|
1386
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1387
|
+
trigger: import("../route/client.js").TriggerCompactOperation;
|
|
1388
|
+
}>;
|
|
1389
|
+
export * as OpenAIResponses from "./openai-responses.js";
|