diff --git a/.stats.yml b/.stats.yml index b4d9bc39c4a..35a7dcb730a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e9e968f2bf05402754affac40563fb49a9f7979ad72579fd407bedb0ba702ff5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c1304c4f3acd7dbe8b476827fe5df13055ab6634accc43a8edbbb82e1208a98.yml diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index a3685c12491..673262c5fed 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -50,42 +50,6 @@ def with_raw_response(self) -> AIResourceWithRawResponse: def with_streaming_response(self) -> AIResourceWithStreamingResponse: return AIResourceWithStreamingResponse(self) - @overload - def run( - self, - model_name: str, - *, - account_id: str, - body: object, - # 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... - @overload def run( self, @@ -367,7 +331,7 @@ def run( model_name: str, *, account_id: str, - messages: Iterable[ai_run_params.Variant8Message], + messages: Iterable[ai_run_params.Variant7Message], frequency_penalty: float | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, presence_penalty: float | NotGiven = NOT_GIVEN, @@ -375,7 +339,7 @@ def run( seed: int | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, temperature: float | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -524,7 +488,6 @@ def run( ... @required_args( - ["account_id", "body"], ["account_id", "text"], ["account_id", "prompt"], ["account_id", "audio"], @@ -539,7 +502,6 @@ def run( model_name: str, *, account_id: str, - body: object | NotGiven = NOT_GIVEN, text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, @@ -565,8 +527,8 @@ def run( temperature: float | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.Variant8Message] | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.Variant7Message] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, @@ -586,7 +548,42 @@ def run( Optional[AIRunResponse], self._post( f"/accounts/{account_id}/ai/run/{model_name}", - body=maybe_transform(body, ai_run_params.AIRunParams), + body=maybe_transform( + { + "text": text, + "prompt": prompt, + "guidance": guidance, + "height": height, + "image": image, + "image_b64": image_b64, + "lora_weights": lora_weights, + "loras": loras, + "mask": mask, + "negative_prompt": negative_prompt, + "num_steps": num_steps, + "seed": seed, + "strength": strength, + "width": width, + "audio": audio, + "frequency_penalty": frequency_penalty, + "lora": lora, + "max_tokens": max_tokens, + "presence_penalty": presence_penalty, + "raw": raw, + "repetition_penalty": repetition_penalty, + "stream": stream, + "temperature": temperature, + "top_k": top_k, + "top_p": top_p, + "messages": messages, + "tools": tools, + "target_lang": target_lang, + "source_lang": source_lang, + "input_text": input_text, + "max_length": max_length, + }, + ai_run_params.AIRunParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -614,42 +611,6 @@ def with_raw_response(self) -> AsyncAIResourceWithRawResponse: def with_streaming_response(self) -> AsyncAIResourceWithStreamingResponse: return AsyncAIResourceWithStreamingResponse(self) - @overload - async def run( - self, - model_name: str, - *, - account_id: str, - body: object, - # 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... - @overload async def run( self, @@ -931,7 +892,7 @@ async def run( model_name: str, *, account_id: str, - messages: Iterable[ai_run_params.Variant8Message], + messages: Iterable[ai_run_params.Variant7Message], frequency_penalty: float | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, presence_penalty: float | NotGiven = NOT_GIVEN, @@ -939,7 +900,7 @@ async def run( seed: int | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, temperature: float | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1088,7 +1049,6 @@ async def run( ... @required_args( - ["account_id", "body"], ["account_id", "text"], ["account_id", "prompt"], ["account_id", "audio"], @@ -1103,7 +1063,6 @@ async def run( model_name: str, *, account_id: str, - body: object | NotGiven = NOT_GIVEN, text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, @@ -1129,8 +1088,8 @@ async def run( temperature: float | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, top_p: float | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.Variant8Message] | NotGiven = NOT_GIVEN, - tools: Iterable[ai_run_params.Variant8Tool] | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.Variant7Message] | NotGiven = NOT_GIVEN, + tools: Iterable[ai_run_params.Variant7Tool] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, @@ -1150,7 +1109,42 @@ async def run( Optional[AIRunResponse], await self._post( f"/accounts/{account_id}/ai/run/{model_name}", - body=await async_maybe_transform(body, ai_run_params.AIRunParams), + body=await async_maybe_transform( + { + "text": text, + "prompt": prompt, + "guidance": guidance, + "height": height, + "image": image, + "image_b64": image_b64, + "lora_weights": lora_weights, + "loras": loras, + "mask": mask, + "negative_prompt": negative_prompt, + "num_steps": num_steps, + "seed": seed, + "strength": strength, + "width": width, + "audio": audio, + "frequency_penalty": frequency_penalty, + "lora": lora, + "max_tokens": max_tokens, + "presence_penalty": presence_penalty, + "raw": raw, + "repetition_penalty": repetition_penalty, + "stream": stream, + "temperature": temperature, + "top_k": top_k, + "top_p": top_p, + "messages": messages, + "tools": tools, + "target_lang": target_lang, + "source_lang": source_lang, + "input_text": input_text, + "max_length": max_length, + }, + ai_run_params.AIRunParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 835090f17db..788ee5867fb 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -7,20 +7,19 @@ __all__ = [ "AIRunParams", - "DumbPipe", "TextClassification", "TextToImage", "TextEmbeddings", "AutomaticSpeechRecognition", "ImageClassification", "ObjectDetection", + "Variant6", "Variant7", - "Variant8", - "Variant8Message", - "Variant8Tool", - "Variant8ToolFunction", - "Variant8ToolFunctionParameters", - "Variant8ToolFunctionParametersProperties", + "Variant7Message", + "Variant7Tool", + "Variant7ToolFunction", + "Variant7ToolFunctionParameters", + "Variant7ToolFunctionParametersProperties", "Translation", "Summarization", "ImageToText", @@ -28,12 +27,6 @@ ] -class DumbPipe(TypedDict, total=False): - account_id: Required[str] - - body: Required[object] - - class TextClassification(TypedDict, total=False): account_id: Required[str] @@ -94,7 +87,7 @@ class ObjectDetection(TypedDict, total=False): image: Iterable[float] -class Variant7(TypedDict, total=False): +class Variant6(TypedDict, total=False): account_id: Required[str] prompt: Required[str] @@ -122,10 +115,10 @@ class Variant7(TypedDict, total=False): top_p: float -class Variant8(TypedDict, total=False): +class Variant7(TypedDict, total=False): account_id: Required[str] - messages: Required[Iterable[Variant8Message]] + messages: Required[Iterable[Variant7Message]] frequency_penalty: float @@ -141,43 +134,43 @@ class Variant8(TypedDict, total=False): temperature: float - tools: Iterable[Variant8Tool] + tools: Iterable[Variant7Tool] top_k: int top_p: float -class Variant8Message(TypedDict, total=False): +class Variant7Message(TypedDict, total=False): content: Required[str] role: Required[str] -class Variant8ToolFunctionParametersProperties(TypedDict, total=False): +class Variant7ToolFunctionParametersProperties(TypedDict, total=False): description: str type: str -class Variant8ToolFunctionParameters(TypedDict, total=False): - properties: Dict[str, Variant8ToolFunctionParametersProperties] +class Variant7ToolFunctionParameters(TypedDict, total=False): + properties: Dict[str, Variant7ToolFunctionParametersProperties] required: List[str] type: str -class Variant8ToolFunction(TypedDict, total=False): +class Variant7ToolFunction(TypedDict, total=False): description: str name: str - parameters: Variant8ToolFunctionParameters + parameters: Variant7ToolFunctionParameters -class Variant8Tool(TypedDict, total=False): - function: Variant8ToolFunction +class Variant7Tool(TypedDict, total=False): + function: Variant7ToolFunction type: str @@ -223,15 +216,14 @@ class ImageToTextMessage(TypedDict, total=False): AIRunParams = Union[ - DumbPipe, TextClassification, TextToImage, TextEmbeddings, AutomaticSpeechRecognition, ImageClassification, ObjectDetection, + Variant6, Variant7, - Variant8, Translation, Summarization, ImageToText, diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 004acc6feea..953b41873a5 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -111,5 +111,4 @@ class ImageToText(BaseModel): Translation, Summarization, ImageToText, - object, ] diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index 5af829b9c8c..e67bf0eee20 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -19,59 +19,6 @@ class TestAI: @parametrize def test_method_run_overload_1(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_run_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="", - body={}, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - model_name="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - @parametrize - def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -80,7 +27,7 @@ def test_method_run_overload_2(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -93,7 +40,7 @@ def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -108,7 +55,7 @@ def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_2(self, client: Cloudflare) -> None: + def test_path_params_run_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -124,7 +71,7 @@ def test_path_params_run_overload_2(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_3(self, client: Cloudflare) -> None: + def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -133,7 +80,7 @@ def test_method_run_overload_3(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -154,7 +101,7 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -167,7 +114,7 @@ def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -182,7 +129,7 @@ def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_3(self, client: Cloudflare) -> None: + def test_path_params_run_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -198,7 +145,7 @@ def test_path_params_run_overload_3(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_4(self, client: Cloudflare) -> None: + def test_method_run_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -207,7 +154,7 @@ def test_method_run_overload_4(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -220,7 +167,7 @@ def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -235,7 +182,7 @@ def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_4(self, client: Cloudflare) -> None: + def test_path_params_run_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -251,7 +198,7 @@ def test_path_params_run_overload_4(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_5(self, client: Cloudflare) -> None: + def test_method_run_overload_4(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -260,7 +207,7 @@ def test_method_run_overload_5(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -273,7 +220,7 @@ def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -288,7 +235,7 @@ def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_5(self, client: Cloudflare) -> None: + def test_path_params_run_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -304,7 +251,7 @@ def test_path_params_run_overload_5(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_6(self, client: Cloudflare) -> None: + def test_method_run_overload_5(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -313,7 +260,7 @@ def test_method_run_overload_6(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -326,7 +273,7 @@ def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -341,7 +288,7 @@ def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_6(self, client: Cloudflare) -> None: + def test_path_params_run_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -357,7 +304,7 @@ def test_path_params_run_overload_6(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_7(self, client: Cloudflare) -> None: + def test_method_run_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -365,7 +312,7 @@ def test_method_run_overload_7(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -374,7 +321,7 @@ def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -386,7 +333,7 @@ def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -400,7 +347,7 @@ def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_7(self, client: Cloudflare) -> None: + def test_path_params_run_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -414,7 +361,7 @@ def test_path_params_run_overload_7(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_8(self, client: Cloudflare) -> None: + def test_method_run_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -423,7 +370,7 @@ def test_method_run_overload_8(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -443,7 +390,7 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -456,7 +403,7 @@ def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -471,7 +418,7 @@ def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_8(self, client: Cloudflare) -> None: + def test_path_params_run_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -487,7 +434,7 @@ def test_path_params_run_overload_8(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_9(self, client: Cloudflare) -> None: + def test_method_run_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -509,7 +456,7 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -593,7 +540,7 @@ def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -619,7 +566,7 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -647,7 +594,7 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_9(self, client: Cloudflare) -> None: + def test_path_params_run_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -689,7 +636,7 @@ def test_path_params_run_overload_9(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_10(self, client: Cloudflare) -> None: + def test_method_run_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -699,7 +646,7 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -710,7 +657,7 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -724,7 +671,7 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -740,7 +687,7 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_10(self, client: Cloudflare) -> None: + def test_path_params_run_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -758,7 +705,7 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_11(self, client: Cloudflare) -> None: + def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -767,7 +714,7 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -777,7 +724,7 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -790,7 +737,7 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -805,7 +752,7 @@ def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_11(self, client: Cloudflare) -> None: + def test_path_params_run_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -821,7 +768,7 @@ def test_path_params_run_overload_11(self, client: Cloudflare) -> None: ) @parametrize - def test_method_run_overload_12(self, client: Cloudflare) -> None: + def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -830,7 +777,7 @@ def test_method_run_overload_12(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_method_run_with_all_params_overload_12(self, client: Cloudflare) -> None: + def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -857,7 +804,7 @@ def test_method_run_with_all_params_overload_12(self, client: Cloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: + def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -870,7 +817,7 @@ def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - def test_streaming_response_run_overload_12(self, client: Cloudflare) -> None: + def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -885,7 +832,7 @@ def test_streaming_response_run_overload_12(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_run_overload_12(self, client: Cloudflare) -> None: + def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( model_name="model_name", @@ -906,59 +853,6 @@ class TestAsyncAI: @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @parametrize - async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( - model_name="model_name", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.workers.ai.with_raw_response.run( - model_name="model_name", - account_id="", - body={}, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( - model_name="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - @parametrize - async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -967,7 +861,7 @@ async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -980,7 +874,7 @@ async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -995,7 +889,7 @@ async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1011,7 +905,7 @@ async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1020,7 +914,7 @@ async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1041,7 +935,7 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1054,7 +948,7 @@ async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1069,7 +963,7 @@ async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1085,7 +979,7 @@ async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1094,7 +988,7 @@ async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1107,7 +1001,7 @@ async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1122,7 +1016,7 @@ async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1138,7 +1032,7 @@ async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1147,7 +1041,7 @@ async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1160,7 +1054,7 @@ async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1175,7 +1069,7 @@ async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1191,7 +1085,7 @@ async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1200,7 +1094,7 @@ async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1213,7 +1107,7 @@ async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1228,7 +1122,7 @@ async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1244,7 +1138,7 @@ async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1252,7 +1146,7 @@ async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1261,7 +1155,7 @@ async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1273,7 +1167,7 @@ async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1287,7 +1181,7 @@ async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1301,7 +1195,7 @@ async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1310,7 +1204,7 @@ async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1330,7 +1224,7 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1343,7 +1237,7 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1358,7 +1252,7 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1374,7 +1268,7 @@ async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1396,7 +1290,7 @@ async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> Non assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1480,7 +1374,7 @@ async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCl assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1506,7 +1400,7 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1534,7 +1428,7 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1576,7 +1470,7 @@ async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) - ) @parametrize - async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1586,7 +1480,7 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1597,7 +1491,7 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1611,7 +1505,7 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1627,7 +1521,7 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1645,7 +1539,7 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) ) @parametrize - async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1654,7 +1548,7 @@ async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1664,7 +1558,7 @@ async def test_method_run_with_all_params_overload_11(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1677,7 +1571,7 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1692,7 +1586,7 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name", @@ -1708,7 +1602,7 @@ async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) ) @parametrize - async def test_method_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1717,7 +1611,7 @@ async def test_method_run_overload_12(self, async_client: AsyncCloudflare) -> No assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_method_run_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1744,7 +1638,7 @@ async def test_method_run_with_all_params_overload_12(self, async_client: AsyncC assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1757,7 +1651,7 @@ async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize - async def test_streaming_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1772,7 +1666,7 @@ async def test_streaming_response_run_overload_12(self, async_client: AsyncCloud assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( model_name="model_name",