@cloudflare/workers-types 5.20260827.1 → 5.20260829.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.
@@ -11789,6 +11789,163 @@ declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
11789
11789
  inputs: ChatCompletionsInput;
11790
11790
  postProcessedOutputs: ChatCompletionsOutput;
11791
11791
  }
11792
+ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code {
11793
+ inputs: ChatCompletionsInput;
11794
+ postProcessedOutputs: ChatCompletionsOutput;
11795
+ }
11796
+ declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_2 {
11797
+ inputs: ChatCompletionsInput;
11798
+ postProcessedOutputs: ChatCompletionsOutput;
11799
+ }
11800
+ interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input {
11801
+ /**
11802
+ * Which Moondream skill to run.
11803
+ */
11804
+ task?: "query" | "caption" | "point" | "detect";
11805
+ /**
11806
+ * Input image as a public HTTPS URL or base64 data URI. Optional for `query`; required for `caption`, `point`, and `detect`.
11807
+ */
11808
+ image?: string;
11809
+ /**
11810
+ * Question for the `query` task.
11811
+ */
11812
+ question?: string;
11813
+ /**
11814
+ * Caption length for the `caption` task.
11815
+ */
11816
+ caption_length?: "short" | "normal" | "long";
11817
+ /**
11818
+ * Object phrase to locate for `point` and `detect` tasks (e.g. 'person wearing a red shirt').
11819
+ */
11820
+ target?: string;
11821
+ /**
11822
+ * Enable reasoning trace for the `query` task.
11823
+ */
11824
+ reasoning?: boolean;
11825
+ /**
11826
+ * Sampling temperature.
11827
+ */
11828
+ temperature?: number;
11829
+ /**
11830
+ * Top-p (nucleus) sampling.
11831
+ */
11832
+ top_p?: number;
11833
+ /**
11834
+ * Max tokens to generate for `query` and `caption`.
11835
+ */
11836
+ max_tokens?: number;
11837
+ /**
11838
+ * Max objects to return for `point` and `detect`.
11839
+ */
11840
+ max_objects?: number;
11841
+ /**
11842
+ * Return incremental tokens for `query` and `caption`. `point` and `detect` do not support streaming.
11843
+ */
11844
+ stream?: boolean;
11845
+ }
11846
+ interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output {
11847
+ /**
11848
+ * Reason the generation finished.
11849
+ */
11850
+ finish_reason: string;
11851
+ metrics: {
11852
+ /**
11853
+ * Number of input tokens consumed.
11854
+ */
11855
+ input_tokens: number;
11856
+ /**
11857
+ * Number of output tokens generated.
11858
+ */
11859
+ output_tokens: number;
11860
+ /**
11861
+ * Prefill time in milliseconds.
11862
+ */
11863
+ prefill_time_ms: number;
11864
+ /**
11865
+ * Decode time in milliseconds.
11866
+ */
11867
+ decode_time_ms: number;
11868
+ /**
11869
+ * Time to first token in milliseconds.
11870
+ */
11871
+ ttft_ms: number;
11872
+ };
11873
+ /**
11874
+ * Answer text for the `query` task. Null for other tasks.
11875
+ */
11876
+ answer?: string;
11877
+ /**
11878
+ * Caption text for the `caption` task. Null for other tasks.
11879
+ */
11880
+ caption?: string;
11881
+ /**
11882
+ * Located points for the `point` task. Null for other tasks.
11883
+ */
11884
+ points?: {
11885
+ /**
11886
+ * X coordinate.
11887
+ */
11888
+ x: number;
11889
+ /**
11890
+ * Y coordinate.
11891
+ */
11892
+ y: number;
11893
+ }[];
11894
+ /**
11895
+ * Detected bounding boxes for the `detect` task. Null for other tasks.
11896
+ */
11897
+ objects?: {
11898
+ /**
11899
+ * Minimum X coordinate.
11900
+ */
11901
+ x_min: number;
11902
+ /**
11903
+ * Minimum Y coordinate.
11904
+ */
11905
+ y_min: number;
11906
+ /**
11907
+ * Maximum X coordinate.
11908
+ */
11909
+ x_max: number;
11910
+ /**
11911
+ * Maximum Y coordinate.
11912
+ */
11913
+ y_max: number;
11914
+ }[];
11915
+ /**
11916
+ * Reasoning trace for the `query` task when reasoning=true. Null otherwise.
11917
+ */
11918
+ reasoning?: {
11919
+ /**
11920
+ * Reasoning text.
11921
+ */
11922
+ text: string;
11923
+ /**
11924
+ * Grounding information.
11925
+ */
11926
+ grounding?: {}[];
11927
+ };
11928
+ }
11929
+ declare abstract class Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B {
11930
+ inputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input;
11931
+ postProcessedOutputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output;
11932
+ }
11933
+ declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731 {
11934
+ inputs: ChatCompletionsInput;
11935
+ postProcessedOutputs: ChatCompletionsOutput;
11936
+ }
11937
+ declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813 {
11938
+ inputs: ChatCompletionsInput;
11939
+ postProcessedOutputs: ChatCompletionsOutput;
11940
+ }
11941
+ declare abstract class Base_Ai_Cf_Qwen_Qwen3_8_27B {
11942
+ inputs: ChatCompletionsInput;
11943
+ postProcessedOutputs: ChatCompletionsOutput;
11944
+ }
11945
+ declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_3_Flash {
11946
+ inputs: ChatCompletionsInput;
11947
+ postProcessedOutputs: ChatCompletionsOutput;
11948
+ }
11792
11949
  interface AiModels {
11793
11950
  "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
11794
11951
  "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
@@ -11881,6 +12038,13 @@ interface AiModels {
11881
12038
  "@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
11882
12039
  "@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
11883
12040
  "@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
12041
+ "@cf/moonshotai/kimi-k2.7-code": Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code;
12042
+ "@cf/zai-org/glm-5.2": Base_Ai_Cf_Zai_Org_Glm_5_2;
12043
+ "@cf/moondream/moondream3.1-9B-A2B": Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B;
12044
+ "@cf/deepseek-ai/deepseek-v4-flash-0731": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731;
12045
+ "@cf/deepseek-ai/deepseek-v4-pro-0813": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813;
12046
+ "@cf/qwen/qwen3.8-27b": Base_Ai_Cf_Qwen_Qwen3_8_27B;
12047
+ "@cf/zai-org/glm-5.3-flash": Base_Ai_Cf_Zai_Org_Glm_5_3_Flash;
11884
12048
  }
11885
12049
  type AiOptions = {
11886
12050
  /**
@@ -12641,6 +12805,15 @@ interface BrowserRunBaseOptions {
12641
12805
  */
12642
12806
  cacheTTL?: number;
12643
12807
  }
12808
+ /**
12809
+ * Backend selection, mixed into the options of the quick actions that support it.
12810
+ * Deliberately not part of `BrowserRunBaseOptions`: `scrape`, `links` and `snapshot`
12811
+ * reject an alternate backend, so they must not accept the field.
12812
+ */
12813
+ interface BrowserRunAlternateBackendOptions {
12814
+ /** Render with an alternate browser backend instead of the default one. */
12815
+ browser?: "kitesurf";
12816
+ }
12644
12817
  /** Common options shared by all quick actions. Exactly one of `url` or `html` must be provided.*/
12645
12818
  type BrowserRunCommonOptions =
12646
12819
  | (BrowserRunBaseOptions & {
@@ -12677,7 +12850,7 @@ type BrowserRunScreenshotOptions = BrowserRunCommonOptions & {
12677
12850
  scrollPage?: boolean;
12678
12851
  /** @see https://pptr.dev/api/puppeteer.screenshotoptions */
12679
12852
  screenshotOptions?: BrowserRunPuppeteerScreenshotOptions;
12680
- };
12853
+ } & BrowserRunAlternateBackendOptions;
12681
12854
  type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12682
12855
  /** @see https://pptr.dev/api/puppeteer.pdfoptions */
12683
12856
  pdfOptions?: {
@@ -12724,7 +12897,7 @@ type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12724
12897
  /** @default 30000 */
12725
12898
  timeout?: number;
12726
12899
  };
12727
- };
12900
+ } & BrowserRunAlternateBackendOptions;
12728
12901
  type BrowserRunScrapeOptions = BrowserRunCommonOptions & {
12729
12902
  /** CSS selectors to scrape. At least one element is required. */
12730
12903
  elements: Array<{
@@ -12760,7 +12933,7 @@ type BrowserRunAccessibilityTreeOptions = BrowserRunCommonOptions & {
12760
12933
  * HTTP 200; a malformed selector is an error.
12761
12934
  */
12762
12935
  root?: string;
12763
- };
12936
+ } & BrowserRunAlternateBackendOptions;
12764
12937
  interface BrowserRunJsonBaseOptions {
12765
12938
  /** Custom AI models to try in order. Max 3. Falls back to next on error. */
12766
12939
  custom_ai?: Array<{
@@ -12775,6 +12948,7 @@ interface BrowserRunJsonBaseOptions {
12775
12948
  * At least one of `prompt` or `response_format` must be provided.
12776
12949
  */
12777
12950
  type BrowserRunJsonOptions = BrowserRunCommonOptions &
12951
+ BrowserRunAlternateBackendOptions &
12778
12952
  BrowserRunJsonBaseOptions &
12779
12953
  (
12780
12954
  | {
@@ -12790,8 +12964,10 @@ type BrowserRunJsonOptions = BrowserRunCommonOptions &
12790
12964
  response_format: AiTextGenerationResponseFormat;
12791
12965
  }
12792
12966
  );
12793
- type BrowserRunContentOptions = BrowserRunCommonOptions;
12794
- type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
12967
+ type BrowserRunContentOptions = BrowserRunCommonOptions &
12968
+ BrowserRunAlternateBackendOptions;
12969
+ type BrowserRunMarkdownOptions = BrowserRunCommonOptions &
12970
+ BrowserRunAlternateBackendOptions;
12795
12971
  type BrowserRunRedirectHop = {
12796
12972
  /** URL that returned the redirect. */
12797
12973
  url: string;
@@ -14812,6 +14988,78 @@ interface Hyperdrive {
14812
14988
  */
14813
14989
  readonly database: string;
14814
14990
  }
14991
+ /**
14992
+ * A handle to a dynamically-provisioned Hyperdrive connection, returned by
14993
+ * `HyperdriveApi.get()`.
14994
+ */
14995
+ interface HyperdriveDynamic extends Disposable {
14996
+ /**
14997
+ * The database name to use when connecting through this Hyperdrive.
14998
+ */
14999
+ readonly database: Promise<string>;
15000
+ /*
15001
+ * The randomly generated user to use when authenticating to your
15002
+ * database via Hyperdrive.
15003
+ */
15004
+ readonly user: Promise<string>;
15005
+ /*
15006
+ * The randomly generated password to use when authenticating to your
15007
+ * database via Hyperdrive.
15008
+ */
15009
+ readonly password: Promise<string>;
15010
+ /**
15011
+ * Open a TCP socket to the target database through this Hyperdrive.
15012
+ *
15013
+ */
15014
+ connect(): Promise<Socket>;
15015
+ }
15016
+ /**
15017
+ * Binding that provisions Hyperdrive connections at request time, rather than
15018
+ * from static configuration.
15019
+ */
15020
+ interface HyperdriveDynamicApi {
15021
+ /**
15022
+ * Provision a connection for the database described by `args`.
15023
+ *
15024
+ */
15025
+ get(args: HyperdriveDynamicConfig): Promise<HyperdriveDynamic>;
15026
+ /**
15027
+ * Get a pre-generated connection string used for connecting to dynamic Hyperdrive.
15028
+ */
15029
+ getHyperdriveConnectionString(connectionString: string): Promise<string>;
15030
+ }
15031
+ /**
15032
+ * Parameters identifying the database that a dynamically-provisioned
15033
+ * Hyperdrive connection should target.
15034
+ */
15035
+ interface HyperdriveDynamicConfig {
15036
+ /**
15037
+ * Generated connection string to pass into the dynamic worker.
15038
+ *
15039
+ */
15040
+ dynamicHyperdriveConnectionString: string;
15041
+ /**
15042
+ * Connection string for the origin database Hyperdrive should connect to.
15043
+ * Contains credentials, so treat it as a secret.
15044
+ *
15045
+ * The scheme selects the database engine. PostgreSQL origins are supported.
15046
+ */
15047
+ connectionString: string;
15048
+ /**
15049
+ * Region in which to place the connection pool. See the Hyperdrive
15050
+ * documentation for the set of supported regions.
15051
+ */
15052
+ targetRegion: string;
15053
+ /**
15054
+ * Whether Hyperdrive should cache query results for this connection.
15055
+ */
15056
+ cachingEnabled?: boolean;
15057
+ /**
15058
+ * Maximum number of connections the pool may open to the origin database.
15059
+ * Defaults to 60.
15060
+ */
15061
+ maxConnections?: number;
15062
+ }
14815
15063
  // Copyright (c) 2024 Cloudflare, Inc.
14816
15064
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
14817
15065
  // https://opensource.org/licenses/Apache-2.0
@@ -11801,6 +11801,163 @@ export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
11801
11801
  inputs: ChatCompletionsInput;
11802
11802
  postProcessedOutputs: ChatCompletionsOutput;
11803
11803
  }
11804
+ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code {
11805
+ inputs: ChatCompletionsInput;
11806
+ postProcessedOutputs: ChatCompletionsOutput;
11807
+ }
11808
+ export declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_2 {
11809
+ inputs: ChatCompletionsInput;
11810
+ postProcessedOutputs: ChatCompletionsOutput;
11811
+ }
11812
+ export interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input {
11813
+ /**
11814
+ * Which Moondream skill to run.
11815
+ */
11816
+ task?: "query" | "caption" | "point" | "detect";
11817
+ /**
11818
+ * Input image as a public HTTPS URL or base64 data URI. Optional for `query`; required for `caption`, `point`, and `detect`.
11819
+ */
11820
+ image?: string;
11821
+ /**
11822
+ * Question for the `query` task.
11823
+ */
11824
+ question?: string;
11825
+ /**
11826
+ * Caption length for the `caption` task.
11827
+ */
11828
+ caption_length?: "short" | "normal" | "long";
11829
+ /**
11830
+ * Object phrase to locate for `point` and `detect` tasks (e.g. 'person wearing a red shirt').
11831
+ */
11832
+ target?: string;
11833
+ /**
11834
+ * Enable reasoning trace for the `query` task.
11835
+ */
11836
+ reasoning?: boolean;
11837
+ /**
11838
+ * Sampling temperature.
11839
+ */
11840
+ temperature?: number;
11841
+ /**
11842
+ * Top-p (nucleus) sampling.
11843
+ */
11844
+ top_p?: number;
11845
+ /**
11846
+ * Max tokens to generate for `query` and `caption`.
11847
+ */
11848
+ max_tokens?: number;
11849
+ /**
11850
+ * Max objects to return for `point` and `detect`.
11851
+ */
11852
+ max_objects?: number;
11853
+ /**
11854
+ * Return incremental tokens for `query` and `caption`. `point` and `detect` do not support streaming.
11855
+ */
11856
+ stream?: boolean;
11857
+ }
11858
+ export interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output {
11859
+ /**
11860
+ * Reason the generation finished.
11861
+ */
11862
+ finish_reason: string;
11863
+ metrics: {
11864
+ /**
11865
+ * Number of input tokens consumed.
11866
+ */
11867
+ input_tokens: number;
11868
+ /**
11869
+ * Number of output tokens generated.
11870
+ */
11871
+ output_tokens: number;
11872
+ /**
11873
+ * Prefill time in milliseconds.
11874
+ */
11875
+ prefill_time_ms: number;
11876
+ /**
11877
+ * Decode time in milliseconds.
11878
+ */
11879
+ decode_time_ms: number;
11880
+ /**
11881
+ * Time to first token in milliseconds.
11882
+ */
11883
+ ttft_ms: number;
11884
+ };
11885
+ /**
11886
+ * Answer text for the `query` task. Null for other tasks.
11887
+ */
11888
+ answer?: string;
11889
+ /**
11890
+ * Caption text for the `caption` task. Null for other tasks.
11891
+ */
11892
+ caption?: string;
11893
+ /**
11894
+ * Located points for the `point` task. Null for other tasks.
11895
+ */
11896
+ points?: {
11897
+ /**
11898
+ * X coordinate.
11899
+ */
11900
+ x: number;
11901
+ /**
11902
+ * Y coordinate.
11903
+ */
11904
+ y: number;
11905
+ }[];
11906
+ /**
11907
+ * Detected bounding boxes for the `detect` task. Null for other tasks.
11908
+ */
11909
+ objects?: {
11910
+ /**
11911
+ * Minimum X coordinate.
11912
+ */
11913
+ x_min: number;
11914
+ /**
11915
+ * Minimum Y coordinate.
11916
+ */
11917
+ y_min: number;
11918
+ /**
11919
+ * Maximum X coordinate.
11920
+ */
11921
+ x_max: number;
11922
+ /**
11923
+ * Maximum Y coordinate.
11924
+ */
11925
+ y_max: number;
11926
+ }[];
11927
+ /**
11928
+ * Reasoning trace for the `query` task when reasoning=true. Null otherwise.
11929
+ */
11930
+ reasoning?: {
11931
+ /**
11932
+ * Reasoning text.
11933
+ */
11934
+ text: string;
11935
+ /**
11936
+ * Grounding information.
11937
+ */
11938
+ grounding?: {}[];
11939
+ };
11940
+ }
11941
+ export declare abstract class Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B {
11942
+ inputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input;
11943
+ postProcessedOutputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output;
11944
+ }
11945
+ export declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731 {
11946
+ inputs: ChatCompletionsInput;
11947
+ postProcessedOutputs: ChatCompletionsOutput;
11948
+ }
11949
+ export declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813 {
11950
+ inputs: ChatCompletionsInput;
11951
+ postProcessedOutputs: ChatCompletionsOutput;
11952
+ }
11953
+ export declare abstract class Base_Ai_Cf_Qwen_Qwen3_8_27B {
11954
+ inputs: ChatCompletionsInput;
11955
+ postProcessedOutputs: ChatCompletionsOutput;
11956
+ }
11957
+ export declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_3_Flash {
11958
+ inputs: ChatCompletionsInput;
11959
+ postProcessedOutputs: ChatCompletionsOutput;
11960
+ }
11804
11961
  export interface AiModels {
11805
11962
  "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
11806
11963
  "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
@@ -11893,6 +12050,13 @@ export interface AiModels {
11893
12050
  "@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
11894
12051
  "@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
11895
12052
  "@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
12053
+ "@cf/moonshotai/kimi-k2.7-code": Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code;
12054
+ "@cf/zai-org/glm-5.2": Base_Ai_Cf_Zai_Org_Glm_5_2;
12055
+ "@cf/moondream/moondream3.1-9B-A2B": Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B;
12056
+ "@cf/deepseek-ai/deepseek-v4-flash-0731": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731;
12057
+ "@cf/deepseek-ai/deepseek-v4-pro-0813": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813;
12058
+ "@cf/qwen/qwen3.8-27b": Base_Ai_Cf_Qwen_Qwen3_8_27B;
12059
+ "@cf/zai-org/glm-5.3-flash": Base_Ai_Cf_Zai_Org_Glm_5_3_Flash;
11896
12060
  }
11897
12061
  export type AiOptions = {
11898
12062
  /**
@@ -12655,6 +12819,15 @@ export interface BrowserRunBaseOptions {
12655
12819
  */
12656
12820
  cacheTTL?: number;
12657
12821
  }
12822
+ /**
12823
+ * Backend selection, mixed into the options of the quick actions that support it.
12824
+ * Deliberately not part of `BrowserRunBaseOptions`: `scrape`, `links` and `snapshot`
12825
+ * reject an alternate backend, so they must not accept the field.
12826
+ */
12827
+ export interface BrowserRunAlternateBackendOptions {
12828
+ /** Render with an alternate browser backend instead of the default one. */
12829
+ browser?: "kitesurf";
12830
+ }
12658
12831
  /** Common options shared by all quick actions. Exactly one of `url` or `html` must be provided.*/
12659
12832
  export type BrowserRunCommonOptions =
12660
12833
  | (BrowserRunBaseOptions & {
@@ -12691,7 +12864,7 @@ export type BrowserRunScreenshotOptions = BrowserRunCommonOptions & {
12691
12864
  scrollPage?: boolean;
12692
12865
  /** @see https://pptr.dev/api/puppeteer.screenshotoptions */
12693
12866
  screenshotOptions?: BrowserRunPuppeteerScreenshotOptions;
12694
- };
12867
+ } & BrowserRunAlternateBackendOptions;
12695
12868
  export type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12696
12869
  /** @see https://pptr.dev/api/puppeteer.pdfoptions */
12697
12870
  pdfOptions?: {
@@ -12738,7 +12911,7 @@ export type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12738
12911
  /** @default 30000 */
12739
12912
  timeout?: number;
12740
12913
  };
12741
- };
12914
+ } & BrowserRunAlternateBackendOptions;
12742
12915
  export type BrowserRunScrapeOptions = BrowserRunCommonOptions & {
12743
12916
  /** CSS selectors to scrape. At least one element is required. */
12744
12917
  elements: Array<{
@@ -12774,7 +12947,7 @@ export type BrowserRunAccessibilityTreeOptions = BrowserRunCommonOptions & {
12774
12947
  * HTTP 200; a malformed selector is an error.
12775
12948
  */
12776
12949
  root?: string;
12777
- };
12950
+ } & BrowserRunAlternateBackendOptions;
12778
12951
  export interface BrowserRunJsonBaseOptions {
12779
12952
  /** Custom AI models to try in order. Max 3. Falls back to next on error. */
12780
12953
  custom_ai?: Array<{
@@ -12789,6 +12962,7 @@ export interface BrowserRunJsonBaseOptions {
12789
12962
  * At least one of `prompt` or `response_format` must be provided.
12790
12963
  */
12791
12964
  export type BrowserRunJsonOptions = BrowserRunCommonOptions &
12965
+ BrowserRunAlternateBackendOptions &
12792
12966
  BrowserRunJsonBaseOptions &
12793
12967
  (
12794
12968
  | {
@@ -12804,8 +12978,10 @@ export type BrowserRunJsonOptions = BrowserRunCommonOptions &
12804
12978
  response_format: AiTextGenerationResponseFormat;
12805
12979
  }
12806
12980
  );
12807
- export type BrowserRunContentOptions = BrowserRunCommonOptions;
12808
- export type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
12981
+ export type BrowserRunContentOptions = BrowserRunCommonOptions &
12982
+ BrowserRunAlternateBackendOptions;
12983
+ export type BrowserRunMarkdownOptions = BrowserRunCommonOptions &
12984
+ BrowserRunAlternateBackendOptions;
12809
12985
  export type BrowserRunRedirectHop = {
12810
12986
  /** URL that returned the redirect. */
12811
12987
  url: string;
@@ -14829,6 +15005,78 @@ export interface Hyperdrive {
14829
15005
  */
14830
15006
  readonly database: string;
14831
15007
  }
15008
+ /**
15009
+ * A handle to a dynamically-provisioned Hyperdrive connection, returned by
15010
+ * `HyperdriveApi.get()`.
15011
+ */
15012
+ export interface HyperdriveDynamic extends Disposable {
15013
+ /**
15014
+ * The database name to use when connecting through this Hyperdrive.
15015
+ */
15016
+ readonly database: Promise<string>;
15017
+ /*
15018
+ * The randomly generated user to use when authenticating to your
15019
+ * database via Hyperdrive.
15020
+ */
15021
+ readonly user: Promise<string>;
15022
+ /*
15023
+ * The randomly generated password to use when authenticating to your
15024
+ * database via Hyperdrive.
15025
+ */
15026
+ readonly password: Promise<string>;
15027
+ /**
15028
+ * Open a TCP socket to the target database through this Hyperdrive.
15029
+ *
15030
+ */
15031
+ connect(): Promise<Socket>;
15032
+ }
15033
+ /**
15034
+ * Binding that provisions Hyperdrive connections at request time, rather than
15035
+ * from static configuration.
15036
+ */
15037
+ export interface HyperdriveDynamicApi {
15038
+ /**
15039
+ * Provision a connection for the database described by `args`.
15040
+ *
15041
+ */
15042
+ get(args: HyperdriveDynamicConfig): Promise<HyperdriveDynamic>;
15043
+ /**
15044
+ * Get a pre-generated connection string used for connecting to dynamic Hyperdrive.
15045
+ */
15046
+ getHyperdriveConnectionString(connectionString: string): Promise<string>;
15047
+ }
15048
+ /**
15049
+ * Parameters identifying the database that a dynamically-provisioned
15050
+ * Hyperdrive connection should target.
15051
+ */
15052
+ export interface HyperdriveDynamicConfig {
15053
+ /**
15054
+ * Generated connection string to pass into the dynamic worker.
15055
+ *
15056
+ */
15057
+ dynamicHyperdriveConnectionString: string;
15058
+ /**
15059
+ * Connection string for the origin database Hyperdrive should connect to.
15060
+ * Contains credentials, so treat it as a secret.
15061
+ *
15062
+ * The scheme selects the database engine. PostgreSQL origins are supported.
15063
+ */
15064
+ connectionString: string;
15065
+ /**
15066
+ * Region in which to place the connection pool. See the Hyperdrive
15067
+ * documentation for the set of supported regions.
15068
+ */
15069
+ targetRegion: string;
15070
+ /**
15071
+ * Whether Hyperdrive should cache query results for this connection.
15072
+ */
15073
+ cachingEnabled?: boolean;
15074
+ /**
15075
+ * Maximum number of connections the pool may open to the origin database.
15076
+ * Defaults to 60.
15077
+ */
15078
+ maxConnections?: number;
15079
+ }
14832
15080
  // Copyright (c) 2024 Cloudflare, Inc.
14833
15081
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
14834
15082
  // https://opensource.org/licenses/Apache-2.0
package/index.d.ts CHANGED
@@ -11514,6 +11514,163 @@ declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
11514
11514
  inputs: ChatCompletionsInput;
11515
11515
  postProcessedOutputs: ChatCompletionsOutput;
11516
11516
  }
11517
+ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code {
11518
+ inputs: ChatCompletionsInput;
11519
+ postProcessedOutputs: ChatCompletionsOutput;
11520
+ }
11521
+ declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_2 {
11522
+ inputs: ChatCompletionsInput;
11523
+ postProcessedOutputs: ChatCompletionsOutput;
11524
+ }
11525
+ interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input {
11526
+ /**
11527
+ * Which Moondream skill to run.
11528
+ */
11529
+ task?: "query" | "caption" | "point" | "detect";
11530
+ /**
11531
+ * Input image as a public HTTPS URL or base64 data URI. Optional for `query`; required for `caption`, `point`, and `detect`.
11532
+ */
11533
+ image?: string;
11534
+ /**
11535
+ * Question for the `query` task.
11536
+ */
11537
+ question?: string;
11538
+ /**
11539
+ * Caption length for the `caption` task.
11540
+ */
11541
+ caption_length?: "short" | "normal" | "long";
11542
+ /**
11543
+ * Object phrase to locate for `point` and `detect` tasks (e.g. 'person wearing a red shirt').
11544
+ */
11545
+ target?: string;
11546
+ /**
11547
+ * Enable reasoning trace for the `query` task.
11548
+ */
11549
+ reasoning?: boolean;
11550
+ /**
11551
+ * Sampling temperature.
11552
+ */
11553
+ temperature?: number;
11554
+ /**
11555
+ * Top-p (nucleus) sampling.
11556
+ */
11557
+ top_p?: number;
11558
+ /**
11559
+ * Max tokens to generate for `query` and `caption`.
11560
+ */
11561
+ max_tokens?: number;
11562
+ /**
11563
+ * Max objects to return for `point` and `detect`.
11564
+ */
11565
+ max_objects?: number;
11566
+ /**
11567
+ * Return incremental tokens for `query` and `caption`. `point` and `detect` do not support streaming.
11568
+ */
11569
+ stream?: boolean;
11570
+ }
11571
+ interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output {
11572
+ /**
11573
+ * Reason the generation finished.
11574
+ */
11575
+ finish_reason: string;
11576
+ metrics: {
11577
+ /**
11578
+ * Number of input tokens consumed.
11579
+ */
11580
+ input_tokens: number;
11581
+ /**
11582
+ * Number of output tokens generated.
11583
+ */
11584
+ output_tokens: number;
11585
+ /**
11586
+ * Prefill time in milliseconds.
11587
+ */
11588
+ prefill_time_ms: number;
11589
+ /**
11590
+ * Decode time in milliseconds.
11591
+ */
11592
+ decode_time_ms: number;
11593
+ /**
11594
+ * Time to first token in milliseconds.
11595
+ */
11596
+ ttft_ms: number;
11597
+ };
11598
+ /**
11599
+ * Answer text for the `query` task. Null for other tasks.
11600
+ */
11601
+ answer?: string;
11602
+ /**
11603
+ * Caption text for the `caption` task. Null for other tasks.
11604
+ */
11605
+ caption?: string;
11606
+ /**
11607
+ * Located points for the `point` task. Null for other tasks.
11608
+ */
11609
+ points?: {
11610
+ /**
11611
+ * X coordinate.
11612
+ */
11613
+ x: number;
11614
+ /**
11615
+ * Y coordinate.
11616
+ */
11617
+ y: number;
11618
+ }[];
11619
+ /**
11620
+ * Detected bounding boxes for the `detect` task. Null for other tasks.
11621
+ */
11622
+ objects?: {
11623
+ /**
11624
+ * Minimum X coordinate.
11625
+ */
11626
+ x_min: number;
11627
+ /**
11628
+ * Minimum Y coordinate.
11629
+ */
11630
+ y_min: number;
11631
+ /**
11632
+ * Maximum X coordinate.
11633
+ */
11634
+ x_max: number;
11635
+ /**
11636
+ * Maximum Y coordinate.
11637
+ */
11638
+ y_max: number;
11639
+ }[];
11640
+ /**
11641
+ * Reasoning trace for the `query` task when reasoning=true. Null otherwise.
11642
+ */
11643
+ reasoning?: {
11644
+ /**
11645
+ * Reasoning text.
11646
+ */
11647
+ text: string;
11648
+ /**
11649
+ * Grounding information.
11650
+ */
11651
+ grounding?: {}[];
11652
+ };
11653
+ }
11654
+ declare abstract class Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B {
11655
+ inputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input;
11656
+ postProcessedOutputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output;
11657
+ }
11658
+ declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731 {
11659
+ inputs: ChatCompletionsInput;
11660
+ postProcessedOutputs: ChatCompletionsOutput;
11661
+ }
11662
+ declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813 {
11663
+ inputs: ChatCompletionsInput;
11664
+ postProcessedOutputs: ChatCompletionsOutput;
11665
+ }
11666
+ declare abstract class Base_Ai_Cf_Qwen_Qwen3_8_27B {
11667
+ inputs: ChatCompletionsInput;
11668
+ postProcessedOutputs: ChatCompletionsOutput;
11669
+ }
11670
+ declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_3_Flash {
11671
+ inputs: ChatCompletionsInput;
11672
+ postProcessedOutputs: ChatCompletionsOutput;
11673
+ }
11517
11674
  interface AiModels {
11518
11675
  "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
11519
11676
  "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
@@ -11606,6 +11763,13 @@ interface AiModels {
11606
11763
  "@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
11607
11764
  "@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
11608
11765
  "@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
11766
+ "@cf/moonshotai/kimi-k2.7-code": Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code;
11767
+ "@cf/zai-org/glm-5.2": Base_Ai_Cf_Zai_Org_Glm_5_2;
11768
+ "@cf/moondream/moondream3.1-9B-A2B": Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B;
11769
+ "@cf/deepseek-ai/deepseek-v4-flash-0731": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731;
11770
+ "@cf/deepseek-ai/deepseek-v4-pro-0813": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813;
11771
+ "@cf/qwen/qwen3.8-27b": Base_Ai_Cf_Qwen_Qwen3_8_27B;
11772
+ "@cf/zai-org/glm-5.3-flash": Base_Ai_Cf_Zai_Org_Glm_5_3_Flash;
11609
11773
  }
11610
11774
  type AiOptions = {
11611
11775
  /**
@@ -12366,6 +12530,15 @@ interface BrowserRunBaseOptions {
12366
12530
  */
12367
12531
  cacheTTL?: number;
12368
12532
  }
12533
+ /**
12534
+ * Backend selection, mixed into the options of the quick actions that support it.
12535
+ * Deliberately not part of `BrowserRunBaseOptions`: `scrape`, `links` and `snapshot`
12536
+ * reject an alternate backend, so they must not accept the field.
12537
+ */
12538
+ interface BrowserRunAlternateBackendOptions {
12539
+ /** Render with an alternate browser backend instead of the default one. */
12540
+ browser?: "kitesurf";
12541
+ }
12369
12542
  /** Common options shared by all quick actions. Exactly one of `url` or `html` must be provided.*/
12370
12543
  type BrowserRunCommonOptions =
12371
12544
  | (BrowserRunBaseOptions & {
@@ -12402,7 +12575,7 @@ type BrowserRunScreenshotOptions = BrowserRunCommonOptions & {
12402
12575
  scrollPage?: boolean;
12403
12576
  /** @see https://pptr.dev/api/puppeteer.screenshotoptions */
12404
12577
  screenshotOptions?: BrowserRunPuppeteerScreenshotOptions;
12405
- };
12578
+ } & BrowserRunAlternateBackendOptions;
12406
12579
  type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12407
12580
  /** @see https://pptr.dev/api/puppeteer.pdfoptions */
12408
12581
  pdfOptions?: {
@@ -12449,7 +12622,7 @@ type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12449
12622
  /** @default 30000 */
12450
12623
  timeout?: number;
12451
12624
  };
12452
- };
12625
+ } & BrowserRunAlternateBackendOptions;
12453
12626
  type BrowserRunScrapeOptions = BrowserRunCommonOptions & {
12454
12627
  /** CSS selectors to scrape. At least one element is required. */
12455
12628
  elements: Array<{
@@ -12485,7 +12658,7 @@ type BrowserRunAccessibilityTreeOptions = BrowserRunCommonOptions & {
12485
12658
  * HTTP 200; a malformed selector is an error.
12486
12659
  */
12487
12660
  root?: string;
12488
- };
12661
+ } & BrowserRunAlternateBackendOptions;
12489
12662
  interface BrowserRunJsonBaseOptions {
12490
12663
  /** Custom AI models to try in order. Max 3. Falls back to next on error. */
12491
12664
  custom_ai?: Array<{
@@ -12500,6 +12673,7 @@ interface BrowserRunJsonBaseOptions {
12500
12673
  * At least one of `prompt` or `response_format` must be provided.
12501
12674
  */
12502
12675
  type BrowserRunJsonOptions = BrowserRunCommonOptions &
12676
+ BrowserRunAlternateBackendOptions &
12503
12677
  BrowserRunJsonBaseOptions &
12504
12678
  (
12505
12679
  | {
@@ -12515,8 +12689,10 @@ type BrowserRunJsonOptions = BrowserRunCommonOptions &
12515
12689
  response_format: AiTextGenerationResponseFormat;
12516
12690
  }
12517
12691
  );
12518
- type BrowserRunContentOptions = BrowserRunCommonOptions;
12519
- type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
12692
+ type BrowserRunContentOptions = BrowserRunCommonOptions &
12693
+ BrowserRunAlternateBackendOptions;
12694
+ type BrowserRunMarkdownOptions = BrowserRunCommonOptions &
12695
+ BrowserRunAlternateBackendOptions;
12520
12696
  type BrowserRunRedirectHop = {
12521
12697
  /** URL that returned the redirect. */
12522
12698
  url: string;
@@ -14537,6 +14713,78 @@ interface Hyperdrive {
14537
14713
  */
14538
14714
  readonly database: string;
14539
14715
  }
14716
+ /**
14717
+ * A handle to a dynamically-provisioned Hyperdrive connection, returned by
14718
+ * `HyperdriveApi.get()`.
14719
+ */
14720
+ interface HyperdriveDynamic extends Disposable {
14721
+ /**
14722
+ * The database name to use when connecting through this Hyperdrive.
14723
+ */
14724
+ readonly database: Promise<string>;
14725
+ /*
14726
+ * The randomly generated user to use when authenticating to your
14727
+ * database via Hyperdrive.
14728
+ */
14729
+ readonly user: Promise<string>;
14730
+ /*
14731
+ * The randomly generated password to use when authenticating to your
14732
+ * database via Hyperdrive.
14733
+ */
14734
+ readonly password: Promise<string>;
14735
+ /**
14736
+ * Open a TCP socket to the target database through this Hyperdrive.
14737
+ *
14738
+ */
14739
+ connect(): Promise<Socket>;
14740
+ }
14741
+ /**
14742
+ * Binding that provisions Hyperdrive connections at request time, rather than
14743
+ * from static configuration.
14744
+ */
14745
+ interface HyperdriveDynamicApi {
14746
+ /**
14747
+ * Provision a connection for the database described by `args`.
14748
+ *
14749
+ */
14750
+ get(args: HyperdriveDynamicConfig): Promise<HyperdriveDynamic>;
14751
+ /**
14752
+ * Get a pre-generated connection string used for connecting to dynamic Hyperdrive.
14753
+ */
14754
+ getHyperdriveConnectionString(connectionString: string): Promise<string>;
14755
+ }
14756
+ /**
14757
+ * Parameters identifying the database that a dynamically-provisioned
14758
+ * Hyperdrive connection should target.
14759
+ */
14760
+ interface HyperdriveDynamicConfig {
14761
+ /**
14762
+ * Generated connection string to pass into the dynamic worker.
14763
+ *
14764
+ */
14765
+ dynamicHyperdriveConnectionString: string;
14766
+ /**
14767
+ * Connection string for the origin database Hyperdrive should connect to.
14768
+ * Contains credentials, so treat it as a secret.
14769
+ *
14770
+ * The scheme selects the database engine. PostgreSQL origins are supported.
14771
+ */
14772
+ connectionString: string;
14773
+ /**
14774
+ * Region in which to place the connection pool. See the Hyperdrive
14775
+ * documentation for the set of supported regions.
14776
+ */
14777
+ targetRegion: string;
14778
+ /**
14779
+ * Whether Hyperdrive should cache query results for this connection.
14780
+ */
14781
+ cachingEnabled?: boolean;
14782
+ /**
14783
+ * Maximum number of connections the pool may open to the origin database.
14784
+ * Defaults to 60.
14785
+ */
14786
+ maxConnections?: number;
14787
+ }
14540
14788
  // Copyright (c) 2024 Cloudflare, Inc.
14541
14789
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
14542
14790
  // https://opensource.org/licenses/Apache-2.0
package/index.ts CHANGED
@@ -11526,6 +11526,163 @@ export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
11526
11526
  inputs: ChatCompletionsInput;
11527
11527
  postProcessedOutputs: ChatCompletionsOutput;
11528
11528
  }
11529
+ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code {
11530
+ inputs: ChatCompletionsInput;
11531
+ postProcessedOutputs: ChatCompletionsOutput;
11532
+ }
11533
+ export declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_2 {
11534
+ inputs: ChatCompletionsInput;
11535
+ postProcessedOutputs: ChatCompletionsOutput;
11536
+ }
11537
+ export interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input {
11538
+ /**
11539
+ * Which Moondream skill to run.
11540
+ */
11541
+ task?: "query" | "caption" | "point" | "detect";
11542
+ /**
11543
+ * Input image as a public HTTPS URL or base64 data URI. Optional for `query`; required for `caption`, `point`, and `detect`.
11544
+ */
11545
+ image?: string;
11546
+ /**
11547
+ * Question for the `query` task.
11548
+ */
11549
+ question?: string;
11550
+ /**
11551
+ * Caption length for the `caption` task.
11552
+ */
11553
+ caption_length?: "short" | "normal" | "long";
11554
+ /**
11555
+ * Object phrase to locate for `point` and `detect` tasks (e.g. 'person wearing a red shirt').
11556
+ */
11557
+ target?: string;
11558
+ /**
11559
+ * Enable reasoning trace for the `query` task.
11560
+ */
11561
+ reasoning?: boolean;
11562
+ /**
11563
+ * Sampling temperature.
11564
+ */
11565
+ temperature?: number;
11566
+ /**
11567
+ * Top-p (nucleus) sampling.
11568
+ */
11569
+ top_p?: number;
11570
+ /**
11571
+ * Max tokens to generate for `query` and `caption`.
11572
+ */
11573
+ max_tokens?: number;
11574
+ /**
11575
+ * Max objects to return for `point` and `detect`.
11576
+ */
11577
+ max_objects?: number;
11578
+ /**
11579
+ * Return incremental tokens for `query` and `caption`. `point` and `detect` do not support streaming.
11580
+ */
11581
+ stream?: boolean;
11582
+ }
11583
+ export interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output {
11584
+ /**
11585
+ * Reason the generation finished.
11586
+ */
11587
+ finish_reason: string;
11588
+ metrics: {
11589
+ /**
11590
+ * Number of input tokens consumed.
11591
+ */
11592
+ input_tokens: number;
11593
+ /**
11594
+ * Number of output tokens generated.
11595
+ */
11596
+ output_tokens: number;
11597
+ /**
11598
+ * Prefill time in milliseconds.
11599
+ */
11600
+ prefill_time_ms: number;
11601
+ /**
11602
+ * Decode time in milliseconds.
11603
+ */
11604
+ decode_time_ms: number;
11605
+ /**
11606
+ * Time to first token in milliseconds.
11607
+ */
11608
+ ttft_ms: number;
11609
+ };
11610
+ /**
11611
+ * Answer text for the `query` task. Null for other tasks.
11612
+ */
11613
+ answer?: string;
11614
+ /**
11615
+ * Caption text for the `caption` task. Null for other tasks.
11616
+ */
11617
+ caption?: string;
11618
+ /**
11619
+ * Located points for the `point` task. Null for other tasks.
11620
+ */
11621
+ points?: {
11622
+ /**
11623
+ * X coordinate.
11624
+ */
11625
+ x: number;
11626
+ /**
11627
+ * Y coordinate.
11628
+ */
11629
+ y: number;
11630
+ }[];
11631
+ /**
11632
+ * Detected bounding boxes for the `detect` task. Null for other tasks.
11633
+ */
11634
+ objects?: {
11635
+ /**
11636
+ * Minimum X coordinate.
11637
+ */
11638
+ x_min: number;
11639
+ /**
11640
+ * Minimum Y coordinate.
11641
+ */
11642
+ y_min: number;
11643
+ /**
11644
+ * Maximum X coordinate.
11645
+ */
11646
+ x_max: number;
11647
+ /**
11648
+ * Maximum Y coordinate.
11649
+ */
11650
+ y_max: number;
11651
+ }[];
11652
+ /**
11653
+ * Reasoning trace for the `query` task when reasoning=true. Null otherwise.
11654
+ */
11655
+ reasoning?: {
11656
+ /**
11657
+ * Reasoning text.
11658
+ */
11659
+ text: string;
11660
+ /**
11661
+ * Grounding information.
11662
+ */
11663
+ grounding?: {}[];
11664
+ };
11665
+ }
11666
+ export declare abstract class Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B {
11667
+ inputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input;
11668
+ postProcessedOutputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output;
11669
+ }
11670
+ export declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731 {
11671
+ inputs: ChatCompletionsInput;
11672
+ postProcessedOutputs: ChatCompletionsOutput;
11673
+ }
11674
+ export declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813 {
11675
+ inputs: ChatCompletionsInput;
11676
+ postProcessedOutputs: ChatCompletionsOutput;
11677
+ }
11678
+ export declare abstract class Base_Ai_Cf_Qwen_Qwen3_8_27B {
11679
+ inputs: ChatCompletionsInput;
11680
+ postProcessedOutputs: ChatCompletionsOutput;
11681
+ }
11682
+ export declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_3_Flash {
11683
+ inputs: ChatCompletionsInput;
11684
+ postProcessedOutputs: ChatCompletionsOutput;
11685
+ }
11529
11686
  export interface AiModels {
11530
11687
  "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
11531
11688
  "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
@@ -11618,6 +11775,13 @@ export interface AiModels {
11618
11775
  "@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
11619
11776
  "@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
11620
11777
  "@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
11778
+ "@cf/moonshotai/kimi-k2.7-code": Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code;
11779
+ "@cf/zai-org/glm-5.2": Base_Ai_Cf_Zai_Org_Glm_5_2;
11780
+ "@cf/moondream/moondream3.1-9B-A2B": Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B;
11781
+ "@cf/deepseek-ai/deepseek-v4-flash-0731": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731;
11782
+ "@cf/deepseek-ai/deepseek-v4-pro-0813": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813;
11783
+ "@cf/qwen/qwen3.8-27b": Base_Ai_Cf_Qwen_Qwen3_8_27B;
11784
+ "@cf/zai-org/glm-5.3-flash": Base_Ai_Cf_Zai_Org_Glm_5_3_Flash;
11621
11785
  }
11622
11786
  export type AiOptions = {
11623
11787
  /**
@@ -12380,6 +12544,15 @@ export interface BrowserRunBaseOptions {
12380
12544
  */
12381
12545
  cacheTTL?: number;
12382
12546
  }
12547
+ /**
12548
+ * Backend selection, mixed into the options of the quick actions that support it.
12549
+ * Deliberately not part of `BrowserRunBaseOptions`: `scrape`, `links` and `snapshot`
12550
+ * reject an alternate backend, so they must not accept the field.
12551
+ */
12552
+ export interface BrowserRunAlternateBackendOptions {
12553
+ /** Render with an alternate browser backend instead of the default one. */
12554
+ browser?: "kitesurf";
12555
+ }
12383
12556
  /** Common options shared by all quick actions. Exactly one of `url` or `html` must be provided.*/
12384
12557
  export type BrowserRunCommonOptions =
12385
12558
  | (BrowserRunBaseOptions & {
@@ -12416,7 +12589,7 @@ export type BrowserRunScreenshotOptions = BrowserRunCommonOptions & {
12416
12589
  scrollPage?: boolean;
12417
12590
  /** @see https://pptr.dev/api/puppeteer.screenshotoptions */
12418
12591
  screenshotOptions?: BrowserRunPuppeteerScreenshotOptions;
12419
- };
12592
+ } & BrowserRunAlternateBackendOptions;
12420
12593
  export type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12421
12594
  /** @see https://pptr.dev/api/puppeteer.pdfoptions */
12422
12595
  pdfOptions?: {
@@ -12463,7 +12636,7 @@ export type BrowserRunPDFOptions = BrowserRunCommonOptions & {
12463
12636
  /** @default 30000 */
12464
12637
  timeout?: number;
12465
12638
  };
12466
- };
12639
+ } & BrowserRunAlternateBackendOptions;
12467
12640
  export type BrowserRunScrapeOptions = BrowserRunCommonOptions & {
12468
12641
  /** CSS selectors to scrape. At least one element is required. */
12469
12642
  elements: Array<{
@@ -12499,7 +12672,7 @@ export type BrowserRunAccessibilityTreeOptions = BrowserRunCommonOptions & {
12499
12672
  * HTTP 200; a malformed selector is an error.
12500
12673
  */
12501
12674
  root?: string;
12502
- };
12675
+ } & BrowserRunAlternateBackendOptions;
12503
12676
  export interface BrowserRunJsonBaseOptions {
12504
12677
  /** Custom AI models to try in order. Max 3. Falls back to next on error. */
12505
12678
  custom_ai?: Array<{
@@ -12514,6 +12687,7 @@ export interface BrowserRunJsonBaseOptions {
12514
12687
  * At least one of `prompt` or `response_format` must be provided.
12515
12688
  */
12516
12689
  export type BrowserRunJsonOptions = BrowserRunCommonOptions &
12690
+ BrowserRunAlternateBackendOptions &
12517
12691
  BrowserRunJsonBaseOptions &
12518
12692
  (
12519
12693
  | {
@@ -12529,8 +12703,10 @@ export type BrowserRunJsonOptions = BrowserRunCommonOptions &
12529
12703
  response_format: AiTextGenerationResponseFormat;
12530
12704
  }
12531
12705
  );
12532
- export type BrowserRunContentOptions = BrowserRunCommonOptions;
12533
- export type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
12706
+ export type BrowserRunContentOptions = BrowserRunCommonOptions &
12707
+ BrowserRunAlternateBackendOptions;
12708
+ export type BrowserRunMarkdownOptions = BrowserRunCommonOptions &
12709
+ BrowserRunAlternateBackendOptions;
12534
12710
  export type BrowserRunRedirectHop = {
12535
12711
  /** URL that returned the redirect. */
12536
12712
  url: string;
@@ -14554,6 +14730,78 @@ export interface Hyperdrive {
14554
14730
  */
14555
14731
  readonly database: string;
14556
14732
  }
14733
+ /**
14734
+ * A handle to a dynamically-provisioned Hyperdrive connection, returned by
14735
+ * `HyperdriveApi.get()`.
14736
+ */
14737
+ export interface HyperdriveDynamic extends Disposable {
14738
+ /**
14739
+ * The database name to use when connecting through this Hyperdrive.
14740
+ */
14741
+ readonly database: Promise<string>;
14742
+ /*
14743
+ * The randomly generated user to use when authenticating to your
14744
+ * database via Hyperdrive.
14745
+ */
14746
+ readonly user: Promise<string>;
14747
+ /*
14748
+ * The randomly generated password to use when authenticating to your
14749
+ * database via Hyperdrive.
14750
+ */
14751
+ readonly password: Promise<string>;
14752
+ /**
14753
+ * Open a TCP socket to the target database through this Hyperdrive.
14754
+ *
14755
+ */
14756
+ connect(): Promise<Socket>;
14757
+ }
14758
+ /**
14759
+ * Binding that provisions Hyperdrive connections at request time, rather than
14760
+ * from static configuration.
14761
+ */
14762
+ export interface HyperdriveDynamicApi {
14763
+ /**
14764
+ * Provision a connection for the database described by `args`.
14765
+ *
14766
+ */
14767
+ get(args: HyperdriveDynamicConfig): Promise<HyperdriveDynamic>;
14768
+ /**
14769
+ * Get a pre-generated connection string used for connecting to dynamic Hyperdrive.
14770
+ */
14771
+ getHyperdriveConnectionString(connectionString: string): Promise<string>;
14772
+ }
14773
+ /**
14774
+ * Parameters identifying the database that a dynamically-provisioned
14775
+ * Hyperdrive connection should target.
14776
+ */
14777
+ export interface HyperdriveDynamicConfig {
14778
+ /**
14779
+ * Generated connection string to pass into the dynamic worker.
14780
+ *
14781
+ */
14782
+ dynamicHyperdriveConnectionString: string;
14783
+ /**
14784
+ * Connection string for the origin database Hyperdrive should connect to.
14785
+ * Contains credentials, so treat it as a secret.
14786
+ *
14787
+ * The scheme selects the database engine. PostgreSQL origins are supported.
14788
+ */
14789
+ connectionString: string;
14790
+ /**
14791
+ * Region in which to place the connection pool. See the Hyperdrive
14792
+ * documentation for the set of supported regions.
14793
+ */
14794
+ targetRegion: string;
14795
+ /**
14796
+ * Whether Hyperdrive should cache query results for this connection.
14797
+ */
14798
+ cachingEnabled?: boolean;
14799
+ /**
14800
+ * Maximum number of connections the pool may open to the origin database.
14801
+ * Defaults to 60.
14802
+ */
14803
+ maxConnections?: number;
14804
+ }
14557
14805
  // Copyright (c) 2024 Cloudflare, Inc.
14558
14806
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
14559
14807
  // https://opensource.org/licenses/Apache-2.0
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "5.20260827.1"
10
+ "version": "5.20260829.1"
11
11
  }