@opencode/ai 2.0.29 → 2.0.31
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/protocols/alibaba-chat.d.ts +1 -1
- package/dist/protocols/alibaba-messages.d.ts +1 -1
- package/dist/protocols/alibaba-responses.d.ts +3 -3
- package/dist/protocols/anthropic-messages.d.ts +2 -2
- package/dist/protocols/bedrock-converse.d.ts +2 -2
- package/dist/protocols/bedrock-converse.js +1 -1
- package/dist/protocols/cohere-chat.d.ts +2 -2
- package/dist/protocols/meta-messages.d.ts +1 -1
- package/dist/protocols/meta-responses.d.ts +4 -4
- package/dist/protocols/mistral-chat.d.ts +3 -3
- package/dist/protocols/open-responses.d.ts +10 -9
- package/dist/protocols/open-responses.js +3 -1
- package/dist/protocols/openai-chat.d.ts +3 -3
- package/dist/protocols/openai-compatible-chat.d.ts +1 -1
- package/dist/protocols/openai-compatible-responses.d.ts +1 -1
- package/dist/protocols/openai-responses.d.ts +7 -7
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.js +5 -3
- package/dist/protocols/venice-chat.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +3 -3
- package/dist/protocols/zai-chat.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +1 -1
- package/dist/providers/alibaba.d.ts +3 -3
- package/dist/providers/amazon-bedrock-mantle.d.ts +3 -3
- package/dist/providers/amazon-bedrock.d.ts +1 -1
- package/dist/providers/anthropic-compatible.d.ts +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/azure.d.ts +3 -3
- package/dist/providers/baseten.d.ts +2 -2
- package/dist/providers/cerebras.d.ts +2 -2
- package/dist/providers/cloudflare-ai-gateway.d.ts +6 -6
- package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
- package/dist/providers/cohere.d.ts +4 -4
- package/dist/providers/deepinfra.d.ts +2 -2
- package/dist/providers/deepseek.d.ts +2 -2
- package/dist/providers/digitalocean.d.ts +3 -3
- package/dist/providers/fireworks.d.ts +2 -2
- package/dist/providers/google-vertex-chat.d.ts +1 -1
- package/dist/providers/google-vertex-messages.d.ts +1 -1
- package/dist/providers/google-vertex-mistral.d.ts +1 -1
- package/dist/providers/google-vertex-responses.d.ts +1 -1
- package/dist/providers/groq.d.ts +2 -2
- package/dist/providers/meta.d.ts +3 -3
- package/dist/providers/minimax.d.ts +3 -3
- package/dist/providers/mistral.d.ts +2 -2
- package/dist/providers/moonshot.d.ts +3 -3
- package/dist/providers/openai-compatible-responses.d.ts +1 -1
- package/dist/providers/openai-compatible.d.ts +1 -1
- package/dist/providers/openai.d.ts +2 -2
- package/dist/providers/opencode.js +1 -1
- package/dist/providers/openrouter.d.ts +3 -3
- package/dist/providers/togetherai.d.ts +2 -2
- package/dist/providers/venice.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/zai-coding-plan.d.ts +3 -3
- package/dist/providers/zai.d.ts +1 -1
- package/package.json +3 -3
|
@@ -121,6 +121,7 @@ export declare const protocol: Protocol<{
|
|
|
121
121
|
readonly stream: true;
|
|
122
122
|
readonly max_completion_tokens?: number | undefined;
|
|
123
123
|
readonly max_tokens?: number | undefined;
|
|
124
|
+
readonly temperature?: number | undefined;
|
|
124
125
|
readonly tools?: readonly {
|
|
125
126
|
readonly function: {
|
|
126
127
|
readonly description: string;
|
|
@@ -137,7 +138,6 @@ export declare const protocol: Protocol<{
|
|
|
137
138
|
} | undefined;
|
|
138
139
|
}[] | undefined;
|
|
139
140
|
readonly stop?: readonly string[] | undefined;
|
|
140
|
-
readonly temperature?: number | undefined;
|
|
141
141
|
readonly seed?: number | undefined;
|
|
142
142
|
readonly thinking?: {
|
|
143
143
|
readonly type: (string & {}) | "disabled" | "adaptive";
|
|
@@ -204,6 +204,7 @@ export declare const protocol: Protocol<{
|
|
|
204
204
|
readonly metadata?: {
|
|
205
205
|
readonly user_id?: string | null | undefined;
|
|
206
206
|
} | undefined;
|
|
207
|
+
readonly temperature?: number | undefined;
|
|
207
208
|
readonly tools?: readonly {
|
|
208
209
|
readonly description: string;
|
|
209
210
|
readonly name: string;
|
|
@@ -223,7 +224,6 @@ export declare const protocol: Protocol<{
|
|
|
223
224
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
224
225
|
} | undefined;
|
|
225
226
|
}[] | undefined;
|
|
226
|
-
readonly temperature?: number | undefined;
|
|
227
227
|
readonly thinking?: {
|
|
228
228
|
readonly type: string;
|
|
229
229
|
readonly budget_tokens?: number | undefined;
|
|
@@ -144,6 +144,7 @@ export declare const protocol: Protocol<{
|
|
|
144
144
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
145
145
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
146
146
|
} | undefined;
|
|
147
|
+
readonly temperature?: number | undefined;
|
|
147
148
|
readonly tools?: readonly ({
|
|
148
149
|
readonly [x: string]: unknown;
|
|
149
150
|
readonly type: string;
|
|
@@ -159,7 +160,6 @@ export declare const protocol: Protocol<{
|
|
|
159
160
|
readonly text?: {
|
|
160
161
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
161
162
|
} | undefined;
|
|
162
|
-
readonly temperature?: number | undefined;
|
|
163
163
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
164
164
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
165
165
|
readonly type: "function";
|
|
@@ -206,7 +206,7 @@ export declare const protocol: Protocol<{
|
|
|
206
206
|
readonly type: string;
|
|
207
207
|
readonly id?: string | undefined;
|
|
208
208
|
readonly name?: string | undefined;
|
|
209
|
-
readonly namespace?: string | undefined;
|
|
209
|
+
readonly namespace?: string | null | undefined;
|
|
210
210
|
readonly arguments?: string | undefined;
|
|
211
211
|
readonly call_id?: string | undefined;
|
|
212
212
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -237,7 +237,7 @@ export declare const protocol: Protocol<{
|
|
|
237
237
|
readonly type: string;
|
|
238
238
|
readonly id?: string | undefined;
|
|
239
239
|
readonly name?: string | undefined;
|
|
240
|
-
readonly namespace?: string | undefined;
|
|
240
|
+
readonly namespace?: string | null | undefined;
|
|
241
241
|
readonly arguments?: string | undefined;
|
|
242
242
|
readonly call_id?: string | undefined;
|
|
243
243
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -604,6 +604,7 @@ export declare const protocol: Protocol<{
|
|
|
604
604
|
readonly metadata?: {
|
|
605
605
|
readonly user_id?: string | null | undefined;
|
|
606
606
|
} | undefined;
|
|
607
|
+
readonly temperature?: number | undefined;
|
|
607
608
|
readonly tools?: readonly {
|
|
608
609
|
readonly description: string;
|
|
609
610
|
readonly name: string;
|
|
@@ -623,7 +624,6 @@ export declare const protocol: Protocol<{
|
|
|
623
624
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
624
625
|
} | undefined;
|
|
625
626
|
}[] | undefined;
|
|
626
|
-
readonly temperature?: number | undefined;
|
|
627
627
|
readonly thinking?: {
|
|
628
628
|
readonly type: "enabled";
|
|
629
629
|
readonly budget_tokens: number;
|
|
@@ -964,6 +964,7 @@ export declare const route: Route<{
|
|
|
964
964
|
readonly metadata?: {
|
|
965
965
|
readonly user_id?: string | null | undefined;
|
|
966
966
|
} | undefined;
|
|
967
|
+
readonly temperature?: number | undefined;
|
|
967
968
|
readonly tools?: readonly {
|
|
968
969
|
readonly description: string;
|
|
969
970
|
readonly name: string;
|
|
@@ -983,7 +984,6 @@ export declare const route: Route<{
|
|
|
983
984
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
984
985
|
} | undefined;
|
|
985
986
|
}[] | undefined;
|
|
986
|
-
readonly temperature?: number | undefined;
|
|
987
987
|
readonly thinking?: {
|
|
988
988
|
readonly type: "enabled";
|
|
989
989
|
readonly budget_tokens: number;
|
|
@@ -234,8 +234,8 @@ export declare const protocol: Protocol<{
|
|
|
234
234
|
readonly text: string;
|
|
235
235
|
})[] | undefined;
|
|
236
236
|
readonly inferenceConfig?: {
|
|
237
|
-
readonly maxTokens?: number | undefined;
|
|
238
237
|
readonly temperature?: number | undefined;
|
|
238
|
+
readonly maxTokens?: number | undefined;
|
|
239
239
|
readonly topP?: number | undefined;
|
|
240
240
|
readonly stopSequences?: readonly string[] | undefined;
|
|
241
241
|
} | undefined;
|
|
@@ -463,8 +463,8 @@ export declare const route: Route<{
|
|
|
463
463
|
readonly text: string;
|
|
464
464
|
})[] | undefined;
|
|
465
465
|
readonly inferenceConfig?: {
|
|
466
|
-
readonly maxTokens?: number | undefined;
|
|
467
466
|
readonly temperature?: number | undefined;
|
|
467
|
+
readonly maxTokens?: number | undefined;
|
|
468
468
|
readonly topP?: number | undefined;
|
|
469
469
|
readonly stopSequences?: readonly string[] | undefined;
|
|
470
470
|
} | undefined;
|
|
@@ -413,7 +413,7 @@ const fromRequest = Effect.fn("BedrockConverse.fromRequest")(function* (request)
|
|
|
413
413
|
});
|
|
414
414
|
// Bedrock-Claude shares Anthropic's 4-breakpoint cap. Spend the budget in
|
|
415
415
|
// tools → system → messages order to favour the highest-impact prefixes.
|
|
416
|
-
const breakpoints = BedrockCache.breakpoints(request.model
|
|
416
|
+
const breakpoints = BedrockCache.breakpoints(request.model);
|
|
417
417
|
const toolConfig = (() => {
|
|
418
418
|
if (flattened.tools.length === 0)
|
|
419
419
|
return undefined;
|
|
@@ -40,6 +40,7 @@ export declare const protocol: Protocol<{
|
|
|
40
40
|
}[];
|
|
41
41
|
readonly stream: true;
|
|
42
42
|
readonly max_tokens?: number | undefined;
|
|
43
|
+
readonly temperature?: number | undefined;
|
|
43
44
|
readonly tools?: readonly {
|
|
44
45
|
readonly type: "function";
|
|
45
46
|
readonly function: {
|
|
@@ -48,7 +49,6 @@ export declare const protocol: Protocol<{
|
|
|
48
49
|
readonly description?: string | undefined;
|
|
49
50
|
};
|
|
50
51
|
}[] | undefined;
|
|
51
|
-
readonly temperature?: number | undefined;
|
|
52
52
|
readonly seed?: number | undefined;
|
|
53
53
|
readonly thinking?: {
|
|
54
54
|
readonly type: string;
|
|
@@ -154,6 +154,7 @@ export declare const route: Route<{
|
|
|
154
154
|
}[];
|
|
155
155
|
readonly stream: true;
|
|
156
156
|
readonly max_tokens?: number | undefined;
|
|
157
|
+
readonly temperature?: number | undefined;
|
|
157
158
|
readonly tools?: readonly {
|
|
158
159
|
readonly type: "function";
|
|
159
160
|
readonly function: {
|
|
@@ -162,7 +163,6 @@ export declare const route: Route<{
|
|
|
162
163
|
readonly description?: string | undefined;
|
|
163
164
|
};
|
|
164
165
|
}[] | undefined;
|
|
165
|
-
readonly temperature?: number | undefined;
|
|
166
166
|
readonly seed?: number | undefined;
|
|
167
167
|
readonly thinking?: {
|
|
168
168
|
readonly type: string;
|
|
@@ -192,6 +192,7 @@ export declare const protocol: Protocol<{
|
|
|
192
192
|
readonly metadata?: {
|
|
193
193
|
readonly user_id?: string | null | undefined;
|
|
194
194
|
} | undefined;
|
|
195
|
+
readonly temperature?: number | undefined;
|
|
195
196
|
readonly tools?: readonly ({
|
|
196
197
|
readonly type: "web_search";
|
|
197
198
|
readonly name: "web_search";
|
|
@@ -221,7 +222,6 @@ export declare const protocol: Protocol<{
|
|
|
221
222
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
222
223
|
} | undefined;
|
|
223
224
|
}[] | undefined;
|
|
224
|
-
readonly temperature?: number | undefined;
|
|
225
225
|
readonly thinking?: {
|
|
226
226
|
readonly type: "enabled";
|
|
227
227
|
readonly budget_tokens: number;
|
|
@@ -158,6 +158,7 @@ export declare const protocol: Protocol<{
|
|
|
158
158
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
159
159
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
160
160
|
} | undefined;
|
|
161
|
+
readonly temperature?: number | undefined;
|
|
161
162
|
readonly tools?: readonly ({
|
|
162
163
|
readonly [x: string]: unknown;
|
|
163
164
|
readonly type: string;
|
|
@@ -173,7 +174,6 @@ export declare const protocol: Protocol<{
|
|
|
173
174
|
readonly text?: {
|
|
174
175
|
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
175
176
|
} | undefined;
|
|
176
|
-
readonly temperature?: number | undefined;
|
|
177
177
|
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
178
178
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
179
179
|
readonly type: "function";
|
|
@@ -217,7 +217,7 @@ export declare const protocol: Protocol<{
|
|
|
217
217
|
readonly type: string;
|
|
218
218
|
readonly id?: string | undefined;
|
|
219
219
|
readonly name?: string | undefined;
|
|
220
|
-
readonly namespace?: string | undefined;
|
|
220
|
+
readonly namespace?: string | null | undefined;
|
|
221
221
|
readonly arguments?: string | undefined;
|
|
222
222
|
readonly call_id?: string | undefined;
|
|
223
223
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -248,7 +248,7 @@ export declare const protocol: Protocol<{
|
|
|
248
248
|
readonly type: string;
|
|
249
249
|
readonly id?: string | undefined;
|
|
250
250
|
readonly name?: string | undefined;
|
|
251
|
-
readonly namespace?: string | undefined;
|
|
251
|
+
readonly namespace?: string | null | undefined;
|
|
252
252
|
readonly arguments?: string | undefined;
|
|
253
253
|
readonly call_id?: string | undefined;
|
|
254
254
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -394,6 +394,7 @@ export declare const httpTransport: import("../route/transport/http.js").HttpJso
|
|
|
394
394
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
395
395
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
396
396
|
} | undefined;
|
|
397
|
+
readonly temperature?: number | undefined;
|
|
397
398
|
readonly tools?: readonly ({
|
|
398
399
|
readonly [x: string]: unknown;
|
|
399
400
|
readonly type: string;
|
|
@@ -409,7 +410,6 @@ export declare const httpTransport: import("../route/transport/http.js").HttpJso
|
|
|
409
410
|
readonly text?: {
|
|
410
411
|
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
411
412
|
} | undefined;
|
|
412
|
-
readonly temperature?: number | undefined;
|
|
413
413
|
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
414
414
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
415
415
|
readonly type: "function";
|
|
@@ -299,6 +299,7 @@ export declare const protocol: Protocol<{
|
|
|
299
299
|
})[];
|
|
300
300
|
readonly stream: true;
|
|
301
301
|
readonly max_tokens?: number | undefined;
|
|
302
|
+
readonly temperature?: number | undefined;
|
|
302
303
|
readonly tools?: readonly {
|
|
303
304
|
readonly type: "function";
|
|
304
305
|
readonly function: {
|
|
@@ -311,7 +312,6 @@ export declare const protocol: Protocol<{
|
|
|
311
312
|
};
|
|
312
313
|
}[] | undefined;
|
|
313
314
|
readonly stop?: readonly string[] | undefined;
|
|
314
|
-
readonly temperature?: number | undefined;
|
|
315
315
|
readonly tool_choice?: "auto" | "none" | "any" | {
|
|
316
316
|
readonly type: "function";
|
|
317
317
|
readonly function: {
|
|
@@ -436,6 +436,7 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
436
436
|
})[];
|
|
437
437
|
readonly stream: true;
|
|
438
438
|
readonly max_tokens?: number | undefined;
|
|
439
|
+
readonly temperature?: number | undefined;
|
|
439
440
|
readonly tools?: readonly {
|
|
440
441
|
readonly type: "function";
|
|
441
442
|
readonly function: {
|
|
@@ -448,7 +449,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
448
449
|
};
|
|
449
450
|
}[] | undefined;
|
|
450
451
|
readonly stop?: readonly string[] | undefined;
|
|
451
|
-
readonly temperature?: number | undefined;
|
|
452
452
|
readonly tool_choice?: "auto" | "none" | "any" | {
|
|
453
453
|
readonly type: "function";
|
|
454
454
|
readonly function: {
|
|
@@ -527,6 +527,7 @@ export declare const route: Route<{
|
|
|
527
527
|
})[];
|
|
528
528
|
readonly stream: true;
|
|
529
529
|
readonly max_tokens?: number | undefined;
|
|
530
|
+
readonly temperature?: number | undefined;
|
|
530
531
|
readonly tools?: readonly {
|
|
531
532
|
readonly type: "function";
|
|
532
533
|
readonly function: {
|
|
@@ -539,7 +540,6 @@ export declare const route: Route<{
|
|
|
539
540
|
};
|
|
540
541
|
}[] | undefined;
|
|
541
542
|
readonly stop?: readonly string[] | undefined;
|
|
542
|
-
readonly temperature?: number | undefined;
|
|
543
543
|
readonly tool_choice?: "auto" | "none" | "any" | {
|
|
544
544
|
readonly type: "function";
|
|
545
545
|
readonly function: {
|
|
@@ -577,13 +577,14 @@ export declare const StreamItem: Schema.StructWithRest<Schema.Struct<{
|
|
|
577
577
|
readonly id: Schema.optional<Schema.String>;
|
|
578
578
|
readonly call_id: Schema.optional<Schema.String>;
|
|
579
579
|
readonly name: Schema.optional<Schema.String>;
|
|
580
|
-
readonly namespace: Schema.optional<Schema.String
|
|
580
|
+
readonly namespace: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
581
581
|
readonly arguments: Schema.optional<Schema.String>;
|
|
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;
|
|
587
588
|
};
|
|
588
589
|
export declare const Event: Schema.StructWithRest<Schema.Struct<{
|
|
589
590
|
readonly type: Schema.String;
|
|
@@ -598,7 +599,7 @@ export declare const Event: Schema.StructWithRest<Schema.Struct<{
|
|
|
598
599
|
readonly id: Schema.optional<Schema.String>;
|
|
599
600
|
readonly call_id: Schema.optional<Schema.String>;
|
|
600
601
|
readonly name: Schema.optional<Schema.String>;
|
|
601
|
-
readonly namespace: Schema.optional<Schema.String
|
|
602
|
+
readonly namespace: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
602
603
|
readonly arguments: Schema.optional<Schema.String>;
|
|
603
604
|
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
604
605
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
@@ -613,7 +614,7 @@ export declare const Event: Schema.StructWithRest<Schema.Struct<{
|
|
|
613
614
|
readonly id: Schema.optional<Schema.String>;
|
|
614
615
|
readonly call_id: Schema.optional<Schema.String>;
|
|
615
616
|
readonly name: Schema.optional<Schema.String>;
|
|
616
|
-
readonly namespace: Schema.optional<Schema.String
|
|
617
|
+
readonly namespace: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
617
618
|
readonly arguments: Schema.optional<Schema.String>;
|
|
618
619
|
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
619
620
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
@@ -662,7 +663,7 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
|
|
|
662
663
|
readonly type: string;
|
|
663
664
|
readonly id?: string | undefined;
|
|
664
665
|
readonly name?: string | undefined;
|
|
665
|
-
readonly namespace?: string | undefined;
|
|
666
|
+
readonly namespace?: string | null | undefined;
|
|
666
667
|
readonly arguments?: string | undefined;
|
|
667
668
|
readonly call_id?: string | undefined;
|
|
668
669
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -693,7 +694,7 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
|
|
|
693
694
|
readonly type: string;
|
|
694
695
|
readonly id?: string | undefined;
|
|
695
696
|
readonly name?: string | undefined;
|
|
696
|
-
readonly namespace?: string | undefined;
|
|
697
|
+
readonly namespace?: string | null | undefined;
|
|
697
698
|
readonly arguments?: string | undefined;
|
|
698
699
|
readonly call_id?: string | undefined;
|
|
699
700
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -1658,6 +1659,7 @@ export declare const protocol: Protocol<{
|
|
|
1658
1659
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1659
1660
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1660
1661
|
} | undefined;
|
|
1662
|
+
readonly temperature?: number | undefined;
|
|
1661
1663
|
readonly tools?: readonly ({
|
|
1662
1664
|
readonly [x: string]: unknown;
|
|
1663
1665
|
readonly type: string;
|
|
@@ -1673,7 +1675,6 @@ export declare const protocol: Protocol<{
|
|
|
1673
1675
|
readonly text?: {
|
|
1674
1676
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1675
1677
|
} | undefined;
|
|
1676
|
-
readonly temperature?: number | undefined;
|
|
1677
1678
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1678
1679
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1679
1680
|
readonly type: "function";
|
|
@@ -1717,7 +1718,7 @@ export declare const protocol: Protocol<{
|
|
|
1717
1718
|
readonly type: string;
|
|
1718
1719
|
readonly id?: string | undefined;
|
|
1719
1720
|
readonly name?: string | undefined;
|
|
1720
|
-
readonly namespace?: string | undefined;
|
|
1721
|
+
readonly namespace?: string | null | undefined;
|
|
1721
1722
|
readonly arguments?: string | undefined;
|
|
1722
1723
|
readonly call_id?: string | undefined;
|
|
1723
1724
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -1748,7 +1749,7 @@ export declare const protocol: Protocol<{
|
|
|
1748
1749
|
readonly type: string;
|
|
1749
1750
|
readonly id?: string | undefined;
|
|
1750
1751
|
readonly name?: string | undefined;
|
|
1751
|
-
readonly namespace?: string | undefined;
|
|
1752
|
+
readonly namespace?: string | null | undefined;
|
|
1752
1753
|
readonly arguments?: string | undefined;
|
|
1753
1754
|
readonly call_id?: string | undefined;
|
|
1754
1755
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -1894,6 +1895,7 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1894
1895
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1895
1896
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1896
1897
|
} | undefined;
|
|
1898
|
+
readonly temperature?: number | undefined;
|
|
1897
1899
|
readonly tools?: readonly ({
|
|
1898
1900
|
readonly [x: string]: unknown;
|
|
1899
1901
|
readonly type: string;
|
|
@@ -1909,7 +1911,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1909
1911
|
readonly text?: {
|
|
1910
1912
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1911
1913
|
} | undefined;
|
|
1912
|
-
readonly temperature?: number | undefined;
|
|
1913
1914
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1914
1915
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1915
1916
|
readonly type: "function";
|
|
@@ -241,7 +241,7 @@ export const StreamItem = Schema.StructWithRest(Schema.Struct({
|
|
|
241
241
|
id: Schema.optional(Schema.String),
|
|
242
242
|
call_id: Schema.optional(Schema.String),
|
|
243
243
|
name: Schema.optional(Schema.String),
|
|
244
|
-
namespace:
|
|
244
|
+
namespace: optionalNull(Schema.String),
|
|
245
245
|
arguments: Schema.optional(Schema.String),
|
|
246
246
|
encrypted_content: optionalNull(Schema.String),
|
|
247
247
|
}), [Schema.Record(Schema.String, Schema.Unknown)]);
|
|
@@ -714,6 +714,8 @@ const ITEM_ID_PREFIX = {
|
|
|
714
714
|
// otherwise it gets a locally minted one.
|
|
715
715
|
const resolveItem = (state, item, index) => ({
|
|
716
716
|
...item,
|
|
717
|
+
// Some gateways serialize an absent namespace as null.
|
|
718
|
+
namespace: item.namespace ?? undefined,
|
|
717
719
|
id: item.id ??
|
|
718
720
|
(index === undefined ? undefined : state.outputItems[index]) ??
|
|
719
721
|
`${ITEM_ID_PREFIX[item.type] ?? "item"}_${crypto.randomUUID().replaceAll("-", "")}`,
|
|
@@ -1112,6 +1112,7 @@ export declare const protocol: Protocol<{
|
|
|
1112
1112
|
readonly stream: true;
|
|
1113
1113
|
readonly max_completion_tokens?: number | undefined;
|
|
1114
1114
|
readonly max_tokens?: number | undefined;
|
|
1115
|
+
readonly temperature?: number | undefined;
|
|
1115
1116
|
readonly tools?: readonly {
|
|
1116
1117
|
readonly function: {
|
|
1117
1118
|
readonly description: string;
|
|
@@ -1128,7 +1129,6 @@ export declare const protocol: Protocol<{
|
|
|
1128
1129
|
} | undefined;
|
|
1129
1130
|
}[] | undefined;
|
|
1130
1131
|
readonly stop?: readonly string[] | undefined;
|
|
1131
|
-
readonly temperature?: number | undefined;
|
|
1132
1132
|
readonly seed?: number | undefined;
|
|
1133
1133
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1134
1134
|
readonly type: "function";
|
|
@@ -1307,6 +1307,7 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1307
1307
|
readonly stream: true;
|
|
1308
1308
|
readonly max_completion_tokens?: number | undefined;
|
|
1309
1309
|
readonly max_tokens?: number | undefined;
|
|
1310
|
+
readonly temperature?: number | undefined;
|
|
1310
1311
|
readonly tools?: readonly {
|
|
1311
1312
|
readonly function: {
|
|
1312
1313
|
readonly description: string;
|
|
@@ -1323,7 +1324,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1323
1324
|
} | undefined;
|
|
1324
1325
|
}[] | undefined;
|
|
1325
1326
|
readonly stop?: readonly string[] | undefined;
|
|
1326
|
-
readonly temperature?: number | undefined;
|
|
1327
1327
|
readonly seed?: number | undefined;
|
|
1328
1328
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1329
1329
|
readonly type: "function";
|
|
@@ -1429,6 +1429,7 @@ export declare const route: Route<{
|
|
|
1429
1429
|
readonly stream: true;
|
|
1430
1430
|
readonly max_completion_tokens?: number | undefined;
|
|
1431
1431
|
readonly max_tokens?: number | undefined;
|
|
1432
|
+
readonly temperature?: number | undefined;
|
|
1432
1433
|
readonly tools?: readonly {
|
|
1433
1434
|
readonly function: {
|
|
1434
1435
|
readonly description: string;
|
|
@@ -1445,7 +1446,6 @@ export declare const route: Route<{
|
|
|
1445
1446
|
} | undefined;
|
|
1446
1447
|
}[] | undefined;
|
|
1447
1448
|
readonly stop?: readonly string[] | undefined;
|
|
1448
|
-
readonly temperature?: number | undefined;
|
|
1449
1449
|
readonly seed?: number | undefined;
|
|
1450
1450
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
1451
1451
|
readonly type: "function";
|
|
@@ -94,6 +94,7 @@ export declare const route: Route<{
|
|
|
94
94
|
readonly stream: true;
|
|
95
95
|
readonly max_completion_tokens?: number | undefined;
|
|
96
96
|
readonly max_tokens?: number | undefined;
|
|
97
|
+
readonly temperature?: number | undefined;
|
|
97
98
|
readonly tools?: readonly {
|
|
98
99
|
readonly function: {
|
|
99
100
|
readonly description: string;
|
|
@@ -110,7 +111,6 @@ export declare const route: Route<{
|
|
|
110
111
|
} | undefined;
|
|
111
112
|
}[] | undefined;
|
|
112
113
|
readonly stop?: readonly string[] | undefined;
|
|
113
|
-
readonly temperature?: number | undefined;
|
|
114
114
|
readonly seed?: number | undefined;
|
|
115
115
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
116
116
|
readonly type: "function";
|
|
@@ -139,6 +139,7 @@ export declare const route: Route<{
|
|
|
139
139
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
140
140
|
readonly effort?: import("../index.js").ReasoningEffort | undefined;
|
|
141
141
|
} | undefined;
|
|
142
|
+
readonly temperature?: number | undefined;
|
|
142
143
|
readonly tools?: readonly ({
|
|
143
144
|
readonly [x: string]: unknown;
|
|
144
145
|
readonly type: string;
|
|
@@ -154,7 +155,6 @@ export declare const route: Route<{
|
|
|
154
155
|
readonly text?: {
|
|
155
156
|
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
156
157
|
} | undefined;
|
|
157
|
-
readonly temperature?: number | undefined;
|
|
158
158
|
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
159
159
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
160
160
|
readonly type: "function";
|
|
@@ -337,6 +337,7 @@ export declare const protocol: Protocol<{
|
|
|
337
337
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
338
338
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
339
339
|
} | undefined;
|
|
340
|
+
readonly temperature?: number | undefined;
|
|
340
341
|
readonly tools?: readonly ({
|
|
341
342
|
readonly type: "function";
|
|
342
343
|
readonly description: string;
|
|
@@ -372,7 +373,6 @@ export declare const protocol: Protocol<{
|
|
|
372
373
|
readonly text?: {
|
|
373
374
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
374
375
|
} | undefined;
|
|
375
|
-
readonly temperature?: number | undefined;
|
|
376
376
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
377
377
|
readonly context_management?: readonly {
|
|
378
378
|
readonly type: "compaction";
|
|
@@ -422,7 +422,7 @@ export declare const protocol: Protocol<{
|
|
|
422
422
|
readonly type: string;
|
|
423
423
|
readonly id?: string | undefined;
|
|
424
424
|
readonly name?: string | undefined;
|
|
425
|
-
readonly namespace?: string | undefined;
|
|
425
|
+
readonly namespace?: string | null | undefined;
|
|
426
426
|
readonly arguments?: string | undefined;
|
|
427
427
|
readonly call_id?: string | undefined;
|
|
428
428
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -453,7 +453,7 @@ export declare const protocol: Protocol<{
|
|
|
453
453
|
readonly type: string;
|
|
454
454
|
readonly id?: string | undefined;
|
|
455
455
|
readonly name?: string | undefined;
|
|
456
|
-
readonly namespace?: string | undefined;
|
|
456
|
+
readonly namespace?: string | null | undefined;
|
|
457
457
|
readonly arguments?: string | undefined;
|
|
458
458
|
readonly call_id?: string | undefined;
|
|
459
459
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -599,6 +599,7 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
599
599
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
600
600
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
601
601
|
} | undefined;
|
|
602
|
+
readonly temperature?: number | undefined;
|
|
602
603
|
readonly tools?: readonly ({
|
|
603
604
|
readonly type: "function";
|
|
604
605
|
readonly description: string;
|
|
@@ -634,7 +635,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
634
635
|
readonly text?: {
|
|
635
636
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
636
637
|
} | undefined;
|
|
637
|
-
readonly temperature?: number | undefined;
|
|
638
638
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
639
639
|
readonly context_management?: readonly {
|
|
640
640
|
readonly type: "compaction";
|
|
@@ -803,6 +803,7 @@ export declare const channelTransport: (options: import("./open-responses-channe
|
|
|
803
803
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
804
804
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
805
805
|
} | undefined;
|
|
806
|
+
readonly temperature?: number | undefined;
|
|
806
807
|
readonly tools?: readonly ({
|
|
807
808
|
readonly type: "function";
|
|
808
809
|
readonly description: string;
|
|
@@ -838,7 +839,6 @@ export declare const channelTransport: (options: import("./open-responses-channe
|
|
|
838
839
|
readonly text?: {
|
|
839
840
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
840
841
|
} | undefined;
|
|
841
|
-
readonly temperature?: number | undefined;
|
|
842
842
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
843
843
|
readonly context_management?: readonly {
|
|
844
844
|
readonly type: "compaction";
|
|
@@ -1007,6 +1007,7 @@ export declare const transport: import("../route/transport/index.js").Transport<
|
|
|
1007
1007
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1008
1008
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1009
1009
|
} | undefined;
|
|
1010
|
+
readonly temperature?: number | undefined;
|
|
1010
1011
|
readonly tools?: readonly ({
|
|
1011
1012
|
readonly type: "function";
|
|
1012
1013
|
readonly description: string;
|
|
@@ -1042,7 +1043,6 @@ export declare const transport: import("../route/transport/index.js").Transport<
|
|
|
1042
1043
|
readonly text?: {
|
|
1043
1044
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1044
1045
|
} | undefined;
|
|
1045
|
-
readonly temperature?: number | undefined;
|
|
1046
1046
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1047
1047
|
readonly context_management?: readonly {
|
|
1048
1048
|
readonly type: "compaction";
|
|
@@ -1211,6 +1211,7 @@ export declare const route: Route<{
|
|
|
1211
1211
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1212
1212
|
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1213
1213
|
} | undefined;
|
|
1214
|
+
readonly temperature?: number | undefined;
|
|
1214
1215
|
readonly tools?: readonly ({
|
|
1215
1216
|
readonly type: "function";
|
|
1216
1217
|
readonly description: string;
|
|
@@ -1246,7 +1247,6 @@ export declare const route: Route<{
|
|
|
1246
1247
|
readonly text?: {
|
|
1247
1248
|
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
1248
1249
|
} | undefined;
|
|
1249
|
-
readonly temperature?: number | undefined;
|
|
1250
1250
|
readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
|
|
1251
1251
|
readonly context_management?: readonly {
|
|
1252
1252
|
readonly type: "compaction";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import type { CacheHint } from "../../schema/index.js";
|
|
2
|
+
import type { CacheHint, LLMRequest } from "../../schema/index.js";
|
|
3
3
|
export declare const CachePointBlock: Schema.Struct<{
|
|
4
4
|
readonly cachePoint: Schema.Struct<{
|
|
5
5
|
readonly type: Schema.tag<"default">;
|
|
@@ -8,7 +8,7 @@ export declare const CachePointBlock: Schema.Struct<{
|
|
|
8
8
|
}>;
|
|
9
9
|
export type CachePointBlock = Schema.Schema.Type<typeof CachePointBlock>;
|
|
10
10
|
export declare const BEDROCK_BREAKPOINT_CAP = 4;
|
|
11
|
-
export declare const breakpoints: (
|
|
11
|
+
export declare const breakpoints: (model: LLMRequest["model"]) => {
|
|
12
12
|
supported: boolean;
|
|
13
13
|
ttl1h: boolean;
|
|
14
14
|
remaining: number;
|
|
@@ -21,14 +21,16 @@ const CLAUDE_5M = [
|
|
|
21
21
|
];
|
|
22
22
|
// Callers share the four-breakpoint budget across system, messages, and tools.
|
|
23
23
|
export const BEDROCK_BREAKPOINT_CAP = 4;
|
|
24
|
-
export const breakpoints = (
|
|
24
|
+
export const breakpoints = (model) => {
|
|
25
25
|
// Substring matching also handles regional prefixes and model-bearing ARNs.
|
|
26
|
-
const short = CLAUDE_5M.some((id) =>
|
|
26
|
+
const short = CLAUDE_5M.some((id) => model.id.includes(id));
|
|
27
27
|
return {
|
|
28
28
|
...newBreakpoints(BEDROCK_BREAKPOINT_CAP),
|
|
29
|
+
// An explicit Anthropic cache format opts opaque IDs such as application inference profile ARNs in.
|
|
29
30
|
// Assume modern Claude releases retain caching support; older generations need an explicit exception.
|
|
30
31
|
// Other model families use implicit caching where available.
|
|
31
|
-
supported:
|
|
32
|
+
supported: model.compatibility?.cacheFormat === "anthropic" ||
|
|
33
|
+
(model.id.includes("anthropic.claude-") && (short || !LEGACY_CLAUDE.some((id) => model.id.includes(id)))),
|
|
32
34
|
ttl1h: !short,
|
|
33
35
|
};
|
|
34
36
|
};
|
|
@@ -149,6 +149,7 @@ export declare const protocol: Protocol<{
|
|
|
149
149
|
} | undefined;
|
|
150
150
|
readonly max_completion_tokens?: number | undefined;
|
|
151
151
|
readonly max_tokens?: number | undefined;
|
|
152
|
+
readonly temperature?: number | undefined;
|
|
152
153
|
readonly tools?: readonly {
|
|
153
154
|
readonly function: {
|
|
154
155
|
readonly description: string;
|
|
@@ -166,7 +167,6 @@ export declare const protocol: Protocol<{
|
|
|
166
167
|
}[] | undefined;
|
|
167
168
|
readonly stop?: readonly string[] | undefined;
|
|
168
169
|
readonly user?: string | undefined;
|
|
169
|
-
readonly temperature?: number | undefined;
|
|
170
170
|
readonly seed?: number | undefined;
|
|
171
171
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
172
172
|
readonly type: "function";
|
|
@@ -134,6 +134,7 @@ export declare const protocol: Protocol<{
|
|
|
134
134
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
135
135
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
136
136
|
} | undefined;
|
|
137
|
+
readonly temperature?: number | undefined;
|
|
137
138
|
readonly tools?: readonly ({
|
|
138
139
|
readonly [x: string]: unknown;
|
|
139
140
|
readonly type: string;
|
|
@@ -149,7 +150,6 @@ export declare const protocol: Protocol<{
|
|
|
149
150
|
readonly text?: {
|
|
150
151
|
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
151
152
|
} | undefined;
|
|
152
|
-
readonly temperature?: number | undefined;
|
|
153
153
|
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
154
154
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
155
155
|
readonly type: "function";
|
|
@@ -193,7 +193,7 @@ export declare const protocol: Protocol<{
|
|
|
193
193
|
readonly type: string;
|
|
194
194
|
readonly id?: string | undefined;
|
|
195
195
|
readonly name?: string | undefined;
|
|
196
|
-
readonly namespace?: string | undefined;
|
|
196
|
+
readonly namespace?: string | null | undefined;
|
|
197
197
|
readonly arguments?: string | undefined;
|
|
198
198
|
readonly call_id?: string | undefined;
|
|
199
199
|
readonly encrypted_content?: string | null | undefined;
|
|
@@ -224,7 +224,7 @@ export declare const protocol: Protocol<{
|
|
|
224
224
|
readonly type: string;
|
|
225
225
|
readonly id?: string | undefined;
|
|
226
226
|
readonly name?: string | undefined;
|
|
227
|
-
readonly namespace?: string | undefined;
|
|
227
|
+
readonly namespace?: string | null | undefined;
|
|
228
228
|
readonly arguments?: string | undefined;
|
|
229
229
|
readonly call_id?: string | undefined;
|
|
230
230
|
readonly encrypted_content?: string | null | undefined;
|