From 676a40a70134370ecdca261c9804bbe8939e8d9b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 03:10:34 +0000
Subject: [PATCH 01/45] feat(api): manual updates
testing local testing
---
.stats.yml | 4 ++--
src/benchify/resources/fix/fix.py | 18 ++++++++++--------
.../types/fix_create_ai_fallback_params.py | 9 ++++++---
tests/api_resources/test_fix.py | 10 ++--------
4 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index e25c529..f98ce09 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 18
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-0501dfa34f8ffcd73df00592617b82f10843f0b728c90711e16b7271274e0316.yml
-openapi_spec_hash: 103dac0edba909886461d4593568fa70
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-1e0bcd26c750585ed5b22cf808005a38e8c666f67b27452fd0867fb372d86f19.yml
+openapi_spec_hash: 51b459d169188dc0c32c15ef525600a1
config_hash: b7ed1548b06567db243d470ec47c9181
diff --git a/src/benchify/resources/fix/fix.py b/src/benchify/resources/fix/fix.py
index 87addf8..1cb2b5e 100644
--- a/src/benchify/resources/fix/fix.py
+++ b/src/benchify/resources/fix/fix.py
@@ -60,11 +60,11 @@ def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
- template_path: str,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
meta: Optional[fix_create_ai_fallback_params.Meta] | Omit = omit,
+ template_path: 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.
extra_headers: Headers | None = None,
@@ -83,8 +83,6 @@ def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
- template_path: Full path to the template
-
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -93,6 +91,9 @@ def create_ai_fallback(
meta: Meta information for the request
+ template_path: Template path for project context (defaults to benchify/default-template if not
+ provided)
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -107,11 +108,11 @@ def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
- "template_path": template_path,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
"meta": meta,
+ "template_path": template_path,
},
fix_create_ai_fallback_params.FixCreateAIFallbackParams,
),
@@ -151,11 +152,11 @@ async def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
- template_path: str,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
meta: Optional[fix_create_ai_fallback_params.Meta] | Omit = omit,
+ template_path: 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.
extra_headers: Headers | None = None,
@@ -174,8 +175,6 @@ async def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
- template_path: Full path to the template
-
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -184,6 +183,9 @@ async def create_ai_fallback(
meta: Meta information for the request
+ template_path: Template path for project context (defaults to benchify/default-template if not
+ provided)
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -198,11 +200,11 @@ async def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
- "template_path": template_path,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
"meta": meta,
+ "template_path": template_path,
},
fix_create_ai_fallback_params.FixCreateAIFallbackParams,
),
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 335cd39..0a55510 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -22,9 +22,6 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
remaining_diagnostics: Required[RemainingDiagnostics]
"""Diagnostics that remain after standard fixing"""
- template_path: Required[str]
- """Full path to the template"""
-
event_id: str
"""Unique identifier for the event"""
@@ -37,6 +34,12 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
meta: Optional[Meta]
"""Meta information for the request"""
+ template_path: str
+ """
+ Template path for project context (defaults to benchify/default-template if not
+ provided)
+ """
+
class File(TypedDict, total=False):
contents: Required[str]
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 1b996c3..949852c 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -28,7 +28,6 @@ def test_method_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -61,11 +60,11 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
]
}
},
- template_path="benchify/default-template",
event_id="",
include_context=True,
max_attempts=3,
meta={"external_id": "external_id"},
+ template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -80,7 +79,6 @@ def test_raw_response_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert response.is_closed is True
@@ -99,7 +97,6 @@ def test_streaming_response_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -126,7 +123,6 @@ async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> N
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -159,11 +155,11 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
]
}
},
- template_path="benchify/default-template",
event_id="",
include_context=True,
max_attempts=3,
meta={"external_id": "external_id"},
+ template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -178,7 +174,6 @@ async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert response.is_closed is True
@@ -197,7 +192,6 @@ async def test_streaming_response_create_ai_fallback(self, async_client: AsyncBe
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
From 86d3bcd4b43249e2a7e86723184968be5ac435ae Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 03:12:04 +0000
Subject: [PATCH 02/45] feat(api): manual updates
---
.stats.yml | 4 +-
api.md | 12 ++
src/benchify/_client.py | 10 +-
src/benchify/resources/__init__.py | 14 ++
src/benchify/resources/test.py | 141 +++++++++++++++++++
src/benchify/types/__init__.py | 1 +
src/benchify/types/test_retrieve_response.py | 10 ++
tests/api_resources/test_test.py | 80 +++++++++++
8 files changed, 269 insertions(+), 3 deletions(-)
create mode 100644 src/benchify/resources/test.py
create mode 100644 src/benchify/types/test_retrieve_response.py
create mode 100644 tests/api_resources/test_test.py
diff --git a/.stats.yml b/.stats.yml
index f98ce09..f470f10 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 18
+configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-1e0bcd26c750585ed5b22cf808005a38e8c666f67b27452fd0867fb372d86f19.yml
openapi_spec_hash: 51b459d169188dc0c32c15ef525600a1
-config_hash: b7ed1548b06567db243d470ec47c9181
+config_hash: 527fae1fb02ef3e11fc17b3dcf7ad20b
diff --git a/api.md b/api.md
index b8c4634..3af4e4d 100644
--- a/api.md
+++ b/api.md
@@ -104,3 +104,15 @@ from benchify.types.fix import StandardCreateResponse
Methods:
- client.fix.standard.create(\*\*params) -> StandardCreateResponse
+
+# Test
+
+Types:
+
+```python
+from benchify.types import TestRetrieveResponse
+```
+
+Methods:
+
+- client.test.retrieve() -> TestRetrieveResponse
diff --git a/src/benchify/_client.py b/src/benchify/_client.py
index 9b5e849..7743084 100644
--- a/src/benchify/_client.py
+++ b/src/benchify/_client.py
@@ -22,7 +22,7 @@
)
from ._utils import is_given, get_async_library
from ._version import __version__
-from .resources import fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
+from .resources import test, fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import APIStatusError
from ._base_client import (
@@ -51,6 +51,7 @@ class Benchify(SyncAPIClient):
validate_template: validate_template.ValidateTemplateResource
fix_parsing_and_diagnose: fix_parsing_and_diagnose.FixParsingAndDiagnoseResource
fix: fix.FixResource
+ test: test.TestResource
with_raw_response: BenchifyWithRawResponse
with_streaming_response: BenchifyWithStreamedResponse
@@ -110,6 +111,7 @@ def __init__(
self.validate_template = validate_template.ValidateTemplateResource(self)
self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.FixParsingAndDiagnoseResource(self)
self.fix = fix.FixResource(self)
+ self.test = test.TestResource(self)
self.with_raw_response = BenchifyWithRawResponse(self)
self.with_streaming_response = BenchifyWithStreamedResponse(self)
@@ -238,6 +240,7 @@ class AsyncBenchify(AsyncAPIClient):
validate_template: validate_template.AsyncValidateTemplateResource
fix_parsing_and_diagnose: fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResource
fix: fix.AsyncFixResource
+ test: test.AsyncTestResource
with_raw_response: AsyncBenchifyWithRawResponse
with_streaming_response: AsyncBenchifyWithStreamedResponse
@@ -297,6 +300,7 @@ def __init__(
self.validate_template = validate_template.AsyncValidateTemplateResource(self)
self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResource(self)
self.fix = fix.AsyncFixResource(self)
+ self.test = test.AsyncTestResource(self)
self.with_raw_response = AsyncBenchifyWithRawResponse(self)
self.with_streaming_response = AsyncBenchifyWithStreamedResponse(self)
@@ -430,6 +434,7 @@ def __init__(self, client: Benchify) -> None:
client.fix_parsing_and_diagnose
)
self.fix = fix.FixResourceWithRawResponse(client.fix)
+ self.test = test.TestResourceWithRawResponse(client.test)
class AsyncBenchifyWithRawResponse:
@@ -446,6 +451,7 @@ def __init__(self, client: AsyncBenchify) -> None:
client.fix_parsing_and_diagnose
)
self.fix = fix.AsyncFixResourceWithRawResponse(client.fix)
+ self.test = test.AsyncTestResourceWithRawResponse(client.test)
class BenchifyWithStreamedResponse:
@@ -462,6 +468,7 @@ def __init__(self, client: Benchify) -> None:
client.fix_parsing_and_diagnose
)
self.fix = fix.FixResourceWithStreamingResponse(client.fix)
+ self.test = test.TestResourceWithStreamingResponse(client.test)
class AsyncBenchifyWithStreamedResponse:
@@ -480,6 +487,7 @@ def __init__(self, client: AsyncBenchify) -> None:
)
)
self.fix = fix.AsyncFixResourceWithStreamingResponse(client.fix)
+ self.test = test.AsyncTestResourceWithStreamingResponse(client.test)
Client = Benchify
diff --git a/src/benchify/resources/__init__.py b/src/benchify/resources/__init__.py
index ec20094..3daa775 100644
--- a/src/benchify/resources/__init__.py
+++ b/src/benchify/resources/__init__.py
@@ -8,6 +8,14 @@
FixResourceWithStreamingResponse,
AsyncFixResourceWithStreamingResponse,
)
+from .test import (
+ TestResource,
+ AsyncTestResource,
+ TestResourceWithRawResponse,
+ AsyncTestResourceWithRawResponse,
+ TestResourceWithStreamingResponse,
+ AsyncTestResourceWithStreamingResponse,
+)
from .fixer import (
FixerResource,
AsyncFixerResource,
@@ -86,4 +94,10 @@
"AsyncFixResourceWithRawResponse",
"FixResourceWithStreamingResponse",
"AsyncFixResourceWithStreamingResponse",
+ "TestResource",
+ "AsyncTestResource",
+ "TestResourceWithRawResponse",
+ "AsyncTestResourceWithRawResponse",
+ "TestResourceWithStreamingResponse",
+ "AsyncTestResourceWithStreamingResponse",
]
diff --git a/src/benchify/resources/test.py b/src/benchify/resources/test.py
new file mode 100644
index 0000000..8fa0979
--- /dev/null
+++ b/src/benchify/resources/test.py
@@ -0,0 +1,141 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from .._types import Body, Query, Headers, NotGiven, not_given
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from .._base_client import make_request_options
+from ..types.test_retrieve_response import TestRetrieveResponse
+
+__all__ = ["TestResource", "AsyncTestResource"]
+
+
+class TestResource(SyncAPIResource):
+ __test__ = False
+
+ @cached_property
+ def with_raw_response(self) -> TestResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return TestResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> TestResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
+ """
+ return TestResourceWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ *,
+ # 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,
+ ) -> TestRetrieveResponse:
+ """Simple test endpoint that returns hello"""
+ return self._get(
+ "/v1/test",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=TestRetrieveResponse,
+ )
+
+
+class AsyncTestResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncTestResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncTestResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncTestResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
+ """
+ return AsyncTestResourceWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ *,
+ # 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,
+ ) -> TestRetrieveResponse:
+ """Simple test endpoint that returns hello"""
+ return await self._get(
+ "/v1/test",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=TestRetrieveResponse,
+ )
+
+
+class TestResourceWithRawResponse:
+ __test__ = False
+
+ def __init__(self, test: TestResource) -> None:
+ self._test = test
+
+ self.retrieve = to_raw_response_wrapper(
+ test.retrieve,
+ )
+
+
+class AsyncTestResourceWithRawResponse:
+ def __init__(self, test: AsyncTestResource) -> None:
+ self._test = test
+
+ self.retrieve = async_to_raw_response_wrapper(
+ test.retrieve,
+ )
+
+
+class TestResourceWithStreamingResponse:
+ __test__ = False
+
+ def __init__(self, test: TestResource) -> None:
+ self._test = test
+
+ self.retrieve = to_streamed_response_wrapper(
+ test.retrieve,
+ )
+
+
+class AsyncTestResourceWithStreamingResponse:
+ def __init__(self, test: AsyncTestResource) -> None:
+ self._test = test
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ test.retrieve,
+ )
diff --git a/src/benchify/types/__init__.py b/src/benchify/types/__init__.py
index ee71242..d4a3a4f 100644
--- a/src/benchify/types/__init__.py
+++ b/src/benchify/types/__init__.py
@@ -12,6 +12,7 @@
from .stack_get_logs_params import StackGetLogsParams as StackGetLogsParams
from .stack_update_response import StackUpdateResponse as StackUpdateResponse
from .stack_read_file_params import StackReadFileParams as StackReadFileParams
+from .test_retrieve_response import TestRetrieveResponse as TestRetrieveResponse
from .stack_get_logs_response import StackGetLogsResponse as StackGetLogsResponse
from .stack_retrieve_response import StackRetrieveResponse as StackRetrieveResponse
from .stack_write_file_params import StackWriteFileParams as StackWriteFileParams
diff --git a/src/benchify/types/test_retrieve_response.py b/src/benchify/types/test_retrieve_response.py
new file mode 100644
index 0000000..ab794a1
--- /dev/null
+++ b/src/benchify/types/test_retrieve_response.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+
+__all__ = ["TestRetrieveResponse"]
+
+
+class TestRetrieveResponse(BaseModel):
+ __test__ = False
+ message: str
diff --git a/tests/api_resources/test_test.py b/tests/api_resources/test_test.py
new file mode 100644
index 0000000..20c0524
--- /dev/null
+++ b/tests/api_resources/test_test.py
@@ -0,0 +1,80 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from benchify import Benchify, AsyncBenchify
+from tests.utils import assert_matches_type
+from benchify.types import TestRetrieveResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestTest:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_method_retrieve(self, client: Benchify) -> None:
+ test = client.test.retrieve()
+ assert_matches_type(TestRetrieveResponse, test, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_raw_response_retrieve(self, client: Benchify) -> None:
+ response = client.test.with_raw_response.retrieve()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ test = response.parse()
+ assert_matches_type(TestRetrieveResponse, test, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Benchify) -> None:
+ with client.test.with_streaming_response.retrieve() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ test = response.parse()
+ assert_matches_type(TestRetrieveResponse, test, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncTest:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncBenchify) -> None:
+ test = await async_client.test.retrieve()
+ assert_matches_type(TestRetrieveResponse, test, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncBenchify) -> None:
+ response = await async_client.test.with_raw_response.retrieve()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ test = await response.parse()
+ assert_matches_type(TestRetrieveResponse, test, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncBenchify) -> None:
+ async with async_client.test.with_streaming_response.retrieve() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ test = await response.parse()
+ assert_matches_type(TestRetrieveResponse, test, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
From db0f87365147f7478889d69bf6e14807a878c30a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 03:24:46 +0000
Subject: [PATCH 03/45] feat(api): api update
---
.stats.yml | 6 +-
api.md | 12 --
src/benchify/_client.py | 10 +-
src/benchify/resources/__init__.py | 14 --
src/benchify/resources/fix/fix.py | 18 +--
src/benchify/resources/test.py | 141 ------------------
src/benchify/types/__init__.py | 1 -
.../types/fix_create_ai_fallback_params.py | 9 +-
src/benchify/types/test_retrieve_response.py | 10 --
tests/api_resources/test_fix.py | 10 +-
tests/api_resources/test_test.py | 80 ----------
11 files changed, 23 insertions(+), 288 deletions(-)
delete mode 100644 src/benchify/resources/test.py
delete mode 100644 src/benchify/types/test_retrieve_response.py
delete mode 100644 tests/api_resources/test_test.py
diff --git a/.stats.yml b/.stats.yml
index f470f10..ecae562 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 19
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-1e0bcd26c750585ed5b22cf808005a38e8c666f67b27452fd0867fb372d86f19.yml
-openapi_spec_hash: 51b459d169188dc0c32c15ef525600a1
+configured_endpoints: 18
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-0501dfa34f8ffcd73df00592617b82f10843f0b728c90711e16b7271274e0316.yml
+openapi_spec_hash: 103dac0edba909886461d4593568fa70
config_hash: 527fae1fb02ef3e11fc17b3dcf7ad20b
diff --git a/api.md b/api.md
index 3af4e4d..b8c4634 100644
--- a/api.md
+++ b/api.md
@@ -104,15 +104,3 @@ from benchify.types.fix import StandardCreateResponse
Methods:
- client.fix.standard.create(\*\*params) -> StandardCreateResponse
-
-# Test
-
-Types:
-
-```python
-from benchify.types import TestRetrieveResponse
-```
-
-Methods:
-
-- client.test.retrieve() -> TestRetrieveResponse
diff --git a/src/benchify/_client.py b/src/benchify/_client.py
index 7743084..9b5e849 100644
--- a/src/benchify/_client.py
+++ b/src/benchify/_client.py
@@ -22,7 +22,7 @@
)
from ._utils import is_given, get_async_library
from ._version import __version__
-from .resources import test, fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
+from .resources import fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import APIStatusError
from ._base_client import (
@@ -51,7 +51,6 @@ class Benchify(SyncAPIClient):
validate_template: validate_template.ValidateTemplateResource
fix_parsing_and_diagnose: fix_parsing_and_diagnose.FixParsingAndDiagnoseResource
fix: fix.FixResource
- test: test.TestResource
with_raw_response: BenchifyWithRawResponse
with_streaming_response: BenchifyWithStreamedResponse
@@ -111,7 +110,6 @@ def __init__(
self.validate_template = validate_template.ValidateTemplateResource(self)
self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.FixParsingAndDiagnoseResource(self)
self.fix = fix.FixResource(self)
- self.test = test.TestResource(self)
self.with_raw_response = BenchifyWithRawResponse(self)
self.with_streaming_response = BenchifyWithStreamedResponse(self)
@@ -240,7 +238,6 @@ class AsyncBenchify(AsyncAPIClient):
validate_template: validate_template.AsyncValidateTemplateResource
fix_parsing_and_diagnose: fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResource
fix: fix.AsyncFixResource
- test: test.AsyncTestResource
with_raw_response: AsyncBenchifyWithRawResponse
with_streaming_response: AsyncBenchifyWithStreamedResponse
@@ -300,7 +297,6 @@ def __init__(
self.validate_template = validate_template.AsyncValidateTemplateResource(self)
self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResource(self)
self.fix = fix.AsyncFixResource(self)
- self.test = test.AsyncTestResource(self)
self.with_raw_response = AsyncBenchifyWithRawResponse(self)
self.with_streaming_response = AsyncBenchifyWithStreamedResponse(self)
@@ -434,7 +430,6 @@ def __init__(self, client: Benchify) -> None:
client.fix_parsing_and_diagnose
)
self.fix = fix.FixResourceWithRawResponse(client.fix)
- self.test = test.TestResourceWithRawResponse(client.test)
class AsyncBenchifyWithRawResponse:
@@ -451,7 +446,6 @@ def __init__(self, client: AsyncBenchify) -> None:
client.fix_parsing_and_diagnose
)
self.fix = fix.AsyncFixResourceWithRawResponse(client.fix)
- self.test = test.AsyncTestResourceWithRawResponse(client.test)
class BenchifyWithStreamedResponse:
@@ -468,7 +462,6 @@ def __init__(self, client: Benchify) -> None:
client.fix_parsing_and_diagnose
)
self.fix = fix.FixResourceWithStreamingResponse(client.fix)
- self.test = test.TestResourceWithStreamingResponse(client.test)
class AsyncBenchifyWithStreamedResponse:
@@ -487,7 +480,6 @@ def __init__(self, client: AsyncBenchify) -> None:
)
)
self.fix = fix.AsyncFixResourceWithStreamingResponse(client.fix)
- self.test = test.AsyncTestResourceWithStreamingResponse(client.test)
Client = Benchify
diff --git a/src/benchify/resources/__init__.py b/src/benchify/resources/__init__.py
index 3daa775..ec20094 100644
--- a/src/benchify/resources/__init__.py
+++ b/src/benchify/resources/__init__.py
@@ -8,14 +8,6 @@
FixResourceWithStreamingResponse,
AsyncFixResourceWithStreamingResponse,
)
-from .test import (
- TestResource,
- AsyncTestResource,
- TestResourceWithRawResponse,
- AsyncTestResourceWithRawResponse,
- TestResourceWithStreamingResponse,
- AsyncTestResourceWithStreamingResponse,
-)
from .fixer import (
FixerResource,
AsyncFixerResource,
@@ -94,10 +86,4 @@
"AsyncFixResourceWithRawResponse",
"FixResourceWithStreamingResponse",
"AsyncFixResourceWithStreamingResponse",
- "TestResource",
- "AsyncTestResource",
- "TestResourceWithRawResponse",
- "AsyncTestResourceWithRawResponse",
- "TestResourceWithStreamingResponse",
- "AsyncTestResourceWithStreamingResponse",
]
diff --git a/src/benchify/resources/fix/fix.py b/src/benchify/resources/fix/fix.py
index 1cb2b5e..87addf8 100644
--- a/src/benchify/resources/fix/fix.py
+++ b/src/benchify/resources/fix/fix.py
@@ -60,11 +60,11 @@ def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
+ template_path: str,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
meta: Optional[fix_create_ai_fallback_params.Meta] | Omit = omit,
- template_path: 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.
extra_headers: Headers | None = None,
@@ -83,6 +83,8 @@ def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
+ template_path: Full path to the template
+
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -91,9 +93,6 @@ def create_ai_fallback(
meta: Meta information for the request
- template_path: Template path for project context (defaults to benchify/default-template if not
- provided)
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -108,11 +107,11 @@ def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
+ "template_path": template_path,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
"meta": meta,
- "template_path": template_path,
},
fix_create_ai_fallback_params.FixCreateAIFallbackParams,
),
@@ -152,11 +151,11 @@ async def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
+ template_path: str,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
meta: Optional[fix_create_ai_fallback_params.Meta] | Omit = omit,
- template_path: 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.
extra_headers: Headers | None = None,
@@ -175,6 +174,8 @@ async def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
+ template_path: Full path to the template
+
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -183,9 +184,6 @@ async def create_ai_fallback(
meta: Meta information for the request
- template_path: Template path for project context (defaults to benchify/default-template if not
- provided)
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -200,11 +198,11 @@ async def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
+ "template_path": template_path,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
"meta": meta,
- "template_path": template_path,
},
fix_create_ai_fallback_params.FixCreateAIFallbackParams,
),
diff --git a/src/benchify/resources/test.py b/src/benchify/resources/test.py
deleted file mode 100644
index 8fa0979..0000000
--- a/src/benchify/resources/test.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import httpx
-
-from .._types import Body, Query, Headers, NotGiven, not_given
-from .._compat import cached_property
-from .._resource import SyncAPIResource, AsyncAPIResource
-from .._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from .._base_client import make_request_options
-from ..types.test_retrieve_response import TestRetrieveResponse
-
-__all__ = ["TestResource", "AsyncTestResource"]
-
-
-class TestResource(SyncAPIResource):
- __test__ = False
-
- @cached_property
- def with_raw_response(self) -> TestResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
- """
- return TestResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> TestResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
- """
- return TestResourceWithStreamingResponse(self)
-
- def retrieve(
- self,
- *,
- # 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,
- ) -> TestRetrieveResponse:
- """Simple test endpoint that returns hello"""
- return self._get(
- "/v1/test",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=TestRetrieveResponse,
- )
-
-
-class AsyncTestResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncTestResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
- """
- return AsyncTestResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncTestResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
- """
- return AsyncTestResourceWithStreamingResponse(self)
-
- async def retrieve(
- self,
- *,
- # 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,
- ) -> TestRetrieveResponse:
- """Simple test endpoint that returns hello"""
- return await self._get(
- "/v1/test",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=TestRetrieveResponse,
- )
-
-
-class TestResourceWithRawResponse:
- __test__ = False
-
- def __init__(self, test: TestResource) -> None:
- self._test = test
-
- self.retrieve = to_raw_response_wrapper(
- test.retrieve,
- )
-
-
-class AsyncTestResourceWithRawResponse:
- def __init__(self, test: AsyncTestResource) -> None:
- self._test = test
-
- self.retrieve = async_to_raw_response_wrapper(
- test.retrieve,
- )
-
-
-class TestResourceWithStreamingResponse:
- __test__ = False
-
- def __init__(self, test: TestResource) -> None:
- self._test = test
-
- self.retrieve = to_streamed_response_wrapper(
- test.retrieve,
- )
-
-
-class AsyncTestResourceWithStreamingResponse:
- def __init__(self, test: AsyncTestResource) -> None:
- self._test = test
-
- self.retrieve = async_to_streamed_response_wrapper(
- test.retrieve,
- )
diff --git a/src/benchify/types/__init__.py b/src/benchify/types/__init__.py
index d4a3a4f..ee71242 100644
--- a/src/benchify/types/__init__.py
+++ b/src/benchify/types/__init__.py
@@ -12,7 +12,6 @@
from .stack_get_logs_params import StackGetLogsParams as StackGetLogsParams
from .stack_update_response import StackUpdateResponse as StackUpdateResponse
from .stack_read_file_params import StackReadFileParams as StackReadFileParams
-from .test_retrieve_response import TestRetrieveResponse as TestRetrieveResponse
from .stack_get_logs_response import StackGetLogsResponse as StackGetLogsResponse
from .stack_retrieve_response import StackRetrieveResponse as StackRetrieveResponse
from .stack_write_file_params import StackWriteFileParams as StackWriteFileParams
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 0a55510..335cd39 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -22,6 +22,9 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
remaining_diagnostics: Required[RemainingDiagnostics]
"""Diagnostics that remain after standard fixing"""
+ template_path: Required[str]
+ """Full path to the template"""
+
event_id: str
"""Unique identifier for the event"""
@@ -34,12 +37,6 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
meta: Optional[Meta]
"""Meta information for the request"""
- template_path: str
- """
- Template path for project context (defaults to benchify/default-template if not
- provided)
- """
-
class File(TypedDict, total=False):
contents: Required[str]
diff --git a/src/benchify/types/test_retrieve_response.py b/src/benchify/types/test_retrieve_response.py
deleted file mode 100644
index ab794a1..0000000
--- a/src/benchify/types/test_retrieve_response.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .._models import BaseModel
-
-__all__ = ["TestRetrieveResponse"]
-
-
-class TestRetrieveResponse(BaseModel):
- __test__ = False
- message: str
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 949852c..1b996c3 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -28,6 +28,7 @@ def test_method_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
+ template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -60,11 +61,11 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
]
}
},
+ template_path="benchify/default-template",
event_id="",
include_context=True,
max_attempts=3,
meta={"external_id": "external_id"},
- template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -79,6 +80,7 @@ def test_raw_response_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
+ template_path="benchify/default-template",
)
assert response.is_closed is True
@@ -97,6 +99,7 @@ def test_streaming_response_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
+ template_path="benchify/default-template",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -123,6 +126,7 @@ async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> N
}
],
remaining_diagnostics={},
+ template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -155,11 +159,11 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
]
}
},
+ template_path="benchify/default-template",
event_id="",
include_context=True,
max_attempts=3,
meta={"external_id": "external_id"},
- template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -174,6 +178,7 @@ async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify
}
],
remaining_diagnostics={},
+ template_path="benchify/default-template",
)
assert response.is_closed is True
@@ -192,6 +197,7 @@ async def test_streaming_response_create_ai_fallback(self, async_client: AsyncBe
}
],
remaining_diagnostics={},
+ template_path="benchify/default-template",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/test_test.py b/tests/api_resources/test_test.py
deleted file mode 100644
index 20c0524..0000000
--- a/tests/api_resources/test_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from benchify import Benchify, AsyncBenchify
-from tests.utils import assert_matches_type
-from benchify.types import TestRetrieveResponse
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestTest:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_retrieve(self, client: Benchify) -> None:
- test = client.test.retrieve()
- assert_matches_type(TestRetrieveResponse, test, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_retrieve(self, client: Benchify) -> None:
- response = client.test.with_raw_response.retrieve()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- test = response.parse()
- assert_matches_type(TestRetrieveResponse, test, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_retrieve(self, client: Benchify) -> None:
- with client.test.with_streaming_response.retrieve() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- test = response.parse()
- assert_matches_type(TestRetrieveResponse, test, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
-
-class TestAsyncTest:
- parametrize = pytest.mark.parametrize(
- "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_retrieve(self, async_client: AsyncBenchify) -> None:
- test = await async_client.test.retrieve()
- assert_matches_type(TestRetrieveResponse, test, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_retrieve(self, async_client: AsyncBenchify) -> None:
- response = await async_client.test.with_raw_response.retrieve()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- test = await response.parse()
- assert_matches_type(TestRetrieveResponse, test, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_retrieve(self, async_client: AsyncBenchify) -> None:
- async with async_client.test.with_streaming_response.retrieve() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- test = await response.parse()
- assert_matches_type(TestRetrieveResponse, test, path=["response"])
-
- assert cast(Any, response.is_closed) is True
From b42ea01495e0b0b68712d3845933a1fd16964e1c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 04:25:04 +0000
Subject: [PATCH 04/45] feat(api): api update
---
.stats.yml | 4 ++--
src/benchify/resources/fix/fix.py | 18 ++++++++++--------
.../types/fix_create_ai_fallback_params.py | 9 ++++++---
tests/api_resources/test_fix.py | 10 ++--------
4 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index ecae562..b69b652 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 18
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-0501dfa34f8ffcd73df00592617b82f10843f0b728c90711e16b7271274e0316.yml
-openapi_spec_hash: 103dac0edba909886461d4593568fa70
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-bf760e6f78dfa1ae79046b573cf6a560f7250c980ab436617c40213836970f87.yml
+openapi_spec_hash: 68ee00e95f5f0317a66641b8bcb9521e
config_hash: 527fae1fb02ef3e11fc17b3dcf7ad20b
diff --git a/src/benchify/resources/fix/fix.py b/src/benchify/resources/fix/fix.py
index 87addf8..1cb2b5e 100644
--- a/src/benchify/resources/fix/fix.py
+++ b/src/benchify/resources/fix/fix.py
@@ -60,11 +60,11 @@ def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
- template_path: str,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
meta: Optional[fix_create_ai_fallback_params.Meta] | Omit = omit,
+ template_path: 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.
extra_headers: Headers | None = None,
@@ -83,8 +83,6 @@ def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
- template_path: Full path to the template
-
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -93,6 +91,9 @@ def create_ai_fallback(
meta: Meta information for the request
+ template_path: Template path for project context (defaults to benchify/default-template if not
+ provided)
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -107,11 +108,11 @@ def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
- "template_path": template_path,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
"meta": meta,
+ "template_path": template_path,
},
fix_create_ai_fallback_params.FixCreateAIFallbackParams,
),
@@ -151,11 +152,11 @@ async def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
- template_path: str,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
meta: Optional[fix_create_ai_fallback_params.Meta] | Omit = omit,
+ template_path: 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.
extra_headers: Headers | None = None,
@@ -174,8 +175,6 @@ async def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
- template_path: Full path to the template
-
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -184,6 +183,9 @@ async def create_ai_fallback(
meta: Meta information for the request
+ template_path: Template path for project context (defaults to benchify/default-template if not
+ provided)
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -198,11 +200,11 @@ async def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
- "template_path": template_path,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
"meta": meta,
+ "template_path": template_path,
},
fix_create_ai_fallback_params.FixCreateAIFallbackParams,
),
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 335cd39..0a55510 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -22,9 +22,6 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
remaining_diagnostics: Required[RemainingDiagnostics]
"""Diagnostics that remain after standard fixing"""
- template_path: Required[str]
- """Full path to the template"""
-
event_id: str
"""Unique identifier for the event"""
@@ -37,6 +34,12 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
meta: Optional[Meta]
"""Meta information for the request"""
+ template_path: str
+ """
+ Template path for project context (defaults to benchify/default-template if not
+ provided)
+ """
+
class File(TypedDict, total=False):
contents: Required[str]
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 1b996c3..949852c 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -28,7 +28,6 @@ def test_method_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -61,11 +60,11 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
]
}
},
- template_path="benchify/default-template",
event_id="",
include_context=True,
max_attempts=3,
meta={"external_id": "external_id"},
+ template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -80,7 +79,6 @@ def test_raw_response_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert response.is_closed is True
@@ -99,7 +97,6 @@ def test_streaming_response_create_ai_fallback(self, client: Benchify) -> None:
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -126,7 +123,6 @@ async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> N
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -159,11 +155,11 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
]
}
},
- template_path="benchify/default-template",
event_id="",
include_context=True,
max_attempts=3,
meta={"external_id": "external_id"},
+ template_path="benchify/default-template",
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
@@ -178,7 +174,6 @@ async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
)
assert response.is_closed is True
@@ -197,7 +192,6 @@ async def test_streaming_response_create_ai_fallback(self, async_client: AsyncBe
}
],
remaining_diagnostics={},
- template_path="benchify/default-template",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
From 24ce18d2273bbd4de98f805788b2e95e0d002b44 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 18:54:44 +0000
Subject: [PATCH 05/45] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index b69b652..6fa6d94 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 18
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-bf760e6f78dfa1ae79046b573cf6a560f7250c980ab436617c40213836970f87.yml
-openapi_spec_hash: 68ee00e95f5f0317a66641b8bcb9521e
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-e5105627bd8e8dad5cf6cf66ceb1b0d88156a5307fb8e6c774393c28f51f7079.yml
+openapi_spec_hash: 71208b28a8c9c1e046430129357c3c75
config_hash: 527fae1fb02ef3e11fc17b3dcf7ad20b
From 9d3bc91b39de22ee755e7afb125665ac7d62d7c7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 21:05:08 +0000
Subject: [PATCH 06/45] feat(api): manual updates
---
.stats.yml | 4 +-
api.md | 37 ++-
src/benchify/_client.py | 3 +-
src/benchify/resources/stacks/__init__.py | 33 ++
src/benchify/resources/stacks/bundle.py | 286 ++++++++++++++++++
src/benchify/resources/{ => stacks}/stacks.py | 79 +++--
src/benchify/types/stacks/__init__.py | 8 +
.../stacks/bundle_create_files_params.py | 23 ++
.../stacks/bundle_create_files_response.py | 11 +
.../types/stacks/bundle_create_params.py | 15 +
.../types/stacks/bundle_create_response.py | 11 +
tests/api_resources/stacks/__init__.py | 1 +
tests/api_resources/stacks/test_bundle.py | 255 ++++++++++++++++
13 files changed, 733 insertions(+), 33 deletions(-)
create mode 100644 src/benchify/resources/stacks/__init__.py
create mode 100644 src/benchify/resources/stacks/bundle.py
rename src/benchify/resources/{ => stacks}/stacks.py (95%)
create mode 100644 src/benchify/types/stacks/__init__.py
create mode 100644 src/benchify/types/stacks/bundle_create_files_params.py
create mode 100644 src/benchify/types/stacks/bundle_create_files_response.py
create mode 100644 src/benchify/types/stacks/bundle_create_params.py
create mode 100644 src/benchify/types/stacks/bundle_create_response.py
create mode 100644 tests/api_resources/stacks/__init__.py
create mode 100644 tests/api_resources/stacks/test_bundle.py
diff --git a/.stats.yml b/.stats.yml
index 6fa6d94..7628ea4 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 18
+configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-e5105627bd8e8dad5cf6cf66ceb1b0d88156a5307fb8e6c774393c28f51f7079.yml
openapi_spec_hash: 71208b28a8c9c1e046430129357c3c75
-config_hash: 527fae1fb02ef3e11fc17b3dcf7ad20b
+config_hash: 266887184a04a15b83f7c319e897e992
diff --git a/api.md b/api.md
index b8c4634..c5738ab 100644
--- a/api.md
+++ b/api.md
@@ -32,18 +32,31 @@ from benchify.types import (
Methods:
-- client.stacks.create(\*\*params) -> StackCreateResponse
-- client.stacks.retrieve(id) -> StackRetrieveResponse
-- client.stacks.update(id, \*\*params) -> StackUpdateResponse
-- client.stacks.create_and_run(\*\*params) -> StackCreateAndRunResponse
-- client.stacks.destroy(id) -> None
-- client.stacks.execute_command(id, \*\*params) -> StackExecuteCommandResponse
-- client.stacks.get_logs(id, \*\*params) -> StackGetLogsResponse
-- client.stacks.get_network_info(id) -> StackGetNetworkInfoResponse
-- client.stacks.read_file(id, \*\*params) -> StackReadFileResponse
-- client.stacks.reset(id, \*\*params) -> StackResetResponse
-- client.stacks.wait_for_dev_server_url(id, \*\*params) -> StackWaitForDevServerURLResponse
-- client.stacks.write_file(id, \*\*params) -> StackWriteFileResponse
+- client.stacks.create(\*\*params) -> StackCreateResponse
+- client.stacks.retrieve(id) -> StackRetrieveResponse
+- client.stacks.update(id, \*\*params) -> StackUpdateResponse
+- client.stacks.create_and_run(\*\*params) -> StackCreateAndRunResponse
+- client.stacks.destroy(id) -> None
+- client.stacks.execute_command(id, \*\*params) -> StackExecuteCommandResponse
+- client.stacks.get_logs(id, \*\*params) -> StackGetLogsResponse
+- client.stacks.get_network_info(id) -> StackGetNetworkInfoResponse
+- client.stacks.read_file(id, \*\*params) -> StackReadFileResponse
+- client.stacks.reset(id, \*\*params) -> StackResetResponse
+- client.stacks.wait_for_dev_server_url(id, \*\*params) -> StackWaitForDevServerURLResponse
+- client.stacks.write_file(id, \*\*params) -> StackWriteFileResponse
+
+## Bundle
+
+Types:
+
+```python
+from benchify.types.stacks import BundleCreateResponse, BundleCreateFilesResponse
+```
+
+Methods:
+
+- client.stacks.bundle.create(\*\*params) -> BundleCreateResponse
+- client.stacks.bundle.create_files(\*\*params) -> BundleCreateFilesResponse
# FixStringLiterals
diff --git a/src/benchify/_client.py b/src/benchify/_client.py
index 9b5e849..1bc38bc 100644
--- a/src/benchify/_client.py
+++ b/src/benchify/_client.py
@@ -22,7 +22,7 @@
)
from ._utils import is_given, get_async_library
from ._version import __version__
-from .resources import fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
+from .resources import fixer, validate_template, fix_string_literals, fix_parsing_and_diagnose
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import APIStatusError
from ._base_client import (
@@ -31,6 +31,7 @@
AsyncAPIClient,
)
from .resources.fix import fix
+from .resources.stacks import stacks
__all__ = [
"Timeout",
diff --git a/src/benchify/resources/stacks/__init__.py b/src/benchify/resources/stacks/__init__.py
new file mode 100644
index 0000000..192bdc1
--- /dev/null
+++ b/src/benchify/resources/stacks/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .bundle import (
+ BundleResource,
+ AsyncBundleResource,
+ BundleResourceWithRawResponse,
+ AsyncBundleResourceWithRawResponse,
+ BundleResourceWithStreamingResponse,
+ AsyncBundleResourceWithStreamingResponse,
+)
+from .stacks import (
+ StacksResource,
+ AsyncStacksResource,
+ StacksResourceWithRawResponse,
+ AsyncStacksResourceWithRawResponse,
+ StacksResourceWithStreamingResponse,
+ AsyncStacksResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "BundleResource",
+ "AsyncBundleResource",
+ "BundleResourceWithRawResponse",
+ "AsyncBundleResourceWithRawResponse",
+ "BundleResourceWithStreamingResponse",
+ "AsyncBundleResourceWithStreamingResponse",
+ "StacksResource",
+ "AsyncStacksResource",
+ "StacksResourceWithRawResponse",
+ "AsyncStacksResourceWithRawResponse",
+ "StacksResourceWithStreamingResponse",
+ "AsyncStacksResourceWithStreamingResponse",
+]
diff --git a/src/benchify/resources/stacks/bundle.py b/src/benchify/resources/stacks/bundle.py
new file mode 100644
index 0000000..8045d1a
--- /dev/null
+++ b/src/benchify/resources/stacks/bundle.py
@@ -0,0 +1,286 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+
+import httpx
+
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._utils import maybe_transform, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._base_client import make_request_options
+from ...types.stacks import bundle_create_params, bundle_create_files_params
+from ...types.stacks.bundle_create_response import BundleCreateResponse
+from ...types.stacks.bundle_create_files_response import BundleCreateFilesResponse
+
+__all__ = ["BundleResource", "AsyncBundleResource"]
+
+
+class BundleResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> BundleResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return BundleResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BundleResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
+ """
+ return BundleResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ entrypoint: str,
+ tarball_base64: str,
+ tarball_filename: 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.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BundleCreateResponse:
+ """
+ Accepts a base64 tarball and forwards to the external Sandbox Manager
+ /sandbox/bundle endpoint.
+
+ 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
+ """
+ return self._post(
+ "/v1/stacks/bundle",
+ body=maybe_transform(
+ {
+ "entrypoint": entrypoint,
+ "tarball_base64": tarball_base64,
+ "tarball_filename": tarball_filename,
+ },
+ bundle_create_params.BundleCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BundleCreateResponse,
+ )
+
+ def create_files(
+ self,
+ *,
+ entrypoint: str,
+ files: Iterable[bundle_create_files_params.File],
+ tarball_filename: 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.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BundleCreateFilesResponse:
+ """
+ Accepts a JSON array of {path, content}, packs into a tar.zst, and forwards to
+ the Sandbox Manager /sandbox/bundle endpoint.
+
+ Args:
+ files: Files to bundle
+
+ 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
+ """
+ return self._post(
+ "/v1/stacks/bundle/files",
+ body=maybe_transform(
+ {
+ "entrypoint": entrypoint,
+ "files": files,
+ "tarball_filename": tarball_filename,
+ },
+ bundle_create_files_params.BundleCreateFilesParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BundleCreateFilesResponse,
+ )
+
+
+class AsyncBundleResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncBundleResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncBundleResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBundleResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
+ """
+ return AsyncBundleResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ entrypoint: str,
+ tarball_base64: str,
+ tarball_filename: 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.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BundleCreateResponse:
+ """
+ Accepts a base64 tarball and forwards to the external Sandbox Manager
+ /sandbox/bundle endpoint.
+
+ 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
+ """
+ return await self._post(
+ "/v1/stacks/bundle",
+ body=await async_maybe_transform(
+ {
+ "entrypoint": entrypoint,
+ "tarball_base64": tarball_base64,
+ "tarball_filename": tarball_filename,
+ },
+ bundle_create_params.BundleCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BundleCreateResponse,
+ )
+
+ async def create_files(
+ self,
+ *,
+ entrypoint: str,
+ files: Iterable[bundle_create_files_params.File],
+ tarball_filename: 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.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BundleCreateFilesResponse:
+ """
+ Accepts a JSON array of {path, content}, packs into a tar.zst, and forwards to
+ the Sandbox Manager /sandbox/bundle endpoint.
+
+ Args:
+ files: Files to bundle
+
+ 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
+ """
+ return await self._post(
+ "/v1/stacks/bundle/files",
+ body=await async_maybe_transform(
+ {
+ "entrypoint": entrypoint,
+ "files": files,
+ "tarball_filename": tarball_filename,
+ },
+ bundle_create_files_params.BundleCreateFilesParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BundleCreateFilesResponse,
+ )
+
+
+class BundleResourceWithRawResponse:
+ def __init__(self, bundle: BundleResource) -> None:
+ self._bundle = bundle
+
+ self.create = to_raw_response_wrapper(
+ bundle.create,
+ )
+ self.create_files = to_raw_response_wrapper(
+ bundle.create_files,
+ )
+
+
+class AsyncBundleResourceWithRawResponse:
+ def __init__(self, bundle: AsyncBundleResource) -> None:
+ self._bundle = bundle
+
+ self.create = async_to_raw_response_wrapper(
+ bundle.create,
+ )
+ self.create_files = async_to_raw_response_wrapper(
+ bundle.create_files,
+ )
+
+
+class BundleResourceWithStreamingResponse:
+ def __init__(self, bundle: BundleResource) -> None:
+ self._bundle = bundle
+
+ self.create = to_streamed_response_wrapper(
+ bundle.create,
+ )
+ self.create_files = to_streamed_response_wrapper(
+ bundle.create_files,
+ )
+
+
+class AsyncBundleResourceWithStreamingResponse:
+ def __init__(self, bundle: AsyncBundleResource) -> None:
+ self._bundle = bundle
+
+ self.create = async_to_streamed_response_wrapper(
+ bundle.create,
+ )
+ self.create_files = async_to_streamed_response_wrapper(
+ bundle.create_files,
+ )
diff --git a/src/benchify/resources/stacks.py b/src/benchify/resources/stacks/stacks.py
similarity index 95%
rename from src/benchify/resources/stacks.py
rename to src/benchify/resources/stacks/stacks.py
index 7abaded..e71e99e 100644
--- a/src/benchify/resources/stacks.py
+++ b/src/benchify/resources/stacks/stacks.py
@@ -6,7 +6,15 @@
import httpx
-from ..types import (
+from .bundle import (
+ BundleResource,
+ AsyncBundleResource,
+ BundleResourceWithRawResponse,
+ AsyncBundleResourceWithRawResponse,
+ BundleResourceWithStreamingResponse,
+ AsyncBundleResourceWithStreamingResponse,
+)
+from ...types import (
stack_reset_params,
stack_create_params,
stack_update_params,
@@ -17,33 +25,48 @@
stack_execute_command_params,
stack_wait_for_dev_server_url_params,
)
-from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, SequenceNotStr, omit, not_given
-from .._utils import extract_files, maybe_transform, strip_not_given, deepcopy_minimal, async_maybe_transform
-from .._compat import cached_property
-from .._resource import SyncAPIResource, AsyncAPIResource
-from .._response import (
+from ..._types import (
+ Body,
+ Omit,
+ Query,
+ Headers,
+ NoneType,
+ NotGiven,
+ FileTypes,
+ SequenceNotStr,
+ omit,
+ not_given,
+)
+from ..._utils import extract_files, maybe_transform, strip_not_given, deepcopy_minimal, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from .._base_client import make_request_options
-from ..types.stack_reset_response import StackResetResponse
-from ..types.stack_create_response import StackCreateResponse
-from ..types.stack_update_response import StackUpdateResponse
-from ..types.stack_get_logs_response import StackGetLogsResponse
-from ..types.stack_retrieve_response import StackRetrieveResponse
-from ..types.stack_read_file_response import StackReadFileResponse
-from ..types.stack_write_file_response import StackWriteFileResponse
-from ..types.stack_create_and_run_response import StackCreateAndRunResponse
-from ..types.stack_execute_command_response import StackExecuteCommandResponse
-from ..types.stack_get_network_info_response import StackGetNetworkInfoResponse
-from ..types.stack_wait_for_dev_server_url_response import StackWaitForDevServerURLResponse
+from ..._base_client import make_request_options
+from ...types.stack_reset_response import StackResetResponse
+from ...types.stack_create_response import StackCreateResponse
+from ...types.stack_update_response import StackUpdateResponse
+from ...types.stack_get_logs_response import StackGetLogsResponse
+from ...types.stack_retrieve_response import StackRetrieveResponse
+from ...types.stack_read_file_response import StackReadFileResponse
+from ...types.stack_write_file_response import StackWriteFileResponse
+from ...types.stack_create_and_run_response import StackCreateAndRunResponse
+from ...types.stack_execute_command_response import StackExecuteCommandResponse
+from ...types.stack_get_network_info_response import StackGetNetworkInfoResponse
+from ...types.stack_wait_for_dev_server_url_response import StackWaitForDevServerURLResponse
__all__ = ["StacksResource", "AsyncStacksResource"]
class StacksResource(SyncAPIResource):
+ @cached_property
+ def bundle(self) -> BundleResource:
+ return BundleResource(self._client)
+
@cached_property
def with_raw_response(self) -> StacksResourceWithRawResponse:
"""
@@ -641,6 +664,10 @@ def write_file(
class AsyncStacksResource(AsyncAPIResource):
+ @cached_property
+ def bundle(self) -> AsyncBundleResource:
+ return AsyncBundleResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncStacksResourceWithRawResponse:
"""
@@ -1280,6 +1307,10 @@ def __init__(self, stacks: StacksResource) -> None:
stacks.write_file,
)
+ @cached_property
+ def bundle(self) -> BundleResourceWithRawResponse:
+ return BundleResourceWithRawResponse(self._stacks.bundle)
+
class AsyncStacksResourceWithRawResponse:
def __init__(self, stacks: AsyncStacksResource) -> None:
@@ -1322,6 +1353,10 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
stacks.write_file,
)
+ @cached_property
+ def bundle(self) -> AsyncBundleResourceWithRawResponse:
+ return AsyncBundleResourceWithRawResponse(self._stacks.bundle)
+
class StacksResourceWithStreamingResponse:
def __init__(self, stacks: StacksResource) -> None:
@@ -1364,6 +1399,10 @@ def __init__(self, stacks: StacksResource) -> None:
stacks.write_file,
)
+ @cached_property
+ def bundle(self) -> BundleResourceWithStreamingResponse:
+ return BundleResourceWithStreamingResponse(self._stacks.bundle)
+
class AsyncStacksResourceWithStreamingResponse:
def __init__(self, stacks: AsyncStacksResource) -> None:
@@ -1405,3 +1444,7 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
self.write_file = async_to_streamed_response_wrapper(
stacks.write_file,
)
+
+ @cached_property
+ def bundle(self) -> AsyncBundleResourceWithStreamingResponse:
+ return AsyncBundleResourceWithStreamingResponse(self._stacks.bundle)
diff --git a/src/benchify/types/stacks/__init__.py b/src/benchify/types/stacks/__init__.py
new file mode 100644
index 0000000..66c36ee
--- /dev/null
+++ b/src/benchify/types/stacks/__init__.py
@@ -0,0 +1,8 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .bundle_create_params import BundleCreateParams as BundleCreateParams
+from .bundle_create_response import BundleCreateResponse as BundleCreateResponse
+from .bundle_create_files_params import BundleCreateFilesParams as BundleCreateFilesParams
+from .bundle_create_files_response import BundleCreateFilesResponse as BundleCreateFilesResponse
diff --git a/src/benchify/types/stacks/bundle_create_files_params.py b/src/benchify/types/stacks/bundle_create_files_params.py
new file mode 100644
index 0000000..7ba92fb
--- /dev/null
+++ b/src/benchify/types/stacks/bundle_create_files_params.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BundleCreateFilesParams", "File"]
+
+
+class BundleCreateFilesParams(TypedDict, total=False):
+ entrypoint: Required[str]
+
+ files: Required[Iterable[File]]
+ """Files to bundle"""
+
+ tarball_filename: str
+
+
+class File(TypedDict, total=False):
+ content: Required[str]
+
+ path: Required[str]
diff --git a/src/benchify/types/stacks/bundle_create_files_response.py b/src/benchify/types/stacks/bundle_create_files_response.py
new file mode 100644
index 0000000..3da13e1
--- /dev/null
+++ b/src/benchify/types/stacks/bundle_create_files_response.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["BundleCreateFilesResponse"]
+
+
+class BundleCreateFilesResponse(BaseModel):
+ content: str
+
+ path: str
diff --git a/src/benchify/types/stacks/bundle_create_params.py b/src/benchify/types/stacks/bundle_create_params.py
new file mode 100644
index 0000000..a16c124
--- /dev/null
+++ b/src/benchify/types/stacks/bundle_create_params.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BundleCreateParams"]
+
+
+class BundleCreateParams(TypedDict, total=False):
+ entrypoint: Required[str]
+
+ tarball_base64: Required[str]
+
+ tarball_filename: str
diff --git a/src/benchify/types/stacks/bundle_create_response.py b/src/benchify/types/stacks/bundle_create_response.py
new file mode 100644
index 0000000..41d5692
--- /dev/null
+++ b/src/benchify/types/stacks/bundle_create_response.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["BundleCreateResponse"]
+
+
+class BundleCreateResponse(BaseModel):
+ content: str
+
+ path: str
diff --git a/tests/api_resources/stacks/__init__.py b/tests/api_resources/stacks/__init__.py
new file mode 100644
index 0000000..fd8019a
--- /dev/null
+++ b/tests/api_resources/stacks/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/stacks/test_bundle.py b/tests/api_resources/stacks/test_bundle.py
new file mode 100644
index 0000000..8f1c210
--- /dev/null
+++ b/tests/api_resources/stacks/test_bundle.py
@@ -0,0 +1,255 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from benchify import Benchify, AsyncBenchify
+from tests.utils import assert_matches_type
+from benchify.types.stacks import (
+ BundleCreateResponse,
+ BundleCreateFilesResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestBundle:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_method_create(self, client: Benchify) -> None:
+ bundle = client.stacks.bundle.create(
+ entrypoint="x",
+ tarball_base64="x",
+ )
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_method_create_with_all_params(self, client: Benchify) -> None:
+ bundle = client.stacks.bundle.create(
+ entrypoint="x",
+ tarball_base64="x",
+ tarball_filename="tarball_filename",
+ )
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_raw_response_create(self, client: Benchify) -> None:
+ response = client.stacks.bundle.with_raw_response.create(
+ entrypoint="x",
+ tarball_base64="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bundle = response.parse()
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_streaming_response_create(self, client: Benchify) -> None:
+ with client.stacks.bundle.with_streaming_response.create(
+ entrypoint="x",
+ tarball_base64="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bundle = response.parse()
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_method_create_files(self, client: Benchify) -> None:
+ bundle = client.stacks.bundle.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ )
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_method_create_files_with_all_params(self, client: Benchify) -> None:
+ bundle = client.stacks.bundle.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ tarball_filename="tarball_filename",
+ )
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_raw_response_create_files(self, client: Benchify) -> None:
+ response = client.stacks.bundle.with_raw_response.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bundle = response.parse()
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_streaming_response_create_files(self, client: Benchify) -> None:
+ with client.stacks.bundle.with_streaming_response.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bundle = response.parse()
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncBundle:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncBenchify) -> None:
+ bundle = await async_client.stacks.bundle.create(
+ entrypoint="x",
+ tarball_base64="x",
+ )
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
+ bundle = await async_client.stacks.bundle.create(
+ entrypoint="x",
+ tarball_base64="x",
+ tarball_filename="tarball_filename",
+ )
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
+ response = await async_client.stacks.bundle.with_raw_response.create(
+ entrypoint="x",
+ tarball_base64="x",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bundle = await response.parse()
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncBenchify) -> None:
+ async with async_client.stacks.bundle.with_streaming_response.create(
+ entrypoint="x",
+ tarball_base64="x",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bundle = await response.parse()
+ assert_matches_type(BundleCreateResponse, bundle, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_method_create_files(self, async_client: AsyncBenchify) -> None:
+ bundle = await async_client.stacks.bundle.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ )
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_method_create_files_with_all_params(self, async_client: AsyncBenchify) -> None:
+ bundle = await async_client.stacks.bundle.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ tarball_filename="tarball_filename",
+ )
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_raw_response_create_files(self, async_client: AsyncBenchify) -> None:
+ response = await async_client.stacks.bundle.with_raw_response.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ bundle = await response.parse()
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_streaming_response_create_files(self, async_client: AsyncBenchify) -> None:
+ async with async_client.stacks.bundle.with_streaming_response.create_files(
+ entrypoint="x",
+ files=[
+ {
+ "content": "...",
+ "path": "index.html",
+ }
+ ],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ bundle = await response.parse()
+ assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
From aa53bbc996929586ef02232b9bf2aa47142b7d84 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 10 Nov 2025 09:56:45 +0000
Subject: [PATCH 07/45] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index 7628ea4..5c0ef14 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-e5105627bd8e8dad5cf6cf66ceb1b0d88156a5307fb8e6c774393c28f51f7079.yml
openapi_spec_hash: 71208b28a8c9c1e046430129357c3c75
-config_hash: 266887184a04a15b83f7c319e897e992
+config_hash: c68f9f0717636781973e92339e75438c
From 4e28d49d08c13027bf89b728d8139bf6f8a8e1d4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 10 Nov 2025 10:00:31 +0000
Subject: [PATCH 08/45] feat(api): manual updates
---
.stats.yml | 4 ++--
src/benchify/resources/fix/fix.py | 8 ++++++++
src/benchify/resources/fix/standard.py | 8 ++++++++
src/benchify/types/fix/standard_create_params.py | 3 +++
src/benchify/types/fix_create_ai_fallback_params.py | 3 +++
.../fix_parsing_and_diagnose_detect_issues_response.py | 3 +++
tests/api_resources/fix/test_standard.py | 2 ++
tests/api_resources/test_fix.py | 2 ++
8 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 5c0ef14..396a7c3 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 20
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-e5105627bd8e8dad5cf6cf66ceb1b0d88156a5307fb8e6c774393c28f51f7079.yml
-openapi_spec_hash: 71208b28a8c9c1e046430129357c3c75
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-44b8b74b3b1506bc73a743d9eb7390ef473c196395c039c67e182f02ccf01267.yml
+openapi_spec_hash: 60fb18c76680ec5f75e0941b7845855f
config_hash: c68f9f0717636781973e92339e75438c
diff --git a/src/benchify/resources/fix/fix.py b/src/benchify/resources/fix/fix.py
index 1cb2b5e..539c524 100644
--- a/src/benchify/resources/fix/fix.py
+++ b/src/benchify/resources/fix/fix.py
@@ -60,6 +60,7 @@ def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
@@ -83,6 +84,8 @@ def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -108,6 +111,7 @@ def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
@@ -152,6 +156,7 @@ async def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
@@ -175,6 +180,8 @@ async def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -200,6 +207,7 @@ async def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
diff --git a/src/benchify/resources/fix/standard.py b/src/benchify/resources/fix/standard.py
index f8a3632..3d4125d 100644
--- a/src/benchify/resources/fix/standard.py
+++ b/src/benchify/resources/fix/standard.py
@@ -50,6 +50,7 @@ def create(
files: Iterable[standard_create_params.File],
remaining_diagnostics: standard_create_params.RemainingDiagnostics,
bundle: bool | Omit = omit,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
fix_types: List[Literal["dependency", "parsing", "css", "ai_fallback", "types", "ui", "sql"]] | Omit = omit,
meta: Optional[standard_create_params.Meta] | Omit = omit,
@@ -76,6 +77,8 @@ def create(
bundle: Whether to bundle the project after fixes
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for tracking
fix_types: Types of standard fixes to apply
@@ -101,6 +104,7 @@ def create(
"files": files,
"remaining_diagnostics": remaining_diagnostics,
"bundle": bundle,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"fix_types": fix_types,
"meta": meta,
@@ -142,6 +146,7 @@ async def create(
files: Iterable[standard_create_params.File],
remaining_diagnostics: standard_create_params.RemainingDiagnostics,
bundle: bool | Omit = omit,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
fix_types: List[Literal["dependency", "parsing", "css", "ai_fallback", "types", "ui", "sql"]] | Omit = omit,
meta: Optional[standard_create_params.Meta] | Omit = omit,
@@ -168,6 +173,8 @@ async def create(
bundle: Whether to bundle the project after fixes
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for tracking
fix_types: Types of standard fixes to apply
@@ -193,6 +200,7 @@ async def create(
"files": files,
"remaining_diagnostics": remaining_diagnostics,
"bundle": bundle,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"fix_types": fix_types,
"meta": meta,
diff --git a/src/benchify/types/fix/standard_create_params.py b/src/benchify/types/fix/standard_create_params.py
index c7f570c..fecd3a1 100644
--- a/src/benchify/types/fix/standard_create_params.py
+++ b/src/benchify/types/fix/standard_create_params.py
@@ -25,6 +25,9 @@ class StandardCreateParams(TypedDict, total=False):
bundle: bool
"""Whether to bundle the project after fixes"""
+ continuation_event_id: str
+ """Event ID from Step 1 to continue with the same temp directory"""
+
event_id: str
"""Unique identifier for tracking"""
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 0a55510..774e6ee 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -22,6 +22,9 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
remaining_diagnostics: Required[RemainingDiagnostics]
"""Diagnostics that remain after standard fixing"""
+ continuation_event_id: str
+ """Event ID from Step 1 to continue with the same temp directory"""
+
event_id: str
"""Unique identifier for the event"""
diff --git a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
index 2320cd0..0f27d88 100644
--- a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
+++ b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
@@ -145,6 +145,9 @@ class Data(BaseModel):
estimated_total_fix_time: float
"""Estimated total time to fix all issues in seconds"""
+ event_id: str
+ """Event ID for tracking this operation across steps"""
+
files_analyzed: float
"""Number of files that were analyzed"""
diff --git a/tests/api_resources/fix/test_standard.py b/tests/api_resources/fix/test_standard.py
index 8bfcd8e..517b780 100644
--- a/tests/api_resources/fix/test_standard.py
+++ b/tests/api_resources/fix/test_standard.py
@@ -69,6 +69,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
}
},
bundle=True,
+ continuation_event_id="continuation_event_id",
event_id="",
fix_types=["css", "ui", "dependency", "types"],
meta={"external_id": "external_id"},
@@ -181,6 +182,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
}
},
bundle=True,
+ continuation_event_id="continuation_event_id",
event_id="",
fix_types=["css", "ui", "dependency", "types"],
meta={"external_id": "external_id"},
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 949852c..4ec279c 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -60,6 +60,7 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
]
}
},
+ continuation_event_id="continuation_event_id",
event_id="",
include_context=True,
max_attempts=3,
@@ -155,6 +156,7 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
]
}
},
+ continuation_event_id="continuation_event_id",
event_id="",
include_context=True,
max_attempts=3,
From 3a56790797c67b357047e2cf3ffcc857490e28ea Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 10 Nov 2025 10:24:45 +0000
Subject: [PATCH 09/45] feat(api): api update
---
.stats.yml | 4 ++--
src/benchify/resources/fix/fix.py | 8 --------
src/benchify/resources/fix/standard.py | 8 --------
src/benchify/types/fix/standard_create_params.py | 3 ---
src/benchify/types/fix_create_ai_fallback_params.py | 3 ---
.../fix_parsing_and_diagnose_detect_issues_response.py | 3 ---
tests/api_resources/fix/test_standard.py | 2 --
tests/api_resources/test_fix.py | 2 --
8 files changed, 2 insertions(+), 31 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 396a7c3..5c0ef14 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 20
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-44b8b74b3b1506bc73a743d9eb7390ef473c196395c039c67e182f02ccf01267.yml
-openapi_spec_hash: 60fb18c76680ec5f75e0941b7845855f
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-e5105627bd8e8dad5cf6cf66ceb1b0d88156a5307fb8e6c774393c28f51f7079.yml
+openapi_spec_hash: 71208b28a8c9c1e046430129357c3c75
config_hash: c68f9f0717636781973e92339e75438c
diff --git a/src/benchify/resources/fix/fix.py b/src/benchify/resources/fix/fix.py
index 539c524..1cb2b5e 100644
--- a/src/benchify/resources/fix/fix.py
+++ b/src/benchify/resources/fix/fix.py
@@ -60,7 +60,6 @@ def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
- continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
@@ -84,8 +83,6 @@ def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
- continuation_event_id: Event ID from Step 1 to continue with the same temp directory
-
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -111,7 +108,6 @@ def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
- "continuation_event_id": continuation_event_id,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
@@ -156,7 +152,6 @@ async def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
- continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
@@ -180,8 +175,6 @@ async def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
- continuation_event_id: Event ID from Step 1 to continue with the same temp directory
-
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -207,7 +200,6 @@ async def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
- "continuation_event_id": continuation_event_id,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
diff --git a/src/benchify/resources/fix/standard.py b/src/benchify/resources/fix/standard.py
index 3d4125d..f8a3632 100644
--- a/src/benchify/resources/fix/standard.py
+++ b/src/benchify/resources/fix/standard.py
@@ -50,7 +50,6 @@ def create(
files: Iterable[standard_create_params.File],
remaining_diagnostics: standard_create_params.RemainingDiagnostics,
bundle: bool | Omit = omit,
- continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
fix_types: List[Literal["dependency", "parsing", "css", "ai_fallback", "types", "ui", "sql"]] | Omit = omit,
meta: Optional[standard_create_params.Meta] | Omit = omit,
@@ -77,8 +76,6 @@ def create(
bundle: Whether to bundle the project after fixes
- continuation_event_id: Event ID from Step 1 to continue with the same temp directory
-
event_id: Unique identifier for tracking
fix_types: Types of standard fixes to apply
@@ -104,7 +101,6 @@ def create(
"files": files,
"remaining_diagnostics": remaining_diagnostics,
"bundle": bundle,
- "continuation_event_id": continuation_event_id,
"event_id": event_id,
"fix_types": fix_types,
"meta": meta,
@@ -146,7 +142,6 @@ async def create(
files: Iterable[standard_create_params.File],
remaining_diagnostics: standard_create_params.RemainingDiagnostics,
bundle: bool | Omit = omit,
- continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
fix_types: List[Literal["dependency", "parsing", "css", "ai_fallback", "types", "ui", "sql"]] | Omit = omit,
meta: Optional[standard_create_params.Meta] | Omit = omit,
@@ -173,8 +168,6 @@ async def create(
bundle: Whether to bundle the project after fixes
- continuation_event_id: Event ID from Step 1 to continue with the same temp directory
-
event_id: Unique identifier for tracking
fix_types: Types of standard fixes to apply
@@ -200,7 +193,6 @@ async def create(
"files": files,
"remaining_diagnostics": remaining_diagnostics,
"bundle": bundle,
- "continuation_event_id": continuation_event_id,
"event_id": event_id,
"fix_types": fix_types,
"meta": meta,
diff --git a/src/benchify/types/fix/standard_create_params.py b/src/benchify/types/fix/standard_create_params.py
index fecd3a1..c7f570c 100644
--- a/src/benchify/types/fix/standard_create_params.py
+++ b/src/benchify/types/fix/standard_create_params.py
@@ -25,9 +25,6 @@ class StandardCreateParams(TypedDict, total=False):
bundle: bool
"""Whether to bundle the project after fixes"""
- continuation_event_id: str
- """Event ID from Step 1 to continue with the same temp directory"""
-
event_id: str
"""Unique identifier for tracking"""
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 774e6ee..0a55510 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -22,9 +22,6 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
remaining_diagnostics: Required[RemainingDiagnostics]
"""Diagnostics that remain after standard fixing"""
- continuation_event_id: str
- """Event ID from Step 1 to continue with the same temp directory"""
-
event_id: str
"""Unique identifier for the event"""
diff --git a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
index 0f27d88..2320cd0 100644
--- a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
+++ b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
@@ -145,9 +145,6 @@ class Data(BaseModel):
estimated_total_fix_time: float
"""Estimated total time to fix all issues in seconds"""
- event_id: str
- """Event ID for tracking this operation across steps"""
-
files_analyzed: float
"""Number of files that were analyzed"""
diff --git a/tests/api_resources/fix/test_standard.py b/tests/api_resources/fix/test_standard.py
index 517b780..8bfcd8e 100644
--- a/tests/api_resources/fix/test_standard.py
+++ b/tests/api_resources/fix/test_standard.py
@@ -69,7 +69,6 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
}
},
bundle=True,
- continuation_event_id="continuation_event_id",
event_id="",
fix_types=["css", "ui", "dependency", "types"],
meta={"external_id": "external_id"},
@@ -182,7 +181,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
}
},
bundle=True,
- continuation_event_id="continuation_event_id",
event_id="",
fix_types=["css", "ui", "dependency", "types"],
meta={"external_id": "external_id"},
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 4ec279c..949852c 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -60,7 +60,6 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
]
}
},
- continuation_event_id="continuation_event_id",
event_id="",
include_context=True,
max_attempts=3,
@@ -156,7 +155,6 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
]
}
},
- continuation_event_id="continuation_event_id",
event_id="",
include_context=True,
max_attempts=3,
From acbdbddbfc8a6bf0c32339b4a68635500cf7bb73 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 10 Nov 2025 12:24:45 +0000
Subject: [PATCH 10/45] feat(api): api update
---
.stats.yml | 4 ++--
src/benchify/resources/fix/fix.py | 8 ++++++++
src/benchify/resources/fix/standard.py | 8 ++++++++
src/benchify/types/fix/standard_create_params.py | 3 +++
src/benchify/types/fix_create_ai_fallback_params.py | 3 +++
.../fix_parsing_and_diagnose_detect_issues_response.py | 3 +++
tests/api_resources/fix/test_standard.py | 2 ++
tests/api_resources/test_fix.py | 2 ++
8 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 5c0ef14..36dd8e2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 20
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-e5105627bd8e8dad5cf6cf66ceb1b0d88156a5307fb8e6c774393c28f51f7079.yml
-openapi_spec_hash: 71208b28a8c9c1e046430129357c3c75
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-15315bd72854c0c228780090fa07e55d6314690099802c3eb18c9d107980385c.yml
+openapi_spec_hash: a43dba31bb06c8528647f8d6a2809d92
config_hash: c68f9f0717636781973e92339e75438c
diff --git a/src/benchify/resources/fix/fix.py b/src/benchify/resources/fix/fix.py
index 1cb2b5e..539c524 100644
--- a/src/benchify/resources/fix/fix.py
+++ b/src/benchify/resources/fix/fix.py
@@ -60,6 +60,7 @@ def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
@@ -83,6 +84,8 @@ def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -108,6 +111,7 @@ def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
@@ -152,6 +156,7 @@ async def create_ai_fallback(
*,
files: Iterable[fix_create_ai_fallback_params.File],
remaining_diagnostics: fix_create_ai_fallback_params.RemainingDiagnostics,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
include_context: bool | Omit = omit,
max_attempts: float | Omit = omit,
@@ -175,6 +180,8 @@ async def create_ai_fallback(
remaining_diagnostics: Diagnostics that remain after standard fixing
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for the event
include_context: Whether to include context in AI prompts
@@ -200,6 +207,7 @@ async def create_ai_fallback(
{
"files": files,
"remaining_diagnostics": remaining_diagnostics,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"include_context": include_context,
"max_attempts": max_attempts,
diff --git a/src/benchify/resources/fix/standard.py b/src/benchify/resources/fix/standard.py
index f8a3632..3d4125d 100644
--- a/src/benchify/resources/fix/standard.py
+++ b/src/benchify/resources/fix/standard.py
@@ -50,6 +50,7 @@ def create(
files: Iterable[standard_create_params.File],
remaining_diagnostics: standard_create_params.RemainingDiagnostics,
bundle: bool | Omit = omit,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
fix_types: List[Literal["dependency", "parsing", "css", "ai_fallback", "types", "ui", "sql"]] | Omit = omit,
meta: Optional[standard_create_params.Meta] | Omit = omit,
@@ -76,6 +77,8 @@ def create(
bundle: Whether to bundle the project after fixes
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for tracking
fix_types: Types of standard fixes to apply
@@ -101,6 +104,7 @@ def create(
"files": files,
"remaining_diagnostics": remaining_diagnostics,
"bundle": bundle,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"fix_types": fix_types,
"meta": meta,
@@ -142,6 +146,7 @@ async def create(
files: Iterable[standard_create_params.File],
remaining_diagnostics: standard_create_params.RemainingDiagnostics,
bundle: bool | Omit = omit,
+ continuation_event_id: str | Omit = omit,
event_id: str | Omit = omit,
fix_types: List[Literal["dependency", "parsing", "css", "ai_fallback", "types", "ui", "sql"]] | Omit = omit,
meta: Optional[standard_create_params.Meta] | Omit = omit,
@@ -168,6 +173,8 @@ async def create(
bundle: Whether to bundle the project after fixes
+ continuation_event_id: Event ID from Step 1 to continue with the same temp directory
+
event_id: Unique identifier for tracking
fix_types: Types of standard fixes to apply
@@ -193,6 +200,7 @@ async def create(
"files": files,
"remaining_diagnostics": remaining_diagnostics,
"bundle": bundle,
+ "continuation_event_id": continuation_event_id,
"event_id": event_id,
"fix_types": fix_types,
"meta": meta,
diff --git a/src/benchify/types/fix/standard_create_params.py b/src/benchify/types/fix/standard_create_params.py
index c7f570c..fecd3a1 100644
--- a/src/benchify/types/fix/standard_create_params.py
+++ b/src/benchify/types/fix/standard_create_params.py
@@ -25,6 +25,9 @@ class StandardCreateParams(TypedDict, total=False):
bundle: bool
"""Whether to bundle the project after fixes"""
+ continuation_event_id: str
+ """Event ID from Step 1 to continue with the same temp directory"""
+
event_id: str
"""Unique identifier for tracking"""
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 0a55510..774e6ee 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -22,6 +22,9 @@ class FixCreateAIFallbackParams(TypedDict, total=False):
remaining_diagnostics: Required[RemainingDiagnostics]
"""Diagnostics that remain after standard fixing"""
+ continuation_event_id: str
+ """Event ID from Step 1 to continue with the same temp directory"""
+
event_id: str
"""Unique identifier for the event"""
diff --git a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
index 2320cd0..0f27d88 100644
--- a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
+++ b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
@@ -145,6 +145,9 @@ class Data(BaseModel):
estimated_total_fix_time: float
"""Estimated total time to fix all issues in seconds"""
+ event_id: str
+ """Event ID for tracking this operation across steps"""
+
files_analyzed: float
"""Number of files that were analyzed"""
diff --git a/tests/api_resources/fix/test_standard.py b/tests/api_resources/fix/test_standard.py
index 8bfcd8e..517b780 100644
--- a/tests/api_resources/fix/test_standard.py
+++ b/tests/api_resources/fix/test_standard.py
@@ -69,6 +69,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
}
},
bundle=True,
+ continuation_event_id="continuation_event_id",
event_id="",
fix_types=["css", "ui", "dependency", "types"],
meta={"external_id": "external_id"},
@@ -181,6 +182,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
}
},
bundle=True,
+ continuation_event_id="continuation_event_id",
event_id="",
fix_types=["css", "ui", "dependency", "types"],
meta={"external_id": "external_id"},
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 949852c..4ec279c 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -60,6 +60,7 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
]
}
},
+ continuation_event_id="continuation_event_id",
event_id="",
include_context=True,
max_attempts=3,
@@ -155,6 +156,7 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
]
}
},
+ continuation_event_id="continuation_event_id",
event_id="",
include_context=True,
max_attempts=3,
From a6e0bb074862f6cb6b820e09414c73fcc1d20134 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 11 Nov 2025 00:24:56 +0000
Subject: [PATCH 11/45] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 36dd8e2..2eb66b3 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 20
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-15315bd72854c0c228780090fa07e55d6314690099802c3eb18c9d107980385c.yml
-openapi_spec_hash: a43dba31bb06c8528647f8d6a2809d92
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-8031331c2cf6a654d24dda5425de277b5a39faadbd0dcc4f85ef03fbc2169dac.yml
+openapi_spec_hash: e6c19d3df549fd38b198487d7ea900cd
config_hash: c68f9f0717636781973e92339e75438c
From c3106c7a605a7dc8711ca81f96863a5e20ae81be Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 11 Nov 2025 00:56:23 +0000
Subject: [PATCH 12/45] feat(api): manual updates
---
.stats.yml | 4 +-
api.md | 2 +
src/benchify/resources/stacks/stacks.py | 116 ++++++++++++++++++
src/benchify/types/__init__.py | 2 +
.../types/stack_bundle_multipart_params.py | 17 +++
.../types/stack_bundle_multipart_response.py | 11 ++
tests/api_resources/test_stacks.py | 75 +++++++++++
7 files changed, 225 insertions(+), 2 deletions(-)
create mode 100644 src/benchify/types/stack_bundle_multipart_params.py
create mode 100644 src/benchify/types/stack_bundle_multipart_response.py
diff --git a/.stats.yml b/.stats.yml
index 2eb66b3..a3deb2b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 20
+configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-8031331c2cf6a654d24dda5425de277b5a39faadbd0dcc4f85ef03fbc2169dac.yml
openapi_spec_hash: e6c19d3df549fd38b198487d7ea900cd
-config_hash: c68f9f0717636781973e92339e75438c
+config_hash: 4537489a34488f32b7fd5d7987078778
diff --git a/api.md b/api.md
index c5738ab..d1f6e88 100644
--- a/api.md
+++ b/api.md
@@ -19,6 +19,7 @@ from benchify.types import (
StackCreateResponse,
StackRetrieveResponse,
StackUpdateResponse,
+ StackBundleMultipartResponse,
StackCreateAndRunResponse,
StackExecuteCommandResponse,
StackGetLogsResponse,
@@ -35,6 +36,7 @@ Methods:
- client.stacks.create(\*\*params) -> StackCreateResponse
- client.stacks.retrieve(id) -> StackRetrieveResponse
- client.stacks.update(id, \*\*params) -> StackUpdateResponse
+- client.stacks.bundle_multipart(\*\*params) -> StackBundleMultipartResponse
- client.stacks.create_and_run(\*\*params) -> StackCreateAndRunResponse
- client.stacks.destroy(id) -> None
- client.stacks.execute_command(id, \*\*params) -> StackExecuteCommandResponse
diff --git a/src/benchify/resources/stacks/stacks.py b/src/benchify/resources/stacks/stacks.py
index e71e99e..6f75ce0 100644
--- a/src/benchify/resources/stacks/stacks.py
+++ b/src/benchify/resources/stacks/stacks.py
@@ -23,6 +23,7 @@
stack_write_file_params,
stack_create_and_run_params,
stack_execute_command_params,
+ stack_bundle_multipart_params,
stack_wait_for_dev_server_url_params,
)
from ..._types import (
@@ -56,6 +57,7 @@
from ...types.stack_write_file_response import StackWriteFileResponse
from ...types.stack_create_and_run_response import StackCreateAndRunResponse
from ...types.stack_execute_command_response import StackExecuteCommandResponse
+from ...types.stack_bundle_multipart_response import StackBundleMultipartResponse
from ...types.stack_get_network_info_response import StackGetNetworkInfoResponse
from ...types.stack_wait_for_dev_server_url_response import StackWaitForDevServerURLResponse
@@ -267,6 +269,57 @@ def update(
cast_to=StackUpdateResponse,
)
+ def bundle_multipart(
+ self,
+ *,
+ manifest: str,
+ tarball: FileTypes,
+ # 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,
+ ) -> StackBundleMultipartResponse:
+ """
+ Accepts multipart/form-data containing a JSON string manifest (must include
+ entrypoint) and a tarball file, forwards to /sandbox/bundle-multipart, and
+ returns base64 bundle.
+
+ Args:
+ manifest: JSON string containing bundler manifest (must include entrypoint)
+
+ tarball: Tar.zst project archive
+
+ 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
+ """
+ body = deepcopy_minimal(
+ {
+ "manifest": manifest,
+ "tarball": tarball,
+ }
+ )
+ files = extract_files(cast(Mapping[str, object], body), paths=[["tarball"]])
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ return self._post(
+ "/v1/stacks/bundle-multipart",
+ body=maybe_transform(body, stack_bundle_multipart_params.StackBundleMultipartParams),
+ files=files,
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=StackBundleMultipartResponse,
+ )
+
def create_and_run(
self,
*,
@@ -868,6 +921,57 @@ async def update(
cast_to=StackUpdateResponse,
)
+ async def bundle_multipart(
+ self,
+ *,
+ manifest: str,
+ tarball: FileTypes,
+ # 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,
+ ) -> StackBundleMultipartResponse:
+ """
+ Accepts multipart/form-data containing a JSON string manifest (must include
+ entrypoint) and a tarball file, forwards to /sandbox/bundle-multipart, and
+ returns base64 bundle.
+
+ Args:
+ manifest: JSON string containing bundler manifest (must include entrypoint)
+
+ tarball: Tar.zst project archive
+
+ 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
+ """
+ body = deepcopy_minimal(
+ {
+ "manifest": manifest,
+ "tarball": tarball,
+ }
+ )
+ files = extract_files(cast(Mapping[str, object], body), paths=[["tarball"]])
+ # It should be noted that the actual Content-Type header that will be
+ # sent to the server will contain a `boundary` parameter, e.g.
+ # multipart/form-data; boundary=---abc--
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
+ return await self._post(
+ "/v1/stacks/bundle-multipart",
+ body=await async_maybe_transform(body, stack_bundle_multipart_params.StackBundleMultipartParams),
+ files=files,
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=StackBundleMultipartResponse,
+ )
+
async def create_and_run(
self,
*,
@@ -1279,6 +1383,9 @@ def __init__(self, stacks: StacksResource) -> None:
self.update = to_raw_response_wrapper(
stacks.update,
)
+ self.bundle_multipart = to_raw_response_wrapper(
+ stacks.bundle_multipart,
+ )
self.create_and_run = to_raw_response_wrapper(
stacks.create_and_run,
)
@@ -1325,6 +1432,9 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
self.update = async_to_raw_response_wrapper(
stacks.update,
)
+ self.bundle_multipart = async_to_raw_response_wrapper(
+ stacks.bundle_multipart,
+ )
self.create_and_run = async_to_raw_response_wrapper(
stacks.create_and_run,
)
@@ -1371,6 +1481,9 @@ def __init__(self, stacks: StacksResource) -> None:
self.update = to_streamed_response_wrapper(
stacks.update,
)
+ self.bundle_multipart = to_streamed_response_wrapper(
+ stacks.bundle_multipart,
+ )
self.create_and_run = to_streamed_response_wrapper(
stacks.create_and_run,
)
@@ -1417,6 +1530,9 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
self.update = async_to_streamed_response_wrapper(
stacks.update,
)
+ self.bundle_multipart = async_to_streamed_response_wrapper(
+ stacks.bundle_multipart,
+ )
self.create_and_run = async_to_streamed_response_wrapper(
stacks.create_and_run,
)
diff --git a/src/benchify/types/__init__.py b/src/benchify/types/__init__.py
index ee71242..1058bad 100644
--- a/src/benchify/types/__init__.py
+++ b/src/benchify/types/__init__.py
@@ -20,9 +20,11 @@
from .stack_create_and_run_params import StackCreateAndRunParams as StackCreateAndRunParams
from .stack_execute_command_params import StackExecuteCommandParams as StackExecuteCommandParams
from .fix_create_ai_fallback_params import FixCreateAIFallbackParams as FixCreateAIFallbackParams
+from .stack_bundle_multipart_params import StackBundleMultipartParams as StackBundleMultipartParams
from .stack_create_and_run_response import StackCreateAndRunResponse as StackCreateAndRunResponse
from .stack_execute_command_response import StackExecuteCommandResponse as StackExecuteCommandResponse
from .fix_create_ai_fallback_response import FixCreateAIFallbackResponse as FixCreateAIFallbackResponse
+from .stack_bundle_multipart_response import StackBundleMultipartResponse as StackBundleMultipartResponse
from .stack_get_network_info_response import StackGetNetworkInfoResponse as StackGetNetworkInfoResponse
from .fix_string_literal_create_params import FixStringLiteralCreateParams as FixStringLiteralCreateParams
from .validate_template_validate_params import ValidateTemplateValidateParams as ValidateTemplateValidateParams
diff --git a/src/benchify/types/stack_bundle_multipart_params.py b/src/benchify/types/stack_bundle_multipart_params.py
new file mode 100644
index 0000000..f12ab3f
--- /dev/null
+++ b/src/benchify/types/stack_bundle_multipart_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from .._types import FileTypes
+
+__all__ = ["StackBundleMultipartParams"]
+
+
+class StackBundleMultipartParams(TypedDict, total=False):
+ manifest: Required[str]
+ """JSON string containing bundler manifest (must include entrypoint)"""
+
+ tarball: Required[FileTypes]
+ """Tar.zst project archive"""
diff --git a/src/benchify/types/stack_bundle_multipart_response.py b/src/benchify/types/stack_bundle_multipart_response.py
new file mode 100644
index 0000000..9a9c40d
--- /dev/null
+++ b/src/benchify/types/stack_bundle_multipart_response.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+
+__all__ = ["StackBundleMultipartResponse"]
+
+
+class StackBundleMultipartResponse(BaseModel):
+ content: str
+
+ path: str
diff --git a/tests/api_resources/test_stacks.py b/tests/api_resources/test_stacks.py
index 3886b8f..8eae3b2 100644
--- a/tests/api_resources/test_stacks.py
+++ b/tests/api_resources/test_stacks.py
@@ -20,6 +20,7 @@
StackCreateAndRunResponse,
StackExecuteCommandResponse,
StackGetNetworkInfoResponse,
+ StackBundleMultipartResponse,
StackWaitForDevServerURLResponse,
)
@@ -182,6 +183,43 @@ def test_path_params_update(self, client: Benchify) -> None:
idempotency_key="key-12345678",
)
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_method_bundle_multipart(self, client: Benchify) -> None:
+ stack = client.stacks.bundle_multipart(
+ manifest='{"entrypoint":"src/index.ts"}',
+ tarball=b"raw file contents",
+ )
+ assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_raw_response_bundle_multipart(self, client: Benchify) -> None:
+ response = client.stacks.with_raw_response.bundle_multipart(
+ manifest='{"entrypoint":"src/index.ts"}',
+ tarball=b"raw file contents",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ stack = response.parse()
+ assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ def test_streaming_response_bundle_multipart(self, client: Benchify) -> None:
+ with client.stacks.with_streaming_response.bundle_multipart(
+ manifest='{"entrypoint":"src/index.ts"}',
+ tarball=b"raw file contents",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stack = response.parse()
+ assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_method_create_and_run(self, client: Benchify) -> None:
@@ -774,6 +812,43 @@ async def test_path_params_update(self, async_client: AsyncBenchify) -> None:
idempotency_key="key-12345678",
)
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_method_bundle_multipart(self, async_client: AsyncBenchify) -> None:
+ stack = await async_client.stacks.bundle_multipart(
+ manifest='{"entrypoint":"src/index.ts"}',
+ tarball=b"raw file contents",
+ )
+ assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_raw_response_bundle_multipart(self, async_client: AsyncBenchify) -> None:
+ response = await async_client.stacks.with_raw_response.bundle_multipart(
+ manifest='{"entrypoint":"src/index.ts"}',
+ tarball=b"raw file contents",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ stack = await response.parse()
+ assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
+
+ @pytest.mark.skip(reason="Prism tests are disabled")
+ @parametrize
+ async def test_streaming_response_bundle_multipart(self, async_client: AsyncBenchify) -> None:
+ async with async_client.stacks.with_streaming_response.bundle_multipart(
+ manifest='{"entrypoint":"src/index.ts"}',
+ tarball=b"raw file contents",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stack = await response.parse()
+ assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_method_create_and_run(self, async_client: AsyncBenchify) -> None:
From f5b1d6b16383e15a84a2d3a974d8fa5380a7a676 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 11 Nov 2025 04:57:21 +0000
Subject: [PATCH 13/45] chore(package): drop Python 3.8 support
---
README.md | 4 ++--
pyproject.toml | 5 ++---
src/benchify/_utils/_sync.py | 34 +++-------------------------------
3 files changed, 7 insertions(+), 36 deletions(-)
diff --git a/README.md b/README.md
index ead0fef..f2538f7 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
[)](https://pypi.org/project/benchify/)
-The Benchify Python library provides convenient access to the Benchify REST API from any Python 3.8+
+The Benchify Python library provides convenient access to the Benchify REST API from any Python 3.9+
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
@@ -390,7 +390,7 @@ print(benchify.__version__)
## Requirements
-Python 3.8 or higher.
+Python 3.9 or higher.
## Contributing
diff --git a/pyproject.toml b/pyproject.toml
index 1b88b18..19b0794 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -15,11 +15,10 @@ dependencies = [
"distro>=1.7.0, <2",
"sniffio",
]
-requires-python = ">= 3.8"
+requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
@@ -141,7 +140,7 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
-pythonVersion = "3.8"
+pythonVersion = "3.9"
exclude = [
"_dev",
diff --git a/src/benchify/_utils/_sync.py b/src/benchify/_utils/_sync.py
index ad7ec71..f6027c1 100644
--- a/src/benchify/_utils/_sync.py
+++ b/src/benchify/_utils/_sync.py
@@ -1,10 +1,8 @@
from __future__ import annotations
-import sys
import asyncio
import functools
-import contextvars
-from typing import Any, TypeVar, Callable, Awaitable
+from typing import TypeVar, Callable, Awaitable
from typing_extensions import ParamSpec
import anyio
@@ -15,34 +13,11 @@
T_ParamSpec = ParamSpec("T_ParamSpec")
-if sys.version_info >= (3, 9):
- _asyncio_to_thread = asyncio.to_thread
-else:
- # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
- # for Python 3.8 support
- async def _asyncio_to_thread(
- func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
- ) -> Any:
- """Asynchronously run function *func* in a separate thread.
-
- Any *args and **kwargs supplied for this function are directly passed
- to *func*. Also, the current :class:`contextvars.Context` is propagated,
- allowing context variables from the main thread to be accessed in the
- separate thread.
-
- Returns a coroutine that can be awaited to get the eventual result of *func*.
- """
- loop = asyncio.events.get_running_loop()
- ctx = contextvars.copy_context()
- func_call = functools.partial(ctx.run, func, *args, **kwargs)
- return await loop.run_in_executor(None, func_call)
-
-
async def to_thread(
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
) -> T_Retval:
if sniffio.current_async_library() == "asyncio":
- return await _asyncio_to_thread(func, *args, **kwargs)
+ return await asyncio.to_thread(func, *args, **kwargs)
return await anyio.to_thread.run_sync(
functools.partial(func, *args, **kwargs),
@@ -53,10 +28,7 @@ async def to_thread(
def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
"""
Take a blocking function and create an async one that receives the same
- positional and keyword arguments. For python version 3.9 and above, it uses
- asyncio.to_thread to run the function in a separate thread. For python version
- 3.8, it uses locally defined copy of the asyncio.to_thread function which was
- introduced in python 3.9.
+ positional and keyword arguments.
Usage:
From 75b948d1aa8d9bc26eef28b9a71e39ba8b9b2c9a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 11 Nov 2025 04:57:50 +0000
Subject: [PATCH 14/45] fix: compat with Python 3.14
---
src/benchify/_models.py | 11 ++++++++---
tests/test_models.py | 8 ++++----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/benchify/_models.py b/src/benchify/_models.py
index 6a3cd1d..fcec2cf 100644
--- a/src/benchify/_models.py
+++ b/src/benchify/_models.py
@@ -2,6 +2,7 @@
import os
import inspect
+import weakref
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
from datetime import date, datetime
from typing_extensions import (
@@ -573,6 +574,9 @@ class CachedDiscriminatorType(Protocol):
__discriminator__: DiscriminatorDetails
+DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary()
+
+
class DiscriminatorDetails:
field_name: str
"""The name of the discriminator field in the variant class, e.g.
@@ -615,8 +619,9 @@ def __init__(
def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None:
- if isinstance(union, CachedDiscriminatorType):
- return union.__discriminator__
+ cached = DISCRIMINATOR_CACHE.get(union)
+ if cached is not None:
+ return cached
discriminator_field_name: str | None = None
@@ -669,7 +674,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
discriminator_field=discriminator_field_name,
discriminator_alias=discriminator_alias,
)
- cast(CachedDiscriminatorType, union).__discriminator__ = details
+ DISCRIMINATOR_CACHE.setdefault(union, details)
return details
diff --git a/tests/test_models.py b/tests/test_models.py
index 13cd5a9..8e5b083 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -9,7 +9,7 @@
from benchify._utils import PropertyInfo
from benchify._compat import PYDANTIC_V1, parse_obj, model_dump, model_json
-from benchify._models import BaseModel, construct_type
+from benchify._models import DISCRIMINATOR_CACHE, BaseModel, construct_type
class BasicModel(BaseModel):
@@ -809,7 +809,7 @@ class B(BaseModel):
UnionType = cast(Any, Union[A, B])
- assert not hasattr(UnionType, "__discriminator__")
+ assert not DISCRIMINATOR_CACHE.get(UnionType)
m = construct_type(
value={"type": "b", "data": "foo"}, type_=cast(Any, Annotated[UnionType, PropertyInfo(discriminator="type")])
@@ -818,7 +818,7 @@ class B(BaseModel):
assert m.type == "b"
assert m.data == "foo" # type: ignore[comparison-overlap]
- discriminator = UnionType.__discriminator__
+ discriminator = DISCRIMINATOR_CACHE.get(UnionType)
assert discriminator is not None
m = construct_type(
@@ -830,7 +830,7 @@ class B(BaseModel):
# if the discriminator details object stays the same between invocations then
# we hit the cache
- assert UnionType.__discriminator__ is discriminator
+ assert DISCRIMINATOR_CACHE.get(UnionType) is discriminator
@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1")
From 988433adb17c6723785fcc79d112d1235864858e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 11 Nov 2025 21:24:35 +0000
Subject: [PATCH 15/45] feat(api): api update
---
.stats.yml | 6 +-
api.md | 3 +-
src/benchify/resources/stacks/bundle.py | 99 +------------------
src/benchify/resources/stacks/stacks.py | 4 +-
src/benchify/types/stacks/__init__.py | 2 -
.../types/stacks/bundle_create_params.py | 15 ---
.../types/stacks/bundle_create_response.py | 11 ---
tests/api_resources/stacks/test_bundle.py | 99 +------------------
8 files changed, 8 insertions(+), 231 deletions(-)
delete mode 100644 src/benchify/types/stacks/bundle_create_params.py
delete mode 100644 src/benchify/types/stacks/bundle_create_response.py
diff --git a/.stats.yml b/.stats.yml
index a3deb2b..814443c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 21
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-8031331c2cf6a654d24dda5425de277b5a39faadbd0dcc4f85ef03fbc2169dac.yml
-openapi_spec_hash: e6c19d3df549fd38b198487d7ea900cd
+configured_endpoints: 20
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-1a65aea8dd7dd0cee75490ca5f7797341fc0bfff5e3b61743ab6c9dfa30db1c3.yml
+openapi_spec_hash: 557b15cfaa51d8044690bf5a39d2714f
config_hash: 4537489a34488f32b7fd5d7987078778
diff --git a/api.md b/api.md
index d1f6e88..ea3880c 100644
--- a/api.md
+++ b/api.md
@@ -52,12 +52,11 @@ Methods:
Types:
```python
-from benchify.types.stacks import BundleCreateResponse, BundleCreateFilesResponse
+from benchify.types.stacks import BundleCreateFilesResponse
```
Methods:
-- client.stacks.bundle.create(\*\*params) -> BundleCreateResponse
- client.stacks.bundle.create_files(\*\*params) -> BundleCreateFilesResponse
# FixStringLiterals
diff --git a/src/benchify/resources/stacks/bundle.py b/src/benchify/resources/stacks/bundle.py
index 8045d1a..f40b690 100644
--- a/src/benchify/resources/stacks/bundle.py
+++ b/src/benchify/resources/stacks/bundle.py
@@ -17,8 +17,7 @@
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
-from ...types.stacks import bundle_create_params, bundle_create_files_params
-from ...types.stacks.bundle_create_response import BundleCreateResponse
+from ...types.stacks import bundle_create_files_params
from ...types.stacks.bundle_create_files_response import BundleCreateFilesResponse
__all__ = ["BundleResource", "AsyncBundleResource"]
@@ -44,48 +43,6 @@ def with_streaming_response(self) -> BundleResourceWithStreamingResponse:
"""
return BundleResourceWithStreamingResponse(self)
- def create(
- self,
- *,
- entrypoint: str,
- tarball_base64: str,
- tarball_filename: 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.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> BundleCreateResponse:
- """
- Accepts a base64 tarball and forwards to the external Sandbox Manager
- /sandbox/bundle endpoint.
-
- 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
- """
- return self._post(
- "/v1/stacks/bundle",
- body=maybe_transform(
- {
- "entrypoint": entrypoint,
- "tarball_base64": tarball_base64,
- "tarball_filename": tarball_filename,
- },
- bundle_create_params.BundleCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=BundleCreateResponse,
- )
-
def create_files(
self,
*,
@@ -151,48 +108,6 @@ def with_streaming_response(self) -> AsyncBundleResourceWithStreamingResponse:
"""
return AsyncBundleResourceWithStreamingResponse(self)
- async def create(
- self,
- *,
- entrypoint: str,
- tarball_base64: str,
- tarball_filename: 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.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> BundleCreateResponse:
- """
- Accepts a base64 tarball and forwards to the external Sandbox Manager
- /sandbox/bundle endpoint.
-
- 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
- """
- return await self._post(
- "/v1/stacks/bundle",
- body=await async_maybe_transform(
- {
- "entrypoint": entrypoint,
- "tarball_base64": tarball_base64,
- "tarball_filename": tarball_filename,
- },
- bundle_create_params.BundleCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=BundleCreateResponse,
- )
-
async def create_files(
self,
*,
@@ -242,9 +157,6 @@ class BundleResourceWithRawResponse:
def __init__(self, bundle: BundleResource) -> None:
self._bundle = bundle
- self.create = to_raw_response_wrapper(
- bundle.create,
- )
self.create_files = to_raw_response_wrapper(
bundle.create_files,
)
@@ -254,9 +166,6 @@ class AsyncBundleResourceWithRawResponse:
def __init__(self, bundle: AsyncBundleResource) -> None:
self._bundle = bundle
- self.create = async_to_raw_response_wrapper(
- bundle.create,
- )
self.create_files = async_to_raw_response_wrapper(
bundle.create_files,
)
@@ -266,9 +175,6 @@ class BundleResourceWithStreamingResponse:
def __init__(self, bundle: BundleResource) -> None:
self._bundle = bundle
- self.create = to_streamed_response_wrapper(
- bundle.create,
- )
self.create_files = to_streamed_response_wrapper(
bundle.create_files,
)
@@ -278,9 +184,6 @@ class AsyncBundleResourceWithStreamingResponse:
def __init__(self, bundle: AsyncBundleResource) -> None:
self._bundle = bundle
- self.create = async_to_streamed_response_wrapper(
- bundle.create,
- )
self.create_files = async_to_streamed_response_wrapper(
bundle.create_files,
)
diff --git a/src/benchify/resources/stacks/stacks.py b/src/benchify/resources/stacks/stacks.py
index 6f75ce0..993d125 100644
--- a/src/benchify/resources/stacks/stacks.py
+++ b/src/benchify/resources/stacks/stacks.py
@@ -284,7 +284,7 @@ def bundle_multipart(
"""
Accepts multipart/form-data containing a JSON string manifest (must include
entrypoint) and a tarball file, forwards to /sandbox/bundle-multipart, and
- returns base64 bundle.
+ returns base64 bundle (path + content).
Args:
manifest: JSON string containing bundler manifest (must include entrypoint)
@@ -936,7 +936,7 @@ async def bundle_multipart(
"""
Accepts multipart/form-data containing a JSON string manifest (must include
entrypoint) and a tarball file, forwards to /sandbox/bundle-multipart, and
- returns base64 bundle.
+ returns base64 bundle (path + content).
Args:
manifest: JSON string containing bundler manifest (must include entrypoint)
diff --git a/src/benchify/types/stacks/__init__.py b/src/benchify/types/stacks/__init__.py
index 66c36ee..e649b0f 100644
--- a/src/benchify/types/stacks/__init__.py
+++ b/src/benchify/types/stacks/__init__.py
@@ -2,7 +2,5 @@
from __future__ import annotations
-from .bundle_create_params import BundleCreateParams as BundleCreateParams
-from .bundle_create_response import BundleCreateResponse as BundleCreateResponse
from .bundle_create_files_params import BundleCreateFilesParams as BundleCreateFilesParams
from .bundle_create_files_response import BundleCreateFilesResponse as BundleCreateFilesResponse
diff --git a/src/benchify/types/stacks/bundle_create_params.py b/src/benchify/types/stacks/bundle_create_params.py
deleted file mode 100644
index a16c124..0000000
--- a/src/benchify/types/stacks/bundle_create_params.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["BundleCreateParams"]
-
-
-class BundleCreateParams(TypedDict, total=False):
- entrypoint: Required[str]
-
- tarball_base64: Required[str]
-
- tarball_filename: str
diff --git a/src/benchify/types/stacks/bundle_create_response.py b/src/benchify/types/stacks/bundle_create_response.py
deleted file mode 100644
index 41d5692..0000000
--- a/src/benchify/types/stacks/bundle_create_response.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ..._models import BaseModel
-
-__all__ = ["BundleCreateResponse"]
-
-
-class BundleCreateResponse(BaseModel):
- content: str
-
- path: str
diff --git a/tests/api_resources/stacks/test_bundle.py b/tests/api_resources/stacks/test_bundle.py
index 8f1c210..4b6a111 100644
--- a/tests/api_resources/stacks/test_bundle.py
+++ b/tests/api_resources/stacks/test_bundle.py
@@ -9,10 +9,7 @@
from benchify import Benchify, AsyncBenchify
from tests.utils import assert_matches_type
-from benchify.types.stacks import (
- BundleCreateResponse,
- BundleCreateFilesResponse,
-)
+from benchify.types.stacks import BundleCreateFilesResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,53 +17,6 @@
class TestBundle:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create(self, client: Benchify) -> None:
- bundle = client.stacks.bundle.create(
- entrypoint="x",
- tarball_base64="x",
- )
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_with_all_params(self, client: Benchify) -> None:
- bundle = client.stacks.bundle.create(
- entrypoint="x",
- tarball_base64="x",
- tarball_filename="tarball_filename",
- )
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_create(self, client: Benchify) -> None:
- response = client.stacks.bundle.with_raw_response.create(
- entrypoint="x",
- tarball_base64="x",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- bundle = response.parse()
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_create(self, client: Benchify) -> None:
- with client.stacks.bundle.with_streaming_response.create(
- entrypoint="x",
- tarball_base64="x",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- bundle = response.parse()
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_method_create_files(self, client: Benchify) -> None:
@@ -140,53 +90,6 @@ class TestAsyncBundle:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create(self, async_client: AsyncBenchify) -> None:
- bundle = await async_client.stacks.bundle.create(
- entrypoint="x",
- tarball_base64="x",
- )
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
- bundle = await async_client.stacks.bundle.create(
- entrypoint="x",
- tarball_base64="x",
- tarball_filename="tarball_filename",
- )
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
- response = await async_client.stacks.bundle.with_raw_response.create(
- entrypoint="x",
- tarball_base64="x",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- bundle = await response.parse()
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncBenchify) -> None:
- async with async_client.stacks.bundle.with_streaming_response.create(
- entrypoint="x",
- tarball_base64="x",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- bundle = await response.parse()
- assert_matches_type(BundleCreateResponse, bundle, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_method_create_files(self, async_client: AsyncBenchify) -> None:
From 096f67bad9d1d7f8e55987ec4a1a15e3a41f224a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 12 Nov 2025 04:38:42 +0000
Subject: [PATCH 16/45] fix(compat): update signatures of `model_dump` and
`model_dump_json` for Pydantic v1
---
src/benchify/_models.py | 41 +++++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/src/benchify/_models.py b/src/benchify/_models.py
index fcec2cf..ca9500b 100644
--- a/src/benchify/_models.py
+++ b/src/benchify/_models.py
@@ -257,15 +257,16 @@ def model_dump(
mode: Literal["json", "python"] | str = "python",
include: IncEx | None = None,
exclude: IncEx | None = None,
+ context: Any | None = None,
by_alias: bool | None = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
+ exclude_computed_fields: bool = False,
round_trip: bool = False,
warnings: bool | Literal["none", "warn", "error"] = True,
- context: dict[str, Any] | None = None,
- serialize_as_any: bool = False,
fallback: Callable[[Any], Any] | None = None,
+ serialize_as_any: bool = False,
) -> dict[str, Any]:
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
@@ -273,16 +274,24 @@ def model_dump(
Args:
mode: The mode in which `to_python` should run.
- If mode is 'json', the dictionary will only contain JSON serializable types.
- If mode is 'python', the dictionary may contain any Python objects.
- include: A list of fields to include in the output.
- exclude: A list of fields to exclude from the output.
+ If mode is 'json', the output will only contain JSON serializable types.
+ If mode is 'python', the output may contain non-JSON-serializable Python objects.
+ include: A set of fields to include in the output.
+ exclude: A set of fields to exclude from the output.
+ context: Additional context to pass to the serializer.
by_alias: Whether to use the field's alias in the dictionary key if defined.
- exclude_unset: Whether to exclude fields that are unset or None from the output.
- exclude_defaults: Whether to exclude fields that are set to their default value from the output.
- exclude_none: Whether to exclude fields that have a value of `None` from the output.
- round_trip: Whether to enable serialization and deserialization round-trip support.
- warnings: Whether to log warnings when invalid fields are encountered.
+ exclude_unset: Whether to exclude fields that have not been explicitly set.
+ exclude_defaults: Whether to exclude fields that are set to their default value.
+ exclude_none: Whether to exclude fields that have a value of `None`.
+ exclude_computed_fields: Whether to exclude computed fields.
+ While this can be useful for round-tripping, it is usually recommended to use the dedicated
+ `round_trip` parameter instead.
+ round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
+ warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
+ "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
+ fallback: A function to call when an unknown value is encountered. If not provided,
+ a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised.
+ serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
Returns:
A dictionary representation of the model.
@@ -299,6 +308,8 @@ def model_dump(
raise ValueError("serialize_as_any is only supported in Pydantic v2")
if fallback is not None:
raise ValueError("fallback is only supported in Pydantic v2")
+ if exclude_computed_fields != False:
+ raise ValueError("exclude_computed_fields is only supported in Pydantic v2")
dumped = super().dict( # pyright: ignore[reportDeprecated]
include=include,
exclude=exclude,
@@ -315,15 +326,17 @@ def model_dump_json(
self,
*,
indent: int | None = None,
+ ensure_ascii: bool = False,
include: IncEx | None = None,
exclude: IncEx | None = None,
+ context: Any | None = None,
by_alias: bool | None = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
+ exclude_computed_fields: bool = False,
round_trip: bool = False,
warnings: bool | Literal["none", "warn", "error"] = True,
- context: dict[str, Any] | None = None,
fallback: Callable[[Any], Any] | None = None,
serialize_as_any: bool = False,
) -> str:
@@ -355,6 +368,10 @@ def model_dump_json(
raise ValueError("serialize_as_any is only supported in Pydantic v2")
if fallback is not None:
raise ValueError("fallback is only supported in Pydantic v2")
+ if ensure_ascii != False:
+ raise ValueError("ensure_ascii is only supported in Pydantic v2")
+ if exclude_computed_fields != False:
+ raise ValueError("exclude_computed_fields is only supported in Pydantic v2")
return super().json( # type: ignore[reportDeprecated]
indent=indent,
include=include,
From f17bb881929a54d56e181167942b29966e6239e1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 17 Nov 2025 22:24:15 +0000
Subject: [PATCH 17/45] feat(api): api update
---
.stats.yml | 6 +-
api.md | 14 --
src/benchify/resources/stacks/__init__.py | 14 --
src/benchify/resources/stacks/bundle.py | 189 ------------------
src/benchify/resources/stacks/stacks.py | 148 --------------
src/benchify/types/__init__.py | 2 -
.../types/stack_bundle_multipart_response.py | 18 +-
.../types/stack_create_and_run_params.py | 23 ---
.../types/stack_create_and_run_response.py | 17 --
src/benchify/types/stacks/__init__.py | 3 -
.../stacks/bundle_create_files_params.py | 23 ---
.../stacks/bundle_create_files_response.py | 11 -
tests/api_resources/stacks/test_bundle.py | 158 ---------------
tests/api_resources/test_stacks.py | 97 ---------
14 files changed, 20 insertions(+), 703 deletions(-)
delete mode 100644 src/benchify/resources/stacks/bundle.py
delete mode 100644 src/benchify/types/stack_create_and_run_params.py
delete mode 100644 src/benchify/types/stack_create_and_run_response.py
delete mode 100644 src/benchify/types/stacks/bundle_create_files_params.py
delete mode 100644 src/benchify/types/stacks/bundle_create_files_response.py
delete mode 100644 tests/api_resources/stacks/test_bundle.py
diff --git a/.stats.yml b/.stats.yml
index 814443c..aa71e35 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 20
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-1a65aea8dd7dd0cee75490ca5f7797341fc0bfff5e3b61743ab6c9dfa30db1c3.yml
-openapi_spec_hash: 557b15cfaa51d8044690bf5a39d2714f
+configured_endpoints: 18
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-d345f287418c7ded5f2000038e557efd0aa5acf4a0240e7885c6bc1b842b19fb.yml
+openapi_spec_hash: 00a5dedd2dce00eace3d9f33b8ee4282
config_hash: 4537489a34488f32b7fd5d7987078778
diff --git a/api.md b/api.md
index ea3880c..a8159b8 100644
--- a/api.md
+++ b/api.md
@@ -20,7 +20,6 @@ from benchify.types import (
StackRetrieveResponse,
StackUpdateResponse,
StackBundleMultipartResponse,
- StackCreateAndRunResponse,
StackExecuteCommandResponse,
StackGetLogsResponse,
StackGetNetworkInfoResponse,
@@ -37,7 +36,6 @@ Methods:
- client.stacks.retrieve(id) -> StackRetrieveResponse
- client.stacks.update(id, \*\*params) -> StackUpdateResponse
- client.stacks.bundle_multipart(\*\*params) -> StackBundleMultipartResponse
-- client.stacks.create_and_run(\*\*params) -> StackCreateAndRunResponse
- client.stacks.destroy(id) -> None
- client.stacks.execute_command(id, \*\*params) -> StackExecuteCommandResponse
- client.stacks.get_logs(id, \*\*params) -> StackGetLogsResponse
@@ -47,18 +45,6 @@ Methods:
- client.stacks.wait_for_dev_server_url(id, \*\*params) -> StackWaitForDevServerURLResponse
- client.stacks.write_file(id, \*\*params) -> StackWriteFileResponse
-## Bundle
-
-Types:
-
-```python
-from benchify.types.stacks import BundleCreateFilesResponse
-```
-
-Methods:
-
-- client.stacks.bundle.create_files(\*\*params) -> BundleCreateFilesResponse
-
# FixStringLiterals
Types:
diff --git a/src/benchify/resources/stacks/__init__.py b/src/benchify/resources/stacks/__init__.py
index 192bdc1..2027b42 100644
--- a/src/benchify/resources/stacks/__init__.py
+++ b/src/benchify/resources/stacks/__init__.py
@@ -1,13 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .bundle import (
- BundleResource,
- AsyncBundleResource,
- BundleResourceWithRawResponse,
- AsyncBundleResourceWithRawResponse,
- BundleResourceWithStreamingResponse,
- AsyncBundleResourceWithStreamingResponse,
-)
from .stacks import (
StacksResource,
AsyncStacksResource,
@@ -18,12 +10,6 @@
)
__all__ = [
- "BundleResource",
- "AsyncBundleResource",
- "BundleResourceWithRawResponse",
- "AsyncBundleResourceWithRawResponse",
- "BundleResourceWithStreamingResponse",
- "AsyncBundleResourceWithStreamingResponse",
"StacksResource",
"AsyncStacksResource",
"StacksResourceWithRawResponse",
diff --git a/src/benchify/resources/stacks/bundle.py b/src/benchify/resources/stacks/bundle.py
deleted file mode 100644
index f40b690..0000000
--- a/src/benchify/resources/stacks/bundle.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Iterable
-
-import httpx
-
-from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from ..._utils import maybe_transform, async_maybe_transform
-from ..._compat import cached_property
-from ..._resource import SyncAPIResource, AsyncAPIResource
-from ..._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ..._base_client import make_request_options
-from ...types.stacks import bundle_create_files_params
-from ...types.stacks.bundle_create_files_response import BundleCreateFilesResponse
-
-__all__ = ["BundleResource", "AsyncBundleResource"]
-
-
-class BundleResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> BundleResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
- """
- return BundleResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> BundleResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
- """
- return BundleResourceWithStreamingResponse(self)
-
- def create_files(
- self,
- *,
- entrypoint: str,
- files: Iterable[bundle_create_files_params.File],
- tarball_filename: 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.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> BundleCreateFilesResponse:
- """
- Accepts a JSON array of {path, content}, packs into a tar.zst, and forwards to
- the Sandbox Manager /sandbox/bundle endpoint.
-
- Args:
- files: Files to bundle
-
- 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
- """
- return self._post(
- "/v1/stacks/bundle/files",
- body=maybe_transform(
- {
- "entrypoint": entrypoint,
- "files": files,
- "tarball_filename": tarball_filename,
- },
- bundle_create_files_params.BundleCreateFilesParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=BundleCreateFilesResponse,
- )
-
-
-class AsyncBundleResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncBundleResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#accessing-raw-response-data-eg-headers
- """
- return AsyncBundleResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncBundleResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Benchify/benchify-sdk-python#with_streaming_response
- """
- return AsyncBundleResourceWithStreamingResponse(self)
-
- async def create_files(
- self,
- *,
- entrypoint: str,
- files: Iterable[bundle_create_files_params.File],
- tarball_filename: 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.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> BundleCreateFilesResponse:
- """
- Accepts a JSON array of {path, content}, packs into a tar.zst, and forwards to
- the Sandbox Manager /sandbox/bundle endpoint.
-
- Args:
- files: Files to bundle
-
- 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
- """
- return await self._post(
- "/v1/stacks/bundle/files",
- body=await async_maybe_transform(
- {
- "entrypoint": entrypoint,
- "files": files,
- "tarball_filename": tarball_filename,
- },
- bundle_create_files_params.BundleCreateFilesParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=BundleCreateFilesResponse,
- )
-
-
-class BundleResourceWithRawResponse:
- def __init__(self, bundle: BundleResource) -> None:
- self._bundle = bundle
-
- self.create_files = to_raw_response_wrapper(
- bundle.create_files,
- )
-
-
-class AsyncBundleResourceWithRawResponse:
- def __init__(self, bundle: AsyncBundleResource) -> None:
- self._bundle = bundle
-
- self.create_files = async_to_raw_response_wrapper(
- bundle.create_files,
- )
-
-
-class BundleResourceWithStreamingResponse:
- def __init__(self, bundle: BundleResource) -> None:
- self._bundle = bundle
-
- self.create_files = to_streamed_response_wrapper(
- bundle.create_files,
- )
-
-
-class AsyncBundleResourceWithStreamingResponse:
- def __init__(self, bundle: AsyncBundleResource) -> None:
- self._bundle = bundle
-
- self.create_files = async_to_streamed_response_wrapper(
- bundle.create_files,
- )
diff --git a/src/benchify/resources/stacks/stacks.py b/src/benchify/resources/stacks/stacks.py
index 993d125..1cbd35a 100644
--- a/src/benchify/resources/stacks/stacks.py
+++ b/src/benchify/resources/stacks/stacks.py
@@ -6,14 +6,6 @@
import httpx
-from .bundle import (
- BundleResource,
- AsyncBundleResource,
- BundleResourceWithRawResponse,
- AsyncBundleResourceWithRawResponse,
- BundleResourceWithStreamingResponse,
- AsyncBundleResourceWithStreamingResponse,
-)
from ...types import (
stack_reset_params,
stack_create_params,
@@ -21,7 +13,6 @@
stack_get_logs_params,
stack_read_file_params,
stack_write_file_params,
- stack_create_and_run_params,
stack_execute_command_params,
stack_bundle_multipart_params,
stack_wait_for_dev_server_url_params,
@@ -55,7 +46,6 @@
from ...types.stack_retrieve_response import StackRetrieveResponse
from ...types.stack_read_file_response import StackReadFileResponse
from ...types.stack_write_file_response import StackWriteFileResponse
-from ...types.stack_create_and_run_response import StackCreateAndRunResponse
from ...types.stack_execute_command_response import StackExecuteCommandResponse
from ...types.stack_bundle_multipart_response import StackBundleMultipartResponse
from ...types.stack_get_network_info_response import StackGetNetworkInfoResponse
@@ -65,10 +55,6 @@
class StacksResource(SyncAPIResource):
- @cached_property
- def bundle(self) -> BundleResource:
- return BundleResource(self._client)
-
@cached_property
def with_raw_response(self) -> StacksResourceWithRawResponse:
"""
@@ -320,57 +306,6 @@ def bundle_multipart(
cast_to=StackBundleMultipartResponse,
)
- def create_and_run(
- self,
- *,
- command: SequenceNotStr[str],
- image: str,
- ttl_seconds: float | Omit = omit,
- wait: bool | 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.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> StackCreateAndRunResponse:
- """
- Create a simple container sandbox with a custom image and command
-
- Args:
- command: Command to run
-
- image: Docker image to use
-
- ttl_seconds: Time to live in seconds
-
- wait: Wait for container to be ready
-
- 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
- """
- return self._post(
- "/v1/stacks/create-and-run",
- body=maybe_transform(
- {
- "command": command,
- "image": image,
- "ttl_seconds": ttl_seconds,
- "wait": wait,
- },
- stack_create_and_run_params.StackCreateAndRunParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=StackCreateAndRunResponse,
- )
-
def destroy(
self,
id: str,
@@ -717,10 +652,6 @@ def write_file(
class AsyncStacksResource(AsyncAPIResource):
- @cached_property
- def bundle(self) -> AsyncBundleResource:
- return AsyncBundleResource(self._client)
-
@cached_property
def with_raw_response(self) -> AsyncStacksResourceWithRawResponse:
"""
@@ -972,57 +903,6 @@ async def bundle_multipart(
cast_to=StackBundleMultipartResponse,
)
- async def create_and_run(
- self,
- *,
- command: SequenceNotStr[str],
- image: str,
- ttl_seconds: float | Omit = omit,
- wait: bool | 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.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> StackCreateAndRunResponse:
- """
- Create a simple container sandbox with a custom image and command
-
- Args:
- command: Command to run
-
- image: Docker image to use
-
- ttl_seconds: Time to live in seconds
-
- wait: Wait for container to be ready
-
- 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
- """
- return await self._post(
- "/v1/stacks/create-and-run",
- body=await async_maybe_transform(
- {
- "command": command,
- "image": image,
- "ttl_seconds": ttl_seconds,
- "wait": wait,
- },
- stack_create_and_run_params.StackCreateAndRunParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=StackCreateAndRunResponse,
- )
-
async def destroy(
self,
id: str,
@@ -1386,9 +1266,6 @@ def __init__(self, stacks: StacksResource) -> None:
self.bundle_multipart = to_raw_response_wrapper(
stacks.bundle_multipart,
)
- self.create_and_run = to_raw_response_wrapper(
- stacks.create_and_run,
- )
self.destroy = to_raw_response_wrapper(
stacks.destroy,
)
@@ -1414,10 +1291,6 @@ def __init__(self, stacks: StacksResource) -> None:
stacks.write_file,
)
- @cached_property
- def bundle(self) -> BundleResourceWithRawResponse:
- return BundleResourceWithRawResponse(self._stacks.bundle)
-
class AsyncStacksResourceWithRawResponse:
def __init__(self, stacks: AsyncStacksResource) -> None:
@@ -1435,9 +1308,6 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
self.bundle_multipart = async_to_raw_response_wrapper(
stacks.bundle_multipart,
)
- self.create_and_run = async_to_raw_response_wrapper(
- stacks.create_and_run,
- )
self.destroy = async_to_raw_response_wrapper(
stacks.destroy,
)
@@ -1463,10 +1333,6 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
stacks.write_file,
)
- @cached_property
- def bundle(self) -> AsyncBundleResourceWithRawResponse:
- return AsyncBundleResourceWithRawResponse(self._stacks.bundle)
-
class StacksResourceWithStreamingResponse:
def __init__(self, stacks: StacksResource) -> None:
@@ -1484,9 +1350,6 @@ def __init__(self, stacks: StacksResource) -> None:
self.bundle_multipart = to_streamed_response_wrapper(
stacks.bundle_multipart,
)
- self.create_and_run = to_streamed_response_wrapper(
- stacks.create_and_run,
- )
self.destroy = to_streamed_response_wrapper(
stacks.destroy,
)
@@ -1512,10 +1375,6 @@ def __init__(self, stacks: StacksResource) -> None:
stacks.write_file,
)
- @cached_property
- def bundle(self) -> BundleResourceWithStreamingResponse:
- return BundleResourceWithStreamingResponse(self._stacks.bundle)
-
class AsyncStacksResourceWithStreamingResponse:
def __init__(self, stacks: AsyncStacksResource) -> None:
@@ -1533,9 +1392,6 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
self.bundle_multipart = async_to_streamed_response_wrapper(
stacks.bundle_multipart,
)
- self.create_and_run = async_to_streamed_response_wrapper(
- stacks.create_and_run,
- )
self.destroy = async_to_streamed_response_wrapper(
stacks.destroy,
)
@@ -1560,7 +1416,3 @@ def __init__(self, stacks: AsyncStacksResource) -> None:
self.write_file = async_to_streamed_response_wrapper(
stacks.write_file,
)
-
- @cached_property
- def bundle(self) -> AsyncBundleResourceWithStreamingResponse:
- return AsyncBundleResourceWithStreamingResponse(self._stacks.bundle)
diff --git a/src/benchify/types/__init__.py b/src/benchify/types/__init__.py
index 1058bad..f4a7613 100644
--- a/src/benchify/types/__init__.py
+++ b/src/benchify/types/__init__.py
@@ -17,11 +17,9 @@
from .stack_write_file_params import StackWriteFileParams as StackWriteFileParams
from .stack_read_file_response import StackReadFileResponse as StackReadFileResponse
from .stack_write_file_response import StackWriteFileResponse as StackWriteFileResponse
-from .stack_create_and_run_params import StackCreateAndRunParams as StackCreateAndRunParams
from .stack_execute_command_params import StackExecuteCommandParams as StackExecuteCommandParams
from .fix_create_ai_fallback_params import FixCreateAIFallbackParams as FixCreateAIFallbackParams
from .stack_bundle_multipart_params import StackBundleMultipartParams as StackBundleMultipartParams
-from .stack_create_and_run_response import StackCreateAndRunResponse as StackCreateAndRunResponse
from .stack_execute_command_response import StackExecuteCommandResponse as StackExecuteCommandResponse
from .fix_create_ai_fallback_response import FixCreateAIFallbackResponse as FixCreateAIFallbackResponse
from .stack_bundle_multipart_response import StackBundleMultipartResponse as StackBundleMultipartResponse
diff --git a/src/benchify/types/stack_bundle_multipart_response.py b/src/benchify/types/stack_bundle_multipart_response.py
index 9a9c40d..8a8e138 100644
--- a/src/benchify/types/stack_bundle_multipart_response.py
+++ b/src/benchify/types/stack_bundle_multipart_response.py
@@ -1,11 +1,27 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from typing import List, Optional
+
from .._models import BaseModel
-__all__ = ["StackBundleMultipartResponse"]
+__all__ = ["StackBundleMultipartResponse", "Manifest", "ManifestFile"]
+
+
+class ManifestFile(BaseModel):
+ contents: str
+
+ path: str
+
+
+class Manifest(BaseModel):
+ files: List[ManifestFile]
+
+ url: Optional[str] = None
class StackBundleMultipartResponse(BaseModel):
content: str
path: str
+
+ manifest: Optional[Manifest] = None
diff --git a/src/benchify/types/stack_create_and_run_params.py b/src/benchify/types/stack_create_and_run_params.py
deleted file mode 100644
index 76ba5c4..0000000
--- a/src/benchify/types/stack_create_and_run_params.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-from .._types import SequenceNotStr
-
-__all__ = ["StackCreateAndRunParams"]
-
-
-class StackCreateAndRunParams(TypedDict, total=False):
- command: Required[SequenceNotStr[str]]
- """Command to run"""
-
- image: Required[str]
- """Docker image to use"""
-
- ttl_seconds: float
- """Time to live in seconds"""
-
- wait: bool
- """Wait for container to be ready"""
diff --git a/src/benchify/types/stack_create_and_run_response.py b/src/benchify/types/stack_create_and_run_response.py
deleted file mode 100644
index e57227f..0000000
--- a/src/benchify/types/stack_create_and_run_response.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List
-
-from .._models import BaseModel
-
-__all__ = ["StackCreateAndRunResponse"]
-
-
-class StackCreateAndRunResponse(BaseModel):
- id: str
-
- command: List[str]
-
- image: str
-
- status: str
diff --git a/src/benchify/types/stacks/__init__.py b/src/benchify/types/stacks/__init__.py
index e649b0f..f8ee8b1 100644
--- a/src/benchify/types/stacks/__init__.py
+++ b/src/benchify/types/stacks/__init__.py
@@ -1,6 +1,3 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
-
-from .bundle_create_files_params import BundleCreateFilesParams as BundleCreateFilesParams
-from .bundle_create_files_response import BundleCreateFilesResponse as BundleCreateFilesResponse
diff --git a/src/benchify/types/stacks/bundle_create_files_params.py b/src/benchify/types/stacks/bundle_create_files_params.py
deleted file mode 100644
index 7ba92fb..0000000
--- a/src/benchify/types/stacks/bundle_create_files_params.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Iterable
-from typing_extensions import Required, TypedDict
-
-__all__ = ["BundleCreateFilesParams", "File"]
-
-
-class BundleCreateFilesParams(TypedDict, total=False):
- entrypoint: Required[str]
-
- files: Required[Iterable[File]]
- """Files to bundle"""
-
- tarball_filename: str
-
-
-class File(TypedDict, total=False):
- content: Required[str]
-
- path: Required[str]
diff --git a/src/benchify/types/stacks/bundle_create_files_response.py b/src/benchify/types/stacks/bundle_create_files_response.py
deleted file mode 100644
index 3da13e1..0000000
--- a/src/benchify/types/stacks/bundle_create_files_response.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ..._models import BaseModel
-
-__all__ = ["BundleCreateFilesResponse"]
-
-
-class BundleCreateFilesResponse(BaseModel):
- content: str
-
- path: str
diff --git a/tests/api_resources/stacks/test_bundle.py b/tests/api_resources/stacks/test_bundle.py
deleted file mode 100644
index 4b6a111..0000000
--- a/tests/api_resources/stacks/test_bundle.py
+++ /dev/null
@@ -1,158 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from benchify import Benchify, AsyncBenchify
-from tests.utils import assert_matches_type
-from benchify.types.stacks import BundleCreateFilesResponse
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestBundle:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_files(self, client: Benchify) -> None:
- bundle = client.stacks.bundle.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- )
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_files_with_all_params(self, client: Benchify) -> None:
- bundle = client.stacks.bundle.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- tarball_filename="tarball_filename",
- )
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_create_files(self, client: Benchify) -> None:
- response = client.stacks.bundle.with_raw_response.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- bundle = response.parse()
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_create_files(self, client: Benchify) -> None:
- with client.stacks.bundle.with_streaming_response.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- bundle = response.parse()
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
-
-class TestAsyncBundle:
- parametrize = pytest.mark.parametrize(
- "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_files(self, async_client: AsyncBenchify) -> None:
- bundle = await async_client.stacks.bundle.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- )
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_files_with_all_params(self, async_client: AsyncBenchify) -> None:
- bundle = await async_client.stacks.bundle.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- tarball_filename="tarball_filename",
- )
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_create_files(self, async_client: AsyncBenchify) -> None:
- response = await async_client.stacks.bundle.with_raw_response.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- bundle = await response.parse()
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_create_files(self, async_client: AsyncBenchify) -> None:
- async with async_client.stacks.bundle.with_streaming_response.create_files(
- entrypoint="x",
- files=[
- {
- "content": "...",
- "path": "index.html",
- }
- ],
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- bundle = await response.parse()
- assert_matches_type(BundleCreateFilesResponse, bundle, path=["response"])
-
- assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_stacks.py b/tests/api_resources/test_stacks.py
index 8eae3b2..14843f1 100644
--- a/tests/api_resources/test_stacks.py
+++ b/tests/api_resources/test_stacks.py
@@ -17,7 +17,6 @@
StackReadFileResponse,
StackRetrieveResponse,
StackWriteFileResponse,
- StackCreateAndRunResponse,
StackExecuteCommandResponse,
StackGetNetworkInfoResponse,
StackBundleMultipartResponse,
@@ -220,54 +219,6 @@ def test_streaming_response_bundle_multipart(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_and_run(self, client: Benchify) -> None:
- stack = client.stacks.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- )
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_and_run_with_all_params(self, client: Benchify) -> None:
- stack = client.stacks.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- ttl_seconds=3600,
- wait=False,
- )
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_create_and_run(self, client: Benchify) -> None:
- response = client.stacks.with_raw_response.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- stack = response.parse()
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_create_and_run(self, client: Benchify) -> None:
- with client.stacks.with_streaming_response.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- stack = response.parse()
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_method_destroy(self, client: Benchify) -> None:
@@ -849,54 +800,6 @@ async def test_streaming_response_bundle_multipart(self, async_client: AsyncBenc
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_and_run(self, async_client: AsyncBenchify) -> None:
- stack = await async_client.stacks.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- )
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_and_run_with_all_params(self, async_client: AsyncBenchify) -> None:
- stack = await async_client.stacks.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- ttl_seconds=3600,
- wait=False,
- )
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_create_and_run(self, async_client: AsyncBenchify) -> None:
- response = await async_client.stacks.with_raw_response.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- stack = await response.parse()
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_create_and_run(self, async_client: AsyncBenchify) -> None:
- async with async_client.stacks.with_streaming_response.create_and_run(
- command=["sleep", "3600"],
- image="curlimages/curl:latest",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- stack = await response.parse()
- assert_matches_type(StackCreateAndRunResponse, stack, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_method_destroy(self, async_client: AsyncBenchify) -> None:
From dc5218cfd1712d7b2bf5671b2985ae12eae6d4b7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 22 Nov 2025 04:13:55 +0000
Subject: [PATCH 18/45] chore: add Python 3.14 classifier and testing
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyproject.toml b/pyproject.toml
index 19b0794..e0a6043 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
+ "Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
From 04ce4dc454aab185e59aec577c12eb89252045f7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 28 Nov 2025 03:29:17 +0000
Subject: [PATCH 19/45] fix: ensure streams are always closed
---
src/benchify/_streaming.py | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/benchify/_streaming.py b/src/benchify/_streaming.py
index de5651f..9bc9f8d 100644
--- a/src/benchify/_streaming.py
+++ b/src/benchify/_streaming.py
@@ -54,11 +54,12 @@ def __stream__(self) -> Iterator[_T]:
process_data = self._client._process_response_data
iterator = self._iter_events()
- for sse in iterator:
- yield process_data(data=sse.json(), cast_to=cast_to, response=response)
-
- # As we might not fully consume the response stream, we need to close it explicitly
- response.close()
+ try:
+ for sse in iterator:
+ yield process_data(data=sse.json(), cast_to=cast_to, response=response)
+ finally:
+ # Ensure the response is closed even if the consumer doesn't read all data
+ response.close()
def __enter__(self) -> Self:
return self
@@ -117,11 +118,12 @@ async def __stream__(self) -> AsyncIterator[_T]:
process_data = self._client._process_response_data
iterator = self._iter_events()
- async for sse in iterator:
- yield process_data(data=sse.json(), cast_to=cast_to, response=response)
-
- # As we might not fully consume the response stream, we need to close it explicitly
- await response.aclose()
+ try:
+ async for sse in iterator:
+ yield process_data(data=sse.json(), cast_to=cast_to, response=response)
+ finally:
+ # Ensure the response is closed even if the consumer doesn't read all data
+ await response.aclose()
async def __aenter__(self) -> Self:
return self
From 69a5933b2a0671dd5c4d8a50bfa15e0af49d0a9c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 28 Nov 2025 03:30:24 +0000
Subject: [PATCH 20/45] chore(deps): mypy 1.18.1 has a regression, pin to 1.17
---
pyproject.toml | 2 +-
requirements-dev.lock | 4 +++-
requirements.lock | 8 ++++----
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index e0a6043..05b9e7d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -46,7 +46,7 @@ managed = true
# version pins are in requirements-dev.lock
dev-dependencies = [
"pyright==1.1.399",
- "mypy",
+ "mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 0e0d6ca..cfa5948 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -72,7 +72,7 @@ mdurl==0.1.2
multidict==6.4.4
# via aiohttp
# via yarl
-mypy==1.14.1
+mypy==1.17.0
mypy-extensions==1.0.0
# via mypy
nodeenv==1.8.0
@@ -81,6 +81,8 @@ nox==2023.4.22
packaging==23.2
# via nox
# via pytest
+pathspec==0.12.1
+ # via mypy
platformdirs==3.11.0
# via virtualenv
pluggy==1.5.0
diff --git a/requirements.lock b/requirements.lock
index 5346f48..eb50814 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -55,21 +55,21 @@ multidict==6.4.4
propcache==0.3.1
# via aiohttp
# via yarl
-pydantic==2.11.9
+pydantic==2.12.5
# via benchify
-pydantic-core==2.33.2
+pydantic-core==2.41.5
# via pydantic
sniffio==1.3.0
# via anyio
# via benchify
-typing-extensions==4.12.2
+typing-extensions==4.15.0
# via anyio
# via benchify
# via multidict
# via pydantic
# via pydantic-core
# via typing-inspection
-typing-inspection==0.4.1
+typing-inspection==0.4.2
# via pydantic
yarl==1.20.0
# via aiohttp
From 9a95a832a4bf7a3b456c8919e5b28adab0666f90 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 3 Dec 2025 05:52:15 +0000
Subject: [PATCH 21/45] chore: update lockfile
---
pyproject.toml | 14 +++---
requirements-dev.lock | 108 +++++++++++++++++++++++-------------------
requirements.lock | 31 ++++++------
3 files changed, 83 insertions(+), 70 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 05b9e7d..b9adaaf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,14 +7,16 @@ license = "Apache-2.0"
authors = [
{ name = "Benchify", email = "support@benchify.com" },
]
+
dependencies = [
- "httpx>=0.23.0, <1",
- "pydantic>=1.9.0, <3",
- "typing-extensions>=4.10, <5",
- "anyio>=3.5.0, <5",
- "distro>=1.7.0, <2",
- "sniffio",
+ "httpx>=0.23.0, <1",
+ "pydantic>=1.9.0, <3",
+ "typing-extensions>=4.10, <5",
+ "anyio>=3.5.0, <5",
+ "distro>=1.7.0, <2",
+ "sniffio",
]
+
requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
diff --git a/requirements-dev.lock b/requirements-dev.lock
index cfa5948..8a16d0f 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -12,40 +12,45 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.12.8
+aiohttp==3.13.2
# via benchify
# via httpx-aiohttp
-aiosignal==1.3.2
+aiosignal==1.4.0
# via aiohttp
-annotated-types==0.6.0
+annotated-types==0.7.0
# via pydantic
-anyio==4.4.0
+anyio==4.12.0
# via benchify
# via httpx
-argcomplete==3.1.2
+argcomplete==3.6.3
# via nox
async-timeout==5.0.1
# via aiohttp
-attrs==25.3.0
+attrs==25.4.0
# via aiohttp
-certifi==2023.7.22
+ # via nox
+backports-asyncio-runner==1.2.0
+ # via pytest-asyncio
+certifi==2025.11.12
# via httpcore
# via httpx
-colorlog==6.7.0
+colorlog==6.10.1
+ # via nox
+dependency-groups==1.3.1
# via nox
-dirty-equals==0.6.0
-distlib==0.3.7
+dirty-equals==0.11
+distlib==0.4.0
# via virtualenv
-distro==1.8.0
+distro==1.9.0
# via benchify
-exceptiongroup==1.2.2
+exceptiongroup==1.3.1
# via anyio
# via pytest
-execnet==2.1.1
+execnet==2.1.2
# via pytest-xdist
-filelock==3.12.4
+filelock==3.19.1
# via virtualenv
-frozenlist==1.6.2
+frozenlist==1.8.0
# via aiohttp
# via aiosignal
h11==0.16.0
@@ -58,82 +63,87 @@ httpx==0.28.1
# via respx
httpx-aiohttp==0.1.9
# via benchify
-idna==3.4
+humanize==4.13.0
+ # via nox
+idna==3.11
# via anyio
# via httpx
# via yarl
-importlib-metadata==7.0.0
-iniconfig==2.0.0
+importlib-metadata==8.7.0
+iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
-multidict==6.4.4
+multidict==6.7.0
# via aiohttp
# via yarl
mypy==1.17.0
-mypy-extensions==1.0.0
+mypy-extensions==1.1.0
# via mypy
-nodeenv==1.8.0
+nodeenv==1.9.1
# via pyright
-nox==2023.4.22
-packaging==23.2
+nox==2025.11.12
+packaging==25.0
+ # via dependency-groups
# via nox
# via pytest
pathspec==0.12.1
# via mypy
-platformdirs==3.11.0
+platformdirs==4.4.0
# via virtualenv
-pluggy==1.5.0
+pluggy==1.6.0
# via pytest
-propcache==0.3.1
+propcache==0.4.1
# via aiohttp
# via yarl
-pydantic==2.11.9
+pydantic==2.12.5
# via benchify
-pydantic-core==2.33.2
+pydantic-core==2.41.5
# via pydantic
-pygments==2.18.0
+pygments==2.19.2
+ # via pytest
# via rich
pyright==1.1.399
-pytest==8.3.3
+pytest==8.4.2
# via pytest-asyncio
# via pytest-xdist
-pytest-asyncio==0.24.0
-pytest-xdist==3.7.0
-python-dateutil==2.8.2
+pytest-asyncio==1.2.0
+pytest-xdist==3.8.0
+python-dateutil==2.9.0.post0
# via time-machine
-pytz==2023.3.post1
- # via dirty-equals
respx==0.22.0
-rich==13.7.1
-ruff==0.9.4
-setuptools==68.2.2
- # via nodeenv
-six==1.16.0
+rich==14.2.0
+ruff==0.14.7
+six==1.17.0
# via python-dateutil
-sniffio==1.3.0
- # via anyio
+sniffio==1.3.1
# via benchify
-time-machine==2.9.0
-tomli==2.0.2
+time-machine==2.19.0
+tomli==2.3.0
+ # via dependency-groups
# via mypy
+ # via nox
# via pytest
-typing-extensions==4.12.2
+typing-extensions==4.15.0
+ # via aiosignal
# via anyio
# via benchify
+ # via exceptiongroup
# via multidict
# via mypy
# via pydantic
# via pydantic-core
# via pyright
+ # via pytest-asyncio
# via typing-inspection
-typing-inspection==0.4.1
+ # via virtualenv
+typing-inspection==0.4.2
# via pydantic
-virtualenv==20.24.5
+virtualenv==20.35.4
# via nox
-yarl==1.20.0
+yarl==1.22.0
# via aiohttp
-zipp==3.17.0
+zipp==3.23.0
# via importlib-metadata
diff --git a/requirements.lock b/requirements.lock
index eb50814..82f8236 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -12,28 +12,28 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.12.8
+aiohttp==3.13.2
# via benchify
# via httpx-aiohttp
-aiosignal==1.3.2
+aiosignal==1.4.0
# via aiohttp
-annotated-types==0.6.0
+annotated-types==0.7.0
# via pydantic
-anyio==4.4.0
+anyio==4.12.0
# via benchify
# via httpx
async-timeout==5.0.1
# via aiohttp
-attrs==25.3.0
+attrs==25.4.0
# via aiohttp
-certifi==2023.7.22
+certifi==2025.11.12
# via httpcore
# via httpx
-distro==1.8.0
+distro==1.9.0
# via benchify
-exceptiongroup==1.2.2
+exceptiongroup==1.3.1
# via anyio
-frozenlist==1.6.2
+frozenlist==1.8.0
# via aiohttp
# via aiosignal
h11==0.16.0
@@ -45,31 +45,32 @@ httpx==0.28.1
# via httpx-aiohttp
httpx-aiohttp==0.1.9
# via benchify
-idna==3.4
+idna==3.11
# via anyio
# via httpx
# via yarl
-multidict==6.4.4
+multidict==6.7.0
# via aiohttp
# via yarl
-propcache==0.3.1
+propcache==0.4.1
# via aiohttp
# via yarl
pydantic==2.12.5
# via benchify
pydantic-core==2.41.5
# via pydantic
-sniffio==1.3.0
- # via anyio
+sniffio==1.3.1
# via benchify
typing-extensions==4.15.0
+ # via aiosignal
# via anyio
# via benchify
+ # via exceptiongroup
# via multidict
# via pydantic
# via pydantic-core
# via typing-inspection
typing-inspection==0.4.2
# via pydantic
-yarl==1.20.0
+yarl==1.22.0
# via aiohttp
From 0a45222f9cbf46b0319c20b382c4d6bf593c148b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 3 Dec 2025 05:59:44 +0000
Subject: [PATCH 22/45] chore(docs): use environment variables for
authentication in code snippets
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f2538f7..0b15e1d 100644
--- a/README.md
+++ b/README.md
@@ -79,6 +79,7 @@ pip install benchify[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
```python
+import os
import asyncio
from benchify import DefaultAioHttpClient
from benchify import AsyncBenchify
@@ -86,7 +87,7 @@ from benchify import AsyncBenchify
async def main() -> None:
async with AsyncBenchify(
- api_key="My API Key",
+ api_key=os.environ.get("BENCHIFY_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
response = await client.fixer.run()
From fae18b6333d3697845bbf233ea20f55c96202561 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Dec 2025 04:40:45 +0000
Subject: [PATCH 23/45] fix(types): allow pyright to infer TypedDict types
within SequenceNotStr
---
src/benchify/_types.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/benchify/_types.py b/src/benchify/_types.py
index 4acf927..2f5b091 100644
--- a/src/benchify/_types.py
+++ b/src/benchify/_types.py
@@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False):
if TYPE_CHECKING:
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
+ #
+ # Note: index() and count() methods are intentionally omitted to allow pyright to properly
+ # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
class SequenceNotStr(Protocol[_T_co]):
@overload
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
def __contains__(self, value: object, /) -> bool: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T_co]: ...
- def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
- def count(self, value: Any, /) -> int: ...
def __reversed__(self) -> Iterator[_T_co]: ...
else:
# just point this to a normal `Sequence` at runtime to avoid having to special case
From 2564e8dbd691cd3ca3d47ed56dcdb21c96ef249f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Dec 2025 04:42:39 +0000
Subject: [PATCH 24/45] chore: add missing docstrings
---
.../types/fix/standard_create_params.py | 6 ++++
.../types/fix/standard_create_response.py | 10 ++++++
.../types/fix_create_ai_fallback_params.py | 6 ++++
.../types/fix_create_ai_fallback_response.py | 6 ++++
...rsing_and_diagnose_detect_issues_params.py | 2 ++
...ing_and_diagnose_detect_issues_response.py | 16 +++++++++
.../types/fix_string_literal_create_params.py | 4 +++
.../fix_string_literal_create_response.py | 6 ++++
src/benchify/types/fixer_run_params.py | 2 ++
src/benchify/types/fixer_run_response.py | 36 +++++++++++++++++++
src/benchify/types/stack_create_response.py | 6 ++++
src/benchify/types/stack_get_logs_response.py | 4 +++
src/benchify/types/stack_retrieve_response.py | 2 ++
src/benchify/types/stack_update_response.py | 2 ++
.../validate_template_validate_params.py | 2 ++
15 files changed, 110 insertions(+)
diff --git a/src/benchify/types/fix/standard_create_params.py b/src/benchify/types/fix/standard_create_params.py
index fecd3a1..9c86e1b 100644
--- a/src/benchify/types/fix/standard_create_params.py
+++ b/src/benchify/types/fix/standard_create_params.py
@@ -53,6 +53,8 @@ class File(TypedDict, total=False):
class RemainingDiagnosticsFileToDiagnosticLocation(TypedDict, total=False):
+ """Location of the diagnostic"""
+
column: Required[Optional[float]]
"""Column number (1-based)"""
@@ -87,10 +89,14 @@ class RemainingDiagnosticsFileToDiagnostic(TypedDict, total=False):
class RemainingDiagnostics(TypedDict, total=False):
+ """Diagnostics to fix (output from step 1 or previous fixes)"""
+
file_to_diagnostics: Dict[str, Iterable[RemainingDiagnosticsFileToDiagnostic]]
"""Diagnostics grouped by file"""
class Meta(TypedDict, total=False):
+ """Meta information for the request"""
+
external_id: Optional[str]
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix/standard_create_response.py b/src/benchify/types/fix/standard_create_response.py
index 9e80c02..4be4348 100644
--- a/src/benchify/types/fix/standard_create_response.py
+++ b/src/benchify/types/fix/standard_create_response.py
@@ -27,6 +27,8 @@ class DataChangedFile(BaseModel):
class DataRemainingDiagnosticsFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -61,6 +63,8 @@ class DataRemainingDiagnosticsFileToDiagnostic(BaseModel):
class DataRemainingDiagnostics(BaseModel):
+ """Remaining diagnostics after standard fixes"""
+
file_to_diagnostics: Optional[Dict[str, List[DataRemainingDiagnosticsFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
@@ -74,6 +78,8 @@ class DataBundledFile(BaseModel):
class Data(BaseModel):
+ """The actual response data"""
+
changed_files: List[DataChangedFile]
"""Files that were modified during fixing"""
@@ -103,6 +109,8 @@ class Data(BaseModel):
class Error(BaseModel):
+ """The error from the API query"""
+
code: str
"""The error code"""
@@ -114,6 +122,8 @@ class Error(BaseModel):
class Meta(BaseModel):
+ """Meta information"""
+
external_id: Optional[str] = None
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix_create_ai_fallback_params.py b/src/benchify/types/fix_create_ai_fallback_params.py
index 774e6ee..4f005fc 100644
--- a/src/benchify/types/fix_create_ai_fallback_params.py
+++ b/src/benchify/types/fix_create_ai_fallback_params.py
@@ -53,6 +53,8 @@ class File(TypedDict, total=False):
class RemainingDiagnosticsFileToDiagnosticLocation(TypedDict, total=False):
+ """Location of the diagnostic"""
+
column: Required[Optional[float]]
"""Column number (1-based)"""
@@ -87,10 +89,14 @@ class RemainingDiagnosticsFileToDiagnostic(TypedDict, total=False):
class RemainingDiagnostics(TypedDict, total=False):
+ """Diagnostics that remain after standard fixing"""
+
file_to_diagnostics: Dict[str, Iterable[RemainingDiagnosticsFileToDiagnostic]]
"""Diagnostics grouped by file"""
class Meta(TypedDict, total=False):
+ """Meta information for the request"""
+
external_id: Optional[str]
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix_create_ai_fallback_response.py b/src/benchify/types/fix_create_ai_fallback_response.py
index 6e520d4..6c25ddd 100644
--- a/src/benchify/types/fix_create_ai_fallback_response.py
+++ b/src/benchify/types/fix_create_ai_fallback_response.py
@@ -25,6 +25,8 @@ class DataFileResults(BaseModel):
class Data(BaseModel):
+ """The actual response data"""
+
execution_time: float
"""Time taken to execute AI fallback in seconds"""
@@ -51,6 +53,8 @@ class Data(BaseModel):
class Error(BaseModel):
+ """The error from the API query"""
+
code: str
"""The error code"""
@@ -62,6 +66,8 @@ class Error(BaseModel):
class Meta(BaseModel):
+ """Meta information"""
+
external_id: Optional[str] = None
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_params.py b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_params.py
index 1e243bb..da75a90 100644
--- a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_params.py
+++ b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_params.py
@@ -34,5 +34,7 @@ class File(TypedDict, total=False):
class Meta(TypedDict, total=False):
+ """Meta information for the request"""
+
external_id: Optional[str]
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
index 0f27d88..fc61092 100644
--- a/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
+++ b/src/benchify/types/fix_parsing_and_diagnose_detect_issues_response.py
@@ -30,6 +30,8 @@ class DataChangedFile(BaseModel):
class DataDiagnosticsNotRequestedFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -64,11 +66,15 @@ class DataDiagnosticsNotRequestedFileToDiagnostic(BaseModel):
class DataDiagnosticsNotRequested(BaseModel):
+ """Diagnostics that do not match the requested fix types"""
+
file_to_diagnostics: Optional[Dict[str, List[DataDiagnosticsNotRequestedFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
class DataDiagnosticsRequestedFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -103,11 +109,15 @@ class DataDiagnosticsRequestedFileToDiagnostic(BaseModel):
class DataDiagnosticsRequested(BaseModel):
+ """Diagnostics that match the requested fix types"""
+
file_to_diagnostics: Optional[Dict[str, List[DataDiagnosticsRequestedFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
class DataDiagnostics(BaseModel):
+ """Diagnostics split into fixable (requested) and other (not_requested) groups"""
+
not_requested: Optional[DataDiagnosticsNotRequested] = None
"""Diagnostics that do not match the requested fix types"""
@@ -130,6 +140,8 @@ class DataFixTypesAvailable(BaseModel):
class Data(BaseModel):
+ """The actual response data"""
+
changed_files: List[DataChangedFile]
"""Files that were changed during detection"""
@@ -168,6 +180,8 @@ class Data(BaseModel):
class Error(BaseModel):
+ """The error from the API query"""
+
code: str
"""The error code"""
@@ -179,6 +193,8 @@ class Error(BaseModel):
class Meta(BaseModel):
+ """Meta information"""
+
external_id: Optional[str] = None
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix_string_literal_create_params.py b/src/benchify/types/fix_string_literal_create_params.py
index c1aa237..7b7a273 100644
--- a/src/benchify/types/fix_string_literal_create_params.py
+++ b/src/benchify/types/fix_string_literal_create_params.py
@@ -20,6 +20,8 @@ class FixStringLiteralCreateParams(TypedDict, total=False):
class File(TypedDict, total=False):
+ """File to process"""
+
contents: Required[str]
"""File contents"""
@@ -28,5 +30,7 @@ class File(TypedDict, total=False):
class Meta(TypedDict, total=False):
+ """Meta information for the request"""
+
external_id: Optional[str]
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fix_string_literal_create_response.py b/src/benchify/types/fix_string_literal_create_response.py
index 31e0c63..716d2c6 100644
--- a/src/benchify/types/fix_string_literal_create_response.py
+++ b/src/benchify/types/fix_string_literal_create_response.py
@@ -19,6 +19,8 @@ class DataStrategyStatistic(BaseModel):
class Data(BaseModel):
+ """The actual response data"""
+
contents: str
"""The file contents (original or fixed)"""
@@ -36,6 +38,8 @@ class Data(BaseModel):
class Error(BaseModel):
+ """The error from the API query"""
+
code: str
"""The error code"""
@@ -47,6 +51,8 @@ class Error(BaseModel):
class Meta(BaseModel):
+ """Meta information"""
+
external_id: Optional[str] = None
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fixer_run_params.py b/src/benchify/types/fixer_run_params.py
index 1efbe2f..d7858f4 100644
--- a/src/benchify/types/fixer_run_params.py
+++ b/src/benchify/types/fixer_run_params.py
@@ -55,5 +55,7 @@ class File(TypedDict, total=False):
class Meta(TypedDict, total=False):
+ """Meta information for the request"""
+
external_id: Optional[str]
"""Customer tracking identifier"""
diff --git a/src/benchify/types/fixer_run_response.py b/src/benchify/types/fixer_run_response.py
index 05e3404..064f3dc 100644
--- a/src/benchify/types/fixer_run_response.py
+++ b/src/benchify/types/fixer_run_response.py
@@ -35,6 +35,8 @@
class DataStatus(BaseModel):
+ """Final per-file status after fixing"""
+
composite_status: Literal[
"FIXED_EVERYTHING", "FIXED_REQUESTED", "PARTIALLY_FIXED", "NO_REQUESTED_ISSUES", "NO_ISSUES", "FAILED"
]
@@ -68,6 +70,8 @@ class DataSuggestedChangesChangedFile(BaseModel):
class DataSuggestedChanges(BaseModel):
+ """Suggested changes to fix the issues"""
+
all_files: Optional[List[DataSuggestedChangesAllFile]] = None
"""List of all files with their current contents.
@@ -93,6 +97,8 @@ class DataBundleFile(BaseModel):
class DataBundle(BaseModel):
+ """Bundle information if bundling was requested"""
+
build_system: str
status: Literal["SUCCESS", "FAILED", "NOT_ATTEMPTED", "PARTIAL_SUCCESS"]
@@ -117,6 +123,8 @@ class DataFileToStrategyStatistic(BaseModel):
class DataFinalDiagnosticsNotRequestedFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -151,11 +159,15 @@ class DataFinalDiagnosticsNotRequestedFileToDiagnostic(BaseModel):
class DataFinalDiagnosticsNotRequested(BaseModel):
+ """Diagnostics that do not match the requested fix types"""
+
file_to_diagnostics: Optional[Dict[str, List[DataFinalDiagnosticsNotRequestedFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
class DataFinalDiagnosticsRequestedFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -190,11 +202,17 @@ class DataFinalDiagnosticsRequestedFileToDiagnostic(BaseModel):
class DataFinalDiagnosticsRequested(BaseModel):
+ """Diagnostics that match the requested fix types"""
+
file_to_diagnostics: Optional[Dict[str, List[DataFinalDiagnosticsRequestedFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
class DataFinalDiagnostics(BaseModel):
+ """
+ Diagnostics after fixing, split into relevant vs other based on requested fix types
+ """
+
not_requested: Optional[DataFinalDiagnosticsNotRequested] = None
"""Diagnostics that do not match the requested fix types"""
@@ -203,6 +221,8 @@ class DataFinalDiagnostics(BaseModel):
class DataInitialDiagnosticsNotRequestedFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -237,11 +257,15 @@ class DataInitialDiagnosticsNotRequestedFileToDiagnostic(BaseModel):
class DataInitialDiagnosticsNotRequested(BaseModel):
+ """Diagnostics that do not match the requested fix types"""
+
file_to_diagnostics: Optional[Dict[str, List[DataInitialDiagnosticsNotRequestedFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
class DataInitialDiagnosticsRequestedFileToDiagnosticLocation(BaseModel):
+ """Location of the diagnostic"""
+
column: Optional[float] = None
"""Column number (1-based)"""
@@ -276,11 +300,17 @@ class DataInitialDiagnosticsRequestedFileToDiagnostic(BaseModel):
class DataInitialDiagnosticsRequested(BaseModel):
+ """Diagnostics that match the requested fix types"""
+
file_to_diagnostics: Optional[Dict[str, List[DataInitialDiagnosticsRequestedFileToDiagnostic]]] = None
"""Diagnostics grouped by file"""
class DataInitialDiagnostics(BaseModel):
+ """
+ Diagnostics before fixing, split into relevant vs other based on requested fix types
+ """
+
not_requested: Optional[DataInitialDiagnosticsNotRequested] = None
"""Diagnostics that do not match the requested fix types"""
@@ -289,6 +319,8 @@ class DataInitialDiagnostics(BaseModel):
class Data(BaseModel):
+ """The actual response data"""
+
fixer_version: str
"""Version of the fixer"""
@@ -321,6 +353,8 @@ class Data(BaseModel):
class Error(BaseModel):
+ """The error from the API query"""
+
code: str
"""The error code"""
@@ -332,6 +366,8 @@ class Error(BaseModel):
class Meta(BaseModel):
+ """Meta information"""
+
external_id: Optional[str] = None
"""Customer tracking identifier"""
diff --git a/src/benchify/types/stack_create_response.py b/src/benchify/types/stack_create_response.py
index 7a5d55d..0428d78 100644
--- a/src/benchify/types/stack_create_response.py
+++ b/src/benchify/types/stack_create_response.py
@@ -11,6 +11,8 @@
class BuildStatus(BaseModel):
+ """Build status information"""
+
phase: Literal["pending", "running", "completed", "failed"]
"""Build phase states"""
@@ -25,6 +27,8 @@ class BuildStatus(BaseModel):
class Service(BaseModel):
+ """Information about a service in the stack"""
+
id: str
"""Service identifier"""
@@ -45,6 +49,8 @@ class Service(BaseModel):
class StackCreateResponse(BaseModel):
+ """Response after creating a new stack"""
+
id: str
"""Stack identifier"""
diff --git a/src/benchify/types/stack_get_logs_response.py b/src/benchify/types/stack_get_logs_response.py
index 307a2ec..cb5f9ec 100644
--- a/src/benchify/types/stack_get_logs_response.py
+++ b/src/benchify/types/stack_get_logs_response.py
@@ -11,6 +11,8 @@
class Service(BaseModel):
+ """Logs from a single service"""
+
id: str
"""Service ID"""
@@ -28,6 +30,8 @@ class Service(BaseModel):
class StackGetLogsResponse(BaseModel):
+ """Structured logs response from stack"""
+
id: str
"""Stack ID"""
diff --git a/src/benchify/types/stack_retrieve_response.py b/src/benchify/types/stack_retrieve_response.py
index 550ac83..b573630 100644
--- a/src/benchify/types/stack_retrieve_response.py
+++ b/src/benchify/types/stack_retrieve_response.py
@@ -11,6 +11,8 @@
class StackRetrieveResponse(BaseModel):
+ """Stack status response"""
+
id: str
"""Stack identifier"""
diff --git a/src/benchify/types/stack_update_response.py b/src/benchify/types/stack_update_response.py
index fc377b2..b64d22d 100644
--- a/src/benchify/types/stack_update_response.py
+++ b/src/benchify/types/stack_update_response.py
@@ -11,6 +11,8 @@
class StackUpdateResponse(BaseModel):
+ """Response after patching a stack"""
+
id: str
"""Stack identifier"""
diff --git a/src/benchify/types/validate_template_validate_params.py b/src/benchify/types/validate_template_validate_params.py
index ce42209..c84bf41 100644
--- a/src/benchify/types/validate_template_validate_params.py
+++ b/src/benchify/types/validate_template_validate_params.py
@@ -29,5 +29,7 @@ class ValidateTemplateValidateParams(TypedDict, total=False):
class Meta(TypedDict, total=False):
+ """Meta information for the request"""
+
external_id: Optional[str]
"""Customer tracking identifier"""
From d16ba6962962dd2feb5c5d5d9ef6d102f9f6c576 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 16 Dec 2025 04:37:07 +0000
Subject: [PATCH 25/45] chore(internal): add missing files argument to base
client
---
src/benchify/_base_client.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/benchify/_base_client.py b/src/benchify/_base_client.py
index b549448..ba8a91b 100644
--- a/src/benchify/_base_client.py
+++ b/src/benchify/_base_client.py
@@ -1247,9 +1247,12 @@ def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
- opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
+ opts = FinalRequestOptions.construct(
+ method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
+ )
return self.request(cast_to, opts)
def put(
@@ -1767,9 +1770,12 @@ async def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
- opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
+ opts = FinalRequestOptions.construct(
+ method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
+ )
return await self.request(cast_to, opts)
async def put(
From 37917619e0f6b6506afa8251aaa3cb0760907886 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 17 Dec 2025 06:21:07 +0000
Subject: [PATCH 26/45] chore: speedup initial import
---
src/benchify/_client.py | 341 ++++++++++++++++++++++++++++++----------
1 file changed, 255 insertions(+), 86 deletions(-)
diff --git a/src/benchify/_client.py b/src/benchify/_client.py
index 1bc38bc..4ea605d 100644
--- a/src/benchify/_client.py
+++ b/src/benchify/_client.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, Mapping
+from typing import TYPE_CHECKING, Any, Mapping
from typing_extensions import Self, override
import httpx
@@ -21,8 +21,8 @@
not_given,
)
from ._utils import is_given, get_async_library
+from ._compat import cached_property
from ._version import __version__
-from .resources import fixer, validate_template, fix_string_literals, fix_parsing_and_diagnose
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import APIStatusError
from ._base_client import (
@@ -30,8 +30,15 @@
SyncAPIClient,
AsyncAPIClient,
)
-from .resources.fix import fix
-from .resources.stacks import stacks
+
+if TYPE_CHECKING:
+ from .resources import fix, fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
+ from .resources.fixer import FixerResource, AsyncFixerResource
+ from .resources.fix.fix import FixResource, AsyncFixResource
+ from .resources.stacks.stacks import StacksResource, AsyncStacksResource
+ from .resources.validate_template import ValidateTemplateResource, AsyncValidateTemplateResource
+ from .resources.fix_string_literals import FixStringLiteralsResource, AsyncFixStringLiteralsResource
+ from .resources.fix_parsing_and_diagnose import FixParsingAndDiagnoseResource, AsyncFixParsingAndDiagnoseResource
__all__ = [
"Timeout",
@@ -46,15 +53,6 @@
class Benchify(SyncAPIClient):
- fixer: fixer.FixerResource
- stacks: stacks.StacksResource
- fix_string_literals: fix_string_literals.FixStringLiteralsResource
- validate_template: validate_template.ValidateTemplateResource
- fix_parsing_and_diagnose: fix_parsing_and_diagnose.FixParsingAndDiagnoseResource
- fix: fix.FixResource
- with_raw_response: BenchifyWithRawResponse
- with_streaming_response: BenchifyWithStreamedResponse
-
# client options
api_key: str | None
@@ -105,14 +103,49 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)
- self.fixer = fixer.FixerResource(self)
- self.stacks = stacks.StacksResource(self)
- self.fix_string_literals = fix_string_literals.FixStringLiteralsResource(self)
- self.validate_template = validate_template.ValidateTemplateResource(self)
- self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.FixParsingAndDiagnoseResource(self)
- self.fix = fix.FixResource(self)
- self.with_raw_response = BenchifyWithRawResponse(self)
- self.with_streaming_response = BenchifyWithStreamedResponse(self)
+ @cached_property
+ def fixer(self) -> FixerResource:
+ from .resources.fixer import FixerResource
+
+ return FixerResource(self)
+
+ @cached_property
+ def stacks(self) -> StacksResource:
+ from .resources.stacks import StacksResource
+
+ return StacksResource(self)
+
+ @cached_property
+ def fix_string_literals(self) -> FixStringLiteralsResource:
+ from .resources.fix_string_literals import FixStringLiteralsResource
+
+ return FixStringLiteralsResource(self)
+
+ @cached_property
+ def validate_template(self) -> ValidateTemplateResource:
+ from .resources.validate_template import ValidateTemplateResource
+
+ return ValidateTemplateResource(self)
+
+ @cached_property
+ def fix_parsing_and_diagnose(self) -> FixParsingAndDiagnoseResource:
+ from .resources.fix_parsing_and_diagnose import FixParsingAndDiagnoseResource
+
+ return FixParsingAndDiagnoseResource(self)
+
+ @cached_property
+ def fix(self) -> FixResource:
+ from .resources.fix import FixResource
+
+ return FixResource(self)
+
+ @cached_property
+ def with_raw_response(self) -> BenchifyWithRawResponse:
+ return BenchifyWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BenchifyWithStreamedResponse:
+ return BenchifyWithStreamedResponse(self)
@property
@override
@@ -233,15 +266,6 @@ def _make_status_error(
class AsyncBenchify(AsyncAPIClient):
- fixer: fixer.AsyncFixerResource
- stacks: stacks.AsyncStacksResource
- fix_string_literals: fix_string_literals.AsyncFixStringLiteralsResource
- validate_template: validate_template.AsyncValidateTemplateResource
- fix_parsing_and_diagnose: fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResource
- fix: fix.AsyncFixResource
- with_raw_response: AsyncBenchifyWithRawResponse
- with_streaming_response: AsyncBenchifyWithStreamedResponse
-
# client options
api_key: str | None
@@ -292,14 +316,49 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)
- self.fixer = fixer.AsyncFixerResource(self)
- self.stacks = stacks.AsyncStacksResource(self)
- self.fix_string_literals = fix_string_literals.AsyncFixStringLiteralsResource(self)
- self.validate_template = validate_template.AsyncValidateTemplateResource(self)
- self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResource(self)
- self.fix = fix.AsyncFixResource(self)
- self.with_raw_response = AsyncBenchifyWithRawResponse(self)
- self.with_streaming_response = AsyncBenchifyWithStreamedResponse(self)
+ @cached_property
+ def fixer(self) -> AsyncFixerResource:
+ from .resources.fixer import AsyncFixerResource
+
+ return AsyncFixerResource(self)
+
+ @cached_property
+ def stacks(self) -> AsyncStacksResource:
+ from .resources.stacks import AsyncStacksResource
+
+ return AsyncStacksResource(self)
+
+ @cached_property
+ def fix_string_literals(self) -> AsyncFixStringLiteralsResource:
+ from .resources.fix_string_literals import AsyncFixStringLiteralsResource
+
+ return AsyncFixStringLiteralsResource(self)
+
+ @cached_property
+ def validate_template(self) -> AsyncValidateTemplateResource:
+ from .resources.validate_template import AsyncValidateTemplateResource
+
+ return AsyncValidateTemplateResource(self)
+
+ @cached_property
+ def fix_parsing_and_diagnose(self) -> AsyncFixParsingAndDiagnoseResource:
+ from .resources.fix_parsing_and_diagnose import AsyncFixParsingAndDiagnoseResource
+
+ return AsyncFixParsingAndDiagnoseResource(self)
+
+ @cached_property
+ def fix(self) -> AsyncFixResource:
+ from .resources.fix import AsyncFixResource
+
+ return AsyncFixResource(self)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncBenchifyWithRawResponse:
+ return AsyncBenchifyWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBenchifyWithStreamedResponse:
+ return AsyncBenchifyWithStreamedResponse(self)
@property
@override
@@ -420,67 +479,177 @@ def _make_status_error(
class BenchifyWithRawResponse:
+ _client: Benchify
+
def __init__(self, client: Benchify) -> None:
- self.fixer = fixer.FixerResourceWithRawResponse(client.fixer)
- self.stacks = stacks.StacksResourceWithRawResponse(client.stacks)
- self.fix_string_literals = fix_string_literals.FixStringLiteralsResourceWithRawResponse(
- client.fix_string_literals
- )
- self.validate_template = validate_template.ValidateTemplateResourceWithRawResponse(client.validate_template)
- self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.FixParsingAndDiagnoseResourceWithRawResponse(
- client.fix_parsing_and_diagnose
- )
- self.fix = fix.FixResourceWithRawResponse(client.fix)
+ self._client = client
+
+ @cached_property
+ def fixer(self) -> fixer.FixerResourceWithRawResponse:
+ from .resources.fixer import FixerResourceWithRawResponse
+
+ return FixerResourceWithRawResponse(self._client.fixer)
+
+ @cached_property
+ def stacks(self) -> stacks.StacksResourceWithRawResponse:
+ from .resources.stacks import StacksResourceWithRawResponse
+
+ return StacksResourceWithRawResponse(self._client.stacks)
+
+ @cached_property
+ def fix_string_literals(self) -> fix_string_literals.FixStringLiteralsResourceWithRawResponse:
+ from .resources.fix_string_literals import FixStringLiteralsResourceWithRawResponse
+
+ return FixStringLiteralsResourceWithRawResponse(self._client.fix_string_literals)
+
+ @cached_property
+ def validate_template(self) -> validate_template.ValidateTemplateResourceWithRawResponse:
+ from .resources.validate_template import ValidateTemplateResourceWithRawResponse
+
+ return ValidateTemplateResourceWithRawResponse(self._client.validate_template)
+
+ @cached_property
+ def fix_parsing_and_diagnose(self) -> fix_parsing_and_diagnose.FixParsingAndDiagnoseResourceWithRawResponse:
+ from .resources.fix_parsing_and_diagnose import FixParsingAndDiagnoseResourceWithRawResponse
+
+ return FixParsingAndDiagnoseResourceWithRawResponse(self._client.fix_parsing_and_diagnose)
+
+ @cached_property
+ def fix(self) -> fix.FixResourceWithRawResponse:
+ from .resources.fix import FixResourceWithRawResponse
+
+ return FixResourceWithRawResponse(self._client.fix)
class AsyncBenchifyWithRawResponse:
+ _client: AsyncBenchify
+
def __init__(self, client: AsyncBenchify) -> None:
- self.fixer = fixer.AsyncFixerResourceWithRawResponse(client.fixer)
- self.stacks = stacks.AsyncStacksResourceWithRawResponse(client.stacks)
- self.fix_string_literals = fix_string_literals.AsyncFixStringLiteralsResourceWithRawResponse(
- client.fix_string_literals
- )
- self.validate_template = validate_template.AsyncValidateTemplateResourceWithRawResponse(
- client.validate_template
- )
- self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResourceWithRawResponse(
- client.fix_parsing_and_diagnose
- )
- self.fix = fix.AsyncFixResourceWithRawResponse(client.fix)
+ self._client = client
+
+ @cached_property
+ def fixer(self) -> fixer.AsyncFixerResourceWithRawResponse:
+ from .resources.fixer import AsyncFixerResourceWithRawResponse
+
+ return AsyncFixerResourceWithRawResponse(self._client.fixer)
+
+ @cached_property
+ def stacks(self) -> stacks.AsyncStacksResourceWithRawResponse:
+ from .resources.stacks import AsyncStacksResourceWithRawResponse
+
+ return AsyncStacksResourceWithRawResponse(self._client.stacks)
+
+ @cached_property
+ def fix_string_literals(self) -> fix_string_literals.AsyncFixStringLiteralsResourceWithRawResponse:
+ from .resources.fix_string_literals import AsyncFixStringLiteralsResourceWithRawResponse
+
+ return AsyncFixStringLiteralsResourceWithRawResponse(self._client.fix_string_literals)
+
+ @cached_property
+ def validate_template(self) -> validate_template.AsyncValidateTemplateResourceWithRawResponse:
+ from .resources.validate_template import AsyncValidateTemplateResourceWithRawResponse
+
+ return AsyncValidateTemplateResourceWithRawResponse(self._client.validate_template)
+
+ @cached_property
+ def fix_parsing_and_diagnose(self) -> fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResourceWithRawResponse:
+ from .resources.fix_parsing_and_diagnose import AsyncFixParsingAndDiagnoseResourceWithRawResponse
+
+ return AsyncFixParsingAndDiagnoseResourceWithRawResponse(self._client.fix_parsing_and_diagnose)
+
+ @cached_property
+ def fix(self) -> fix.AsyncFixResourceWithRawResponse:
+ from .resources.fix import AsyncFixResourceWithRawResponse
+
+ return AsyncFixResourceWithRawResponse(self._client.fix)
class BenchifyWithStreamedResponse:
+ _client: Benchify
+
def __init__(self, client: Benchify) -> None:
- self.fixer = fixer.FixerResourceWithStreamingResponse(client.fixer)
- self.stacks = stacks.StacksResourceWithStreamingResponse(client.stacks)
- self.fix_string_literals = fix_string_literals.FixStringLiteralsResourceWithStreamingResponse(
- client.fix_string_literals
- )
- self.validate_template = validate_template.ValidateTemplateResourceWithStreamingResponse(
- client.validate_template
- )
- self.fix_parsing_and_diagnose = fix_parsing_and_diagnose.FixParsingAndDiagnoseResourceWithStreamingResponse(
- client.fix_parsing_and_diagnose
- )
- self.fix = fix.FixResourceWithStreamingResponse(client.fix)
+ self._client = client
+
+ @cached_property
+ def fixer(self) -> fixer.FixerResourceWithStreamingResponse:
+ from .resources.fixer import FixerResourceWithStreamingResponse
+
+ return FixerResourceWithStreamingResponse(self._client.fixer)
+
+ @cached_property
+ def stacks(self) -> stacks.StacksResourceWithStreamingResponse:
+ from .resources.stacks import StacksResourceWithStreamingResponse
+
+ return StacksResourceWithStreamingResponse(self._client.stacks)
+
+ @cached_property
+ def fix_string_literals(self) -> fix_string_literals.FixStringLiteralsResourceWithStreamingResponse:
+ from .resources.fix_string_literals import FixStringLiteralsResourceWithStreamingResponse
+
+ return FixStringLiteralsResourceWithStreamingResponse(self._client.fix_string_literals)
+
+ @cached_property
+ def validate_template(self) -> validate_template.ValidateTemplateResourceWithStreamingResponse:
+ from .resources.validate_template import ValidateTemplateResourceWithStreamingResponse
+
+ return ValidateTemplateResourceWithStreamingResponse(self._client.validate_template)
+
+ @cached_property
+ def fix_parsing_and_diagnose(self) -> fix_parsing_and_diagnose.FixParsingAndDiagnoseResourceWithStreamingResponse:
+ from .resources.fix_parsing_and_diagnose import FixParsingAndDiagnoseResourceWithStreamingResponse
+
+ return FixParsingAndDiagnoseResourceWithStreamingResponse(self._client.fix_parsing_and_diagnose)
+
+ @cached_property
+ def fix(self) -> fix.FixResourceWithStreamingResponse:
+ from .resources.fix import FixResourceWithStreamingResponse
+
+ return FixResourceWithStreamingResponse(self._client.fix)
class AsyncBenchifyWithStreamedResponse:
+ _client: AsyncBenchify
+
def __init__(self, client: AsyncBenchify) -> None:
- self.fixer = fixer.AsyncFixerResourceWithStreamingResponse(client.fixer)
- self.stacks = stacks.AsyncStacksResourceWithStreamingResponse(client.stacks)
- self.fix_string_literals = fix_string_literals.AsyncFixStringLiteralsResourceWithStreamingResponse(
- client.fix_string_literals
- )
- self.validate_template = validate_template.AsyncValidateTemplateResourceWithStreamingResponse(
- client.validate_template
- )
- self.fix_parsing_and_diagnose = (
- fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResourceWithStreamingResponse(
- client.fix_parsing_and_diagnose
- )
- )
- self.fix = fix.AsyncFixResourceWithStreamingResponse(client.fix)
+ self._client = client
+
+ @cached_property
+ def fixer(self) -> fixer.AsyncFixerResourceWithStreamingResponse:
+ from .resources.fixer import AsyncFixerResourceWithStreamingResponse
+
+ return AsyncFixerResourceWithStreamingResponse(self._client.fixer)
+
+ @cached_property
+ def stacks(self) -> stacks.AsyncStacksResourceWithStreamingResponse:
+ from .resources.stacks import AsyncStacksResourceWithStreamingResponse
+
+ return AsyncStacksResourceWithStreamingResponse(self._client.stacks)
+
+ @cached_property
+ def fix_string_literals(self) -> fix_string_literals.AsyncFixStringLiteralsResourceWithStreamingResponse:
+ from .resources.fix_string_literals import AsyncFixStringLiteralsResourceWithStreamingResponse
+
+ return AsyncFixStringLiteralsResourceWithStreamingResponse(self._client.fix_string_literals)
+
+ @cached_property
+ def validate_template(self) -> validate_template.AsyncValidateTemplateResourceWithStreamingResponse:
+ from .resources.validate_template import AsyncValidateTemplateResourceWithStreamingResponse
+
+ return AsyncValidateTemplateResourceWithStreamingResponse(self._client.validate_template)
+
+ @cached_property
+ def fix_parsing_and_diagnose(
+ self,
+ ) -> fix_parsing_and_diagnose.AsyncFixParsingAndDiagnoseResourceWithStreamingResponse:
+ from .resources.fix_parsing_and_diagnose import AsyncFixParsingAndDiagnoseResourceWithStreamingResponse
+
+ return AsyncFixParsingAndDiagnoseResourceWithStreamingResponse(self._client.fix_parsing_and_diagnose)
+
+ @cached_property
+ def fix(self) -> fix.AsyncFixResourceWithStreamingResponse:
+ from .resources.fix import AsyncFixResourceWithStreamingResponse
+
+ return AsyncFixResourceWithStreamingResponse(self._client.fix)
Client = Benchify
From 7732f705f48dd431880c8ed65708a4cf5b8eff06 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 18 Dec 2025 07:20:40 +0000
Subject: [PATCH 27/45] fix: use async_to_httpx_files in patch method
---
src/benchify/_base_client.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/benchify/_base_client.py b/src/benchify/_base_client.py
index ba8a91b..116bdb7 100644
--- a/src/benchify/_base_client.py
+++ b/src/benchify/_base_client.py
@@ -1774,7 +1774,7 @@ async def patch(
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(
- method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
+ method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
)
return await self.request(cast_to, opts)
From 3cfbbf79912010c381c10a4ec25c0b96eac0a5f9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 19 Dec 2025 06:22:50 +0000
Subject: [PATCH 28/45] chore(internal): add `--fix` argument to lint script
---
scripts/lint | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/lint b/scripts/lint
index 43a80ce..7de05a1 100755
--- a/scripts/lint
+++ b/scripts/lint
@@ -4,8 +4,13 @@ set -e
cd "$(dirname "$0")/.."
-echo "==> Running lints"
-rye run lint
+if [ "$1" = "--fix" ]; then
+ echo "==> Running lints with --fix"
+ rye run fix:ruff
+else
+ echo "==> Running lints"
+ rye run lint
+fi
echo "==> Making sure it imports"
rye run python -c 'import benchify'
From 9c77b1bc44be11429ef47d60004997ac38ec1daa Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 6 Jan 2026 05:43:16 +0000
Subject: [PATCH 29/45] chore(internal): codegen related update
---
LICENSE | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
index ca74ba3..f0958ad 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2025 Benchify
+ Copyright 2026 Benchify
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
From 73251c34c556b8010d7c18d8f200930a9e3b1a87 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 6 Jan 2026 05:55:56 +0000
Subject: [PATCH 30/45] docs: prominently feature MCP server setup in root SDK
readmes
---
README.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README.md b/README.md
index 0b15e1d..4906335 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,15 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://
It is generated with [Stainless](https://www.stainless.com/).
+## MCP Server
+
+Use the Benchify MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
+
+[](https://cursor.com/en-US/install-mcp?name=benchify-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImJlbmNoaWZ5LW1jcCJdfQ)
+[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22benchify-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22benchify-mcp%22%5D%7D)
+
+> Note: You may need to set environment variables in your MCP client.
+
## Documentation
The REST API documentation can be found on [benchify.com](https://benchify.com/support). The full API of this library can be found in [api.md](api.md).
From 8c22a38c0969909e0aa24b5a856b59a6f506ba9b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 8 Jan 2026 05:39:07 +0000
Subject: [PATCH 31/45] fix(client): loosen auth header validation
---
src/benchify/_client.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/benchify/_client.py b/src/benchify/_client.py
index 4ea605d..73c9941 100644
--- a/src/benchify/_client.py
+++ b/src/benchify/_client.py
@@ -171,9 +171,7 @@ def default_headers(self) -> dict[str, str | Omit]:
@override
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
- if self.api_key and headers.get("Authorization"):
- return
- if isinstance(custom_headers.get("Authorization"), Omit):
+ if headers.get("Authorization") or isinstance(custom_headers.get("Authorization"), Omit):
return
raise TypeError(
@@ -384,9 +382,7 @@ def default_headers(self) -> dict[str, str | Omit]:
@override
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
- if self.api_key and headers.get("Authorization"):
- return
- if isinstance(custom_headers.get("Authorization"), Omit):
+ if headers.get("Authorization") or isinstance(custom_headers.get("Authorization"), Omit):
return
raise TypeError(
From 2c35482f9d7fc168d95dc23b7eff85503739b369 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 14 Jan 2026 08:16:15 +0000
Subject: [PATCH 32/45] feat(client): add support for binary request streaming
---
src/benchify/_base_client.py | 145 ++++++++++++++++++++++++---
src/benchify/_models.py | 17 +++-
src/benchify/_types.py | 9 ++
tests/test_client.py | 187 ++++++++++++++++++++++++++++++++++-
4 files changed, 344 insertions(+), 14 deletions(-)
diff --git a/src/benchify/_base_client.py b/src/benchify/_base_client.py
index 116bdb7..02f5112 100644
--- a/src/benchify/_base_client.py
+++ b/src/benchify/_base_client.py
@@ -9,6 +9,7 @@
import inspect
import logging
import platform
+import warnings
import email.utils
from types import TracebackType
from random import random
@@ -51,9 +52,11 @@
ResponseT,
AnyMapping,
PostParser,
+ BinaryTypes,
RequestFiles,
HttpxSendArgs,
RequestOptions,
+ AsyncBinaryTypes,
HttpxRequestFiles,
ModelBuilderProtocol,
not_given,
@@ -477,8 +480,19 @@ def _build_request(
retries_taken: int = 0,
) -> httpx.Request:
if log.isEnabledFor(logging.DEBUG):
- log.debug("Request options: %s", model_dump(options, exclude_unset=True))
-
+ log.debug(
+ "Request options: %s",
+ model_dump(
+ options,
+ exclude_unset=True,
+ # Pydantic v1 can't dump every type we support in content, so we exclude it for now.
+ exclude={
+ "content",
+ }
+ if PYDANTIC_V1
+ else {},
+ ),
+ )
kwargs: dict[str, Any] = {}
json_data = options.json_data
@@ -532,7 +546,13 @@ def _build_request(
is_body_allowed = options.method.lower() != "get"
if is_body_allowed:
- if isinstance(json_data, bytes):
+ if options.content is not None and json_data is not None:
+ raise TypeError("Passing both `content` and `json_data` is not supported")
+ if options.content is not None and files is not None:
+ raise TypeError("Passing both `content` and `files` is not supported")
+ if options.content is not None:
+ kwargs["content"] = options.content
+ elif isinstance(json_data, bytes):
kwargs["content"] = json_data
else:
kwargs["json"] = json_data if is_given(json_data) else None
@@ -1194,6 +1214,7 @@ def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
options: RequestOptions = {},
files: RequestFiles | None = None,
stream: Literal[False] = False,
@@ -1206,6 +1227,7 @@ def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
options: RequestOptions = {},
files: RequestFiles | None = None,
stream: Literal[True],
@@ -1219,6 +1241,7 @@ def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
options: RequestOptions = {},
files: RequestFiles | None = None,
stream: bool,
@@ -1231,13 +1254,25 @@ def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
options: RequestOptions = {},
files: RequestFiles | None = None,
stream: bool = False,
stream_cls: type[_StreamT] | None = None,
) -> ResponseT | _StreamT:
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if files is not None and content is not None:
+ raise TypeError("Passing both `files` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
opts = FinalRequestOptions.construct(
- method="post", url=path, json_data=body, files=to_httpx_files(files), **options
+ method="post", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
)
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
@@ -1247,11 +1282,23 @@ def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if files is not None and content is not None:
+ raise TypeError("Passing both `files` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
opts = FinalRequestOptions.construct(
- method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
+ method="patch", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
)
return self.request(cast_to, opts)
@@ -1261,11 +1308,23 @@ def put(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if files is not None and content is not None:
+ raise TypeError("Passing both `files` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
opts = FinalRequestOptions.construct(
- method="put", url=path, json_data=body, files=to_httpx_files(files), **options
+ method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
)
return self.request(cast_to, opts)
@@ -1275,9 +1334,19 @@ def delete(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: BinaryTypes | None = None,
options: RequestOptions = {},
) -> ResponseT:
- opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options)
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
return self.request(cast_to, opts)
def get_api_list(
@@ -1717,6 +1786,7 @@ async def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
stream: Literal[False] = False,
@@ -1729,6 +1799,7 @@ async def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
stream: Literal[True],
@@ -1742,6 +1813,7 @@ async def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
stream: bool,
@@ -1754,13 +1826,25 @@ async def post(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
stream: bool = False,
stream_cls: type[_AsyncStreamT] | None = None,
) -> ResponseT | _AsyncStreamT:
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if files is not None and content is not None:
+ raise TypeError("Passing both `files` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
opts = FinalRequestOptions.construct(
- method="post", url=path, json_data=body, files=await async_to_httpx_files(files), **options
+ method="post", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options
)
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
@@ -1770,11 +1854,28 @@ async def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if files is not None and content is not None:
+ raise TypeError("Passing both `files` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
opts = FinalRequestOptions.construct(
- method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
+ method="patch",
+ url=path,
+ json_data=body,
+ content=content,
+ files=await async_to_httpx_files(files),
+ **options,
)
return await self.request(cast_to, opts)
@@ -1784,11 +1885,23 @@ async def put(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if files is not None and content is not None:
+ raise TypeError("Passing both `files` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
opts = FinalRequestOptions.construct(
- method="put", url=path, json_data=body, files=await async_to_httpx_files(files), **options
+ method="put", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options
)
return await self.request(cast_to, opts)
@@ -1798,9 +1911,19 @@ async def delete(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
+ content: AsyncBinaryTypes | None = None,
options: RequestOptions = {},
) -> ResponseT:
- opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options)
+ if body is not None and content is not None:
+ raise TypeError("Passing both `body` and `content` is not supported")
+ if isinstance(body, bytes):
+ warnings.warn(
+ "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
+ "Please pass raw bytes via the `content` parameter instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
return await self.request(cast_to, opts)
def get_api_list(
diff --git a/src/benchify/_models.py b/src/benchify/_models.py
index ca9500b..29070e0 100644
--- a/src/benchify/_models.py
+++ b/src/benchify/_models.py
@@ -3,7 +3,20 @@
import os
import inspect
import weakref
-from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
+from typing import (
+ IO,
+ TYPE_CHECKING,
+ Any,
+ Type,
+ Union,
+ Generic,
+ TypeVar,
+ Callable,
+ Iterable,
+ Optional,
+ AsyncIterable,
+ cast,
+)
from datetime import date, datetime
from typing_extensions import (
List,
@@ -787,6 +800,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
timeout: float | Timeout | None
files: HttpxRequestFiles | None
idempotency_key: str
+ content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None]
json_data: Body
extra_json: AnyMapping
follow_redirects: bool
@@ -805,6 +819,7 @@ class FinalRequestOptions(pydantic.BaseModel):
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
follow_redirects: Union[bool, None] = None
+ content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] = None
# It should be noted that we cannot use `json` here as that would override
# a BaseModel method in an incompatible fashion.
json_data: Union[Body, None] = None
diff --git a/src/benchify/_types.py b/src/benchify/_types.py
index 2f5b091..c452a1e 100644
--- a/src/benchify/_types.py
+++ b/src/benchify/_types.py
@@ -13,9 +13,11 @@
Mapping,
TypeVar,
Callable,
+ Iterable,
Iterator,
Optional,
Sequence,
+ AsyncIterable,
)
from typing_extensions import (
Set,
@@ -56,6 +58,13 @@
else:
Base64FileInput = Union[IO[bytes], PathLike]
FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8.
+
+
+# Used for sending raw binary data / streaming data in request bodies
+# e.g. for file uploads without multipart encoding
+BinaryTypes = Union[bytes, bytearray, IO[bytes], Iterable[bytes]]
+AsyncBinaryTypes = Union[bytes, bytearray, IO[bytes], AsyncIterable[bytes]]
+
FileTypes = Union[
# file (or bytes)
FileContent,
diff --git a/tests/test_client.py b/tests/test_client.py
index 4e25610..5ee3fb2 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -8,10 +8,11 @@
import json
import asyncio
import inspect
+import dataclasses
import tracemalloc
-from typing import Any, Union, cast
+from typing import Any, Union, TypeVar, Callable, Iterable, Iterator, Optional, Coroutine, cast
from unittest import mock
-from typing_extensions import Literal
+from typing_extensions import Literal, AsyncIterator, override
import httpx
import pytest
@@ -36,6 +37,7 @@
from .utils import update_env
+T = TypeVar("T")
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
api_key = "My API Key"
@@ -50,6 +52,57 @@ def _low_retry_timeout(*_args: Any, **_kwargs: Any) -> float:
return 0.1
+def mirror_request_content(request: httpx.Request) -> httpx.Response:
+ return httpx.Response(200, content=request.content)
+
+
+# note: we can't use the httpx.MockTransport class as it consumes the request
+# body itself, which means we can't test that the body is read lazily
+class MockTransport(httpx.BaseTransport, httpx.AsyncBaseTransport):
+ def __init__(
+ self,
+ handler: Callable[[httpx.Request], httpx.Response]
+ | Callable[[httpx.Request], Coroutine[Any, Any, httpx.Response]],
+ ) -> None:
+ self.handler = handler
+
+ @override
+ def handle_request(
+ self,
+ request: httpx.Request,
+ ) -> httpx.Response:
+ assert not inspect.iscoroutinefunction(self.handler), "handler must not be a coroutine function"
+ assert inspect.isfunction(self.handler), "handler must be a function"
+ return self.handler(request)
+
+ @override
+ async def handle_async_request(
+ self,
+ request: httpx.Request,
+ ) -> httpx.Response:
+ assert inspect.iscoroutinefunction(self.handler), "handler must be a coroutine function"
+ return await self.handler(request)
+
+
+@dataclasses.dataclass
+class Counter:
+ value: int = 0
+
+
+def _make_sync_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> Iterator[T]:
+ for item in iterable:
+ if counter:
+ counter.value += 1
+ yield item
+
+
+async def _make_async_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> AsyncIterator[T]:
+ for item in iterable:
+ if counter:
+ counter.value += 1
+ yield item
+
+
def _get_open_connections(client: Benchify | AsyncBenchify) -> int:
transport = client._client._transport
assert isinstance(transport, httpx.HTTPTransport) or isinstance(transport, httpx.AsyncHTTPTransport)
@@ -511,6 +564,70 @@ def test_multipart_repeating_array(self, client: Benchify) -> None:
b"",
]
+ @pytest.mark.respx(base_url=base_url)
+ def test_binary_content_upload(self, respx_mock: MockRouter, client: Benchify) -> None:
+ respx_mock.post("/upload").mock(side_effect=mirror_request_content)
+
+ file_content = b"Hello, this is a test file."
+
+ response = client.post(
+ "/upload",
+ content=file_content,
+ cast_to=httpx.Response,
+ options={"headers": {"Content-Type": "application/octet-stream"}},
+ )
+
+ assert response.status_code == 200
+ assert response.request.headers["Content-Type"] == "application/octet-stream"
+ assert response.content == file_content
+
+ def test_binary_content_upload_with_iterator(self) -> None:
+ file_content = b"Hello, this is a test file."
+ counter = Counter()
+ iterator = _make_sync_iterator([file_content], counter=counter)
+
+ def mock_handler(request: httpx.Request) -> httpx.Response:
+ assert counter.value == 0, "the request body should not have been read"
+ return httpx.Response(200, content=request.read())
+
+ with Benchify(
+ base_url=base_url,
+ api_key=api_key,
+ _strict_response_validation=True,
+ http_client=httpx.Client(transport=MockTransport(handler=mock_handler)),
+ ) as client:
+ response = client.post(
+ "/upload",
+ content=iterator,
+ cast_to=httpx.Response,
+ options={"headers": {"Content-Type": "application/octet-stream"}},
+ )
+
+ assert response.status_code == 200
+ assert response.request.headers["Content-Type"] == "application/octet-stream"
+ assert response.content == file_content
+ assert counter.value == 1
+
+ @pytest.mark.respx(base_url=base_url)
+ def test_binary_content_upload_with_body_is_deprecated(self, respx_mock: MockRouter, client: Benchify) -> None:
+ respx_mock.post("/upload").mock(side_effect=mirror_request_content)
+
+ file_content = b"Hello, this is a test file."
+
+ with pytest.deprecated_call(
+ match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead."
+ ):
+ response = client.post(
+ "/upload",
+ body=file_content,
+ cast_to=httpx.Response,
+ options={"headers": {"Content-Type": "application/octet-stream"}},
+ )
+
+ assert response.status_code == 200
+ assert response.request.headers["Content-Type"] == "application/octet-stream"
+ assert response.content == file_content
+
@pytest.mark.respx(base_url=base_url)
def test_basic_union_response(self, respx_mock: MockRouter, client: Benchify) -> None:
class Model1(BaseModel):
@@ -1339,6 +1456,72 @@ def test_multipart_repeating_array(self, async_client: AsyncBenchify) -> None:
b"",
]
+ @pytest.mark.respx(base_url=base_url)
+ async def test_binary_content_upload(self, respx_mock: MockRouter, async_client: AsyncBenchify) -> None:
+ respx_mock.post("/upload").mock(side_effect=mirror_request_content)
+
+ file_content = b"Hello, this is a test file."
+
+ response = await async_client.post(
+ "/upload",
+ content=file_content,
+ cast_to=httpx.Response,
+ options={"headers": {"Content-Type": "application/octet-stream"}},
+ )
+
+ assert response.status_code == 200
+ assert response.request.headers["Content-Type"] == "application/octet-stream"
+ assert response.content == file_content
+
+ async def test_binary_content_upload_with_asynciterator(self) -> None:
+ file_content = b"Hello, this is a test file."
+ counter = Counter()
+ iterator = _make_async_iterator([file_content], counter=counter)
+
+ async def mock_handler(request: httpx.Request) -> httpx.Response:
+ assert counter.value == 0, "the request body should not have been read"
+ return httpx.Response(200, content=await request.aread())
+
+ async with AsyncBenchify(
+ base_url=base_url,
+ api_key=api_key,
+ _strict_response_validation=True,
+ http_client=httpx.AsyncClient(transport=MockTransport(handler=mock_handler)),
+ ) as client:
+ response = await client.post(
+ "/upload",
+ content=iterator,
+ cast_to=httpx.Response,
+ options={"headers": {"Content-Type": "application/octet-stream"}},
+ )
+
+ assert response.status_code == 200
+ assert response.request.headers["Content-Type"] == "application/octet-stream"
+ assert response.content == file_content
+ assert counter.value == 1
+
+ @pytest.mark.respx(base_url=base_url)
+ async def test_binary_content_upload_with_body_is_deprecated(
+ self, respx_mock: MockRouter, async_client: AsyncBenchify
+ ) -> None:
+ respx_mock.post("/upload").mock(side_effect=mirror_request_content)
+
+ file_content = b"Hello, this is a test file."
+
+ with pytest.deprecated_call(
+ match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead."
+ ):
+ response = await async_client.post(
+ "/upload",
+ body=file_content,
+ cast_to=httpx.Response,
+ options={"headers": {"Content-Type": "application/octet-stream"}},
+ )
+
+ assert response.status_code == 200
+ assert response.request.headers["Content-Type"] == "application/octet-stream"
+ assert response.content == file_content
+
@pytest.mark.respx(base_url=base_url)
async def test_basic_union_response(self, respx_mock: MockRouter, async_client: AsyncBenchify) -> None:
class Model1(BaseModel):
From 1450fbd5b449481749a518d3b8c1410ba8473b05 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 17 Jan 2026 06:24:35 +0000
Subject: [PATCH 33/45] chore(internal): update `actions/checkout` version
---
.github/workflows/ci.yml | 6 +++---
.github/workflows/publish-pypi.yml | 2 +-
.github/workflows/release-doctor.yml | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1243b2c..79a6f53 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/benchify-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install Rye
run: |
@@ -44,7 +44,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/benchify-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install Rye
run: |
@@ -81,7 +81,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/benchify-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install Rye
run: |
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
index b935271..0413e5b 100644
--- a/.github/workflows/publish-pypi.yml
+++ b/.github/workflows/publish-pypi.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install Rye
run: |
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index 38c5945..4e8c262 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -12,7 +12,7 @@ jobs:
if: github.repository == 'Benchify/benchify-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Check release environment
run: |
From b0d0279c1f1b22a6ff09802fb1d04dd66dd1c0a4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 24 Jan 2026 05:42:11 +0000
Subject: [PATCH 34/45] chore(ci): upgrade `actions/github-script`
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 79a6f53..b9d5475 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -63,7 +63,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/benchify-python'
id: github-oidc
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());
From 378d7822f3073a570ddbf64f4a4521a210f0fdf9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 29 Jan 2026 06:13:53 +0000
Subject: [PATCH 35/45] fix(docs): fix mcp installation instructions for remote
servers
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 4906335..d64cc7b 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@ It is generated with [Stainless](https://www.stainless.com/).
Use the Benchify MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
-[](https://cursor.com/en-US/install-mcp?name=benchify-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImJlbmNoaWZ5LW1jcCJdfQ)
-[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22benchify-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22benchify-mcp%22%5D%7D)
+[](https://cursor.com/en-US/install-mcp?name=benchify-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImJlbmNoaWZ5LW1jcCJdLCJlbnYiOnsiQkVOQ0hJRllfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)
+[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22benchify-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22benchify-mcp%22%5D%2C%22env%22%3A%7B%22BENCHIFY_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
> Note: You may need to set environment variables in your MCP client.
From 11383dd4f5806a594f3131f423c4e27c150e3200 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 30 Jan 2026 05:30:10 +0000
Subject: [PATCH 36/45] feat(client): add custom JSON encoder for extended type
support
---
src/benchify/_base_client.py | 7 +-
src/benchify/_compat.py | 6 +-
src/benchify/_utils/_json.py | 35 ++++++++++
tests/test_utils/test_json.py | 126 ++++++++++++++++++++++++++++++++++
4 files changed, 169 insertions(+), 5 deletions(-)
create mode 100644 src/benchify/_utils/_json.py
create mode 100644 tests/test_utils/test_json.py
diff --git a/src/benchify/_base_client.py b/src/benchify/_base_client.py
index 02f5112..335954e 100644
--- a/src/benchify/_base_client.py
+++ b/src/benchify/_base_client.py
@@ -86,6 +86,7 @@
APIConnectionError,
APIResponseValidationError,
)
+from ._utils._json import openapi_dumps
log: logging.Logger = logging.getLogger(__name__)
@@ -554,8 +555,10 @@ def _build_request(
kwargs["content"] = options.content
elif isinstance(json_data, bytes):
kwargs["content"] = json_data
- else:
- kwargs["json"] = json_data if is_given(json_data) else None
+ elif not files:
+ # Don't set content when JSON is sent as multipart/form-data,
+ # since httpx's content param overrides other body arguments
+ kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
diff --git a/src/benchify/_compat.py b/src/benchify/_compat.py
index bdef67f..786ff42 100644
--- a/src/benchify/_compat.py
+++ b/src/benchify/_compat.py
@@ -139,6 +139,7 @@ def model_dump(
exclude_defaults: bool = False,
warnings: bool = True,
mode: Literal["json", "python"] = "python",
+ by_alias: bool | None = None,
) -> dict[str, Any]:
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
return model.model_dump(
@@ -148,13 +149,12 @@ def model_dump(
exclude_defaults=exclude_defaults,
# warnings are not supported in Pydantic v1
warnings=True if PYDANTIC_V1 else warnings,
+ by_alias=by_alias,
)
return cast(
"dict[str, Any]",
model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
- exclude=exclude,
- exclude_unset=exclude_unset,
- exclude_defaults=exclude_defaults,
+ exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias)
),
)
diff --git a/src/benchify/_utils/_json.py b/src/benchify/_utils/_json.py
new file mode 100644
index 0000000..6058421
--- /dev/null
+++ b/src/benchify/_utils/_json.py
@@ -0,0 +1,35 @@
+import json
+from typing import Any
+from datetime import datetime
+from typing_extensions import override
+
+import pydantic
+
+from .._compat import model_dump
+
+
+def openapi_dumps(obj: Any) -> bytes:
+ """
+ Serialize an object to UTF-8 encoded JSON bytes.
+
+ Extends the standard json.dumps with support for additional types
+ commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc.
+ """
+ return json.dumps(
+ obj,
+ cls=_CustomEncoder,
+ # Uses the same defaults as httpx's JSON serialization
+ ensure_ascii=False,
+ separators=(",", ":"),
+ allow_nan=False,
+ ).encode()
+
+
+class _CustomEncoder(json.JSONEncoder):
+ @override
+ def default(self, o: Any) -> Any:
+ if isinstance(o, datetime):
+ return o.isoformat()
+ if isinstance(o, pydantic.BaseModel):
+ return model_dump(o, exclude_unset=True, mode="json", by_alias=True)
+ return super().default(o)
diff --git a/tests/test_utils/test_json.py b/tests/test_utils/test_json.py
new file mode 100644
index 0000000..687daa4
--- /dev/null
+++ b/tests/test_utils/test_json.py
@@ -0,0 +1,126 @@
+from __future__ import annotations
+
+import datetime
+from typing import Union
+
+import pydantic
+
+from benchify import _compat
+from benchify._utils._json import openapi_dumps
+
+
+class TestOpenapiDumps:
+ def test_basic(self) -> None:
+ data = {"key": "value", "number": 42}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"key":"value","number":42}'
+
+ def test_datetime_serialization(self) -> None:
+ dt = datetime.datetime(2023, 1, 1, 12, 0, 0)
+ data = {"datetime": dt}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"datetime":"2023-01-01T12:00:00"}'
+
+ def test_pydantic_model_serialization(self) -> None:
+ class User(pydantic.BaseModel):
+ first_name: str
+ last_name: str
+ age: int
+
+ model_instance = User(first_name="John", last_name="Kramer", age=83)
+ data = {"model": model_instance}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"first_name":"John","last_name":"Kramer","age":83}}'
+
+ def test_pydantic_model_with_default_values(self) -> None:
+ class User(pydantic.BaseModel):
+ name: str
+ role: str = "user"
+ active: bool = True
+ score: int = 0
+
+ model_instance = User(name="Alice")
+ data = {"model": model_instance}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"name":"Alice"}}'
+
+ def test_pydantic_model_with_default_values_overridden(self) -> None:
+ class User(pydantic.BaseModel):
+ name: str
+ role: str = "user"
+ active: bool = True
+
+ model_instance = User(name="Bob", role="admin", active=False)
+ data = {"model": model_instance}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"name":"Bob","role":"admin","active":false}}'
+
+ def test_pydantic_model_with_alias(self) -> None:
+ class User(pydantic.BaseModel):
+ first_name: str = pydantic.Field(alias="firstName")
+ last_name: str = pydantic.Field(alias="lastName")
+
+ model_instance = User(firstName="John", lastName="Doe")
+ data = {"model": model_instance}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"firstName":"John","lastName":"Doe"}}'
+
+ def test_pydantic_model_with_alias_and_default(self) -> None:
+ class User(pydantic.BaseModel):
+ user_name: str = pydantic.Field(alias="userName")
+ user_role: str = pydantic.Field(default="member", alias="userRole")
+ is_active: bool = pydantic.Field(default=True, alias="isActive")
+
+ model_instance = User(userName="charlie")
+ data = {"model": model_instance}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"userName":"charlie"}}'
+
+ model_with_overrides = User(userName="diana", userRole="admin", isActive=False)
+ data = {"model": model_with_overrides}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"userName":"diana","userRole":"admin","isActive":false}}'
+
+ def test_pydantic_model_with_nested_models_and_defaults(self) -> None:
+ class Address(pydantic.BaseModel):
+ street: str
+ city: str = "Unknown"
+
+ class User(pydantic.BaseModel):
+ name: str
+ address: Address
+ verified: bool = False
+
+ if _compat.PYDANTIC_V1:
+ # to handle forward references in Pydantic v1
+ User.update_forward_refs(**locals()) # type: ignore[reportDeprecated]
+
+ address = Address(street="123 Main St")
+ user = User(name="Diana", address=address)
+ data = {"user": user}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"user":{"name":"Diana","address":{"street":"123 Main St"}}}'
+
+ address_with_city = Address(street="456 Oak Ave", city="Boston")
+ user_verified = User(name="Eve", address=address_with_city, verified=True)
+ data = {"user": user_verified}
+ json_bytes = openapi_dumps(data)
+ assert (
+ json_bytes == b'{"user":{"name":"Eve","address":{"street":"456 Oak Ave","city":"Boston"},"verified":true}}'
+ )
+
+ def test_pydantic_model_with_optional_fields(self) -> None:
+ class User(pydantic.BaseModel):
+ name: str
+ email: Union[str, None]
+ phone: Union[str, None]
+
+ model_with_none = User(name="Eve", email=None, phone=None)
+ data = {"model": model_with_none}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"name":"Eve","email":null,"phone":null}}'
+
+ model_with_values = User(name="Frank", email="frank@example.com", phone=None)
+ data = {"model": model_with_values}
+ json_bytes = openapi_dumps(data)
+ assert json_bytes == b'{"model":{"name":"Frank","email":"frank@example.com","phone":null}}'
From 6681cdf5dde39dcadfd2006194277931dc785d0e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 10 Feb 2026 05:35:15 +0000
Subject: [PATCH 37/45] chore(internal): bump dependencies
---
requirements-dev.lock | 20 ++++++++++----------
requirements.lock | 8 ++++----
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 8a16d0f..d83234d 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -12,14 +12,14 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.13.2
+aiohttp==3.13.3
# via benchify
# via httpx-aiohttp
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
-anyio==4.12.0
+anyio==4.12.1
# via benchify
# via httpx
argcomplete==3.6.3
@@ -31,7 +31,7 @@ attrs==25.4.0
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
-certifi==2025.11.12
+certifi==2026.1.4
# via httpcore
# via httpx
colorlog==6.10.1
@@ -61,7 +61,7 @@ httpx==0.28.1
# via benchify
# via httpx-aiohttp
# via respx
-httpx-aiohttp==0.1.9
+httpx-aiohttp==0.1.12
# via benchify
humanize==4.13.0
# via nox
@@ -69,7 +69,7 @@ idna==3.11
# via anyio
# via httpx
# via yarl
-importlib-metadata==8.7.0
+importlib-metadata==8.7.1
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
@@ -82,14 +82,14 @@ multidict==6.7.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
-nodeenv==1.9.1
+nodeenv==1.10.0
# via pyright
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
-pathspec==0.12.1
+pathspec==1.0.3
# via mypy
platformdirs==4.4.0
# via virtualenv
@@ -115,13 +115,13 @@ python-dateutil==2.9.0.post0
# via time-machine
respx==0.22.0
rich==14.2.0
-ruff==0.14.7
+ruff==0.14.13
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via benchify
time-machine==2.19.0
-tomli==2.3.0
+tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
@@ -141,7 +141,7 @@ typing-extensions==4.15.0
# via virtualenv
typing-inspection==0.4.2
# via pydantic
-virtualenv==20.35.4
+virtualenv==20.36.1
# via nox
yarl==1.22.0
# via aiohttp
diff --git a/requirements.lock b/requirements.lock
index 82f8236..bcb6d79 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -12,21 +12,21 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.13.2
+aiohttp==3.13.3
# via benchify
# via httpx-aiohttp
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
-anyio==4.12.0
+anyio==4.12.1
# via benchify
# via httpx
async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
-certifi==2025.11.12
+certifi==2026.1.4
# via httpcore
# via httpx
distro==1.9.0
@@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via benchify
# via httpx-aiohttp
-httpx-aiohttp==0.1.9
+httpx-aiohttp==0.1.12
# via benchify
idna==3.11
# via anyio
From 4f8e8e8735c4e156faa4d9dba479ca5ad42bf92a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 12 Feb 2026 07:21:35 +0000
Subject: [PATCH 38/45] chore(internal): fix lint error on Python 3.14
---
src/benchify/_utils/_compat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/benchify/_utils/_compat.py b/src/benchify/_utils/_compat.py
index dd70323..2c70b29 100644
--- a/src/benchify/_utils/_compat.py
+++ b/src/benchify/_utils/_compat.py
@@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool:
else:
import types
- return tp is Union or tp is types.UnionType
+ return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap]
def is_typeddict(tp: Type[Any]) -> bool:
From 711513df3f25b7a222c6d6a98843c5a6d9fc1e9c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 13 Feb 2026 04:58:09 +0000
Subject: [PATCH 39/45] chore: format all `api.md` files
---
api.md | 24 +++++-----
pyproject.toml | 2 +-
src/benchify/_client.py | 2 +-
src/benchify/resources/{stacks => }/stacks.py | 47 +++++++------------
src/benchify/resources/stacks/__init__.py | 19 --------
tests/api_resources/stacks/__init__.py | 1 -
6 files changed, 32 insertions(+), 63 deletions(-)
rename src/benchify/resources/{stacks => }/stacks.py (97%)
delete mode 100644 src/benchify/resources/stacks/__init__.py
delete mode 100644 tests/api_resources/stacks/__init__.py
diff --git a/api.md b/api.md
index a8159b8..7ebb7d0 100644
--- a/api.md
+++ b/api.md
@@ -32,18 +32,18 @@ from benchify.types import (
Methods:
-- client.stacks.create(\*\*params) -> StackCreateResponse
-- client.stacks.retrieve(id) -> StackRetrieveResponse
-- client.stacks.update(id, \*\*params) -> StackUpdateResponse
-- client.stacks.bundle_multipart(\*\*params) -> StackBundleMultipartResponse
-- client.stacks.destroy(id) -> None
-- client.stacks.execute_command(id, \*\*params) -> StackExecuteCommandResponse
-- client.stacks.get_logs(id, \*\*params) -> StackGetLogsResponse
-- client.stacks.get_network_info(id) -> StackGetNetworkInfoResponse
-- client.stacks.read_file(id, \*\*params) -> StackReadFileResponse
-- client.stacks.reset(id, \*\*params) -> StackResetResponse
-- client.stacks.wait_for_dev_server_url(id, \*\*params) -> StackWaitForDevServerURLResponse
-- client.stacks.write_file(id, \*\*params) -> StackWriteFileResponse
+- client.stacks.create(\*\*params) -> StackCreateResponse
+- client.stacks.retrieve(id) -> StackRetrieveResponse
+- client.stacks.update(id, \*\*params) -> StackUpdateResponse
+- client.stacks.bundle_multipart(\*\*params) -> StackBundleMultipartResponse
+- client.stacks.destroy(id) -> None
+- client.stacks.execute_command(id, \*\*params) -> StackExecuteCommandResponse
+- client.stacks.get_logs(id, \*\*params) -> StackGetLogsResponse
+- client.stacks.get_network_info(id) -> StackGetNetworkInfoResponse
+- client.stacks.read_file(id, \*\*params) -> StackReadFileResponse
+- client.stacks.reset(id, \*\*params) -> StackResetResponse
+- client.stacks.wait_for_dev_server_url(id, \*\*params) -> StackWaitForDevServerURLResponse
+- client.stacks.write_file(id, \*\*params) -> StackWriteFileResponse
# FixStringLiterals
diff --git a/pyproject.toml b/pyproject.toml
index b9adaaf..4e83e62 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -69,7 +69,7 @@ format = { chain = [
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
-"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
+"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
"format:ruff" = "ruff format"
"lint" = { chain = [
diff --git a/src/benchify/_client.py b/src/benchify/_client.py
index 73c9941..8ba2dff 100644
--- a/src/benchify/_client.py
+++ b/src/benchify/_client.py
@@ -34,8 +34,8 @@
if TYPE_CHECKING:
from .resources import fix, fixer, stacks, validate_template, fix_string_literals, fix_parsing_and_diagnose
from .resources.fixer import FixerResource, AsyncFixerResource
+ from .resources.stacks import StacksResource, AsyncStacksResource
from .resources.fix.fix import FixResource, AsyncFixResource
- from .resources.stacks.stacks import StacksResource, AsyncStacksResource
from .resources.validate_template import ValidateTemplateResource, AsyncValidateTemplateResource
from .resources.fix_string_literals import FixStringLiteralsResource, AsyncFixStringLiteralsResource
from .resources.fix_parsing_and_diagnose import FixParsingAndDiagnoseResource, AsyncFixParsingAndDiagnoseResource
diff --git a/src/benchify/resources/stacks/stacks.py b/src/benchify/resources/stacks.py
similarity index 97%
rename from src/benchify/resources/stacks/stacks.py
rename to src/benchify/resources/stacks.py
index 1cbd35a..13a842d 100644
--- a/src/benchify/resources/stacks/stacks.py
+++ b/src/benchify/resources/stacks.py
@@ -6,7 +6,7 @@
import httpx
-from ...types import (
+from ..types import (
stack_reset_params,
stack_create_params,
stack_update_params,
@@ -17,39 +17,28 @@
stack_bundle_multipart_params,
stack_wait_for_dev_server_url_params,
)
-from ..._types import (
- Body,
- Omit,
- Query,
- Headers,
- NoneType,
- NotGiven,
- FileTypes,
- SequenceNotStr,
- omit,
- not_given,
-)
-from ..._utils import extract_files, maybe_transform, strip_not_given, deepcopy_minimal, async_maybe_transform
-from ..._compat import cached_property
-from ..._resource import SyncAPIResource, AsyncAPIResource
-from ..._response import (
+from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, SequenceNotStr, omit, not_given
+from .._utils import extract_files, maybe_transform, strip_not_given, deepcopy_minimal, async_maybe_transform
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ..._base_client import make_request_options
-from ...types.stack_reset_response import StackResetResponse
-from ...types.stack_create_response import StackCreateResponse
-from ...types.stack_update_response import StackUpdateResponse
-from ...types.stack_get_logs_response import StackGetLogsResponse
-from ...types.stack_retrieve_response import StackRetrieveResponse
-from ...types.stack_read_file_response import StackReadFileResponse
-from ...types.stack_write_file_response import StackWriteFileResponse
-from ...types.stack_execute_command_response import StackExecuteCommandResponse
-from ...types.stack_bundle_multipart_response import StackBundleMultipartResponse
-from ...types.stack_get_network_info_response import StackGetNetworkInfoResponse
-from ...types.stack_wait_for_dev_server_url_response import StackWaitForDevServerURLResponse
+from .._base_client import make_request_options
+from ..types.stack_reset_response import StackResetResponse
+from ..types.stack_create_response import StackCreateResponse
+from ..types.stack_update_response import StackUpdateResponse
+from ..types.stack_get_logs_response import StackGetLogsResponse
+from ..types.stack_retrieve_response import StackRetrieveResponse
+from ..types.stack_read_file_response import StackReadFileResponse
+from ..types.stack_write_file_response import StackWriteFileResponse
+from ..types.stack_execute_command_response import StackExecuteCommandResponse
+from ..types.stack_bundle_multipart_response import StackBundleMultipartResponse
+from ..types.stack_get_network_info_response import StackGetNetworkInfoResponse
+from ..types.stack_wait_for_dev_server_url_response import StackWaitForDevServerURLResponse
__all__ = ["StacksResource", "AsyncStacksResource"]
diff --git a/src/benchify/resources/stacks/__init__.py b/src/benchify/resources/stacks/__init__.py
deleted file mode 100644
index 2027b42..0000000
--- a/src/benchify/resources/stacks/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .stacks import (
- StacksResource,
- AsyncStacksResource,
- StacksResourceWithRawResponse,
- AsyncStacksResourceWithRawResponse,
- StacksResourceWithStreamingResponse,
- AsyncStacksResourceWithStreamingResponse,
-)
-
-__all__ = [
- "StacksResource",
- "AsyncStacksResource",
- "StacksResourceWithRawResponse",
- "AsyncStacksResourceWithRawResponse",
- "StacksResourceWithStreamingResponse",
- "AsyncStacksResourceWithStreamingResponse",
-]
diff --git a/tests/api_resources/stacks/__init__.py b/tests/api_resources/stacks/__init__.py
deleted file mode 100644
index fd8019a..0000000
--- a/tests/api_resources/stacks/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
From 10a1f64f9e861aba06f334c933e9ef716b1ea141 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 20 Feb 2026 06:50:34 +0000
Subject: [PATCH 40/45] chore(internal): remove mock server code
---
scripts/mock | 41 -----------------------------------------
scripts/test | 46 ----------------------------------------------
2 files changed, 87 deletions(-)
delete mode 100755 scripts/mock
diff --git a/scripts/mock b/scripts/mock
deleted file mode 100755
index 0b28f6e..0000000
--- a/scripts/mock
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-cd "$(dirname "$0")/.."
-
-if [[ -n "$1" && "$1" != '--'* ]]; then
- URL="$1"
- shift
-else
- URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)"
-fi
-
-# Check if the URL is empty
-if [ -z "$URL" ]; then
- echo "Error: No OpenAPI spec path/url provided or found in .stats.yml"
- exit 1
-fi
-
-echo "==> Starting mock server with URL ${URL}"
-
-# Run prism mock on the given spec
-if [ "$1" == "--daemon" ]; then
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
-
- # Wait for server to come online
- echo -n "Waiting for server"
- while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
- echo -n "."
- sleep 0.1
- done
-
- if grep -q "✖ fatal" ".prism.log"; then
- cat .prism.log
- exit 1
- fi
-
- echo
-else
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
-fi
diff --git a/scripts/test b/scripts/test
index dbeda2d..39729d0 100755
--- a/scripts/test
+++ b/scripts/test
@@ -4,53 +4,7 @@ set -e
cd "$(dirname "$0")/.."
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[0;33m'
-NC='\033[0m' # No Color
-function prism_is_running() {
- curl --silent "http://localhost:4010" >/dev/null 2>&1
-}
-
-kill_server_on_port() {
- pids=$(lsof -t -i tcp:"$1" || echo "")
- if [ "$pids" != "" ]; then
- kill "$pids"
- echo "Stopped $pids."
- fi
-}
-
-function is_overriding_api_base_url() {
- [ -n "$TEST_API_BASE_URL" ]
-}
-
-if ! is_overriding_api_base_url && ! prism_is_running ; then
- # When we exit this script, make sure to kill the background mock server process
- trap 'kill_server_on_port 4010' EXIT
-
- # Start the dev server
- ./scripts/mock --daemon
-fi
-
-if is_overriding_api_base_url ; then
- echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
- echo
-elif ! prism_is_running ; then
- echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
- echo -e "running against your OpenAPI spec."
- echo
- echo -e "To run the server, pass in the path or url of your OpenAPI"
- echo -e "spec to the prism command:"
- echo
- echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
- echo
-
- exit 1
-else
- echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
- echo
-fi
export DEFER_PYDANTIC_BUILD=false
From 8c7ae7b7ef535ee037dcccd0f074348dd21b7ea1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 20 Feb 2026 06:51:01 +0000
Subject: [PATCH 41/45] chore: update mock server docs
---
CONTRIBUTING.md | 7 -
tests/api_resources/fix/test_standard.py | 16 +-
tests/api_resources/test_fix.py | 16 +-
.../test_fix_parsing_and_diagnose.py | 16 +-
.../api_resources/test_fix_string_literals.py | 16 +-
tests/api_resources/test_fixer.py | 16 +-
tests/api_resources/test_stacks.py | 204 +++++++++---------
tests/api_resources/test_validate_template.py | 16 +-
8 files changed, 150 insertions(+), 157 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ed2e3d1..1a870b9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl
## Running tests
-Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
-
-```sh
-# you will need npm installed
-$ npx prism mock path/to/your/openapi.yml
-```
-
```sh
$ ./scripts/test
```
diff --git a/tests/api_resources/fix/test_standard.py b/tests/api_resources/fix/test_standard.py
index 517b780..1e66760 100644
--- a/tests/api_resources/fix/test_standard.py
+++ b/tests/api_resources/fix/test_standard.py
@@ -17,7 +17,7 @@
class TestStandard:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create(self, client: Benchify) -> None:
standard = client.fix.standard.create(
@@ -35,7 +35,7 @@ def test_method_create(self, client: Benchify) -> None:
)
assert_matches_type(StandardCreateResponse, standard, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_with_all_params(self, client: Benchify) -> None:
standard = client.fix.standard.create(
@@ -78,7 +78,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(StandardCreateResponse, standard, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create(self, client: Benchify) -> None:
response = client.fix.standard.with_raw_response.create(
@@ -100,7 +100,7 @@ def test_raw_response_create(self, client: Benchify) -> None:
standard = response.parse()
assert_matches_type(StandardCreateResponse, standard, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create(self, client: Benchify) -> None:
with client.fix.standard.with_streaming_response.create(
@@ -130,7 +130,7 @@ class TestAsyncStandard:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create(self, async_client: AsyncBenchify) -> None:
standard = await async_client.fix.standard.create(
@@ -148,7 +148,7 @@ async def test_method_create(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StandardCreateResponse, standard, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
standard = await async_client.fix.standard.create(
@@ -191,7 +191,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
)
assert_matches_type(StandardCreateResponse, standard, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
response = await async_client.fix.standard.with_raw_response.create(
@@ -213,7 +213,7 @@ async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
standard = await response.parse()
assert_matches_type(StandardCreateResponse, standard, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create(self, async_client: AsyncBenchify) -> None:
async with async_client.fix.standard.with_streaming_response.create(
diff --git a/tests/api_resources/test_fix.py b/tests/api_resources/test_fix.py
index 4ec279c..21eb207 100644
--- a/tests/api_resources/test_fix.py
+++ b/tests/api_resources/test_fix.py
@@ -17,7 +17,7 @@
class TestFix:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_ai_fallback(self, client: Benchify) -> None:
fix = client.fix.create_ai_fallback(
@@ -31,7 +31,7 @@ def test_method_create_ai_fallback(self, client: Benchify) -> None:
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> None:
fix = client.fix.create_ai_fallback(
@@ -69,7 +69,7 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_ai_fallback(self, client: Benchify) -> None:
response = client.fix.with_raw_response.create_ai_fallback(
@@ -87,7 +87,7 @@ def test_raw_response_create_ai_fallback(self, client: Benchify) -> None:
fix = response.parse()
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_ai_fallback(self, client: Benchify) -> None:
with client.fix.with_streaming_response.create_ai_fallback(
@@ -113,7 +113,7 @@ class TestAsyncFix:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> None:
fix = await async_client.fix.create_ai_fallback(
@@ -127,7 +127,7 @@ async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> N
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_ai_fallback_with_all_params(self, async_client: AsyncBenchify) -> None:
fix = await async_client.fix.create_ai_fallback(
@@ -165,7 +165,7 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
)
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify) -> None:
response = await async_client.fix.with_raw_response.create_ai_fallback(
@@ -183,7 +183,7 @@ async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify
fix = await response.parse()
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_ai_fallback(self, async_client: AsyncBenchify) -> None:
async with async_client.fix.with_streaming_response.create_ai_fallback(
diff --git a/tests/api_resources/test_fix_parsing_and_diagnose.py b/tests/api_resources/test_fix_parsing_and_diagnose.py
index a1ba24b..fa467af 100644
--- a/tests/api_resources/test_fix_parsing_and_diagnose.py
+++ b/tests/api_resources/test_fix_parsing_and_diagnose.py
@@ -17,13 +17,13 @@
class TestFixParsingAndDiagnose:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_detect_issues(self, client: Benchify) -> None:
fix_parsing_and_diagnose = client.fix_parsing_and_diagnose.detect_issues()
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_detect_issues_with_all_params(self, client: Benchify) -> None:
fix_parsing_and_diagnose = client.fix_parsing_and_diagnose.detect_issues(
@@ -43,7 +43,7 @@ def test_method_detect_issues_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_detect_issues(self, client: Benchify) -> None:
response = client.fix_parsing_and_diagnose.with_raw_response.detect_issues()
@@ -53,7 +53,7 @@ def test_raw_response_detect_issues(self, client: Benchify) -> None:
fix_parsing_and_diagnose = response.parse()
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_detect_issues(self, client: Benchify) -> None:
with client.fix_parsing_and_diagnose.with_streaming_response.detect_issues() as response:
@@ -71,13 +71,13 @@ class TestAsyncFixParsingAndDiagnose:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_detect_issues(self, async_client: AsyncBenchify) -> None:
fix_parsing_and_diagnose = await async_client.fix_parsing_and_diagnose.detect_issues()
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_detect_issues_with_all_params(self, async_client: AsyncBenchify) -> None:
fix_parsing_and_diagnose = await async_client.fix_parsing_and_diagnose.detect_issues(
@@ -97,7 +97,7 @@ async def test_method_detect_issues_with_all_params(self, async_client: AsyncBen
)
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_detect_issues(self, async_client: AsyncBenchify) -> None:
response = await async_client.fix_parsing_and_diagnose.with_raw_response.detect_issues()
@@ -107,7 +107,7 @@ async def test_raw_response_detect_issues(self, async_client: AsyncBenchify) ->
fix_parsing_and_diagnose = await response.parse()
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_detect_issues(self, async_client: AsyncBenchify) -> None:
async with async_client.fix_parsing_and_diagnose.with_streaming_response.detect_issues() as response:
diff --git a/tests/api_resources/test_fix_string_literals.py b/tests/api_resources/test_fix_string_literals.py
index 027e3c0..c3d1c2b 100644
--- a/tests/api_resources/test_fix_string_literals.py
+++ b/tests/api_resources/test_fix_string_literals.py
@@ -17,7 +17,7 @@
class TestFixStringLiterals:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create(self, client: Benchify) -> None:
fix_string_literal = client.fix_string_literals.create(
@@ -28,7 +28,7 @@ def test_method_create(self, client: Benchify) -> None:
)
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_with_all_params(self, client: Benchify) -> None:
fix_string_literal = client.fix_string_literals.create(
@@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create(self, client: Benchify) -> None:
response = client.fix_string_literals.with_raw_response.create(
@@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Benchify) -> None:
fix_string_literal = response.parse()
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create(self, client: Benchify) -> None:
with client.fix_string_literals.with_streaming_response.create(
@@ -79,7 +79,7 @@ class TestAsyncFixStringLiterals:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create(self, async_client: AsyncBenchify) -> None:
fix_string_literal = await async_client.fix_string_literals.create(
@@ -90,7 +90,7 @@ async def test_method_create(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
fix_string_literal = await async_client.fix_string_literals.create(
@@ -103,7 +103,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
)
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
response = await async_client.fix_string_literals.with_raw_response.create(
@@ -118,7 +118,7 @@ async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
fix_string_literal = await response.parse()
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create(self, async_client: AsyncBenchify) -> None:
async with async_client.fix_string_literals.with_streaming_response.create(
diff --git a/tests/api_resources/test_fixer.py b/tests/api_resources/test_fixer.py
index 41efee7..a352d59 100644
--- a/tests/api_resources/test_fixer.py
+++ b/tests/api_resources/test_fixer.py
@@ -17,13 +17,13 @@
class TestFixer:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_run(self, client: Benchify) -> None:
fixer = client.fixer.run()
assert_matches_type(FixerRunResponse, fixer, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_run_with_all_params(self, client: Benchify) -> None:
fixer = client.fixer.run(
@@ -49,7 +49,7 @@ def test_method_run_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(FixerRunResponse, fixer, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_run(self, client: Benchify) -> None:
response = client.fixer.with_raw_response.run()
@@ -59,7 +59,7 @@ def test_raw_response_run(self, client: Benchify) -> None:
fixer = response.parse()
assert_matches_type(FixerRunResponse, fixer, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_run(self, client: Benchify) -> None:
with client.fixer.with_streaming_response.run() as response:
@@ -77,13 +77,13 @@ class TestAsyncFixer:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_run(self, async_client: AsyncBenchify) -> None:
fixer = await async_client.fixer.run()
assert_matches_type(FixerRunResponse, fixer, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_run_with_all_params(self, async_client: AsyncBenchify) -> None:
fixer = await async_client.fixer.run(
@@ -109,7 +109,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncBenchify) ->
)
assert_matches_type(FixerRunResponse, fixer, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_run(self, async_client: AsyncBenchify) -> None:
response = await async_client.fixer.with_raw_response.run()
@@ -119,7 +119,7 @@ async def test_raw_response_run(self, async_client: AsyncBenchify) -> None:
fixer = await response.parse()
assert_matches_type(FixerRunResponse, fixer, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_run(self, async_client: AsyncBenchify) -> None:
async with async_client.fixer.with_streaming_response.run() as response:
diff --git a/tests/api_resources/test_stacks.py b/tests/api_resources/test_stacks.py
index 14843f1..cdcc445 100644
--- a/tests/api_resources/test_stacks.py
+++ b/tests/api_resources/test_stacks.py
@@ -29,7 +29,7 @@
class TestStacks:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create(self, client: Benchify) -> None:
stack = client.stacks.create(
@@ -39,7 +39,7 @@ def test_method_create(self, client: Benchify) -> None:
)
assert_matches_type(StackCreateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_with_all_params(self, client: Benchify) -> None:
stack = client.stacks.create(
@@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(StackCreateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.create(
@@ -65,7 +65,7 @@ def test_raw_response_create(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackCreateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.create(
@@ -81,7 +81,7 @@ def test_streaming_response_create(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_retrieve(self, client: Benchify) -> None:
stack = client.stacks.retrieve(
@@ -89,7 +89,7 @@ def test_method_retrieve(self, client: Benchify) -> None:
)
assert_matches_type(StackRetrieveResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_retrieve(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.retrieve(
@@ -101,7 +101,7 @@ def test_raw_response_retrieve(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackRetrieveResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_retrieve(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.retrieve(
@@ -115,7 +115,7 @@ def test_streaming_response_retrieve(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_retrieve(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -123,7 +123,7 @@ def test_path_params_retrieve(self, client: Benchify) -> None:
"",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_update(self, client: Benchify) -> None:
stack = client.stacks.update(
@@ -132,7 +132,7 @@ def test_method_update(self, client: Benchify) -> None:
)
assert_matches_type(StackUpdateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_update_with_all_params(self, client: Benchify) -> None:
stack = client.stacks.update(
@@ -145,7 +145,7 @@ def test_method_update_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(StackUpdateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_update(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.update(
@@ -158,7 +158,7 @@ def test_raw_response_update(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackUpdateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_update(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.update(
@@ -173,7 +173,7 @@ def test_streaming_response_update(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_update(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -182,7 +182,7 @@ def test_path_params_update(self, client: Benchify) -> None:
idempotency_key="key-12345678",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_bundle_multipart(self, client: Benchify) -> None:
stack = client.stacks.bundle_multipart(
@@ -191,7 +191,7 @@ def test_method_bundle_multipart(self, client: Benchify) -> None:
)
assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_bundle_multipart(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.bundle_multipart(
@@ -204,7 +204,7 @@ def test_raw_response_bundle_multipart(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_bundle_multipart(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.bundle_multipart(
@@ -219,7 +219,7 @@ def test_streaming_response_bundle_multipart(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_destroy(self, client: Benchify) -> None:
stack = client.stacks.destroy(
@@ -227,7 +227,7 @@ def test_method_destroy(self, client: Benchify) -> None:
)
assert stack is None
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_destroy(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.destroy(
@@ -239,7 +239,7 @@ def test_raw_response_destroy(self, client: Benchify) -> None:
stack = response.parse()
assert stack is None
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_destroy(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.destroy(
@@ -253,7 +253,7 @@ def test_streaming_response_destroy(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_destroy(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -261,7 +261,7 @@ def test_path_params_destroy(self, client: Benchify) -> None:
"",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_execute_command(self, client: Benchify) -> None:
stack = client.stacks.execute_command(
@@ -270,7 +270,7 @@ def test_method_execute_command(self, client: Benchify) -> None:
)
assert_matches_type(StackExecuteCommandResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_execute_command(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.execute_command(
@@ -283,7 +283,7 @@ def test_raw_response_execute_command(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackExecuteCommandResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_execute_command(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.execute_command(
@@ -298,7 +298,7 @@ def test_streaming_response_execute_command(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_execute_command(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -307,7 +307,7 @@ def test_path_params_execute_command(self, client: Benchify) -> None:
command=["curl", "-s", "https://example.com"],
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_get_logs(self, client: Benchify) -> None:
stack = client.stacks.get_logs(
@@ -315,7 +315,7 @@ def test_method_get_logs(self, client: Benchify) -> None:
)
assert_matches_type(StackGetLogsResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_get_logs_with_all_params(self, client: Benchify) -> None:
stack = client.stacks.get_logs(
@@ -324,7 +324,7 @@ def test_method_get_logs_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(StackGetLogsResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_get_logs(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.get_logs(
@@ -336,7 +336,7 @@ def test_raw_response_get_logs(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackGetLogsResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_get_logs(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.get_logs(
@@ -350,7 +350,7 @@ def test_streaming_response_get_logs(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_get_logs(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -358,7 +358,7 @@ def test_path_params_get_logs(self, client: Benchify) -> None:
id="",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_get_network_info(self, client: Benchify) -> None:
stack = client.stacks.get_network_info(
@@ -366,7 +366,7 @@ def test_method_get_network_info(self, client: Benchify) -> None:
)
assert_matches_type(StackGetNetworkInfoResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_get_network_info(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.get_network_info(
@@ -378,7 +378,7 @@ def test_raw_response_get_network_info(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackGetNetworkInfoResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_get_network_info(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.get_network_info(
@@ -392,7 +392,7 @@ def test_streaming_response_get_network_info(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_get_network_info(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -400,7 +400,7 @@ def test_path_params_get_network_info(self, client: Benchify) -> None:
"",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_read_file(self, client: Benchify) -> None:
stack = client.stacks.read_file(
@@ -409,7 +409,7 @@ def test_method_read_file(self, client: Benchify) -> None:
)
assert_matches_type(StackReadFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_read_file(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.read_file(
@@ -422,7 +422,7 @@ def test_raw_response_read_file(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackReadFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_read_file(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.read_file(
@@ -437,7 +437,7 @@ def test_streaming_response_read_file(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_read_file(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -446,7 +446,7 @@ def test_path_params_read_file(self, client: Benchify) -> None:
path="/workspace/index.html",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_reset(self, client: Benchify) -> None:
stack = client.stacks.reset(
@@ -455,7 +455,7 @@ def test_method_reset(self, client: Benchify) -> None:
)
assert_matches_type(StackResetResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_reset_with_all_params(self, client: Benchify) -> None:
stack = client.stacks.reset(
@@ -465,7 +465,7 @@ def test_method_reset_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(StackResetResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_reset(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.reset(
@@ -478,7 +478,7 @@ def test_raw_response_reset(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackResetResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_reset(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.reset(
@@ -493,7 +493,7 @@ def test_streaming_response_reset(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_reset(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -502,7 +502,7 @@ def test_path_params_reset(self, client: Benchify) -> None:
tarball_base64="tarball_base64",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_wait_for_dev_server_url(self, client: Benchify) -> None:
stack = client.stacks.wait_for_dev_server_url(
@@ -510,7 +510,7 @@ def test_method_wait_for_dev_server_url(self, client: Benchify) -> None:
)
assert_matches_type(StackWaitForDevServerURLResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_wait_for_dev_server_url_with_all_params(self, client: Benchify) -> None:
stack = client.stacks.wait_for_dev_server_url(
@@ -520,7 +520,7 @@ def test_method_wait_for_dev_server_url_with_all_params(self, client: Benchify)
)
assert_matches_type(StackWaitForDevServerURLResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_wait_for_dev_server_url(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.wait_for_dev_server_url(
@@ -532,7 +532,7 @@ def test_raw_response_wait_for_dev_server_url(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackWaitForDevServerURLResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_wait_for_dev_server_url(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.wait_for_dev_server_url(
@@ -546,7 +546,7 @@ def test_streaming_response_wait_for_dev_server_url(self, client: Benchify) -> N
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_wait_for_dev_server_url(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -554,7 +554,7 @@ def test_path_params_wait_for_dev_server_url(self, client: Benchify) -> None:
id="",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_write_file(self, client: Benchify) -> None:
stack = client.stacks.write_file(
@@ -564,7 +564,7 @@ def test_method_write_file(self, client: Benchify) -> None:
)
assert_matches_type(StackWriteFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_write_file(self, client: Benchify) -> None:
response = client.stacks.with_raw_response.write_file(
@@ -578,7 +578,7 @@ def test_raw_response_write_file(self, client: Benchify) -> None:
stack = response.parse()
assert_matches_type(StackWriteFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_write_file(self, client: Benchify) -> None:
with client.stacks.with_streaming_response.write_file(
@@ -594,7 +594,7 @@ def test_streaming_response_write_file(self, client: Benchify) -> None:
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_write_file(self, client: Benchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -610,7 +610,7 @@ class TestAsyncStacks:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.create(
@@ -620,7 +620,7 @@ async def test_method_create(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackCreateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.create(
@@ -632,7 +632,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
)
assert_matches_type(StackCreateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.create(
@@ -646,7 +646,7 @@ async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
stack = await response.parse()
assert_matches_type(StackCreateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.create(
@@ -662,7 +662,7 @@ async def test_streaming_response_create(self, async_client: AsyncBenchify) -> N
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_retrieve(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.retrieve(
@@ -670,7 +670,7 @@ async def test_method_retrieve(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackRetrieveResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.retrieve(
@@ -682,7 +682,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBenchify) -> None:
stack = await response.parse()
assert_matches_type(StackRetrieveResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.retrieve(
@@ -696,7 +696,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBenchify) ->
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_retrieve(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -704,7 +704,7 @@ async def test_path_params_retrieve(self, async_client: AsyncBenchify) -> None:
"",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_update(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.update(
@@ -713,7 +713,7 @@ async def test_method_update(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackUpdateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.update(
@@ -726,7 +726,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncBenchify)
)
assert_matches_type(StackUpdateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_update(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.update(
@@ -739,7 +739,7 @@ async def test_raw_response_update(self, async_client: AsyncBenchify) -> None:
stack = await response.parse()
assert_matches_type(StackUpdateResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_update(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.update(
@@ -754,7 +754,7 @@ async def test_streaming_response_update(self, async_client: AsyncBenchify) -> N
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_update(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -763,7 +763,7 @@ async def test_path_params_update(self, async_client: AsyncBenchify) -> None:
idempotency_key="key-12345678",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_bundle_multipart(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.bundle_multipart(
@@ -772,7 +772,7 @@ async def test_method_bundle_multipart(self, async_client: AsyncBenchify) -> Non
)
assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_bundle_multipart(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.bundle_multipart(
@@ -785,7 +785,7 @@ async def test_raw_response_bundle_multipart(self, async_client: AsyncBenchify)
stack = await response.parse()
assert_matches_type(StackBundleMultipartResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_bundle_multipart(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.bundle_multipart(
@@ -800,7 +800,7 @@ async def test_streaming_response_bundle_multipart(self, async_client: AsyncBenc
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_destroy(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.destroy(
@@ -808,7 +808,7 @@ async def test_method_destroy(self, async_client: AsyncBenchify) -> None:
)
assert stack is None
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_destroy(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.destroy(
@@ -820,7 +820,7 @@ async def test_raw_response_destroy(self, async_client: AsyncBenchify) -> None:
stack = await response.parse()
assert stack is None
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_destroy(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.destroy(
@@ -834,7 +834,7 @@ async def test_streaming_response_destroy(self, async_client: AsyncBenchify) ->
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_destroy(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -842,7 +842,7 @@ async def test_path_params_destroy(self, async_client: AsyncBenchify) -> None:
"",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_execute_command(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.execute_command(
@@ -851,7 +851,7 @@ async def test_method_execute_command(self, async_client: AsyncBenchify) -> None
)
assert_matches_type(StackExecuteCommandResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_execute_command(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.execute_command(
@@ -864,7 +864,7 @@ async def test_raw_response_execute_command(self, async_client: AsyncBenchify) -
stack = await response.parse()
assert_matches_type(StackExecuteCommandResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_execute_command(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.execute_command(
@@ -879,7 +879,7 @@ async def test_streaming_response_execute_command(self, async_client: AsyncBench
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_execute_command(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -888,7 +888,7 @@ async def test_path_params_execute_command(self, async_client: AsyncBenchify) ->
command=["curl", "-s", "https://example.com"],
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_get_logs(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.get_logs(
@@ -896,7 +896,7 @@ async def test_method_get_logs(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackGetLogsResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_get_logs_with_all_params(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.get_logs(
@@ -905,7 +905,7 @@ async def test_method_get_logs_with_all_params(self, async_client: AsyncBenchify
)
assert_matches_type(StackGetLogsResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_get_logs(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.get_logs(
@@ -917,7 +917,7 @@ async def test_raw_response_get_logs(self, async_client: AsyncBenchify) -> None:
stack = await response.parse()
assert_matches_type(StackGetLogsResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_get_logs(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.get_logs(
@@ -931,7 +931,7 @@ async def test_streaming_response_get_logs(self, async_client: AsyncBenchify) ->
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_get_logs(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -939,7 +939,7 @@ async def test_path_params_get_logs(self, async_client: AsyncBenchify) -> None:
id="",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_get_network_info(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.get_network_info(
@@ -947,7 +947,7 @@ async def test_method_get_network_info(self, async_client: AsyncBenchify) -> Non
)
assert_matches_type(StackGetNetworkInfoResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_get_network_info(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.get_network_info(
@@ -959,7 +959,7 @@ async def test_raw_response_get_network_info(self, async_client: AsyncBenchify)
stack = await response.parse()
assert_matches_type(StackGetNetworkInfoResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_get_network_info(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.get_network_info(
@@ -973,7 +973,7 @@ async def test_streaming_response_get_network_info(self, async_client: AsyncBenc
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_get_network_info(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -981,7 +981,7 @@ async def test_path_params_get_network_info(self, async_client: AsyncBenchify) -
"",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_read_file(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.read_file(
@@ -990,7 +990,7 @@ async def test_method_read_file(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackReadFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_read_file(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.read_file(
@@ -1003,7 +1003,7 @@ async def test_raw_response_read_file(self, async_client: AsyncBenchify) -> None
stack = await response.parse()
assert_matches_type(StackReadFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_read_file(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.read_file(
@@ -1018,7 +1018,7 @@ async def test_streaming_response_read_file(self, async_client: AsyncBenchify) -
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_read_file(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -1027,7 +1027,7 @@ async def test_path_params_read_file(self, async_client: AsyncBenchify) -> None:
path="/workspace/index.html",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_reset(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.reset(
@@ -1036,7 +1036,7 @@ async def test_method_reset(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackResetResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_reset_with_all_params(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.reset(
@@ -1046,7 +1046,7 @@ async def test_method_reset_with_all_params(self, async_client: AsyncBenchify) -
)
assert_matches_type(StackResetResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_reset(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.reset(
@@ -1059,7 +1059,7 @@ async def test_raw_response_reset(self, async_client: AsyncBenchify) -> None:
stack = await response.parse()
assert_matches_type(StackResetResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_reset(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.reset(
@@ -1074,7 +1074,7 @@ async def test_streaming_response_reset(self, async_client: AsyncBenchify) -> No
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_reset(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -1083,7 +1083,7 @@ async def test_path_params_reset(self, async_client: AsyncBenchify) -> None:
tarball_base64="tarball_base64",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_wait_for_dev_server_url(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.wait_for_dev_server_url(
@@ -1091,7 +1091,7 @@ async def test_method_wait_for_dev_server_url(self, async_client: AsyncBenchify)
)
assert_matches_type(StackWaitForDevServerURLResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_wait_for_dev_server_url_with_all_params(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.wait_for_dev_server_url(
@@ -1101,7 +1101,7 @@ async def test_method_wait_for_dev_server_url_with_all_params(self, async_client
)
assert_matches_type(StackWaitForDevServerURLResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_wait_for_dev_server_url(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.wait_for_dev_server_url(
@@ -1113,7 +1113,7 @@ async def test_raw_response_wait_for_dev_server_url(self, async_client: AsyncBen
stack = await response.parse()
assert_matches_type(StackWaitForDevServerURLResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_wait_for_dev_server_url(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.wait_for_dev_server_url(
@@ -1127,7 +1127,7 @@ async def test_streaming_response_wait_for_dev_server_url(self, async_client: As
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_wait_for_dev_server_url(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -1135,7 +1135,7 @@ async def test_path_params_wait_for_dev_server_url(self, async_client: AsyncBenc
id="",
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_write_file(self, async_client: AsyncBenchify) -> None:
stack = await async_client.stacks.write_file(
@@ -1145,7 +1145,7 @@ async def test_method_write_file(self, async_client: AsyncBenchify) -> None:
)
assert_matches_type(StackWriteFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_write_file(self, async_client: AsyncBenchify) -> None:
response = await async_client.stacks.with_raw_response.write_file(
@@ -1159,7 +1159,7 @@ async def test_raw_response_write_file(self, async_client: AsyncBenchify) -> Non
stack = await response.parse()
assert_matches_type(StackWriteFileResponse, stack, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_write_file(self, async_client: AsyncBenchify) -> None:
async with async_client.stacks.with_streaming_response.write_file(
@@ -1175,7 +1175,7 @@ async def test_streaming_response_write_file(self, async_client: AsyncBenchify)
assert cast(Any, response.is_closed) is True
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_write_file(self, async_client: AsyncBenchify) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
diff --git a/tests/api_resources/test_validate_template.py b/tests/api_resources/test_validate_template.py
index f0e2c3f..89d783c 100644
--- a/tests/api_resources/test_validate_template.py
+++ b/tests/api_resources/test_validate_template.py
@@ -17,13 +17,13 @@
class TestValidateTemplate:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_validate(self, client: Benchify) -> None:
validate_template = client.validate_template.validate()
assert_matches_type(ValidateTemplateValidateResponse, validate_template, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_validate_with_all_params(self, client: Benchify) -> None:
validate_template = client.validate_template.validate(
@@ -36,7 +36,7 @@ def test_method_validate_with_all_params(self, client: Benchify) -> None:
)
assert_matches_type(ValidateTemplateValidateResponse, validate_template, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_validate(self, client: Benchify) -> None:
response = client.validate_template.with_raw_response.validate()
@@ -46,7 +46,7 @@ def test_raw_response_validate(self, client: Benchify) -> None:
validate_template = response.parse()
assert_matches_type(ValidateTemplateValidateResponse, validate_template, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_validate(self, client: Benchify) -> None:
with client.validate_template.with_streaming_response.validate() as response:
@@ -64,13 +64,13 @@ class TestAsyncValidateTemplate:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_validate(self, async_client: AsyncBenchify) -> None:
validate_template = await async_client.validate_template.validate()
assert_matches_type(ValidateTemplateValidateResponse, validate_template, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_validate_with_all_params(self, async_client: AsyncBenchify) -> None:
validate_template = await async_client.validate_template.validate(
@@ -83,7 +83,7 @@ async def test_method_validate_with_all_params(self, async_client: AsyncBenchify
)
assert_matches_type(ValidateTemplateValidateResponse, validate_template, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_validate(self, async_client: AsyncBenchify) -> None:
response = await async_client.validate_template.with_raw_response.validate()
@@ -93,7 +93,7 @@ async def test_raw_response_validate(self, async_client: AsyncBenchify) -> None:
validate_template = await response.parse()
assert_matches_type(ValidateTemplateValidateResponse, validate_template, path=["response"])
- @pytest.mark.skip(reason="Prism tests are disabled")
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_validate(self, async_client: AsyncBenchify) -> None:
async with async_client.validate_template.with_streaming_response.validate() as response:
From 354018a24317362a1b089ecfc05cb054bf50fe98 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 24 Feb 2026 07:02:10 +0000
Subject: [PATCH 42/45] chore(internal): add request options to SSE classes
---
src/benchify/_response.py | 3 +++
src/benchify/_streaming.py | 11 ++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/benchify/_response.py b/src/benchify/_response.py
index 31df498..4088700 100644
--- a/src/benchify/_response.py
+++ b/src/benchify/_response.py
@@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
),
response=self.http_response,
client=cast(Any, self._client),
+ options=self._options,
),
)
@@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
cast_to=extract_stream_chunk_type(self._stream_cls),
response=self.http_response,
client=cast(Any, self._client),
+ options=self._options,
),
)
@@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
cast_to=cast_to,
response=self.http_response,
client=cast(Any, self._client),
+ options=self._options,
),
)
diff --git a/src/benchify/_streaming.py b/src/benchify/_streaming.py
index 9bc9f8d..5a2a4bb 100644
--- a/src/benchify/_streaming.py
+++ b/src/benchify/_streaming.py
@@ -4,7 +4,7 @@
import json
import inspect
from types import TracebackType
-from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast
+from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast
from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable
import httpx
@@ -13,6 +13,7 @@
if TYPE_CHECKING:
from ._client import Benchify, AsyncBenchify
+ from ._models import FinalRequestOptions
_T = TypeVar("_T")
@@ -22,7 +23,7 @@ class Stream(Generic[_T]):
"""Provides the core interface to iterate over a synchronous stream response."""
response: httpx.Response
-
+ _options: Optional[FinalRequestOptions] = None
_decoder: SSEBytesDecoder
def __init__(
@@ -31,10 +32,12 @@ def __init__(
cast_to: type[_T],
response: httpx.Response,
client: Benchify,
+ options: Optional[FinalRequestOptions] = None,
) -> None:
self.response = response
self._cast_to = cast_to
self._client = client
+ self._options = options
self._decoder = client._make_sse_decoder()
self._iterator = self.__stream__()
@@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]):
"""Provides the core interface to iterate over an asynchronous stream response."""
response: httpx.Response
-
+ _options: Optional[FinalRequestOptions] = None
_decoder: SSEDecoder | SSEBytesDecoder
def __init__(
@@ -94,10 +97,12 @@ def __init__(
cast_to: type[_T],
response: httpx.Response,
client: AsyncBenchify,
+ options: Optional[FinalRequestOptions] = None,
) -> None:
self.response = response
self._cast_to = cast_to
self._client = client
+ self._options = options
self._decoder = client._make_sse_decoder()
self._iterator = self.__stream__()
From 46524de6bbe962ba385dd851f14bad6724a727f0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 24 Feb 2026 07:08:31 +0000
Subject: [PATCH 43/45] chore(internal): make
`test_proxy_environment_variables` more resilient
---
tests/test_client.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/test_client.py b/tests/test_client.py
index 5ee3fb2..edad5b9 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -956,6 +956,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
+ # Delete in case our environment has this set
+ monkeypatch.delenv("HTTP_PROXY", raising=False)
client = DefaultHttpxClient()
@@ -1871,6 +1873,8 @@ async def test_get_platform(self) -> None:
async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
+ # Delete in case our environment has this set
+ monkeypatch.delenv("HTTP_PROXY", raising=False)
client = DefaultAsyncHttpxClient()
From 3e630889266a7141a7c55608e9a82a0a9ba356da Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 25 Feb 2026 06:53:03 +0000
Subject: [PATCH 44/45] chore(internal): make
`test_proxy_environment_variables` more resilient to env
---
tests/test_client.py | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/tests/test_client.py b/tests/test_client.py
index edad5b9..bba541d 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -956,8 +956,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
- # Delete in case our environment has this set
+ # Delete in case our environment has any proxy env vars set
monkeypatch.delenv("HTTP_PROXY", raising=False)
+ monkeypatch.delenv("ALL_PROXY", raising=False)
+ monkeypatch.delenv("NO_PROXY", raising=False)
+ monkeypatch.delenv("http_proxy", raising=False)
+ monkeypatch.delenv("https_proxy", raising=False)
+ monkeypatch.delenv("all_proxy", raising=False)
+ monkeypatch.delenv("no_proxy", raising=False)
client = DefaultHttpxClient()
@@ -1873,8 +1879,14 @@ async def test_get_platform(self) -> None:
async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
- # Delete in case our environment has this set
+ # Delete in case our environment has any proxy env vars set
monkeypatch.delenv("HTTP_PROXY", raising=False)
+ monkeypatch.delenv("ALL_PROXY", raising=False)
+ monkeypatch.delenv("NO_PROXY", raising=False)
+ monkeypatch.delenv("http_proxy", raising=False)
+ monkeypatch.delenv("https_proxy", raising=False)
+ monkeypatch.delenv("all_proxy", raising=False)
+ monkeypatch.delenv("no_proxy", raising=False)
client = DefaultAsyncHttpxClient()
From e9ec00145e286291b7b03591bf8d407b8a3aa2e8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 25 Feb 2026 06:53:30 +0000
Subject: [PATCH 45/45] release: 0.8.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 60 +++++++++++++++++++++++++++++++++++
pyproject.toml | 2 +-
src/benchify/_version.py | 2 +-
4 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 1b77f50..6538ca9 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.7.0"
+ ".": "0.8.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c7574e..3491c8d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,65 @@
# Changelog
+## 0.8.0 (2026-02-25)
+
+Full Changelog: [v0.7.0...v0.8.0](https://github.com/Benchify/benchify-sdk-python/compare/v0.7.0...v0.8.0)
+
+### Features
+
+* **api:** api update ([f17bb88](https://github.com/Benchify/benchify-sdk-python/commit/f17bb881929a54d56e181167942b29966e6239e1))
+* **api:** api update ([988433a](https://github.com/Benchify/benchify-sdk-python/commit/988433adb17c6723785fcc79d112d1235864858e))
+* **api:** api update ([acbdbdd](https://github.com/Benchify/benchify-sdk-python/commit/acbdbddbfc8a6bf0c32339b4a68635500cf7bb73))
+* **api:** api update ([3a56790](https://github.com/Benchify/benchify-sdk-python/commit/3a56790797c67b357047e2cf3ffcc857490e28ea))
+* **api:** api update ([b42ea01](https://github.com/Benchify/benchify-sdk-python/commit/b42ea01495e0b0b68712d3845933a1fd16964e1c))
+* **api:** api update ([db0f873](https://github.com/Benchify/benchify-sdk-python/commit/db0f87365147f7478889d69bf6e14807a878c30a))
+* **api:** manual updates ([c3106c7](https://github.com/Benchify/benchify-sdk-python/commit/c3106c7a605a7dc8711ca81f96863a5e20ae81be))
+* **api:** manual updates ([4e28d49](https://github.com/Benchify/benchify-sdk-python/commit/4e28d49d08c13027bf89b728d8139bf6f8a8e1d4))
+* **api:** manual updates ([9d3bc91](https://github.com/Benchify/benchify-sdk-python/commit/9d3bc91b39de22ee755e7afb125665ac7d62d7c7))
+* **api:** manual updates ([86d3bcd](https://github.com/Benchify/benchify-sdk-python/commit/86d3bcd4b43249e2a7e86723184968be5ac435ae))
+* **api:** manual updates ([676a40a](https://github.com/Benchify/benchify-sdk-python/commit/676a40a70134370ecdca261c9804bbe8939e8d9b))
+* **client:** add custom JSON encoder for extended type support ([11383dd](https://github.com/Benchify/benchify-sdk-python/commit/11383dd4f5806a594f3131f423c4e27c150e3200))
+* **client:** add support for binary request streaming ([2c35482](https://github.com/Benchify/benchify-sdk-python/commit/2c35482f9d7fc168d95dc23b7eff85503739b369))
+
+
+### Bug Fixes
+
+* **client:** loosen auth header validation ([8c22a38](https://github.com/Benchify/benchify-sdk-python/commit/8c22a38c0969909e0aa24b5a856b59a6f506ba9b))
+* compat with Python 3.14 ([75b948d](https://github.com/Benchify/benchify-sdk-python/commit/75b948d1aa8d9bc26eef28b9a71e39ba8b9b2c9a))
+* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([096f67b](https://github.com/Benchify/benchify-sdk-python/commit/096f67bad9d1d7f8e55987ec4a1a15e3a41f224a))
+* **docs:** fix mcp installation instructions for remote servers ([378d782](https://github.com/Benchify/benchify-sdk-python/commit/378d7822f3073a570ddbf64f4a4521a210f0fdf9))
+* ensure streams are always closed ([04ce4dc](https://github.com/Benchify/benchify-sdk-python/commit/04ce4dc454aab185e59aec577c12eb89252045f7))
+* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([fae18b6](https://github.com/Benchify/benchify-sdk-python/commit/fae18b6333d3697845bbf233ea20f55c96202561))
+* use async_to_httpx_files in patch method ([7732f70](https://github.com/Benchify/benchify-sdk-python/commit/7732f705f48dd431880c8ed65708a4cf5b8eff06))
+
+
+### Chores
+
+* add missing docstrings ([2564e8d](https://github.com/Benchify/benchify-sdk-python/commit/2564e8dbd691cd3ca3d47ed56dcdb21c96ef249f))
+* add Python 3.14 classifier and testing ([dc5218c](https://github.com/Benchify/benchify-sdk-python/commit/dc5218cfd1712d7b2bf5671b2985ae12eae6d4b7))
+* **ci:** upgrade `actions/github-script` ([b0d0279](https://github.com/Benchify/benchify-sdk-python/commit/b0d0279c1f1b22a6ff09802fb1d04dd66dd1c0a4))
+* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([69a5933](https://github.com/Benchify/benchify-sdk-python/commit/69a5933b2a0671dd5c4d8a50bfa15e0af49d0a9c))
+* **docs:** use environment variables for authentication in code snippets ([0a45222](https://github.com/Benchify/benchify-sdk-python/commit/0a45222f9cbf46b0319c20b382c4d6bf593c148b))
+* format all `api.md` files ([711513d](https://github.com/Benchify/benchify-sdk-python/commit/711513df3f25b7a222c6d6a98843c5a6d9fc1e9c))
+* **internal:** add `--fix` argument to lint script ([3cfbbf7](https://github.com/Benchify/benchify-sdk-python/commit/3cfbbf79912010c381c10a4ec25c0b96eac0a5f9))
+* **internal:** add missing files argument to base client ([d16ba69](https://github.com/Benchify/benchify-sdk-python/commit/d16ba6962962dd2feb5c5d5d9ef6d102f9f6c576))
+* **internal:** add request options to SSE classes ([354018a](https://github.com/Benchify/benchify-sdk-python/commit/354018a24317362a1b089ecfc05cb054bf50fe98))
+* **internal:** bump dependencies ([6681cdf](https://github.com/Benchify/benchify-sdk-python/commit/6681cdf5dde39dcadfd2006194277931dc785d0e))
+* **internal:** codegen related update ([9c77b1b](https://github.com/Benchify/benchify-sdk-python/commit/9c77b1bc44be11429ef47d60004997ac38ec1daa))
+* **internal:** fix lint error on Python 3.14 ([4f8e8e8](https://github.com/Benchify/benchify-sdk-python/commit/4f8e8e8735c4e156faa4d9dba479ca5ad42bf92a))
+* **internal:** make `test_proxy_environment_variables` more resilient ([46524de](https://github.com/Benchify/benchify-sdk-python/commit/46524de6bbe962ba385dd851f14bad6724a727f0))
+* **internal:** make `test_proxy_environment_variables` more resilient to env ([3e63088](https://github.com/Benchify/benchify-sdk-python/commit/3e630889266a7141a7c55608e9a82a0a9ba356da))
+* **internal:** remove mock server code ([10a1f64](https://github.com/Benchify/benchify-sdk-python/commit/10a1f64f9e861aba06f334c933e9ef716b1ea141))
+* **internal:** update `actions/checkout` version ([1450fbd](https://github.com/Benchify/benchify-sdk-python/commit/1450fbd5b449481749a518d3b8c1410ba8473b05))
+* **package:** drop Python 3.8 support ([f5b1d6b](https://github.com/Benchify/benchify-sdk-python/commit/f5b1d6b16383e15a84a2d3a974d8fa5380a7a676))
+* speedup initial import ([3791761](https://github.com/Benchify/benchify-sdk-python/commit/37917619e0f6b6506afa8251aaa3cb0760907886))
+* update lockfile ([9a95a83](https://github.com/Benchify/benchify-sdk-python/commit/9a95a832a4bf7a3b456c8919e5b28adab0666f90))
+* update mock server docs ([8c7ae7b](https://github.com/Benchify/benchify-sdk-python/commit/8c7ae7b7ef535ee037dcccd0f074348dd21b7ea1))
+
+
+### Documentation
+
+* prominently feature MCP server setup in root SDK readmes ([73251c3](https://github.com/Benchify/benchify-sdk-python/commit/73251c34c556b8010d7c18d8f200930a9e3b1a87))
+
## 0.7.0 (2025-11-07)
Full Changelog: [v0.6.0...v0.7.0](https://github.com/Benchify/benchify-sdk-python/compare/v0.6.0...v0.7.0)
diff --git a/pyproject.toml b/pyproject.toml
index 4e83e62..3aeb034 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "benchify"
-version = "0.7.0"
+version = "0.8.0"
description = "The official Python library for the benchify API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/benchify/_version.py b/src/benchify/_version.py
index a0d071c..4381b8d 100644
--- a/src/benchify/_version.py
+++ b/src/benchify/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "benchify"
-__version__ = "0.7.0" # x-release-please-version
+__version__ = "0.8.0" # x-release-please-version