@opencode/ai 2.0.32 → 2.1.0
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/dist/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +6 -14
- package/dist/experimental/realtime.js +28 -3
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -397,7 +397,6 @@ export declare const coreFields: {
|
|
|
397
397
|
frequency_penalty: Schema.optional<Schema.Number>;
|
|
398
398
|
};
|
|
399
399
|
export declare const OpenResponsesBody: Schema.Struct<{
|
|
400
|
-
readonly stream: Schema.Literal<true>;
|
|
401
400
|
readonly model: Schema.String;
|
|
402
401
|
readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
403
402
|
readonly type: Schema.Literal<"compaction">;
|
|
@@ -557,153 +556,288 @@ export declare const OpenResponsesBody: Schema.Struct<{
|
|
|
557
556
|
readonly top_p: Schema.optional<Schema.Number>;
|
|
558
557
|
readonly presence_penalty: Schema.optional<Schema.Number>;
|
|
559
558
|
readonly frequency_penalty: Schema.optional<Schema.Number>;
|
|
559
|
+
readonly stream: Schema.Literal<true>;
|
|
560
560
|
}>;
|
|
561
561
|
export type OpenResponsesBody = Schema.Schema.Type<typeof OpenResponsesBody>;
|
|
562
562
|
export declare const OpenResponsesUsage: Schema.StructWithRest<Schema.Struct<{
|
|
563
|
-
readonly input_tokens: Schema.
|
|
563
|
+
readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
564
564
|
readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
565
|
-
readonly cached_tokens: Schema.
|
|
566
|
-
readonly cache_write_tokens: Schema.
|
|
565
|
+
readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
566
|
+
readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
567
567
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
568
|
-
readonly output_tokens: Schema.
|
|
568
|
+
readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
569
569
|
readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
570
|
-
readonly reasoning_tokens: Schema.
|
|
570
|
+
readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
571
571
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
572
|
-
readonly total_tokens: Schema.
|
|
572
|
+
readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
573
573
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
574
574
|
type OpenResponsesUsage = Schema.Schema.Type<typeof OpenResponsesUsage>;
|
|
575
575
|
export declare const StreamItem: Schema.StructWithRest<Schema.Struct<{
|
|
576
576
|
readonly type: Schema.String;
|
|
577
|
-
readonly id: Schema.optional<Schema.String>;
|
|
578
|
-
readonly call_id: Schema.optional<Schema.String>;
|
|
579
|
-
readonly name: Schema.optional<Schema.String>;
|
|
580
|
-
readonly namespace: Schema.optional<Schema.NullOr<Schema.String
|
|
581
|
-
readonly arguments: Schema.optional<Schema.String>;
|
|
577
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
578
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
579
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
580
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
581
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
582
582
|
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
583
583
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
584
584
|
export type StreamItem = Schema.Schema.Type<typeof StreamItem>;
|
|
585
585
|
export type OutputItem = StreamItem & {
|
|
586
586
|
readonly id: string;
|
|
587
|
-
readonly namespace?: string;
|
|
588
587
|
};
|
|
589
|
-
export declare const Event: Schema.StructWithRest<Schema.Struct<{
|
|
588
|
+
export declare const Event: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
590
589
|
readonly type: Schema.String;
|
|
591
|
-
readonly delta: Schema.optional<Schema.String>;
|
|
592
|
-
readonly arguments: Schema.optional<Schema.String>;
|
|
593
|
-
readonly text: Schema.optional<Schema.String>;
|
|
590
|
+
readonly delta: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
591
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
592
|
+
readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
594
593
|
readonly item_id: Schema.optional<Schema.String>;
|
|
595
|
-
readonly output_index: Schema.optional<Schema.Number>;
|
|
596
|
-
readonly summary_index: Schema.optional<Schema.Number>;
|
|
594
|
+
readonly output_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
|
|
595
|
+
readonly summary_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
|
|
597
596
|
readonly item: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
598
597
|
readonly type: Schema.String;
|
|
599
|
-
readonly id: Schema.optional<Schema.String>;
|
|
600
|
-
readonly call_id: Schema.optional<Schema.String>;
|
|
601
|
-
readonly name: Schema.optional<Schema.String>;
|
|
602
|
-
readonly namespace: Schema.optional<Schema.NullOr<Schema.String
|
|
603
|
-
readonly arguments: Schema.optional<Schema.String>;
|
|
598
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
599
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
600
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
601
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
602
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
604
603
|
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
605
604
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
606
|
-
readonly response: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
607
|
-
readonly id: Schema.optional<Schema.String>;
|
|
605
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
606
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
608
607
|
readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
609
608
|
readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
610
|
-
readonly reason: Schema.optional<Schema.String>;
|
|
609
|
+
readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
611
610
|
}>>>;
|
|
612
|
-
readonly output: Schema.optional<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
611
|
+
readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
612
|
+
readonly type: Schema.String;
|
|
613
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
614
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
615
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
616
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
617
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
618
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
619
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
613
620
|
readonly type: Schema.String;
|
|
614
|
-
readonly id: Schema.optional<Schema.String>;
|
|
615
|
-
readonly call_id: Schema.optional<Schema.String>;
|
|
616
|
-
readonly name: Schema.optional<Schema.String>;
|
|
617
|
-
readonly namespace: Schema.optional<Schema.NullOr<Schema.String
|
|
618
|
-
readonly arguments: Schema.optional<Schema.String>;
|
|
621
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
622
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
623
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
624
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
625
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
619
626
|
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
627
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
|
|
628
|
+
readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
629
|
+
readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
630
|
+
readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
631
|
+
readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
632
|
+
readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
633
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
634
|
+
readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
635
|
+
readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
636
|
+
readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
637
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
638
|
+
readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
620
639
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
640
|
+
readonly error: Schema.optional<Schema.Unknown>;
|
|
641
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
642
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
643
|
+
readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
644
|
+
readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
645
|
+
readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
646
|
+
}>>>;
|
|
647
|
+
readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
648
|
+
readonly type: Schema.String;
|
|
649
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
650
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
651
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
652
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
653
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
654
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
655
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
656
|
+
readonly type: Schema.String;
|
|
657
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
658
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
659
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
660
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
661
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
662
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
663
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
|
|
621
664
|
readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
622
|
-
readonly input_tokens: Schema.
|
|
665
|
+
readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
623
666
|
readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
624
|
-
readonly cached_tokens: Schema.
|
|
625
|
-
readonly cache_write_tokens: Schema.
|
|
667
|
+
readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
668
|
+
readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
626
669
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
627
|
-
readonly output_tokens: Schema.
|
|
670
|
+
readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
628
671
|
readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
629
|
-
readonly reasoning_tokens: Schema.
|
|
672
|
+
readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
630
673
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
631
|
-
readonly total_tokens: Schema.
|
|
674
|
+
readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
632
675
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
633
676
|
readonly error: Schema.optional<Schema.Unknown>;
|
|
634
|
-
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]
|
|
677
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, never, never>;
|
|
635
678
|
readonly code: Schema.optional<Schema.Unknown>;
|
|
636
679
|
readonly message: Schema.optional<Schema.Unknown>;
|
|
637
680
|
readonly error: Schema.optional<Schema.Unknown>;
|
|
638
681
|
readonly status: Schema.optional<Schema.Unknown>;
|
|
639
682
|
readonly status_code: Schema.optional<Schema.Unknown>;
|
|
640
|
-
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]
|
|
683
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.decodeTo<Schema.StructWithRest<Schema.Struct<{
|
|
684
|
+
readonly type: Schema.String;
|
|
685
|
+
readonly delta: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
686
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
687
|
+
readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
688
|
+
readonly item_id: Schema.optional<Schema.String>;
|
|
689
|
+
readonly output_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
|
|
690
|
+
readonly summary_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
|
|
691
|
+
readonly item: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
692
|
+
readonly type: Schema.String;
|
|
693
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
694
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
695
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
696
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
697
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
698
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
699
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
700
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
701
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
702
|
+
readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
703
|
+
readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
704
|
+
readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
705
|
+
}>>>;
|
|
706
|
+
readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
707
|
+
readonly type: Schema.String;
|
|
708
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
709
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
710
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
711
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
712
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
713
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
714
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
715
|
+
readonly type: Schema.String;
|
|
716
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
717
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
718
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
719
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
720
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
721
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
722
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
|
|
723
|
+
readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
724
|
+
readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
725
|
+
readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
726
|
+
readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
727
|
+
readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
728
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
729
|
+
readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
730
|
+
readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
731
|
+
readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
732
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
733
|
+
readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
734
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
735
|
+
readonly error: Schema.optional<Schema.Unknown>;
|
|
736
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
737
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
738
|
+
readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
739
|
+
readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
740
|
+
readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
741
|
+
}>>>;
|
|
742
|
+
readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
743
|
+
readonly type: Schema.String;
|
|
744
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
745
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
746
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
747
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
748
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
749
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
750
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
751
|
+
readonly type: Schema.String;
|
|
752
|
+
readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
753
|
+
readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
754
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
755
|
+
readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
756
|
+
readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
|
|
757
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
758
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
|
|
759
|
+
readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
760
|
+
readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
761
|
+
readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
762
|
+
readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
763
|
+
readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
764
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
765
|
+
readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
766
|
+
readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
|
|
767
|
+
readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
768
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
769
|
+
readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
770
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
771
|
+
readonly error: Schema.optional<Schema.Unknown>;
|
|
772
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, never, never>;
|
|
773
|
+
readonly code: Schema.optional<Schema.Unknown>;
|
|
774
|
+
readonly message: Schema.optional<Schema.Unknown>;
|
|
775
|
+
readonly error: Schema.optional<Schema.Unknown>;
|
|
776
|
+
readonly status: Schema.optional<Schema.Unknown>;
|
|
777
|
+
readonly status_code: Schema.optional<Schema.Unknown>;
|
|
778
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.$Record<Schema.String, Schema.Unknown>, never, never>]>;
|
|
641
779
|
export type Event = Schema.Schema.Type<typeof Event>;
|
|
642
780
|
export type NormalizedEvent = Event & {
|
|
643
781
|
readonly item?: OutputItem | null;
|
|
644
782
|
};
|
|
645
|
-
/**
|
|
646
|
-
|
|
647
|
-
* `{ "error": ... }` envelope and no event type; that reads as an error event so it classifies instead of
|
|
648
|
-
* failing decoding.
|
|
649
|
-
*/
|
|
650
|
-
export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
|
|
783
|
+
/** Decodes one WebSocket frame. */
|
|
784
|
+
export declare const decodeChannelEvent: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
|
|
651
785
|
readonly [x: string]: unknown;
|
|
652
786
|
readonly type: string;
|
|
653
|
-
readonly
|
|
654
|
-
readonly
|
|
655
|
-
readonly code?: unknown;
|
|
787
|
+
readonly delta?: string | undefined;
|
|
788
|
+
readonly arguments?: string | undefined;
|
|
656
789
|
readonly text?: string | undefined;
|
|
657
|
-
readonly
|
|
790
|
+
readonly item_id?: string | undefined;
|
|
791
|
+
readonly output_index?: number | undefined;
|
|
792
|
+
readonly summary_index?: number | undefined;
|
|
793
|
+
readonly item?: {
|
|
794
|
+
readonly [x: string]: unknown;
|
|
795
|
+
readonly type: string;
|
|
796
|
+
readonly id?: string | undefined;
|
|
797
|
+
readonly call_id?: string | undefined;
|
|
798
|
+
readonly name?: string | undefined;
|
|
799
|
+
readonly namespace?: string | undefined;
|
|
800
|
+
readonly arguments?: string | undefined;
|
|
801
|
+
readonly encrypted_content?: string | null | undefined;
|
|
802
|
+
} | null | undefined;
|
|
658
803
|
readonly response?: {
|
|
659
804
|
readonly [x: string]: unknown;
|
|
660
805
|
readonly id?: string | undefined;
|
|
806
|
+
readonly service_tier?: string | null | undefined;
|
|
807
|
+
readonly incomplete_details?: {
|
|
808
|
+
readonly reason?: string | undefined;
|
|
809
|
+
} | null | undefined;
|
|
661
810
|
readonly output?: readonly {
|
|
662
811
|
readonly [x: string]: unknown;
|
|
663
812
|
readonly type: string;
|
|
664
813
|
readonly id?: string | undefined;
|
|
814
|
+
readonly call_id?: string | undefined;
|
|
665
815
|
readonly name?: string | undefined;
|
|
666
|
-
readonly namespace?: string |
|
|
816
|
+
readonly namespace?: string | undefined;
|
|
667
817
|
readonly arguments?: string | undefined;
|
|
668
|
-
readonly call_id?: string | undefined;
|
|
669
818
|
readonly encrypted_content?: string | null | undefined;
|
|
670
819
|
}[] | undefined;
|
|
671
|
-
readonly error?: unknown;
|
|
672
820
|
readonly usage?: {
|
|
673
821
|
readonly [x: string]: unknown;
|
|
674
822
|
readonly input_tokens?: number | undefined;
|
|
823
|
+
readonly input_tokens_details?: {
|
|
824
|
+
readonly [x: string]: unknown;
|
|
825
|
+
readonly cached_tokens?: number | undefined;
|
|
826
|
+
readonly cache_write_tokens?: number | undefined;
|
|
827
|
+
} | null | undefined;
|
|
675
828
|
readonly output_tokens?: number | undefined;
|
|
676
829
|
readonly output_tokens_details?: {
|
|
677
830
|
readonly [x: string]: unknown;
|
|
678
831
|
readonly reasoning_tokens?: number | undefined;
|
|
679
832
|
} | null | undefined;
|
|
680
833
|
readonly total_tokens?: number | undefined;
|
|
681
|
-
readonly input_tokens_details?: {
|
|
682
|
-
readonly [x: string]: unknown;
|
|
683
|
-
readonly cached_tokens?: number | undefined;
|
|
684
|
-
readonly cache_write_tokens?: number | undefined;
|
|
685
|
-
} | null | undefined;
|
|
686
|
-
} | null | undefined;
|
|
687
|
-
readonly service_tier?: string | null | undefined;
|
|
688
|
-
readonly incomplete_details?: {
|
|
689
|
-
readonly reason?: string | undefined;
|
|
690
834
|
} | null | undefined;
|
|
835
|
+
readonly error?: unknown;
|
|
691
836
|
} | undefined;
|
|
692
|
-
readonly
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
readonly name?: string | undefined;
|
|
697
|
-
readonly namespace?: string | null | undefined;
|
|
698
|
-
readonly arguments?: string | undefined;
|
|
699
|
-
readonly call_id?: string | undefined;
|
|
700
|
-
readonly encrypted_content?: string | null | undefined;
|
|
701
|
-
} | null | undefined;
|
|
702
|
-
readonly delta?: string | undefined;
|
|
703
|
-
readonly arguments?: string | undefined;
|
|
704
|
-
readonly item_id?: string | undefined;
|
|
705
|
-
readonly output_index?: number | undefined;
|
|
706
|
-
readonly summary_index?: number | undefined;
|
|
837
|
+
readonly code?: unknown;
|
|
838
|
+
readonly message?: unknown;
|
|
839
|
+
readonly error?: unknown;
|
|
840
|
+
readonly status?: unknown;
|
|
707
841
|
readonly status_code?: unknown;
|
|
708
842
|
}, Schema.SchemaError, never>;
|
|
709
843
|
export interface ProviderAdapter {
|
|
@@ -753,34 +887,33 @@ export declare const lowerTools: (tools: ReadonlyArray<ToolDefinition>, adapter:
|
|
|
753
887
|
readonly type: string;
|
|
754
888
|
} | {
|
|
755
889
|
readonly type: "function";
|
|
756
|
-
readonly description: string;
|
|
757
890
|
readonly name: string;
|
|
891
|
+
readonly description: string;
|
|
758
892
|
readonly parameters: {
|
|
759
893
|
readonly [x: string]: unknown;
|
|
760
894
|
};
|
|
761
895
|
readonly strict?: boolean | undefined;
|
|
762
896
|
})[], AIError, never>;
|
|
763
|
-
export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"
|
|
897
|
+
export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"auto" | "none" | "required" | {
|
|
764
898
|
type: "function";
|
|
765
899
|
name: string;
|
|
766
900
|
}, AIError, never>;
|
|
767
901
|
export declare const lowerConversation: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
|
|
768
902
|
readonly [x: string]: unknown;
|
|
769
903
|
}, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
|
|
770
|
-
instructions?: string | undefined;
|
|
771
904
|
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
772
905
|
input: ({
|
|
773
906
|
readonly [x: string]: unknown;
|
|
774
|
-
readonly id: string;
|
|
775
907
|
readonly type: "web_search_call";
|
|
908
|
+
readonly id: string;
|
|
776
909
|
readonly status?: string | undefined;
|
|
777
910
|
readonly action?: {
|
|
778
911
|
readonly [x: string]: unknown;
|
|
779
912
|
} | null | undefined;
|
|
780
913
|
} | {
|
|
781
914
|
readonly [x: string]: unknown;
|
|
782
|
-
readonly id: string;
|
|
783
915
|
readonly type: "file_search_call";
|
|
916
|
+
readonly id: string;
|
|
784
917
|
readonly status?: string | undefined;
|
|
785
918
|
readonly queries?: readonly string[] | undefined;
|
|
786
919
|
readonly results?: readonly {
|
|
@@ -788,8 +921,8 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
|
|
|
788
921
|
}[] | null | undefined;
|
|
789
922
|
} | {
|
|
790
923
|
readonly [x: string]: unknown;
|
|
791
|
-
readonly id: string;
|
|
792
924
|
readonly type: "code_interpreter_call";
|
|
925
|
+
readonly id: string;
|
|
793
926
|
readonly status?: string | undefined;
|
|
794
927
|
readonly code?: string | null | undefined;
|
|
795
928
|
readonly container_id?: string | null | undefined;
|
|
@@ -798,14 +931,14 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
|
|
|
798
931
|
}[] | null | undefined;
|
|
799
932
|
} | {
|
|
800
933
|
readonly [x: string]: unknown;
|
|
801
|
-
readonly id: string;
|
|
802
934
|
readonly type: "mcp_call";
|
|
935
|
+
readonly id: string;
|
|
803
936
|
readonly status?: string | undefined;
|
|
937
|
+
readonly server_label?: string | undefined;
|
|
804
938
|
readonly name?: string | undefined;
|
|
939
|
+
readonly arguments?: string | undefined;
|
|
805
940
|
readonly output?: string | null | undefined;
|
|
806
941
|
readonly error?: unknown;
|
|
807
|
-
readonly arguments?: string | undefined;
|
|
808
|
-
readonly server_label?: string | undefined;
|
|
809
942
|
} | {
|
|
810
943
|
readonly type: "configuration_update";
|
|
811
944
|
readonly reasoning: {
|
|
@@ -815,18 +948,10 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
|
|
|
815
948
|
readonly [x: string]: unknown;
|
|
816
949
|
readonly type: string;
|
|
817
950
|
readonly id: string;
|
|
818
|
-
} | {
|
|
819
|
-
readonly type: "reasoning";
|
|
820
|
-
readonly summary: readonly {
|
|
821
|
-
readonly type: "summary_text";
|
|
822
|
-
readonly text: string;
|
|
823
|
-
}[];
|
|
824
|
-
readonly id?: string | undefined;
|
|
825
|
-
readonly encrypted_content?: string | null | undefined;
|
|
826
951
|
} | {
|
|
827
952
|
readonly type: "compaction";
|
|
828
|
-
readonly encrypted_content: string;
|
|
829
953
|
readonly id?: string | null | undefined;
|
|
954
|
+
readonly encrypted_content: string;
|
|
830
955
|
} | {
|
|
831
956
|
readonly type: "message";
|
|
832
957
|
readonly role: "system";
|
|
@@ -837,6 +962,7 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
|
|
|
837
962
|
readonly content: string;
|
|
838
963
|
} | {
|
|
839
964
|
readonly type: "message";
|
|
965
|
+
readonly role: "user";
|
|
840
966
|
readonly content: readonly ({
|
|
841
967
|
readonly type: "input_image";
|
|
842
968
|
readonly image_url: string;
|
|
@@ -851,26 +977,33 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
|
|
|
851
977
|
readonly type: "input_text";
|
|
852
978
|
readonly text: string;
|
|
853
979
|
})[];
|
|
854
|
-
readonly role: "user";
|
|
855
980
|
readonly id?: string | undefined;
|
|
856
981
|
readonly status?: string | undefined;
|
|
857
982
|
} | {
|
|
858
983
|
readonly type: "message";
|
|
984
|
+
readonly id?: string | undefined;
|
|
985
|
+
readonly role: "assistant";
|
|
859
986
|
readonly content: readonly {
|
|
860
987
|
readonly type: "output_text";
|
|
861
988
|
readonly text: string;
|
|
862
989
|
}[];
|
|
863
|
-
readonly role: "assistant";
|
|
864
|
-
readonly id?: string | undefined;
|
|
865
|
-
readonly status?: string | undefined;
|
|
866
990
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
991
|
+
readonly status?: string | undefined;
|
|
992
|
+
} | {
|
|
993
|
+
readonly type: "reasoning";
|
|
994
|
+
readonly id?: string | undefined;
|
|
995
|
+
readonly summary: readonly {
|
|
996
|
+
readonly type: "summary_text";
|
|
997
|
+
readonly text: string;
|
|
998
|
+
}[];
|
|
999
|
+
readonly encrypted_content?: string | null | undefined;
|
|
867
1000
|
} | {
|
|
868
1001
|
readonly type: "function_call";
|
|
869
|
-
readonly name: string;
|
|
870
|
-
readonly arguments: string;
|
|
871
|
-
readonly call_id: string;
|
|
872
1002
|
readonly id?: string | undefined;
|
|
1003
|
+
readonly call_id: string;
|
|
1004
|
+
readonly name: string;
|
|
873
1005
|
readonly namespace?: string | undefined;
|
|
1006
|
+
readonly arguments: string;
|
|
874
1007
|
} | {
|
|
875
1008
|
readonly type: "function_call_output";
|
|
876
1009
|
readonly call_id: string;
|
|
@@ -892,41 +1025,42 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
|
|
|
892
1025
|
readonly video_url: string;
|
|
893
1026
|
})[];
|
|
894
1027
|
})[];
|
|
1028
|
+
instructions?: string | undefined;
|
|
895
1029
|
}, AIError, never>;
|
|
896
1030
|
export declare const lowerGeneration: (request: LLMRequest, options?: OpenResponsesOptions.Resolved) => {
|
|
897
|
-
truncation?: "auto" | "disabled" | undefined;
|
|
898
|
-
parallel_tool_calls?: boolean | undefined;
|
|
899
|
-
max_tool_calls?: number | undefined;
|
|
900
|
-
service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
901
|
-
text?: {
|
|
902
|
-
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
903
|
-
} | undefined;
|
|
904
|
-
reasoning?: {
|
|
905
|
-
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
906
|
-
summary: "auto" | "concise" | "detailed" | undefined;
|
|
907
|
-
} | undefined;
|
|
908
|
-
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
909
|
-
prompt_cache_key?: string | undefined;
|
|
910
|
-
top_logprobs?: number | undefined;
|
|
911
|
-
stream_options?: {
|
|
912
|
-
include_obfuscation: boolean;
|
|
913
|
-
} | undefined;
|
|
914
|
-
safety_identifier?: string | undefined;
|
|
915
|
-
metadata?: {
|
|
916
|
-
readonly [x: string]: string;
|
|
917
|
-
} | undefined;
|
|
918
|
-
store?: boolean | undefined;
|
|
919
1031
|
stream: true;
|
|
920
1032
|
max_output_tokens: number | undefined;
|
|
921
1033
|
temperature: number | undefined;
|
|
922
1034
|
top_p: number | undefined;
|
|
923
1035
|
presence_penalty: number | undefined;
|
|
924
1036
|
frequency_penalty: number | undefined;
|
|
1037
|
+
store?: boolean | undefined;
|
|
1038
|
+
metadata?: {
|
|
1039
|
+
readonly [x: string]: string;
|
|
1040
|
+
} | undefined;
|
|
1041
|
+
safety_identifier?: string | undefined;
|
|
1042
|
+
stream_options?: {
|
|
1043
|
+
include_obfuscation: boolean;
|
|
1044
|
+
} | undefined;
|
|
1045
|
+
top_logprobs?: number | undefined;
|
|
1046
|
+
prompt_cache_key?: string | undefined;
|
|
1047
|
+
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
1048
|
+
reasoning?: {
|
|
1049
|
+
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1050
|
+
summary: "auto" | "concise" | "detailed" | undefined;
|
|
1051
|
+
} | undefined;
|
|
1052
|
+
text?: {
|
|
1053
|
+
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
1054
|
+
} | undefined;
|
|
1055
|
+
service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1056
|
+
max_tool_calls?: number | undefined;
|
|
1057
|
+
parallel_tool_calls?: boolean | undefined;
|
|
1058
|
+
truncation?: "auto" | "disabled" | undefined;
|
|
925
1059
|
};
|
|
926
1060
|
export declare const resolveParallelToolCalls: (request: LLMRequest) => boolean | undefined;
|
|
927
1061
|
export declare const allowedToolChoice: (request: LLMRequest) => {
|
|
928
1062
|
type: "allowed_tools";
|
|
929
|
-
mode: "
|
|
1063
|
+
mode: "auto" | "none" | "required";
|
|
930
1064
|
tools: {
|
|
931
1065
|
type: "function";
|
|
932
1066
|
name: string;
|
|
@@ -935,80 +1069,28 @@ export declare const allowedToolChoice: (request: LLMRequest) => {
|
|
|
935
1069
|
export declare const fromRequestWithAdapter: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
|
|
936
1070
|
readonly [x: string]: unknown;
|
|
937
1071
|
}, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
|
|
938
|
-
|
|
1072
|
+
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
1073
|
+
input: ({
|
|
939
1074
|
readonly [x: string]: unknown;
|
|
940
|
-
readonly type:
|
|
1075
|
+
readonly type: "web_search_call";
|
|
1076
|
+
readonly id: string;
|
|
1077
|
+
readonly status?: string | undefined;
|
|
1078
|
+
readonly action?: {
|
|
1079
|
+
readonly [x: string]: unknown;
|
|
1080
|
+
} | null | undefined;
|
|
941
1081
|
} | {
|
|
942
|
-
readonly
|
|
943
|
-
readonly
|
|
944
|
-
readonly
|
|
945
|
-
readonly
|
|
1082
|
+
readonly [x: string]: unknown;
|
|
1083
|
+
readonly type: "file_search_call";
|
|
1084
|
+
readonly id: string;
|
|
1085
|
+
readonly status?: string | undefined;
|
|
1086
|
+
readonly queries?: readonly string[] | undefined;
|
|
1087
|
+
readonly results?: readonly {
|
|
946
1088
|
readonly [x: string]: unknown;
|
|
947
|
-
};
|
|
948
|
-
readonly strict?: boolean | undefined;
|
|
949
|
-
})[] | undefined;
|
|
950
|
-
tool_choice: "required" | "auto" | "none" | {
|
|
951
|
-
type: "allowed_tools";
|
|
952
|
-
mode: "required" | "auto" | "none";
|
|
953
|
-
tools: {
|
|
954
|
-
type: "function";
|
|
955
|
-
name: string;
|
|
956
|
-
}[];
|
|
957
|
-
} | {
|
|
958
|
-
type: "function";
|
|
959
|
-
name: string;
|
|
960
|
-
} | undefined;
|
|
961
|
-
truncation?: "auto" | "disabled" | undefined;
|
|
962
|
-
parallel_tool_calls?: boolean | undefined;
|
|
963
|
-
max_tool_calls?: number | undefined;
|
|
964
|
-
service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
965
|
-
text?: {
|
|
966
|
-
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
967
|
-
} | undefined;
|
|
968
|
-
reasoning?: {
|
|
969
|
-
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
970
|
-
summary: "auto" | "concise" | "detailed" | undefined;
|
|
971
|
-
} | undefined;
|
|
972
|
-
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
973
|
-
prompt_cache_key?: string | undefined;
|
|
974
|
-
top_logprobs?: number | undefined;
|
|
975
|
-
stream_options?: {
|
|
976
|
-
include_obfuscation: boolean;
|
|
977
|
-
} | undefined;
|
|
978
|
-
safety_identifier?: string | undefined;
|
|
979
|
-
metadata?: {
|
|
980
|
-
readonly [x: string]: string;
|
|
981
|
-
} | undefined;
|
|
982
|
-
store?: boolean | undefined;
|
|
983
|
-
stream: true;
|
|
984
|
-
max_output_tokens: number | undefined;
|
|
985
|
-
temperature: number | undefined;
|
|
986
|
-
top_p: number | undefined;
|
|
987
|
-
presence_penalty: number | undefined;
|
|
988
|
-
frequency_penalty: number | undefined;
|
|
989
|
-
instructions?: string | undefined;
|
|
990
|
-
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
991
|
-
input: ({
|
|
992
|
-
readonly [x: string]: unknown;
|
|
993
|
-
readonly id: string;
|
|
994
|
-
readonly type: "web_search_call";
|
|
995
|
-
readonly status?: string | undefined;
|
|
996
|
-
readonly action?: {
|
|
997
|
-
readonly [x: string]: unknown;
|
|
998
|
-
} | null | undefined;
|
|
999
|
-
} | {
|
|
1000
|
-
readonly [x: string]: unknown;
|
|
1001
|
-
readonly id: string;
|
|
1002
|
-
readonly type: "file_search_call";
|
|
1003
|
-
readonly status?: string | undefined;
|
|
1004
|
-
readonly queries?: readonly string[] | undefined;
|
|
1005
|
-
readonly results?: readonly {
|
|
1006
|
-
readonly [x: string]: unknown;
|
|
1007
|
-
}[] | null | undefined;
|
|
1089
|
+
}[] | null | undefined;
|
|
1008
1090
|
} | {
|
|
1009
1091
|
readonly [x: string]: unknown;
|
|
1010
|
-
readonly id: string;
|
|
1011
1092
|
readonly type: "code_interpreter_call";
|
|
1093
|
+
readonly id: string;
|
|
1012
1094
|
readonly status?: string | undefined;
|
|
1013
1095
|
readonly code?: string | null | undefined;
|
|
1014
1096
|
readonly container_id?: string | null | undefined;
|
|
@@ -1017,14 +1099,14 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
|
|
|
1017
1099
|
}[] | null | undefined;
|
|
1018
1100
|
} | {
|
|
1019
1101
|
readonly [x: string]: unknown;
|
|
1020
|
-
readonly id: string;
|
|
1021
1102
|
readonly type: "mcp_call";
|
|
1103
|
+
readonly id: string;
|
|
1022
1104
|
readonly status?: string | undefined;
|
|
1105
|
+
readonly server_label?: string | undefined;
|
|
1023
1106
|
readonly name?: string | undefined;
|
|
1107
|
+
readonly arguments?: string | undefined;
|
|
1024
1108
|
readonly output?: string | null | undefined;
|
|
1025
1109
|
readonly error?: unknown;
|
|
1026
|
-
readonly arguments?: string | undefined;
|
|
1027
|
-
readonly server_label?: string | undefined;
|
|
1028
1110
|
} | {
|
|
1029
1111
|
readonly type: "configuration_update";
|
|
1030
1112
|
readonly reasoning: {
|
|
@@ -1034,18 +1116,10 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
|
|
|
1034
1116
|
readonly [x: string]: unknown;
|
|
1035
1117
|
readonly type: string;
|
|
1036
1118
|
readonly id: string;
|
|
1037
|
-
} | {
|
|
1038
|
-
readonly type: "reasoning";
|
|
1039
|
-
readonly summary: readonly {
|
|
1040
|
-
readonly type: "summary_text";
|
|
1041
|
-
readonly text: string;
|
|
1042
|
-
}[];
|
|
1043
|
-
readonly id?: string | undefined;
|
|
1044
|
-
readonly encrypted_content?: string | null | undefined;
|
|
1045
1119
|
} | {
|
|
1046
1120
|
readonly type: "compaction";
|
|
1047
|
-
readonly encrypted_content: string;
|
|
1048
1121
|
readonly id?: string | null | undefined;
|
|
1122
|
+
readonly encrypted_content: string;
|
|
1049
1123
|
} | {
|
|
1050
1124
|
readonly type: "message";
|
|
1051
1125
|
readonly role: "system";
|
|
@@ -1056,6 +1130,7 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
|
|
|
1056
1130
|
readonly content: string;
|
|
1057
1131
|
} | {
|
|
1058
1132
|
readonly type: "message";
|
|
1133
|
+
readonly role: "user";
|
|
1059
1134
|
readonly content: readonly ({
|
|
1060
1135
|
readonly type: "input_image";
|
|
1061
1136
|
readonly image_url: string;
|
|
@@ -1070,26 +1145,33 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
|
|
|
1070
1145
|
readonly type: "input_text";
|
|
1071
1146
|
readonly text: string;
|
|
1072
1147
|
})[];
|
|
1073
|
-
readonly role: "user";
|
|
1074
1148
|
readonly id?: string | undefined;
|
|
1075
1149
|
readonly status?: string | undefined;
|
|
1076
1150
|
} | {
|
|
1077
1151
|
readonly type: "message";
|
|
1152
|
+
readonly id?: string | undefined;
|
|
1153
|
+
readonly role: "assistant";
|
|
1078
1154
|
readonly content: readonly {
|
|
1079
1155
|
readonly type: "output_text";
|
|
1080
1156
|
readonly text: string;
|
|
1081
1157
|
}[];
|
|
1082
|
-
readonly role: "assistant";
|
|
1083
|
-
readonly id?: string | undefined;
|
|
1084
|
-
readonly status?: string | undefined;
|
|
1085
1158
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1159
|
+
readonly status?: string | undefined;
|
|
1160
|
+
} | {
|
|
1161
|
+
readonly type: "reasoning";
|
|
1162
|
+
readonly id?: string | undefined;
|
|
1163
|
+
readonly summary: readonly {
|
|
1164
|
+
readonly type: "summary_text";
|
|
1165
|
+
readonly text: string;
|
|
1166
|
+
}[];
|
|
1167
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1086
1168
|
} | {
|
|
1087
1169
|
readonly type: "function_call";
|
|
1088
|
-
readonly name: string;
|
|
1089
|
-
readonly arguments: string;
|
|
1090
|
-
readonly call_id: string;
|
|
1091
1170
|
readonly id?: string | undefined;
|
|
1171
|
+
readonly call_id: string;
|
|
1172
|
+
readonly name: string;
|
|
1092
1173
|
readonly namespace?: string | undefined;
|
|
1174
|
+
readonly arguments: string;
|
|
1093
1175
|
} | {
|
|
1094
1176
|
readonly type: "function_call_output";
|
|
1095
1177
|
readonly call_id: string;
|
|
@@ -1111,73 +1193,73 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
|
|
|
1111
1193
|
readonly video_url: string;
|
|
1112
1194
|
})[];
|
|
1113
1195
|
})[];
|
|
1114
|
-
|
|
1115
|
-
|
|
1196
|
+
instructions?: string | undefined;
|
|
1197
|
+
stream: true;
|
|
1198
|
+
max_output_tokens: number | undefined;
|
|
1199
|
+
temperature: number | undefined;
|
|
1200
|
+
top_p: number | undefined;
|
|
1201
|
+
presence_penalty: number | undefined;
|
|
1202
|
+
frequency_penalty: number | undefined;
|
|
1203
|
+
store?: boolean | undefined;
|
|
1204
|
+
metadata?: {
|
|
1205
|
+
readonly [x: string]: string;
|
|
1206
|
+
} | undefined;
|
|
1207
|
+
safety_identifier?: string | undefined;
|
|
1208
|
+
stream_options?: {
|
|
1209
|
+
include_obfuscation: boolean;
|
|
1210
|
+
} | undefined;
|
|
1211
|
+
top_logprobs?: number | undefined;
|
|
1212
|
+
prompt_cache_key?: string | undefined;
|
|
1213
|
+
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
1214
|
+
reasoning?: {
|
|
1215
|
+
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1216
|
+
summary: "auto" | "concise" | "detailed" | undefined;
|
|
1217
|
+
} | undefined;
|
|
1218
|
+
text?: {
|
|
1219
|
+
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
1220
|
+
} | undefined;
|
|
1221
|
+
service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1222
|
+
max_tool_calls?: number | undefined;
|
|
1223
|
+
parallel_tool_calls?: boolean | undefined;
|
|
1224
|
+
truncation?: "auto" | "disabled" | undefined;
|
|
1116
1225
|
tools: ({
|
|
1117
1226
|
readonly [x: string]: unknown;
|
|
1118
1227
|
readonly type: string;
|
|
1119
1228
|
} | {
|
|
1120
1229
|
readonly type: "function";
|
|
1121
|
-
readonly description: string;
|
|
1122
1230
|
readonly name: string;
|
|
1231
|
+
readonly description: string;
|
|
1123
1232
|
readonly parameters: {
|
|
1124
1233
|
readonly [x: string]: unknown;
|
|
1125
1234
|
};
|
|
1126
1235
|
readonly strict?: boolean | undefined;
|
|
1127
1236
|
})[] | undefined;
|
|
1128
|
-
tool_choice: "
|
|
1237
|
+
tool_choice: "auto" | "none" | "required" | {
|
|
1238
|
+
type: "function";
|
|
1239
|
+
name: string;
|
|
1240
|
+
} | {
|
|
1129
1241
|
type: "allowed_tools";
|
|
1130
|
-
mode: "
|
|
1242
|
+
mode: "auto" | "none" | "required";
|
|
1131
1243
|
tools: {
|
|
1132
1244
|
type: "function";
|
|
1133
1245
|
name: string;
|
|
1134
1246
|
}[];
|
|
1135
|
-
} | {
|
|
1136
|
-
type: "function";
|
|
1137
|
-
name: string;
|
|
1138
1247
|
} | undefined;
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
max_tool_calls?: number | undefined;
|
|
1142
|
-
service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1143
|
-
text?: {
|
|
1144
|
-
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
1145
|
-
} | undefined;
|
|
1146
|
-
reasoning?: {
|
|
1147
|
-
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1148
|
-
summary: "auto" | "concise" | "detailed" | undefined;
|
|
1149
|
-
} | undefined;
|
|
1150
|
-
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
1151
|
-
prompt_cache_key?: string | undefined;
|
|
1152
|
-
top_logprobs?: number | undefined;
|
|
1153
|
-
stream_options?: {
|
|
1154
|
-
include_obfuscation: boolean;
|
|
1155
|
-
} | undefined;
|
|
1156
|
-
safety_identifier?: string | undefined;
|
|
1157
|
-
metadata?: {
|
|
1158
|
-
readonly [x: string]: string;
|
|
1159
|
-
} | undefined;
|
|
1160
|
-
store?: boolean | undefined;
|
|
1161
|
-
stream: true;
|
|
1162
|
-
max_output_tokens: number | undefined;
|
|
1163
|
-
temperature: number | undefined;
|
|
1164
|
-
top_p: number | undefined;
|
|
1165
|
-
presence_penalty: number | undefined;
|
|
1166
|
-
frequency_penalty: number | undefined;
|
|
1167
|
-
instructions?: string | undefined;
|
|
1248
|
+
}, AIError, never>;
|
|
1249
|
+
export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
1168
1250
|
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
1169
1251
|
input: ({
|
|
1170
1252
|
readonly [x: string]: unknown;
|
|
1171
|
-
readonly id: string;
|
|
1172
1253
|
readonly type: "web_search_call";
|
|
1254
|
+
readonly id: string;
|
|
1173
1255
|
readonly status?: string | undefined;
|
|
1174
1256
|
readonly action?: {
|
|
1175
1257
|
readonly [x: string]: unknown;
|
|
1176
1258
|
} | null | undefined;
|
|
1177
1259
|
} | {
|
|
1178
1260
|
readonly [x: string]: unknown;
|
|
1179
|
-
readonly id: string;
|
|
1180
1261
|
readonly type: "file_search_call";
|
|
1262
|
+
readonly id: string;
|
|
1181
1263
|
readonly status?: string | undefined;
|
|
1182
1264
|
readonly queries?: readonly string[] | undefined;
|
|
1183
1265
|
readonly results?: readonly {
|
|
@@ -1185,8 +1267,8 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
1185
1267
|
}[] | null | undefined;
|
|
1186
1268
|
} | {
|
|
1187
1269
|
readonly [x: string]: unknown;
|
|
1188
|
-
readonly id: string;
|
|
1189
1270
|
readonly type: "code_interpreter_call";
|
|
1271
|
+
readonly id: string;
|
|
1190
1272
|
readonly status?: string | undefined;
|
|
1191
1273
|
readonly code?: string | null | undefined;
|
|
1192
1274
|
readonly container_id?: string | null | undefined;
|
|
@@ -1195,14 +1277,14 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
1195
1277
|
}[] | null | undefined;
|
|
1196
1278
|
} | {
|
|
1197
1279
|
readonly [x: string]: unknown;
|
|
1198
|
-
readonly id: string;
|
|
1199
1280
|
readonly type: "mcp_call";
|
|
1281
|
+
readonly id: string;
|
|
1200
1282
|
readonly status?: string | undefined;
|
|
1283
|
+
readonly server_label?: string | undefined;
|
|
1201
1284
|
readonly name?: string | undefined;
|
|
1285
|
+
readonly arguments?: string | undefined;
|
|
1202
1286
|
readonly output?: string | null | undefined;
|
|
1203
1287
|
readonly error?: unknown;
|
|
1204
|
-
readonly arguments?: string | undefined;
|
|
1205
|
-
readonly server_label?: string | undefined;
|
|
1206
1288
|
} | {
|
|
1207
1289
|
readonly type: "configuration_update";
|
|
1208
1290
|
readonly reasoning: {
|
|
@@ -1212,18 +1294,10 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
1212
1294
|
readonly [x: string]: unknown;
|
|
1213
1295
|
readonly type: string;
|
|
1214
1296
|
readonly id: string;
|
|
1215
|
-
} | {
|
|
1216
|
-
readonly type: "reasoning";
|
|
1217
|
-
readonly summary: readonly {
|
|
1218
|
-
readonly type: "summary_text";
|
|
1219
|
-
readonly text: string;
|
|
1220
|
-
}[];
|
|
1221
|
-
readonly id?: string | undefined;
|
|
1222
|
-
readonly encrypted_content?: string | null | undefined;
|
|
1223
1297
|
} | {
|
|
1224
1298
|
readonly type: "compaction";
|
|
1225
|
-
readonly encrypted_content: string;
|
|
1226
1299
|
readonly id?: string | null | undefined;
|
|
1300
|
+
readonly encrypted_content: string;
|
|
1227
1301
|
} | {
|
|
1228
1302
|
readonly type: "message";
|
|
1229
1303
|
readonly role: "system";
|
|
@@ -1234,6 +1308,7 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
1234
1308
|
readonly content: string;
|
|
1235
1309
|
} | {
|
|
1236
1310
|
readonly type: "message";
|
|
1311
|
+
readonly role: "user";
|
|
1237
1312
|
readonly content: readonly ({
|
|
1238
1313
|
readonly type: "input_image";
|
|
1239
1314
|
readonly image_url: string;
|
|
@@ -1248,26 +1323,33 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
1248
1323
|
readonly type: "input_text";
|
|
1249
1324
|
readonly text: string;
|
|
1250
1325
|
})[];
|
|
1251
|
-
readonly role: "user";
|
|
1252
1326
|
readonly id?: string | undefined;
|
|
1253
1327
|
readonly status?: string | undefined;
|
|
1254
1328
|
} | {
|
|
1255
1329
|
readonly type: "message";
|
|
1330
|
+
readonly id?: string | undefined;
|
|
1331
|
+
readonly role: "assistant";
|
|
1256
1332
|
readonly content: readonly {
|
|
1257
1333
|
readonly type: "output_text";
|
|
1258
1334
|
readonly text: string;
|
|
1259
1335
|
}[];
|
|
1260
|
-
readonly role: "assistant";
|
|
1261
|
-
readonly id?: string | undefined;
|
|
1262
|
-
readonly status?: string | undefined;
|
|
1263
1336
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1337
|
+
readonly status?: string | undefined;
|
|
1338
|
+
} | {
|
|
1339
|
+
readonly type: "reasoning";
|
|
1340
|
+
readonly id?: string | undefined;
|
|
1341
|
+
readonly summary: readonly {
|
|
1342
|
+
readonly type: "summary_text";
|
|
1343
|
+
readonly text: string;
|
|
1344
|
+
}[];
|
|
1345
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1264
1346
|
} | {
|
|
1265
1347
|
readonly type: "function_call";
|
|
1266
|
-
readonly name: string;
|
|
1267
|
-
readonly arguments: string;
|
|
1268
|
-
readonly call_id: string;
|
|
1269
1348
|
readonly id?: string | undefined;
|
|
1349
|
+
readonly call_id: string;
|
|
1350
|
+
readonly name: string;
|
|
1270
1351
|
readonly namespace?: string | undefined;
|
|
1352
|
+
readonly arguments: string;
|
|
1271
1353
|
} | {
|
|
1272
1354
|
readonly type: "function_call_output";
|
|
1273
1355
|
readonly call_id: string;
|
|
@@ -1289,6 +1371,58 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
1289
1371
|
readonly video_url: string;
|
|
1290
1372
|
})[];
|
|
1291
1373
|
})[];
|
|
1374
|
+
instructions?: string | undefined;
|
|
1375
|
+
stream: true;
|
|
1376
|
+
max_output_tokens: number | undefined;
|
|
1377
|
+
temperature: number | undefined;
|
|
1378
|
+
top_p: number | undefined;
|
|
1379
|
+
presence_penalty: number | undefined;
|
|
1380
|
+
frequency_penalty: number | undefined;
|
|
1381
|
+
store?: boolean | undefined;
|
|
1382
|
+
metadata?: {
|
|
1383
|
+
readonly [x: string]: string;
|
|
1384
|
+
} | undefined;
|
|
1385
|
+
safety_identifier?: string | undefined;
|
|
1386
|
+
stream_options?: {
|
|
1387
|
+
include_obfuscation: boolean;
|
|
1388
|
+
} | undefined;
|
|
1389
|
+
top_logprobs?: number | undefined;
|
|
1390
|
+
prompt_cache_key?: string | undefined;
|
|
1391
|
+
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
1392
|
+
reasoning?: {
|
|
1393
|
+
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1394
|
+
summary: "auto" | "concise" | "detailed" | undefined;
|
|
1395
|
+
} | undefined;
|
|
1396
|
+
text?: {
|
|
1397
|
+
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
1398
|
+
} | undefined;
|
|
1399
|
+
service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1400
|
+
max_tool_calls?: number | undefined;
|
|
1401
|
+
parallel_tool_calls?: boolean | undefined;
|
|
1402
|
+
truncation?: "auto" | "disabled" | undefined;
|
|
1403
|
+
tools: ({
|
|
1404
|
+
readonly [x: string]: unknown;
|
|
1405
|
+
readonly type: string;
|
|
1406
|
+
} | {
|
|
1407
|
+
readonly type: "function";
|
|
1408
|
+
readonly name: string;
|
|
1409
|
+
readonly description: string;
|
|
1410
|
+
readonly parameters: {
|
|
1411
|
+
readonly [x: string]: unknown;
|
|
1412
|
+
};
|
|
1413
|
+
readonly strict?: boolean | undefined;
|
|
1414
|
+
})[] | undefined;
|
|
1415
|
+
tool_choice: "auto" | "none" | "required" | {
|
|
1416
|
+
type: "function";
|
|
1417
|
+
name: string;
|
|
1418
|
+
} | {
|
|
1419
|
+
type: "allowed_tools";
|
|
1420
|
+
mode: "auto" | "none" | "required";
|
|
1421
|
+
tools: {
|
|
1422
|
+
type: "function";
|
|
1423
|
+
name: string;
|
|
1424
|
+
}[];
|
|
1425
|
+
} | undefined;
|
|
1292
1426
|
}, AIError, never>;
|
|
1293
1427
|
export declare const mapUsage: (usage: OpenResponsesUsage | null | undefined, providerMetadataKey: string) => Usage | undefined;
|
|
1294
1428
|
export declare const metadataKey: (model: LLMRequest["model"]) => string;
|
|
@@ -1304,32 +1438,20 @@ export declare const errorDetail: (event: Event) => {
|
|
|
1304
1438
|
code: string | undefined;
|
|
1305
1439
|
};
|
|
1306
1440
|
export declare const providerFailure: (event: Event, fallback: string, body?: string) => AIError;
|
|
1307
|
-
export declare const step: (state: ParserState, event: NormalizedEvent) => AIError | Effect.Effect<[ParserState, readonly (
|
|
1308
|
-
readonly type: "compaction";
|
|
1309
|
-
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1310
|
-
readonly id?: string | undefined;
|
|
1311
|
-
readonly text?: string | null | undefined;
|
|
1312
|
-
readonly encrypted?: string | undefined;
|
|
1313
|
-
} & ({
|
|
1314
|
-
readonly encrypted: string;
|
|
1315
|
-
readonly text?: never;
|
|
1316
|
-
} | {
|
|
1317
|
-
readonly text: string | null;
|
|
1318
|
-
readonly encrypted?: never;
|
|
1319
|
-
})) | {
|
|
1441
|
+
export declare const step: (state: ParserState, event: NormalizedEvent) => AIError | Effect.Effect<StepResult, never, never> | Effect.Effect<[ParserState, readonly ({
|
|
1320
1442
|
readonly type: "step-start";
|
|
1321
1443
|
readonly index: number;
|
|
1322
1444
|
} | {
|
|
1323
|
-
readonly id: string;
|
|
1324
1445
|
readonly type: "text-start";
|
|
1446
|
+
readonly id: string;
|
|
1325
1447
|
readonly providerMetadata?: {
|
|
1326
1448
|
readonly [x: string]: {
|
|
1327
1449
|
readonly [x: string]: unknown;
|
|
1328
1450
|
};
|
|
1329
1451
|
} | undefined;
|
|
1330
1452
|
} | {
|
|
1331
|
-
readonly id: string;
|
|
1332
1453
|
readonly type: "text-delta";
|
|
1454
|
+
readonly id: string;
|
|
1333
1455
|
readonly text: string;
|
|
1334
1456
|
readonly providerMetadata?: {
|
|
1335
1457
|
readonly [x: string]: {
|
|
@@ -1337,8 +1459,8 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1337
1459
|
};
|
|
1338
1460
|
} | undefined;
|
|
1339
1461
|
} | {
|
|
1340
|
-
readonly id: string;
|
|
1341
1462
|
readonly type: "text-end";
|
|
1463
|
+
readonly id: string;
|
|
1342
1464
|
readonly text?: string | undefined;
|
|
1343
1465
|
readonly providerMetadata?: {
|
|
1344
1466
|
readonly [x: string]: {
|
|
@@ -1346,16 +1468,16 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1346
1468
|
};
|
|
1347
1469
|
} | undefined;
|
|
1348
1470
|
} | {
|
|
1349
|
-
readonly id: string;
|
|
1350
1471
|
readonly type: "reasoning-start";
|
|
1472
|
+
readonly id: string;
|
|
1351
1473
|
readonly providerMetadata?: {
|
|
1352
1474
|
readonly [x: string]: {
|
|
1353
1475
|
readonly [x: string]: unknown;
|
|
1354
1476
|
};
|
|
1355
1477
|
} | undefined;
|
|
1356
1478
|
} | {
|
|
1357
|
-
readonly id: string;
|
|
1358
1479
|
readonly type: "reasoning-delta";
|
|
1480
|
+
readonly id: string;
|
|
1359
1481
|
readonly text: string;
|
|
1360
1482
|
readonly providerMetadata?: {
|
|
1361
1483
|
readonly [x: string]: {
|
|
@@ -1363,8 +1485,8 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1363
1485
|
};
|
|
1364
1486
|
} | undefined;
|
|
1365
1487
|
} | {
|
|
1366
|
-
readonly id: string;
|
|
1367
1488
|
readonly type: "reasoning-end";
|
|
1489
|
+
readonly id: string;
|
|
1368
1490
|
readonly text?: string | undefined;
|
|
1369
1491
|
readonly providerMetadata?: {
|
|
1370
1492
|
readonly [x: string]: {
|
|
@@ -1372,55 +1494,56 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1372
1494
|
};
|
|
1373
1495
|
} | undefined;
|
|
1374
1496
|
} | {
|
|
1375
|
-
readonly id: string;
|
|
1376
1497
|
readonly type: "tool-input-start";
|
|
1498
|
+
readonly id: string;
|
|
1377
1499
|
readonly name: string;
|
|
1500
|
+
readonly namespace?: string | undefined;
|
|
1501
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1378
1502
|
readonly providerMetadata?: {
|
|
1379
1503
|
readonly [x: string]: {
|
|
1380
1504
|
readonly [x: string]: unknown;
|
|
1381
1505
|
};
|
|
1382
1506
|
} | undefined;
|
|
1383
|
-
readonly namespace?: string | undefined;
|
|
1384
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1385
1507
|
} | {
|
|
1386
|
-
readonly id: string;
|
|
1387
1508
|
readonly type: "tool-input-delta";
|
|
1509
|
+
readonly id: string;
|
|
1388
1510
|
readonly name: string;
|
|
1511
|
+
readonly namespace?: string | undefined;
|
|
1389
1512
|
readonly text: string;
|
|
1390
1513
|
readonly input?: unknown;
|
|
1391
|
-
readonly namespace?: string | undefined;
|
|
1392
1514
|
} | {
|
|
1393
|
-
readonly id: string;
|
|
1394
1515
|
readonly type: "tool-input-end";
|
|
1516
|
+
readonly id: string;
|
|
1395
1517
|
readonly name: string;
|
|
1518
|
+
readonly namespace?: string | undefined;
|
|
1396
1519
|
readonly providerMetadata?: {
|
|
1397
1520
|
readonly [x: string]: {
|
|
1398
1521
|
readonly [x: string]: unknown;
|
|
1399
1522
|
};
|
|
1400
1523
|
} | undefined;
|
|
1401
|
-
readonly namespace?: string | undefined;
|
|
1402
1524
|
} | {
|
|
1403
|
-
readonly id: string;
|
|
1404
1525
|
readonly type: "tool-input-error";
|
|
1526
|
+
readonly id: string;
|
|
1405
1527
|
readonly name: string;
|
|
1406
|
-
readonly raw: string;
|
|
1407
1528
|
readonly namespace?: string | undefined;
|
|
1529
|
+
readonly raw: string;
|
|
1408
1530
|
} | {
|
|
1409
|
-
readonly id: string;
|
|
1410
1531
|
readonly type: "tool-call";
|
|
1532
|
+
readonly id: string;
|
|
1411
1533
|
readonly name: string;
|
|
1534
|
+
readonly namespace?: string | undefined;
|
|
1412
1535
|
readonly input: unknown;
|
|
1536
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1413
1537
|
readonly providerMetadata?: {
|
|
1414
1538
|
readonly [x: string]: {
|
|
1415
1539
|
readonly [x: string]: unknown;
|
|
1416
1540
|
};
|
|
1417
1541
|
} | undefined;
|
|
1418
|
-
readonly namespace?: string | undefined;
|
|
1419
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1420
1542
|
} | {
|
|
1421
|
-
readonly id: string;
|
|
1422
1543
|
readonly type: "tool-result";
|
|
1544
|
+
readonly id: string;
|
|
1423
1545
|
readonly name: string;
|
|
1546
|
+
readonly namespace?: string | undefined;
|
|
1424
1547
|
readonly result: {
|
|
1425
1548
|
readonly type: "json";
|
|
1426
1549
|
readonly value: unknown;
|
|
@@ -1454,28 +1577,19 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1454
1577
|
readonly name?: string | undefined;
|
|
1455
1578
|
})[];
|
|
1456
1579
|
} | undefined;
|
|
1580
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1457
1581
|
readonly providerMetadata?: {
|
|
1458
1582
|
readonly [x: string]: {
|
|
1459
1583
|
readonly [x: string]: unknown;
|
|
1460
1584
|
};
|
|
1461
1585
|
} | undefined;
|
|
1462
|
-
readonly namespace?: string | undefined;
|
|
1463
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1464
1586
|
} | {
|
|
1465
|
-
readonly id: string;
|
|
1466
1587
|
readonly type: "tool-error";
|
|
1467
|
-
readonly
|
|
1588
|
+
readonly id: string;
|
|
1468
1589
|
readonly name: string;
|
|
1469
|
-
readonly error?: unknown;
|
|
1470
|
-
readonly providerMetadata?: {
|
|
1471
|
-
readonly [x: string]: {
|
|
1472
|
-
readonly [x: string]: unknown;
|
|
1473
|
-
};
|
|
1474
|
-
} | undefined;
|
|
1475
1590
|
readonly namespace?: string | undefined;
|
|
1476
|
-
|
|
1477
|
-
readonly
|
|
1478
|
-
readonly media: Media.Asset;
|
|
1591
|
+
readonly message: string;
|
|
1592
|
+
readonly error?: unknown;
|
|
1479
1593
|
readonly providerMetadata?: {
|
|
1480
1594
|
readonly [x: string]: {
|
|
1481
1595
|
readonly [x: string]: unknown;
|
|
@@ -1483,33 +1597,41 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1483
1597
|
} | undefined;
|
|
1484
1598
|
} | {
|
|
1485
1599
|
readonly type: "step-finish";
|
|
1600
|
+
readonly index: number;
|
|
1486
1601
|
readonly reason: {
|
|
1487
|
-
readonly normalized: "
|
|
1602
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1488
1603
|
readonly raw?: string | undefined;
|
|
1489
1604
|
readonly category?: string | undefined;
|
|
1490
1605
|
readonly explanation?: string | undefined;
|
|
1491
1606
|
};
|
|
1492
|
-
readonly
|
|
1607
|
+
readonly usage?: Usage | undefined;
|
|
1493
1608
|
readonly providerMetadata?: {
|
|
1494
1609
|
readonly [x: string]: {
|
|
1495
1610
|
readonly [x: string]: unknown;
|
|
1496
1611
|
};
|
|
1497
1612
|
} | undefined;
|
|
1498
|
-
readonly usage?: Usage | undefined;
|
|
1499
1613
|
} | {
|
|
1500
1614
|
readonly type: "finish";
|
|
1501
1615
|
readonly reason: {
|
|
1502
|
-
readonly normalized: "
|
|
1616
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1503
1617
|
readonly raw?: string | undefined;
|
|
1504
1618
|
readonly category?: string | undefined;
|
|
1505
1619
|
readonly explanation?: string | undefined;
|
|
1506
1620
|
};
|
|
1621
|
+
readonly usage?: Usage | undefined;
|
|
1622
|
+
readonly providerMetadata?: {
|
|
1623
|
+
readonly [x: string]: {
|
|
1624
|
+
readonly [x: string]: unknown;
|
|
1625
|
+
};
|
|
1626
|
+
} | undefined;
|
|
1627
|
+
} | {
|
|
1628
|
+
readonly type: "media";
|
|
1629
|
+
readonly media: Media.Asset;
|
|
1507
1630
|
readonly providerMetadata?: {
|
|
1508
1631
|
readonly [x: string]: {
|
|
1509
1632
|
readonly [x: string]: unknown;
|
|
1510
1633
|
};
|
|
1511
1634
|
} | undefined;
|
|
1512
|
-
readonly usage?: Usage | undefined;
|
|
1513
1635
|
} | {
|
|
1514
1636
|
readonly type: "provider-error";
|
|
1515
1637
|
readonly message: string;
|
|
@@ -1519,25 +1641,38 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1519
1641
|
readonly [x: string]: unknown;
|
|
1520
1642
|
};
|
|
1521
1643
|
} | undefined;
|
|
1522
|
-
}
|
|
1644
|
+
} | ({
|
|
1645
|
+
readonly type: "compaction";
|
|
1646
|
+
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1647
|
+
readonly id?: string | undefined;
|
|
1648
|
+
readonly encrypted?: string | undefined;
|
|
1649
|
+
readonly text?: string | null | undefined;
|
|
1650
|
+
} & ({
|
|
1651
|
+
readonly encrypted: string;
|
|
1652
|
+
readonly text?: never;
|
|
1653
|
+
} | {
|
|
1654
|
+
readonly text: string | null;
|
|
1655
|
+
readonly encrypted?: never;
|
|
1656
|
+
})))[]], AIError, never>;
|
|
1523
1657
|
/**
|
|
1524
1658
|
* The provider-neutral Open Responses protocol. Provider-specific Responses
|
|
1525
1659
|
* implementations compose this baseline with their own tools and event variants.
|
|
1526
1660
|
*/
|
|
1527
1661
|
export declare const initial: (request: LLMRequest, adapter?: ProviderAdapter) => ParserState;
|
|
1528
1662
|
export declare const protocol: Protocol<{
|
|
1663
|
+
readonly model: string;
|
|
1529
1664
|
readonly input: readonly ({
|
|
1530
1665
|
readonly [x: string]: unknown;
|
|
1531
|
-
readonly id: string;
|
|
1532
1666
|
readonly type: "web_search_call";
|
|
1667
|
+
readonly id: string;
|
|
1533
1668
|
readonly status?: string | undefined;
|
|
1534
1669
|
readonly action?: {
|
|
1535
1670
|
readonly [x: string]: unknown;
|
|
1536
1671
|
} | null | undefined;
|
|
1537
1672
|
} | {
|
|
1538
1673
|
readonly [x: string]: unknown;
|
|
1539
|
-
readonly id: string;
|
|
1540
1674
|
readonly type: "file_search_call";
|
|
1675
|
+
readonly id: string;
|
|
1541
1676
|
readonly status?: string | undefined;
|
|
1542
1677
|
readonly queries?: readonly string[] | undefined;
|
|
1543
1678
|
readonly results?: readonly {
|
|
@@ -1545,8 +1680,8 @@ export declare const protocol: Protocol<{
|
|
|
1545
1680
|
}[] | null | undefined;
|
|
1546
1681
|
} | {
|
|
1547
1682
|
readonly [x: string]: unknown;
|
|
1548
|
-
readonly id: string;
|
|
1549
1683
|
readonly type: "code_interpreter_call";
|
|
1684
|
+
readonly id: string;
|
|
1550
1685
|
readonly status?: string | undefined;
|
|
1551
1686
|
readonly code?: string | null | undefined;
|
|
1552
1687
|
readonly container_id?: string | null | undefined;
|
|
@@ -1555,14 +1690,14 @@ export declare const protocol: Protocol<{
|
|
|
1555
1690
|
}[] | null | undefined;
|
|
1556
1691
|
} | {
|
|
1557
1692
|
readonly [x: string]: unknown;
|
|
1558
|
-
readonly id: string;
|
|
1559
1693
|
readonly type: "mcp_call";
|
|
1694
|
+
readonly id: string;
|
|
1560
1695
|
readonly status?: string | undefined;
|
|
1696
|
+
readonly server_label?: string | undefined;
|
|
1561
1697
|
readonly name?: string | undefined;
|
|
1698
|
+
readonly arguments?: string | undefined;
|
|
1562
1699
|
readonly output?: string | null | undefined;
|
|
1563
1700
|
readonly error?: unknown;
|
|
1564
|
-
readonly arguments?: string | undefined;
|
|
1565
|
-
readonly server_label?: string | undefined;
|
|
1566
1701
|
} | {
|
|
1567
1702
|
readonly type: "configuration_update";
|
|
1568
1703
|
readonly reasoning: {
|
|
@@ -1572,18 +1707,10 @@ export declare const protocol: Protocol<{
|
|
|
1572
1707
|
readonly [x: string]: unknown;
|
|
1573
1708
|
readonly type: string;
|
|
1574
1709
|
readonly id: string;
|
|
1575
|
-
} | {
|
|
1576
|
-
readonly type: "reasoning";
|
|
1577
|
-
readonly summary: readonly {
|
|
1578
|
-
readonly type: "summary_text";
|
|
1579
|
-
readonly text: string;
|
|
1580
|
-
}[];
|
|
1581
|
-
readonly id?: string | undefined;
|
|
1582
|
-
readonly encrypted_content?: string | null | undefined;
|
|
1583
1710
|
} | {
|
|
1584
1711
|
readonly type: "compaction";
|
|
1585
|
-
readonly encrypted_content: string;
|
|
1586
1712
|
readonly id?: string | null | undefined;
|
|
1713
|
+
readonly encrypted_content: string;
|
|
1587
1714
|
} | {
|
|
1588
1715
|
readonly type: "message";
|
|
1589
1716
|
readonly role: "system";
|
|
@@ -1594,6 +1721,7 @@ export declare const protocol: Protocol<{
|
|
|
1594
1721
|
readonly content: string;
|
|
1595
1722
|
} | {
|
|
1596
1723
|
readonly type: "message";
|
|
1724
|
+
readonly role: "user";
|
|
1597
1725
|
readonly content: readonly ({
|
|
1598
1726
|
readonly type: "input_image";
|
|
1599
1727
|
readonly image_url: string;
|
|
@@ -1608,26 +1736,33 @@ export declare const protocol: Protocol<{
|
|
|
1608
1736
|
readonly type: "input_text";
|
|
1609
1737
|
readonly text: string;
|
|
1610
1738
|
})[];
|
|
1611
|
-
readonly role: "user";
|
|
1612
1739
|
readonly id?: string | undefined;
|
|
1613
1740
|
readonly status?: string | undefined;
|
|
1614
1741
|
} | {
|
|
1615
1742
|
readonly type: "message";
|
|
1743
|
+
readonly id?: string | undefined;
|
|
1744
|
+
readonly role: "assistant";
|
|
1616
1745
|
readonly content: readonly {
|
|
1617
1746
|
readonly type: "output_text";
|
|
1618
1747
|
readonly text: string;
|
|
1619
1748
|
}[];
|
|
1620
|
-
readonly role: "assistant";
|
|
1621
|
-
readonly id?: string | undefined;
|
|
1622
|
-
readonly status?: string | undefined;
|
|
1623
1749
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1750
|
+
readonly status?: string | undefined;
|
|
1751
|
+
} | {
|
|
1752
|
+
readonly type: "reasoning";
|
|
1753
|
+
readonly id?: string | undefined;
|
|
1754
|
+
readonly summary: readonly {
|
|
1755
|
+
readonly type: "summary_text";
|
|
1756
|
+
readonly text: string;
|
|
1757
|
+
}[];
|
|
1758
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1624
1759
|
} | {
|
|
1625
1760
|
readonly type: "function_call";
|
|
1626
|
-
readonly name: string;
|
|
1627
|
-
readonly arguments: string;
|
|
1628
|
-
readonly call_id: string;
|
|
1629
1761
|
readonly id?: string | undefined;
|
|
1762
|
+
readonly call_id: string;
|
|
1763
|
+
readonly name: string;
|
|
1630
1764
|
readonly namespace?: string | undefined;
|
|
1765
|
+
readonly arguments: string;
|
|
1631
1766
|
} | {
|
|
1632
1767
|
readonly type: "function_call_output";
|
|
1633
1768
|
readonly call_id: string;
|
|
@@ -1649,131 +1784,131 @@ export declare const protocol: Protocol<{
|
|
|
1649
1784
|
readonly video_url: string;
|
|
1650
1785
|
})[];
|
|
1651
1786
|
})[];
|
|
1652
|
-
readonly model: string;
|
|
1653
|
-
readonly stream: true;
|
|
1654
|
-
readonly metadata?: {
|
|
1655
|
-
readonly [x: string]: string;
|
|
1656
|
-
} | undefined;
|
|
1657
1787
|
readonly instructions?: string | undefined;
|
|
1658
|
-
readonly reasoning?: {
|
|
1659
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1660
|
-
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1661
|
-
} | undefined;
|
|
1662
|
-
readonly temperature?: number | undefined;
|
|
1663
1788
|
readonly tools?: readonly ({
|
|
1664
1789
|
readonly [x: string]: unknown;
|
|
1665
1790
|
readonly type: string;
|
|
1666
1791
|
} | {
|
|
1667
1792
|
readonly type: "function";
|
|
1668
|
-
readonly description: string;
|
|
1669
1793
|
readonly name: string;
|
|
1794
|
+
readonly description: string;
|
|
1670
1795
|
readonly parameters: {
|
|
1671
1796
|
readonly [x: string]: unknown;
|
|
1672
1797
|
};
|
|
1673
1798
|
readonly strict?: boolean | undefined;
|
|
1674
1799
|
})[] | undefined;
|
|
1675
|
-
readonly
|
|
1676
|
-
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1677
|
-
} | undefined;
|
|
1678
|
-
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1679
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1800
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1680
1801
|
readonly type: "function";
|
|
1681
1802
|
readonly name: string;
|
|
1682
1803
|
} | {
|
|
1683
1804
|
readonly type: "allowed_tools";
|
|
1684
|
-
readonly mode: "
|
|
1805
|
+
readonly mode: "auto" | "none" | "required";
|
|
1685
1806
|
readonly tools: readonly {
|
|
1686
1807
|
readonly type: "function";
|
|
1687
1808
|
readonly name: string;
|
|
1688
1809
|
}[];
|
|
1689
1810
|
} | undefined;
|
|
1690
|
-
readonly top_p?: number | undefined;
|
|
1691
|
-
readonly frequency_penalty?: number | undefined;
|
|
1692
|
-
readonly presence_penalty?: number | undefined;
|
|
1693
1811
|
readonly store?: boolean | undefined;
|
|
1694
|
-
readonly
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
readonly
|
|
1698
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1812
|
+
readonly metadata?: {
|
|
1813
|
+
readonly [x: string]: string;
|
|
1814
|
+
} | undefined;
|
|
1815
|
+
readonly safety_identifier?: string | undefined;
|
|
1699
1816
|
readonly stream_options?: {
|
|
1700
1817
|
readonly include_obfuscation?: boolean | undefined;
|
|
1701
1818
|
} | undefined;
|
|
1702
|
-
readonly safety_identifier?: string | undefined;
|
|
1703
1819
|
readonly top_logprobs?: number | undefined;
|
|
1820
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1821
|
+
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1822
|
+
readonly prompt_cache_key?: string | undefined;
|
|
1823
|
+
readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
1824
|
+
readonly reasoning?: {
|
|
1825
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1826
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1827
|
+
} | undefined;
|
|
1828
|
+
readonly text?: {
|
|
1829
|
+
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1830
|
+
} | undefined;
|
|
1831
|
+
readonly max_output_tokens?: number | undefined;
|
|
1704
1832
|
readonly max_tool_calls?: number | undefined;
|
|
1833
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1834
|
+
readonly temperature?: number | undefined;
|
|
1835
|
+
readonly top_p?: number | undefined;
|
|
1836
|
+
readonly presence_penalty?: number | undefined;
|
|
1837
|
+
readonly frequency_penalty?: number | undefined;
|
|
1838
|
+
readonly stream: true;
|
|
1705
1839
|
}, string, {
|
|
1706
1840
|
readonly [x: string]: unknown;
|
|
1707
1841
|
readonly type: string;
|
|
1708
|
-
readonly
|
|
1709
|
-
readonly
|
|
1710
|
-
readonly code?: unknown;
|
|
1842
|
+
readonly delta?: string | undefined;
|
|
1843
|
+
readonly arguments?: string | undefined;
|
|
1711
1844
|
readonly text?: string | undefined;
|
|
1712
|
-
readonly
|
|
1845
|
+
readonly item_id?: string | undefined;
|
|
1846
|
+
readonly output_index?: number | undefined;
|
|
1847
|
+
readonly summary_index?: number | undefined;
|
|
1848
|
+
readonly item?: {
|
|
1849
|
+
readonly [x: string]: unknown;
|
|
1850
|
+
readonly type: string;
|
|
1851
|
+
readonly id?: string | undefined;
|
|
1852
|
+
readonly call_id?: string | undefined;
|
|
1853
|
+
readonly name?: string | undefined;
|
|
1854
|
+
readonly namespace?: string | undefined;
|
|
1855
|
+
readonly arguments?: string | undefined;
|
|
1856
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1857
|
+
} | null | undefined;
|
|
1713
1858
|
readonly response?: {
|
|
1714
1859
|
readonly [x: string]: unknown;
|
|
1715
1860
|
readonly id?: string | undefined;
|
|
1861
|
+
readonly service_tier?: string | null | undefined;
|
|
1862
|
+
readonly incomplete_details?: {
|
|
1863
|
+
readonly reason?: string | undefined;
|
|
1864
|
+
} | null | undefined;
|
|
1716
1865
|
readonly output?: readonly {
|
|
1717
1866
|
readonly [x: string]: unknown;
|
|
1718
1867
|
readonly type: string;
|
|
1719
1868
|
readonly id?: string | undefined;
|
|
1869
|
+
readonly call_id?: string | undefined;
|
|
1720
1870
|
readonly name?: string | undefined;
|
|
1721
|
-
readonly namespace?: string |
|
|
1871
|
+
readonly namespace?: string | undefined;
|
|
1722
1872
|
readonly arguments?: string | undefined;
|
|
1723
|
-
readonly call_id?: string | undefined;
|
|
1724
1873
|
readonly encrypted_content?: string | null | undefined;
|
|
1725
1874
|
}[] | undefined;
|
|
1726
|
-
readonly error?: unknown;
|
|
1727
1875
|
readonly usage?: {
|
|
1728
1876
|
readonly [x: string]: unknown;
|
|
1729
1877
|
readonly input_tokens?: number | undefined;
|
|
1878
|
+
readonly input_tokens_details?: {
|
|
1879
|
+
readonly [x: string]: unknown;
|
|
1880
|
+
readonly cached_tokens?: number | undefined;
|
|
1881
|
+
readonly cache_write_tokens?: number | undefined;
|
|
1882
|
+
} | null | undefined;
|
|
1730
1883
|
readonly output_tokens?: number | undefined;
|
|
1731
1884
|
readonly output_tokens_details?: {
|
|
1732
1885
|
readonly [x: string]: unknown;
|
|
1733
1886
|
readonly reasoning_tokens?: number | undefined;
|
|
1734
1887
|
} | null | undefined;
|
|
1735
1888
|
readonly total_tokens?: number | undefined;
|
|
1736
|
-
readonly input_tokens_details?: {
|
|
1737
|
-
readonly [x: string]: unknown;
|
|
1738
|
-
readonly cached_tokens?: number | undefined;
|
|
1739
|
-
readonly cache_write_tokens?: number | undefined;
|
|
1740
|
-
} | null | undefined;
|
|
1741
|
-
} | null | undefined;
|
|
1742
|
-
readonly service_tier?: string | null | undefined;
|
|
1743
|
-
readonly incomplete_details?: {
|
|
1744
|
-
readonly reason?: string | undefined;
|
|
1745
1889
|
} | null | undefined;
|
|
1890
|
+
readonly error?: unknown;
|
|
1746
1891
|
} | undefined;
|
|
1747
|
-
readonly
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
readonly name?: string | undefined;
|
|
1752
|
-
readonly namespace?: string | null | undefined;
|
|
1753
|
-
readonly arguments?: string | undefined;
|
|
1754
|
-
readonly call_id?: string | undefined;
|
|
1755
|
-
readonly encrypted_content?: string | null | undefined;
|
|
1756
|
-
} | null | undefined;
|
|
1757
|
-
readonly delta?: string | undefined;
|
|
1758
|
-
readonly arguments?: string | undefined;
|
|
1759
|
-
readonly item_id?: string | undefined;
|
|
1760
|
-
readonly output_index?: number | undefined;
|
|
1761
|
-
readonly summary_index?: number | undefined;
|
|
1892
|
+
readonly code?: unknown;
|
|
1893
|
+
readonly message?: unknown;
|
|
1894
|
+
readonly error?: unknown;
|
|
1895
|
+
readonly status?: unknown;
|
|
1762
1896
|
readonly status_code?: unknown;
|
|
1763
1897
|
}, ParserState>;
|
|
1764
1898
|
export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
1899
|
+
readonly model: string;
|
|
1765
1900
|
readonly input: readonly ({
|
|
1766
1901
|
readonly [x: string]: unknown;
|
|
1767
|
-
readonly id: string;
|
|
1768
1902
|
readonly type: "web_search_call";
|
|
1903
|
+
readonly id: string;
|
|
1769
1904
|
readonly status?: string | undefined;
|
|
1770
1905
|
readonly action?: {
|
|
1771
1906
|
readonly [x: string]: unknown;
|
|
1772
1907
|
} | null | undefined;
|
|
1773
1908
|
} | {
|
|
1774
1909
|
readonly [x: string]: unknown;
|
|
1775
|
-
readonly id: string;
|
|
1776
1910
|
readonly type: "file_search_call";
|
|
1911
|
+
readonly id: string;
|
|
1777
1912
|
readonly status?: string | undefined;
|
|
1778
1913
|
readonly queries?: readonly string[] | undefined;
|
|
1779
1914
|
readonly results?: readonly {
|
|
@@ -1781,8 +1916,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1781
1916
|
}[] | null | undefined;
|
|
1782
1917
|
} | {
|
|
1783
1918
|
readonly [x: string]: unknown;
|
|
1784
|
-
readonly id: string;
|
|
1785
1919
|
readonly type: "code_interpreter_call";
|
|
1920
|
+
readonly id: string;
|
|
1786
1921
|
readonly status?: string | undefined;
|
|
1787
1922
|
readonly code?: string | null | undefined;
|
|
1788
1923
|
readonly container_id?: string | null | undefined;
|
|
@@ -1791,14 +1926,14 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1791
1926
|
}[] | null | undefined;
|
|
1792
1927
|
} | {
|
|
1793
1928
|
readonly [x: string]: unknown;
|
|
1794
|
-
readonly id: string;
|
|
1795
1929
|
readonly type: "mcp_call";
|
|
1930
|
+
readonly id: string;
|
|
1796
1931
|
readonly status?: string | undefined;
|
|
1932
|
+
readonly server_label?: string | undefined;
|
|
1797
1933
|
readonly name?: string | undefined;
|
|
1934
|
+
readonly arguments?: string | undefined;
|
|
1798
1935
|
readonly output?: string | null | undefined;
|
|
1799
1936
|
readonly error?: unknown;
|
|
1800
|
-
readonly arguments?: string | undefined;
|
|
1801
|
-
readonly server_label?: string | undefined;
|
|
1802
1937
|
} | {
|
|
1803
1938
|
readonly type: "configuration_update";
|
|
1804
1939
|
readonly reasoning: {
|
|
@@ -1808,18 +1943,10 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1808
1943
|
readonly [x: string]: unknown;
|
|
1809
1944
|
readonly type: string;
|
|
1810
1945
|
readonly id: string;
|
|
1811
|
-
} | {
|
|
1812
|
-
readonly type: "reasoning";
|
|
1813
|
-
readonly summary: readonly {
|
|
1814
|
-
readonly type: "summary_text";
|
|
1815
|
-
readonly text: string;
|
|
1816
|
-
}[];
|
|
1817
|
-
readonly id?: string | undefined;
|
|
1818
|
-
readonly encrypted_content?: string | null | undefined;
|
|
1819
1946
|
} | {
|
|
1820
1947
|
readonly type: "compaction";
|
|
1821
|
-
readonly encrypted_content: string;
|
|
1822
1948
|
readonly id?: string | null | undefined;
|
|
1949
|
+
readonly encrypted_content: string;
|
|
1823
1950
|
} | {
|
|
1824
1951
|
readonly type: "message";
|
|
1825
1952
|
readonly role: "system";
|
|
@@ -1830,6 +1957,7 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1830
1957
|
readonly content: string;
|
|
1831
1958
|
} | {
|
|
1832
1959
|
readonly type: "message";
|
|
1960
|
+
readonly role: "user";
|
|
1833
1961
|
readonly content: readonly ({
|
|
1834
1962
|
readonly type: "input_image";
|
|
1835
1963
|
readonly image_url: string;
|
|
@@ -1844,26 +1972,33 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1844
1972
|
readonly type: "input_text";
|
|
1845
1973
|
readonly text: string;
|
|
1846
1974
|
})[];
|
|
1847
|
-
readonly role: "user";
|
|
1848
1975
|
readonly id?: string | undefined;
|
|
1849
1976
|
readonly status?: string | undefined;
|
|
1850
1977
|
} | {
|
|
1851
1978
|
readonly type: "message";
|
|
1979
|
+
readonly id?: string | undefined;
|
|
1980
|
+
readonly role: "assistant";
|
|
1852
1981
|
readonly content: readonly {
|
|
1853
1982
|
readonly type: "output_text";
|
|
1854
1983
|
readonly text: string;
|
|
1855
1984
|
}[];
|
|
1856
|
-
readonly role: "assistant";
|
|
1857
|
-
readonly id?: string | undefined;
|
|
1858
|
-
readonly status?: string | undefined;
|
|
1859
1985
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1986
|
+
readonly status?: string | undefined;
|
|
1987
|
+
} | {
|
|
1988
|
+
readonly type: "reasoning";
|
|
1989
|
+
readonly id?: string | undefined;
|
|
1990
|
+
readonly summary: readonly {
|
|
1991
|
+
readonly type: "summary_text";
|
|
1992
|
+
readonly text: string;
|
|
1993
|
+
}[];
|
|
1994
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1860
1995
|
} | {
|
|
1861
1996
|
readonly type: "function_call";
|
|
1862
|
-
readonly name: string;
|
|
1863
|
-
readonly arguments: string;
|
|
1864
|
-
readonly call_id: string;
|
|
1865
1997
|
readonly id?: string | undefined;
|
|
1998
|
+
readonly call_id: string;
|
|
1999
|
+
readonly name: string;
|
|
1866
2000
|
readonly namespace?: string | undefined;
|
|
2001
|
+
readonly arguments: string;
|
|
1867
2002
|
} | {
|
|
1868
2003
|
readonly type: "function_call_output";
|
|
1869
2004
|
readonly call_id: string;
|
|
@@ -1885,58 +2020,57 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1885
2020
|
readonly video_url: string;
|
|
1886
2021
|
})[];
|
|
1887
2022
|
})[];
|
|
1888
|
-
readonly model: string;
|
|
1889
|
-
readonly stream: true;
|
|
1890
|
-
readonly metadata?: {
|
|
1891
|
-
readonly [x: string]: string;
|
|
1892
|
-
} | undefined;
|
|
1893
2023
|
readonly instructions?: string | undefined;
|
|
1894
|
-
readonly reasoning?: {
|
|
1895
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1896
|
-
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1897
|
-
} | undefined;
|
|
1898
|
-
readonly temperature?: number | undefined;
|
|
1899
2024
|
readonly tools?: readonly ({
|
|
1900
2025
|
readonly [x: string]: unknown;
|
|
1901
2026
|
readonly type: string;
|
|
1902
2027
|
} | {
|
|
1903
2028
|
readonly type: "function";
|
|
1904
|
-
readonly description: string;
|
|
1905
2029
|
readonly name: string;
|
|
2030
|
+
readonly description: string;
|
|
1906
2031
|
readonly parameters: {
|
|
1907
2032
|
readonly [x: string]: unknown;
|
|
1908
2033
|
};
|
|
1909
2034
|
readonly strict?: boolean | undefined;
|
|
1910
2035
|
})[] | undefined;
|
|
1911
|
-
readonly
|
|
1912
|
-
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1913
|
-
} | undefined;
|
|
1914
|
-
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1915
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
2036
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1916
2037
|
readonly type: "function";
|
|
1917
2038
|
readonly name: string;
|
|
1918
2039
|
} | {
|
|
1919
2040
|
readonly type: "allowed_tools";
|
|
1920
|
-
readonly mode: "
|
|
2041
|
+
readonly mode: "auto" | "none" | "required";
|
|
1921
2042
|
readonly tools: readonly {
|
|
1922
2043
|
readonly type: "function";
|
|
1923
2044
|
readonly name: string;
|
|
1924
2045
|
}[];
|
|
1925
2046
|
} | undefined;
|
|
1926
|
-
readonly top_p?: number | undefined;
|
|
1927
|
-
readonly frequency_penalty?: number | undefined;
|
|
1928
|
-
readonly presence_penalty?: number | undefined;
|
|
1929
2047
|
readonly store?: boolean | undefined;
|
|
1930
|
-
readonly
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
readonly
|
|
1934
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
2048
|
+
readonly metadata?: {
|
|
2049
|
+
readonly [x: string]: string;
|
|
2050
|
+
} | undefined;
|
|
2051
|
+
readonly safety_identifier?: string | undefined;
|
|
1935
2052
|
readonly stream_options?: {
|
|
1936
2053
|
readonly include_obfuscation?: boolean | undefined;
|
|
1937
2054
|
} | undefined;
|
|
1938
|
-
readonly safety_identifier?: string | undefined;
|
|
1939
2055
|
readonly top_logprobs?: number | undefined;
|
|
2056
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
2057
|
+
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
2058
|
+
readonly prompt_cache_key?: string | undefined;
|
|
2059
|
+
readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
2060
|
+
readonly reasoning?: {
|
|
2061
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
2062
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
2063
|
+
} | undefined;
|
|
2064
|
+
readonly text?: {
|
|
2065
|
+
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
2066
|
+
} | undefined;
|
|
2067
|
+
readonly max_output_tokens?: number | undefined;
|
|
1940
2068
|
readonly max_tool_calls?: number | undefined;
|
|
2069
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
2070
|
+
readonly temperature?: number | undefined;
|
|
2071
|
+
readonly top_p?: number | undefined;
|
|
2072
|
+
readonly presence_penalty?: number | undefined;
|
|
2073
|
+
readonly frequency_penalty?: number | undefined;
|
|
2074
|
+
readonly stream: true;
|
|
1941
2075
|
}, string>;
|
|
1942
2076
|
export * as OpenResponses from "./open-responses.js";
|