diff --git a/.stats.yml b/.stats.yml index 2ab7577..09b6953 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 16 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-129afed79c2ff0ae5f660a17af692c0f716b0d61ce62700f107c1d905346793e.yml -openapi_spec_hash: 4bc73b4bfb67367575ac7b582b77d912 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-42c787cc277f295f28cd81a67f7b746cb4d47c3cd4c8a3fb521b03407649ebdd.yml +openapi_spec_hash: 8f514f7881cf54e0aa65a23366df1af0 config_hash: 61e8ad6b1bd35aec38a7b20a2570b967 diff --git a/src/opencode_ai/resources/session.py b/src/opencode_ai/resources/session.py index ff5c246..2434b31 100644 --- a/src/opencode_ai/resources/session.py +++ b/src/opencode_ai/resources/session.py @@ -162,7 +162,6 @@ class SessionResource(SyncAPIResource): model_id: str, parts: Iterable[MessagePartParam], provider_id: str, - session_id: str, # 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,7 +173,7 @@ class SessionResource(SyncAPIResource): Create and send a new message to a session Args: - session_id: Session ID + id: Session ID extra_headers: Send extra headers @@ -193,7 +192,6 @@ class SessionResource(SyncAPIResource): "model_id": model_id, "parts": parts, "provider_id": provider_id, - "session_id": session_id, }, session_chat_params.SessionChatParams, ), @@ -524,7 +522,6 @@ class AsyncSessionResource(AsyncAPIResource): model_id: str, parts: Iterable[MessagePartParam], provider_id: str, - session_id: str, # 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, @@ -536,7 +533,7 @@ class AsyncSessionResource(AsyncAPIResource): Create and send a new message to a session Args: - session_id: Session ID + id: Session ID extra_headers: Send extra headers @@ -555,7 +552,6 @@ class AsyncSessionResource(AsyncAPIResource): "model_id": model_id, "parts": parts, "provider_id": provider_id, - "session_id": session_id, }, session_chat_params.SessionChatParams, ), diff --git a/src/opencode_ai/types/session_chat_params.py b/src/opencode_ai/types/session_chat_params.py index e7b25d3..ab9cc4a 100644 --- a/src/opencode_ai/types/session_chat_params.py +++ b/src/opencode_ai/types/session_chat_params.py @@ -17,6 +17,3 @@ class SessionChatParams(TypedDict, total=False): parts: Required[Iterable[MessagePartParam]] provider_id: Required[Annotated[str, PropertyInfo(alias="providerID")]] - - session_id: Required[Annotated[str, PropertyInfo(alias="sessionID")]] - """Session ID""" diff --git a/tests/api_resources/test_session.py b/tests/api_resources/test_session.py index 9b2e0b5..01e920c 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="sessionID", ) assert_matches_type(Message, session, path=["response"]) @@ -196,7 +195,6 @@ class TestSession: } ], provider_id="providerID", - session_id="sessionID", ) assert response.is_closed is True @@ -217,7 +215,6 @@ class TestSession: } ], provider_id="providerID", - session_id="sessionID", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,7 +238,6 @@ class TestSession: } ], provider_id="providerID", - session_id="sessionID", ) @pytest.mark.skip() @@ -629,7 +625,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="sessionID", ) assert_matches_type(Message, session, path=["response"]) @@ -646,7 +641,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="sessionID", ) assert response.is_closed is True @@ -667,7 +661,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="sessionID", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -691,7 +684,6 @@ class TestAsyncSession: } ], provider_id="providerID", - session_id="sessionID", ) @pytest.mark.skip()