Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.0.0-beta.1"
".": "5.0.0-beta.2"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 2015
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-83f49bc3fa9273ef989d3e8bcd27f6fdaa7d04ae2519a91f4878f46acc501bb9.yml
openapi_spec_hash: 3f4be3af6f51eea4787dc8345f9ca9c1
config_hash: 9d1829ed664bb3efa8638f98bb32cf46
configured_endpoints: 2020
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0aa90536a3aa68340d37a3389461eed6b13c9f5561ca9ad8aa46d2ca4cbb1701.yml
openapi_spec_hash: 95c0ec155c861dacf17154c43cba13f8
config_hash: a4197f3e022bd501a828d1252b76e06e
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 5.0.0-beta.2 (2026-02-18)

Full Changelog: [v5.0.0-beta.1...v5.0.0-beta.2](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0-beta.1...v5.0.0-beta.2)

### Features

* feat(dex): add DEX rules ([1e9c242](https://github.com/cloudflare/cloudflare-python/commit/1e9c2423aed148c30b92b5a3d25b3d62252f4137))
* feat(stainless): TUN-10249 Add WARP Subnet endpoints ([3accc56](https://github.com/cloudflare/cloudflare-python/commit/3accc56c43e04292b700ea573d036872a8e9cb7b))


### Chores

* **api:** update composite API spec ([79a09b5](https://github.com/cloudflare/cloudflare-python/commit/79a09b5304a8733b5eff39931f5f3b26d92d7cc9))
* **api:** update composite API spec ([a0a0048](https://github.com/cloudflare/cloudflare-python/commit/a0a00481356d678ec42a357483e3da472a16d86d))
* **api:** update composite API spec ([2b950cf](https://github.com/cloudflare/cloudflare-python/commit/2b950cfd2456c31b7c85174f23605cb9e8a470c0))
* **api:** update composite API spec ([6e6f2f5](https://github.com/cloudflare/cloudflare-python/commit/6e6f2f55b1da2f39b4578fa86840f8687f5d4581))
* **api:** update composite API spec ([146459d](https://github.com/cloudflare/cloudflare-python/commit/146459da763b77bcd858d6550ed77e8477bc6e24))
* **api:** update composite API spec ([17a33ff](https://github.com/cloudflare/cloudflare-python/commit/17a33ff8bba4c8adceb155db74bc6a606a3a43cc))
* **api:** update composite API spec ([09e3fb1](https://github.com/cloudflare/cloudflare-python/commit/09e3fb14dfba4fdf088feaa2d567e63065c5960e))
* **api:** update composite API spec ([ad6565c](https://github.com/cloudflare/cloudflare-python/commit/ad6565c1373fc9c7fe70358fe1df4bbd4ef3f831))
* **api:** update composite API spec ([dd1052d](https://github.com/cloudflare/cloudflare-python/commit/dd1052dec57ca99a90848910908b05680428b9a8))
* **api:** update composite API spec ([20bfdf8](https://github.com/cloudflare/cloudflare-python/commit/20bfdf876f557f7b581728db112789cc583d7aa6))
* **api:** update composite API spec ([bb37db8](https://github.com/cloudflare/cloudflare-python/commit/bb37db8de6c2e0b289b0a7eb60fcabf178f43a50))
* **api:** update composite API spec ([e531924](https://github.com/cloudflare/cloudflare-python/commit/e531924080c7d5d184a0734932f08ee59b5d085f))
* **api:** update composite API spec ([4727ace](https://github.com/cloudflare/cloudflare-python/commit/4727acec0eb9ce14c6a1d8ded3d69a00a3bf22c9))

## 5.0.0-beta.1 (2026-02-13)

Full Changelog: [v4.3.1...v5.0.0-beta.1](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0-beta.1)
Expand Down
111 changes: 66 additions & 45 deletions api.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cloudflare"
version = "5.0.0-beta.1"
version = "5.0.0-beta.2"
description = "The official Python library for the cloudflare API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "cloudflare"
__version__ = "5.0.0-beta.1" # x-release-please-version
__version__ = "5.0.0-beta.2" # x-release-please-version
16 changes: 16 additions & 0 deletions src/cloudflare/resources/accounts/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def create(

roles: Array of roles associated with this member.

status: Status of the member invitation. If not provided during creation, defaults to
'pending'. Changing from 'accepted' back to 'pending' will trigger a replacement
of the member resource in Terraform.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -108,6 +112,10 @@ def create(

policies: Array of policies associated with this member.

status: Status of the member invitation. If not provided during creation, defaults to
'pending'. Changing from 'accepted' back to 'pending' will trigger a replacement
of the member resource in Terraform.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -461,6 +469,10 @@ async def create(

roles: Array of roles associated with this member.

status: Status of the member invitation. If not provided during creation, defaults to
'pending'. Changing from 'accepted' back to 'pending' will trigger a replacement
of the member resource in Terraform.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -496,6 +508,10 @@ async def create(

policies: Array of policies associated with this member.

status: Status of the member invitation. If not provided during creation, defaults to
'pending'. Changing from 'accepted' back to 'pending' will trigger a replacement
of the member resource in Terraform.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
13 changes: 7 additions & 6 deletions src/cloudflare/resources/ai/models/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ...._wrappers import ResultWrapper
from ...._base_client import make_request_options
from ....types.ai.models import schema_get_params
from ....types.ai.models.schema_get_response import SchemaGetResponse

__all__ = ["SchemaResource", "AsyncSchemaResource"]

Expand Down Expand Up @@ -54,7 +55,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
) -> SchemaGetResponse:
"""
Get Model Schema

Expand All @@ -79,9 +80,9 @@ def get(
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"model": model}, schema_get_params.SchemaGetParams),
post_parser=ResultWrapper[object]._unwrapper,
post_parser=ResultWrapper[SchemaGetResponse]._unwrapper,
),
cast_to=cast(Type[object], ResultWrapper[object]),
cast_to=cast(Type[SchemaGetResponse], ResultWrapper[SchemaGetResponse]),
)


Expand Down Expand Up @@ -116,7 +117,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
) -> SchemaGetResponse:
"""
Get Model Schema

Expand All @@ -141,9 +142,9 @@ async def get(
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform({"model": model}, schema_get_params.SchemaGetParams),
post_parser=ResultWrapper[object]._unwrapper,
post_parser=ResultWrapper[SchemaGetResponse]._unwrapper,
),
cast_to=cast(Type[object], ResultWrapper[object]),
cast_to=cast(Type[SchemaGetResponse], ResultWrapper[SchemaGetResponse]),
)


Expand Down
46 changes: 35 additions & 11 deletions src/cloudflare/resources/aisearch/instances/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, Iterable, cast
from typing import Type, Iterable, Optional, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -90,15 +90,17 @@ def create(
id: str,
source: str,
type: Literal["r2", "web-crawler"],
ai_gateway_id: str | Omit = omit,
ai_gateway_id: Optional[str] | Omit = omit,
aisearch_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -143,12 +145,14 @@ def create(
reranking_model: Literal["@cf/baai/bge-reranker-base", ""] | Omit = omit,
rewrite_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -240,15 +244,17 @@ def update(
id: str,
*,
account_id: str,
ai_gateway_id: str | Omit = omit,
ai_gateway_id: Optional[str] | Omit = omit,
aisearch_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -297,12 +303,14 @@ def update(
reranking_model: Literal["@cf/baai/bge-reranker-base", ""] | Omit = omit,
rewrite_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -330,12 +338,14 @@ def update(
summarization: bool | Omit = omit,
summarization_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand All @@ -357,9 +367,9 @@ def update(
"",
]
| Omit = omit,
system_prompt_aisearch: str | Omit = omit,
system_prompt_index_summarization: str | Omit = omit,
system_prompt_rewrite_query: str | Omit = omit,
system_prompt_aisearch: Optional[str] | Omit = omit,
system_prompt_index_summarization: Optional[str] | Omit = omit,
system_prompt_rewrite_query: Optional[str] | Omit = omit,
token_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -530,12 +540,14 @@ def chat_completions(
aisearch_options: instance_chat_completions_params.AISearchOptions | Omit = omit,
model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -771,15 +783,17 @@ async def create(
id: str,
source: str,
type: Literal["r2", "web-crawler"],
ai_gateway_id: str | Omit = omit,
ai_gateway_id: Optional[str] | Omit = omit,
aisearch_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -824,12 +838,14 @@ async def create(
reranking_model: Literal["@cf/baai/bge-reranker-base", ""] | Omit = omit,
rewrite_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -921,15 +937,17 @@ async def update(
id: str,
*,
account_id: str,
ai_gateway_id: str | Omit = omit,
ai_gateway_id: Optional[str] | Omit = omit,
aisearch_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -978,12 +996,14 @@ async def update(
reranking_model: Literal["@cf/baai/bge-reranker-base", ""] | Omit = omit,
rewrite_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down Expand Up @@ -1011,12 +1031,14 @@ async def update(
summarization: bool | Omit = omit,
summarization_model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand All @@ -1038,9 +1060,9 @@ async def update(
"",
]
| Omit = omit,
system_prompt_aisearch: str | Omit = omit,
system_prompt_index_summarization: str | Omit = omit,
system_prompt_rewrite_query: str | Omit = omit,
system_prompt_aisearch: Optional[str] | Omit = omit,
system_prompt_index_summarization: Optional[str] | Omit = omit,
system_prompt_rewrite_query: Optional[str] | Omit = omit,
token_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -1211,12 +1233,14 @@ async def chat_completions(
aisearch_options: instance_chat_completions_params.AISearchOptions | Omit = omit,
model: Literal[
"@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"@cf/zai-org/glm-4.7-flash",
"@cf/meta/llama-3.1-8b-instruct-fast",
"@cf/meta/llama-3.1-8b-instruct-fp8",
"@cf/meta/llama-4-scout-17b-16e-instruct",
"@cf/qwen/qwen3-30b-a3b-fp8",
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"@cf/moonshotai/kimi-k2-instruct",
"@cf/google/gemma-3-12b-it",
"anthropic/claude-3-7-sonnet",
"anthropic/claude-sonnet-4",
"anthropic/claude-opus-4",
Expand Down
Loading
Loading