From d19014d3917eaa7d09cd5183092fd8cc49bef34d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 19:40:10 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 4 ++-- src/opencode_ai/resources/session.py | 4 ---- src/opencode_ai/types/session_chat_params.py | 2 -- tests/api_resources/test_session.py | 10 ---------- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5ccf547..0f1eb3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-186e713234760e9f755b35c78809f89378e4f778a451cd5e30649f41489e0bfd.yml -openapi_spec_hash: 5fb2ce9d8055253d597567a8a3293e73 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-d34620b462127c45497743c97fd3569f9e629d9fbd97c0707087eeddbd4b3de1.yml +openapi_spec_hash: 23864c98d555350fe56f1d0e56f205c5 config_hash: a8441af7cb2db855d79fd372ee3b9fb1 diff --git a/src/opencode_ai/resources/session.py b/src/opencode_ai/resources/session.py index 8a3cb46..472dfe0 100644 --- a/src/opencode_ai/resources/session.py +++ b/src/opencode_ai/resources/session.py @@ -161,7 +161,6 @@ class SessionResource(SyncAPIResource): model_id: str, parts: Iterable[session_chat_params.Part], provider_id: str, - session_id: str, message_id: str | NotGiven = NOT_GIVEN, mode: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -194,7 +193,6 @@ class SessionResource(SyncAPIResource): "model_id": model_id, "parts": parts, "provider_id": provider_id, - "session_id": session_id, "message_id": message_id, "mode": mode, }, @@ -529,7 +527,6 @@ class AsyncSessionResource(AsyncAPIResource): model_id: str, parts: Iterable[session_chat_params.Part], provider_id: str, - session_id: str, message_id: str | NotGiven = NOT_GIVEN, mode: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -562,7 +559,6 @@ class AsyncSessionResource(AsyncAPIResource): "model_id": model_id, "parts": parts, "provider_id": provider_id, - "session_id": session_id, "message_id": message_id, "mode": mode, }, diff --git a/src/opencode_ai/types/session_chat_params.py b/src/opencode_ai/types/session_chat_params.py index 1d2bc4b..f9dfee5 100644 --- a/src/opencode_ai/types/session_chat_params.py +++ b/src/opencode_ai/types/session_chat_params.py @@ -19,8 +19,6 @@ class SessionChatParams(TypedDict, total=False): provider_id: Required[Annotated[str, PropertyInfo(alias="providerID")]] - session_id: Required[Annotated[str, PropertyInfo(alias="sessionID")]] - message_id: Annotated[str, PropertyInfo(alias="messageID")] mode: str diff --git a/tests/api_resources/test_session.py b/tests/api_resources/test_session.py index 670c501..644f9a7 100644 --- a/tests/api_resources/test_session.py +++ b/tests/api_resources/test_session.py @@ -179,7 +179,6 @@ class TestSession: } ], provider_id="providerID", - session_id="ses", ) assert_matches_type(AssistantMessage, session, path=["response"]) @@ -202,7 +201,6 @@ class TestSession: } ], provider_id="providerID", - session_id="ses", message_id="msg", mode="mode", ) @@ -221,7 +219,6 @@ class TestSession: } ], provider_id="providerID", - session_id="ses", ) assert response.is_closed is True @@ -242,7 +239,6 @@ class TestSession: } ], provider_id="providerID", - session_id="ses", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -266,7 +262,6 @@ class TestSession: } ], provider_id="providerID", - session_id="ses", ) @pytest.mark.skip() @@ -658,7 +653,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="ses", ) assert_matches_type(AssistantMessage, session, path=["response"]) @@ -681,7 +675,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="ses", message_id="msg", mode="mode", ) @@ -700,7 +693,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="ses", ) assert response.is_closed is True @@ -721,7 +713,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="ses", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -745,7 +736,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="ses", ) @pytest.mark.skip()