@cloudflare/workers-types 4.20260524.1 → 4.20260526.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +16 -20
- package/2021-11-03/index.ts +16 -20
- package/2022-01-31/index.d.ts +16 -20
- package/2022-01-31/index.ts +16 -20
- package/2022-03-21/index.d.ts +16 -20
- package/2022-03-21/index.ts +16 -20
- package/2022-08-04/index.d.ts +16 -20
- package/2022-08-04/index.ts +16 -20
- package/2022-10-31/index.d.ts +16 -20
- package/2022-10-31/index.ts +16 -20
- package/2022-11-30/index.d.ts +16 -20
- package/2022-11-30/index.ts +16 -20
- package/2023-03-01/index.d.ts +16 -20
- package/2023-03-01/index.ts +16 -20
- package/2023-07-01/index.d.ts +16 -20
- package/2023-07-01/index.ts +16 -20
- package/experimental/index.d.ts +16 -20
- package/experimental/index.ts +16 -20
- package/index.d.ts +16 -20
- package/index.ts +16 -20
- package/latest/index.d.ts +16 -20
- package/latest/index.ts +16 -20
- package/oldest/index.d.ts +16 -20
- package/oldest/index.ts +16 -20
- package/package.json +1 -1
package/2022-10-31/index.d.ts
CHANGED
|
@@ -5465,9 +5465,6 @@ type ChatCompletionChoice = {
|
|
|
5465
5465
|
| "function_call";
|
|
5466
5466
|
logprobs: ChatCompletionLogprobs | null;
|
|
5467
5467
|
};
|
|
5468
|
-
type ChatCompletionsPromptInput = {
|
|
5469
|
-
prompt: string;
|
|
5470
|
-
} & ChatCompletionsCommonOptions;
|
|
5471
5468
|
type ChatCompletionsMessagesInput = {
|
|
5472
5469
|
messages: Array<ChatCompletionMessageParam>;
|
|
5473
5470
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9592,11 +9589,11 @@ declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9592
9589
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9593
9590
|
}
|
|
9594
9591
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9595
|
-
inputs: XOR<ResponsesInput,
|
|
9592
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9596
9593
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9597
9594
|
}
|
|
9598
9595
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9599
|
-
inputs: XOR<ResponsesInput,
|
|
9596
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9600
9597
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9601
9598
|
}
|
|
9602
9599
|
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10691,7 +10688,7 @@ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10691
10688
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10692
10689
|
}
|
|
10693
10690
|
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10694
|
-
inputs:
|
|
10691
|
+
inputs: ChatCompletionsInput;
|
|
10695
10692
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10696
10693
|
}
|
|
10697
10694
|
declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10699,7 +10696,7 @@ declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10699
10696
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10700
10697
|
}
|
|
10701
10698
|
declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10702
|
-
inputs:
|
|
10699
|
+
inputs: ChatCompletionsInput;
|
|
10703
10700
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10704
10701
|
}
|
|
10705
10702
|
interface AiModels {
|
|
@@ -10846,16 +10843,8 @@ type AiModelsSearchObject = {
|
|
|
10846
10843
|
value: string;
|
|
10847
10844
|
}[];
|
|
10848
10845
|
};
|
|
10849
|
-
type ChatCompletionsBase =
|
|
10850
|
-
|
|
10851
|
-
ChatCompletionsMessagesInput
|
|
10852
|
-
>;
|
|
10853
|
-
type ChatCompletionsInput = XOR<
|
|
10854
|
-
ChatCompletionsBase,
|
|
10855
|
-
{
|
|
10856
|
-
requests: ChatCompletionsBase[];
|
|
10857
|
-
}
|
|
10858
|
-
>;
|
|
10846
|
+
type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10847
|
+
type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10859
10848
|
interface InferenceUpstreamError extends Error {}
|
|
10860
10849
|
interface AiInternalError extends Error {}
|
|
10861
10850
|
type AiModelListType = Record<string, any>;
|
|
@@ -10918,9 +10907,16 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
10918
10907
|
inputs: AiModelList[Name]["inputs"],
|
|
10919
10908
|
options?: AiOptions,
|
|
10920
10909
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10921
|
-
// Unknown model (
|
|
10922
|
-
|
|
10923
|
-
|
|
10910
|
+
// Unknown model (fallback).
|
|
10911
|
+
//
|
|
10912
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10913
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10914
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10915
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10916
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10917
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10918
|
+
run<Model extends string>(
|
|
10919
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10924
10920
|
inputs: Record<string, unknown>,
|
|
10925
10921
|
options?: AiOptions,
|
|
10926
10922
|
): Promise<Record<string, unknown>>;
|
package/2022-10-31/index.ts
CHANGED
|
@@ -5474,9 +5474,6 @@ export type ChatCompletionChoice = {
|
|
|
5474
5474
|
| "function_call";
|
|
5475
5475
|
logprobs: ChatCompletionLogprobs | null;
|
|
5476
5476
|
};
|
|
5477
|
-
export type ChatCompletionsPromptInput = {
|
|
5478
|
-
prompt: string;
|
|
5479
|
-
} & ChatCompletionsCommonOptions;
|
|
5480
5477
|
export type ChatCompletionsMessagesInput = {
|
|
5481
5478
|
messages: Array<ChatCompletionMessageParam>;
|
|
5482
5479
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9602,11 +9599,11 @@ export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9602
9599
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9603
9600
|
}
|
|
9604
9601
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9605
|
-
inputs: XOR<ResponsesInput,
|
|
9602
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9606
9603
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9607
9604
|
}
|
|
9608
9605
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9609
|
-
inputs: XOR<ResponsesInput,
|
|
9606
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9610
9607
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9611
9608
|
}
|
|
9612
9609
|
export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10701,7 +10698,7 @@ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10701
10698
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10702
10699
|
}
|
|
10703
10700
|
export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10704
|
-
inputs:
|
|
10701
|
+
inputs: ChatCompletionsInput;
|
|
10705
10702
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10706
10703
|
}
|
|
10707
10704
|
export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10709,7 +10706,7 @@ export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10709
10706
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10710
10707
|
}
|
|
10711
10708
|
export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10712
|
-
inputs:
|
|
10709
|
+
inputs: ChatCompletionsInput;
|
|
10713
10710
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10714
10711
|
}
|
|
10715
10712
|
export interface AiModels {
|
|
@@ -10856,16 +10853,8 @@ export type AiModelsSearchObject = {
|
|
|
10856
10853
|
value: string;
|
|
10857
10854
|
}[];
|
|
10858
10855
|
};
|
|
10859
|
-
export type ChatCompletionsBase =
|
|
10860
|
-
|
|
10861
|
-
ChatCompletionsMessagesInput
|
|
10862
|
-
>;
|
|
10863
|
-
export type ChatCompletionsInput = XOR<
|
|
10864
|
-
ChatCompletionsBase,
|
|
10865
|
-
{
|
|
10866
|
-
requests: ChatCompletionsBase[];
|
|
10867
|
-
}
|
|
10868
|
-
>;
|
|
10856
|
+
export type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10857
|
+
export type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10869
10858
|
export interface InferenceUpstreamError extends Error {}
|
|
10870
10859
|
export interface AiInternalError extends Error {}
|
|
10871
10860
|
export type AiModelListType = Record<string, any>;
|
|
@@ -10930,9 +10919,16 @@ export declare abstract class Ai<
|
|
|
10930
10919
|
inputs: AiModelList[Name]["inputs"],
|
|
10931
10920
|
options?: AiOptions,
|
|
10932
10921
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10933
|
-
// Unknown model (
|
|
10934
|
-
|
|
10935
|
-
|
|
10922
|
+
// Unknown model (fallback).
|
|
10923
|
+
//
|
|
10924
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10925
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10926
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10927
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10928
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10929
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10930
|
+
run<Model extends string>(
|
|
10931
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10936
10932
|
inputs: Record<string, unknown>,
|
|
10937
10933
|
options?: AiOptions,
|
|
10938
10934
|
): Promise<Record<string, unknown>>;
|
package/2022-11-30/index.d.ts
CHANGED
|
@@ -5470,9 +5470,6 @@ type ChatCompletionChoice = {
|
|
|
5470
5470
|
| "function_call";
|
|
5471
5471
|
logprobs: ChatCompletionLogprobs | null;
|
|
5472
5472
|
};
|
|
5473
|
-
type ChatCompletionsPromptInput = {
|
|
5474
|
-
prompt: string;
|
|
5475
|
-
} & ChatCompletionsCommonOptions;
|
|
5476
5473
|
type ChatCompletionsMessagesInput = {
|
|
5477
5474
|
messages: Array<ChatCompletionMessageParam>;
|
|
5478
5475
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9597,11 +9594,11 @@ declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9597
9594
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9598
9595
|
}
|
|
9599
9596
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9600
|
-
inputs: XOR<ResponsesInput,
|
|
9597
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9601
9598
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9602
9599
|
}
|
|
9603
9600
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9604
|
-
inputs: XOR<ResponsesInput,
|
|
9601
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9605
9602
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9606
9603
|
}
|
|
9607
9604
|
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10696,7 +10693,7 @@ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10696
10693
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10697
10694
|
}
|
|
10698
10695
|
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10699
|
-
inputs:
|
|
10696
|
+
inputs: ChatCompletionsInput;
|
|
10700
10697
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10701
10698
|
}
|
|
10702
10699
|
declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10704,7 +10701,7 @@ declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10704
10701
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10705
10702
|
}
|
|
10706
10703
|
declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10707
|
-
inputs:
|
|
10704
|
+
inputs: ChatCompletionsInput;
|
|
10708
10705
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10709
10706
|
}
|
|
10710
10707
|
interface AiModels {
|
|
@@ -10851,16 +10848,8 @@ type AiModelsSearchObject = {
|
|
|
10851
10848
|
value: string;
|
|
10852
10849
|
}[];
|
|
10853
10850
|
};
|
|
10854
|
-
type ChatCompletionsBase =
|
|
10855
|
-
|
|
10856
|
-
ChatCompletionsMessagesInput
|
|
10857
|
-
>;
|
|
10858
|
-
type ChatCompletionsInput = XOR<
|
|
10859
|
-
ChatCompletionsBase,
|
|
10860
|
-
{
|
|
10861
|
-
requests: ChatCompletionsBase[];
|
|
10862
|
-
}
|
|
10863
|
-
>;
|
|
10851
|
+
type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10852
|
+
type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10864
10853
|
interface InferenceUpstreamError extends Error {}
|
|
10865
10854
|
interface AiInternalError extends Error {}
|
|
10866
10855
|
type AiModelListType = Record<string, any>;
|
|
@@ -10923,9 +10912,16 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
10923
10912
|
inputs: AiModelList[Name]["inputs"],
|
|
10924
10913
|
options?: AiOptions,
|
|
10925
10914
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10926
|
-
// Unknown model (
|
|
10927
|
-
|
|
10928
|
-
|
|
10915
|
+
// Unknown model (fallback).
|
|
10916
|
+
//
|
|
10917
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10918
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10919
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10920
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10921
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10922
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10923
|
+
run<Model extends string>(
|
|
10924
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10929
10925
|
inputs: Record<string, unknown>,
|
|
10930
10926
|
options?: AiOptions,
|
|
10931
10927
|
): Promise<Record<string, unknown>>;
|
package/2022-11-30/index.ts
CHANGED
|
@@ -5479,9 +5479,6 @@ export type ChatCompletionChoice = {
|
|
|
5479
5479
|
| "function_call";
|
|
5480
5480
|
logprobs: ChatCompletionLogprobs | null;
|
|
5481
5481
|
};
|
|
5482
|
-
export type ChatCompletionsPromptInput = {
|
|
5483
|
-
prompt: string;
|
|
5484
|
-
} & ChatCompletionsCommonOptions;
|
|
5485
5482
|
export type ChatCompletionsMessagesInput = {
|
|
5486
5483
|
messages: Array<ChatCompletionMessageParam>;
|
|
5487
5484
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9607,11 +9604,11 @@ export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9607
9604
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9608
9605
|
}
|
|
9609
9606
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9610
|
-
inputs: XOR<ResponsesInput,
|
|
9607
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9611
9608
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9612
9609
|
}
|
|
9613
9610
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9614
|
-
inputs: XOR<ResponsesInput,
|
|
9611
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9615
9612
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9616
9613
|
}
|
|
9617
9614
|
export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10706,7 +10703,7 @@ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10706
10703
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10707
10704
|
}
|
|
10708
10705
|
export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10709
|
-
inputs:
|
|
10706
|
+
inputs: ChatCompletionsInput;
|
|
10710
10707
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10711
10708
|
}
|
|
10712
10709
|
export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10714,7 +10711,7 @@ export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10714
10711
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10715
10712
|
}
|
|
10716
10713
|
export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10717
|
-
inputs:
|
|
10714
|
+
inputs: ChatCompletionsInput;
|
|
10718
10715
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10719
10716
|
}
|
|
10720
10717
|
export interface AiModels {
|
|
@@ -10861,16 +10858,8 @@ export type AiModelsSearchObject = {
|
|
|
10861
10858
|
value: string;
|
|
10862
10859
|
}[];
|
|
10863
10860
|
};
|
|
10864
|
-
export type ChatCompletionsBase =
|
|
10865
|
-
|
|
10866
|
-
ChatCompletionsMessagesInput
|
|
10867
|
-
>;
|
|
10868
|
-
export type ChatCompletionsInput = XOR<
|
|
10869
|
-
ChatCompletionsBase,
|
|
10870
|
-
{
|
|
10871
|
-
requests: ChatCompletionsBase[];
|
|
10872
|
-
}
|
|
10873
|
-
>;
|
|
10861
|
+
export type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10862
|
+
export type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10874
10863
|
export interface InferenceUpstreamError extends Error {}
|
|
10875
10864
|
export interface AiInternalError extends Error {}
|
|
10876
10865
|
export type AiModelListType = Record<string, any>;
|
|
@@ -10935,9 +10924,16 @@ export declare abstract class Ai<
|
|
|
10935
10924
|
inputs: AiModelList[Name]["inputs"],
|
|
10936
10925
|
options?: AiOptions,
|
|
10937
10926
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10938
|
-
// Unknown model (
|
|
10939
|
-
|
|
10940
|
-
|
|
10927
|
+
// Unknown model (fallback).
|
|
10928
|
+
//
|
|
10929
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10930
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10931
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10932
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10933
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10934
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10935
|
+
run<Model extends string>(
|
|
10936
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10941
10937
|
inputs: Record<string, unknown>,
|
|
10942
10938
|
options?: AiOptions,
|
|
10943
10939
|
): Promise<Record<string, unknown>>;
|
package/2023-03-01/index.d.ts
CHANGED
|
@@ -5476,9 +5476,6 @@ type ChatCompletionChoice = {
|
|
|
5476
5476
|
| "function_call";
|
|
5477
5477
|
logprobs: ChatCompletionLogprobs | null;
|
|
5478
5478
|
};
|
|
5479
|
-
type ChatCompletionsPromptInput = {
|
|
5480
|
-
prompt: string;
|
|
5481
|
-
} & ChatCompletionsCommonOptions;
|
|
5482
5479
|
type ChatCompletionsMessagesInput = {
|
|
5483
5480
|
messages: Array<ChatCompletionMessageParam>;
|
|
5484
5481
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9603,11 +9600,11 @@ declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9603
9600
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9604
9601
|
}
|
|
9605
9602
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9606
|
-
inputs: XOR<ResponsesInput,
|
|
9603
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9607
9604
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9608
9605
|
}
|
|
9609
9606
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9610
|
-
inputs: XOR<ResponsesInput,
|
|
9607
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9611
9608
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9612
9609
|
}
|
|
9613
9610
|
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10702,7 +10699,7 @@ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10702
10699
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10703
10700
|
}
|
|
10704
10701
|
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10705
|
-
inputs:
|
|
10702
|
+
inputs: ChatCompletionsInput;
|
|
10706
10703
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10707
10704
|
}
|
|
10708
10705
|
declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10710,7 +10707,7 @@ declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10710
10707
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10711
10708
|
}
|
|
10712
10709
|
declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10713
|
-
inputs:
|
|
10710
|
+
inputs: ChatCompletionsInput;
|
|
10714
10711
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10715
10712
|
}
|
|
10716
10713
|
interface AiModels {
|
|
@@ -10857,16 +10854,8 @@ type AiModelsSearchObject = {
|
|
|
10857
10854
|
value: string;
|
|
10858
10855
|
}[];
|
|
10859
10856
|
};
|
|
10860
|
-
type ChatCompletionsBase =
|
|
10861
|
-
|
|
10862
|
-
ChatCompletionsMessagesInput
|
|
10863
|
-
>;
|
|
10864
|
-
type ChatCompletionsInput = XOR<
|
|
10865
|
-
ChatCompletionsBase,
|
|
10866
|
-
{
|
|
10867
|
-
requests: ChatCompletionsBase[];
|
|
10868
|
-
}
|
|
10869
|
-
>;
|
|
10857
|
+
type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10858
|
+
type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10870
10859
|
interface InferenceUpstreamError extends Error {}
|
|
10871
10860
|
interface AiInternalError extends Error {}
|
|
10872
10861
|
type AiModelListType = Record<string, any>;
|
|
@@ -10929,9 +10918,16 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
10929
10918
|
inputs: AiModelList[Name]["inputs"],
|
|
10930
10919
|
options?: AiOptions,
|
|
10931
10920
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10932
|
-
// Unknown model (
|
|
10933
|
-
|
|
10934
|
-
|
|
10921
|
+
// Unknown model (fallback).
|
|
10922
|
+
//
|
|
10923
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10924
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10925
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10926
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10927
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10928
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10929
|
+
run<Model extends string>(
|
|
10930
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10935
10931
|
inputs: Record<string, unknown>,
|
|
10936
10932
|
options?: AiOptions,
|
|
10937
10933
|
): Promise<Record<string, unknown>>;
|
package/2023-03-01/index.ts
CHANGED
|
@@ -5485,9 +5485,6 @@ export type ChatCompletionChoice = {
|
|
|
5485
5485
|
| "function_call";
|
|
5486
5486
|
logprobs: ChatCompletionLogprobs | null;
|
|
5487
5487
|
};
|
|
5488
|
-
export type ChatCompletionsPromptInput = {
|
|
5489
|
-
prompt: string;
|
|
5490
|
-
} & ChatCompletionsCommonOptions;
|
|
5491
5488
|
export type ChatCompletionsMessagesInput = {
|
|
5492
5489
|
messages: Array<ChatCompletionMessageParam>;
|
|
5493
5490
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9613,11 +9610,11 @@ export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9613
9610
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9614
9611
|
}
|
|
9615
9612
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9616
|
-
inputs: XOR<ResponsesInput,
|
|
9613
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9617
9614
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9618
9615
|
}
|
|
9619
9616
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9620
|
-
inputs: XOR<ResponsesInput,
|
|
9617
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9621
9618
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9622
9619
|
}
|
|
9623
9620
|
export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10712,7 +10709,7 @@ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10712
10709
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10713
10710
|
}
|
|
10714
10711
|
export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10715
|
-
inputs:
|
|
10712
|
+
inputs: ChatCompletionsInput;
|
|
10716
10713
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10717
10714
|
}
|
|
10718
10715
|
export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10720,7 +10717,7 @@ export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10720
10717
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10721
10718
|
}
|
|
10722
10719
|
export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10723
|
-
inputs:
|
|
10720
|
+
inputs: ChatCompletionsInput;
|
|
10724
10721
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10725
10722
|
}
|
|
10726
10723
|
export interface AiModels {
|
|
@@ -10867,16 +10864,8 @@ export type AiModelsSearchObject = {
|
|
|
10867
10864
|
value: string;
|
|
10868
10865
|
}[];
|
|
10869
10866
|
};
|
|
10870
|
-
export type ChatCompletionsBase =
|
|
10871
|
-
|
|
10872
|
-
ChatCompletionsMessagesInput
|
|
10873
|
-
>;
|
|
10874
|
-
export type ChatCompletionsInput = XOR<
|
|
10875
|
-
ChatCompletionsBase,
|
|
10876
|
-
{
|
|
10877
|
-
requests: ChatCompletionsBase[];
|
|
10878
|
-
}
|
|
10879
|
-
>;
|
|
10867
|
+
export type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10868
|
+
export type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10880
10869
|
export interface InferenceUpstreamError extends Error {}
|
|
10881
10870
|
export interface AiInternalError extends Error {}
|
|
10882
10871
|
export type AiModelListType = Record<string, any>;
|
|
@@ -10941,9 +10930,16 @@ export declare abstract class Ai<
|
|
|
10941
10930
|
inputs: AiModelList[Name]["inputs"],
|
|
10942
10931
|
options?: AiOptions,
|
|
10943
10932
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10944
|
-
// Unknown model (
|
|
10945
|
-
|
|
10946
|
-
|
|
10933
|
+
// Unknown model (fallback).
|
|
10934
|
+
//
|
|
10935
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10936
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10937
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10938
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10939
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10940
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10941
|
+
run<Model extends string>(
|
|
10942
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10947
10943
|
inputs: Record<string, unknown>,
|
|
10948
10944
|
options?: AiOptions,
|
|
10949
10945
|
): Promise<Record<string, unknown>>;
|
package/2023-07-01/index.d.ts
CHANGED
|
@@ -5476,9 +5476,6 @@ type ChatCompletionChoice = {
|
|
|
5476
5476
|
| "function_call";
|
|
5477
5477
|
logprobs: ChatCompletionLogprobs | null;
|
|
5478
5478
|
};
|
|
5479
|
-
type ChatCompletionsPromptInput = {
|
|
5480
|
-
prompt: string;
|
|
5481
|
-
} & ChatCompletionsCommonOptions;
|
|
5482
5479
|
type ChatCompletionsMessagesInput = {
|
|
5483
5480
|
messages: Array<ChatCompletionMessageParam>;
|
|
5484
5481
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9603,11 +9600,11 @@ declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9603
9600
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9604
9601
|
}
|
|
9605
9602
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9606
|
-
inputs: XOR<ResponsesInput,
|
|
9603
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9607
9604
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9608
9605
|
}
|
|
9609
9606
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9610
|
-
inputs: XOR<ResponsesInput,
|
|
9607
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9611
9608
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9612
9609
|
}
|
|
9613
9610
|
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10702,7 +10699,7 @@ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10702
10699
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10703
10700
|
}
|
|
10704
10701
|
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10705
|
-
inputs:
|
|
10702
|
+
inputs: ChatCompletionsInput;
|
|
10706
10703
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10707
10704
|
}
|
|
10708
10705
|
declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10710,7 +10707,7 @@ declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10710
10707
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10711
10708
|
}
|
|
10712
10709
|
declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10713
|
-
inputs:
|
|
10710
|
+
inputs: ChatCompletionsInput;
|
|
10714
10711
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10715
10712
|
}
|
|
10716
10713
|
interface AiModels {
|
|
@@ -10857,16 +10854,8 @@ type AiModelsSearchObject = {
|
|
|
10857
10854
|
value: string;
|
|
10858
10855
|
}[];
|
|
10859
10856
|
};
|
|
10860
|
-
type ChatCompletionsBase =
|
|
10861
|
-
|
|
10862
|
-
ChatCompletionsMessagesInput
|
|
10863
|
-
>;
|
|
10864
|
-
type ChatCompletionsInput = XOR<
|
|
10865
|
-
ChatCompletionsBase,
|
|
10866
|
-
{
|
|
10867
|
-
requests: ChatCompletionsBase[];
|
|
10868
|
-
}
|
|
10869
|
-
>;
|
|
10857
|
+
type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10858
|
+
type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10870
10859
|
interface InferenceUpstreamError extends Error {}
|
|
10871
10860
|
interface AiInternalError extends Error {}
|
|
10872
10861
|
type AiModelListType = Record<string, any>;
|
|
@@ -10929,9 +10918,16 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
10929
10918
|
inputs: AiModelList[Name]["inputs"],
|
|
10930
10919
|
options?: AiOptions,
|
|
10931
10920
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10932
|
-
// Unknown model (
|
|
10933
|
-
|
|
10934
|
-
|
|
10921
|
+
// Unknown model (fallback).
|
|
10922
|
+
//
|
|
10923
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10924
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10925
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10926
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10927
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10928
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10929
|
+
run<Model extends string>(
|
|
10930
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10935
10931
|
inputs: Record<string, unknown>,
|
|
10936
10932
|
options?: AiOptions,
|
|
10937
10933
|
): Promise<Record<string, unknown>>;
|
package/2023-07-01/index.ts
CHANGED
|
@@ -5485,9 +5485,6 @@ export type ChatCompletionChoice = {
|
|
|
5485
5485
|
| "function_call";
|
|
5486
5486
|
logprobs: ChatCompletionLogprobs | null;
|
|
5487
5487
|
};
|
|
5488
|
-
export type ChatCompletionsPromptInput = {
|
|
5489
|
-
prompt: string;
|
|
5490
|
-
} & ChatCompletionsCommonOptions;
|
|
5491
5488
|
export type ChatCompletionsMessagesInput = {
|
|
5492
5489
|
messages: Array<ChatCompletionMessageParam>;
|
|
5493
5490
|
} & ChatCompletionsCommonOptions;
|
|
@@ -9613,11 +9610,11 @@ export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
9613
9610
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
9614
9611
|
}
|
|
9615
9612
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
9616
|
-
inputs: XOR<ResponsesInput,
|
|
9613
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9617
9614
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9618
9615
|
}
|
|
9619
9616
|
export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
9620
|
-
inputs: XOR<ResponsesInput,
|
|
9617
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
9621
9618
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
9622
9619
|
}
|
|
9623
9620
|
export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -10712,7 +10709,7 @@ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
10712
10709
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10713
10710
|
}
|
|
10714
10711
|
export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
10715
|
-
inputs:
|
|
10712
|
+
inputs: ChatCompletionsInput;
|
|
10716
10713
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10717
10714
|
}
|
|
10718
10715
|
export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
@@ -10720,7 +10717,7 @@ export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
|
10720
10717
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10721
10718
|
}
|
|
10722
10719
|
export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
10723
|
-
inputs:
|
|
10720
|
+
inputs: ChatCompletionsInput;
|
|
10724
10721
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10725
10722
|
}
|
|
10726
10723
|
export interface AiModels {
|
|
@@ -10867,16 +10864,8 @@ export type AiModelsSearchObject = {
|
|
|
10867
10864
|
value: string;
|
|
10868
10865
|
}[];
|
|
10869
10866
|
};
|
|
10870
|
-
export type ChatCompletionsBase =
|
|
10871
|
-
|
|
10872
|
-
ChatCompletionsMessagesInput
|
|
10873
|
-
>;
|
|
10874
|
-
export type ChatCompletionsInput = XOR<
|
|
10875
|
-
ChatCompletionsBase,
|
|
10876
|
-
{
|
|
10877
|
-
requests: ChatCompletionsBase[];
|
|
10878
|
-
}
|
|
10879
|
-
>;
|
|
10867
|
+
export type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
10868
|
+
export type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
10880
10869
|
export interface InferenceUpstreamError extends Error {}
|
|
10881
10870
|
export interface AiInternalError extends Error {}
|
|
10882
10871
|
export type AiModelListType = Record<string, any>;
|
|
@@ -10941,9 +10930,16 @@ export declare abstract class Ai<
|
|
|
10941
10930
|
inputs: AiModelList[Name]["inputs"],
|
|
10942
10931
|
options?: AiOptions,
|
|
10943
10932
|
): Promise<AiModelList[Name]["postProcessedOutputs"]>;
|
|
10944
|
-
// Unknown model (
|
|
10945
|
-
|
|
10946
|
-
|
|
10933
|
+
// Unknown model (fallback).
|
|
10934
|
+
//
|
|
10935
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
10936
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
10937
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
10938
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
10939
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
10940
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
10941
|
+
run<Model extends string>(
|
|
10942
|
+
model: Model extends keyof AiModelList ? never : Model,
|
|
10947
10943
|
inputs: Record<string, unknown>,
|
|
10948
10944
|
options?: AiOptions,
|
|
10949
10945
|
): Promise<Record<string, unknown>>;
|