-
Notifications
You must be signed in to change notification settings - Fork 100
release: 3.6.0 #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stainless-app
wants to merge
7
commits into
main
Choose a base branch
from
release-please--branches--main--changes--next
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
release: 3.6.0 #308
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0c9bb8c
chore: sync repo
stainless-app[bot] 22dd688
feat: Add executionModel serialization to api client
stainless-app[bot] f9017c8
feat(client): add custom JSON encoder for extended type support
stainless-app[bot] 0061b08
Update example link text
monadoid ce4be56
Merge pull request #43 from stainless-sdks/STG-1303
monadoid 555a9c4
chore(internal): codegen related update
stainless-app[bot] 20984a3
release: 3.6.0
stainless-app[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| ".": "3.5.0" | ||
| ".": "3.6.0" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| configured_endpoints: 8 | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-43e6dd4ce19381de488d296e9036fea15bfea9a6f946cf8ccf4e02aecc8fb765.yml | ||
| openapi_spec_hash: f736e7a8acea0d73e1031c86ea803246 | ||
| config_hash: b375728ccf7d33287335852f4f59c293 | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-8fbb3fa8f3a37c1c7408de427fe125aadec49f705e8e30d191601a9b69c4cc41.yml | ||
| openapi_spec_hash: 48b4dfac35a842d7fb0d228caf87544e | ||
| config_hash: 7386d24e2f03a3b2a89b3f6881446348 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
|
||
| __title__ = "stagehand" | ||
| __version__ = "3.5.0" # x-release-please-version | ||
| __version__ = "3.6.0" # x-release-please-version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -225,6 +225,19 @@ def test_method_execute_with_all_params_overload_1(self, client: Stagehand) -> N | |
| id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", | ||
| agent_config={ | ||
| "cua": True, | ||
| "execution_model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Duplicate "mode"/"model" keys in agent_config mean the newly added model configuration is ignored (later keys override earlier ones). Consolidate these entries so the intended values are actually used. Prompt for AI agents |
||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": {"model_name": "openai/gpt-5-nano"}, | ||
| "provider": "openai", | ||
|
|
@@ -308,6 +321,19 @@ def test_method_execute_with_all_params_overload_2(self, client: Stagehand) -> N | |
| id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", | ||
| agent_config={ | ||
| "cua": True, | ||
| "execution_model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": {"model_name": "openai/gpt-5-nano"}, | ||
| "provider": "openai", | ||
|
|
@@ -1058,6 +1084,19 @@ async def test_method_execute_with_all_params_overload_1(self, async_client: Asy | |
| id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", | ||
| agent_config={ | ||
| "cua": True, | ||
| "execution_model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": {"model_name": "openai/gpt-5-nano"}, | ||
| "provider": "openai", | ||
|
|
@@ -1141,6 +1180,19 @@ async def test_method_execute_with_all_params_overload_2(self, async_client: Asy | |
| id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", | ||
| agent_config={ | ||
| "cua": True, | ||
| "execution_model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": { | ||
| "model_name": "openai/gpt-5-nano", | ||
| "api_key": "sk-some-openai-api-key", | ||
| "base_url": "https://api.openai.com/v1", | ||
| "provider": "openai", | ||
| }, | ||
| "mode": "cua", | ||
| "model": {"model_name": "openai/gpt-5-nano"}, | ||
| "provider": "openai", | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: This change introduces a silent failure when
filesare provided along withjson_data(but without amultipart/form-dataheader).Previously,
httpxwould raise aValueErrorbecausejsonandfilescannot be used together. With this change,contentis not set whenfilesare present, causingjson_datato be silently ignored/dropped while the request proceeds with only the files.Restoring the error ensures users are aware of the invalid usage (or missing header).
Prompt for AI agents