Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.30"
".": "0.1.0-alpha.31"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-1efc45c35b58e88b0550fbb0c7a204ef66522742f87c9e29c76a18b120c0d945.yml
openapi_spec_hash: 5e15d85e4704624f9b13bae1c71aa416
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-335697785b44f3928145853339226bd5e8accd5199bb9d79e2a3fd2d8ce62a57.yml
openapi_spec_hash: 74fbaad0fa44496d0d8b11d9b98eab03
config_hash: 1ae82c93499b9f0b9ba828b8919f9cb3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.31 (2025-07-24)

Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/sst/opencode-sdk-python/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)

### Features

* **api:** api update ([35553a6](https://github.com/sst/opencode-sdk-python/commit/35553a6e3b3472562cdc38f0399fcd37af1b52e9))

## 0.1.0-alpha.30 (2025-07-23)

Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/sst/opencode-sdk-python/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "opencode-ai"
version = "0.1.0-alpha.30"
version = "0.1.0-alpha.31"
description = "The official Python library for the opencode API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/opencode_ai/_version.py
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__ = "opencode_ai"
__version__ = "0.1.0-alpha.30" # x-release-please-version
__version__ = "0.1.0-alpha.31" # x-release-please-version
2 changes: 2 additions & 0 deletions src/opencode_ai/types/assistant_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class AssistantMessage(BaseModel):

cost: float

mode: str

api_model_id: str = FieldInfo(alias="modelID")

path: Path
Expand Down
16 changes: 15 additions & 1 deletion src/opencode_ai/types/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"ProviderModels",
"ProviderModelsCost",
"ProviderModelsLimit",
"ProviderOptions",
]


Expand Down Expand Up @@ -103,6 +104,19 @@ class ProviderModels(BaseModel):
tool_call: Optional[bool] = None


class ProviderOptions(BaseModel):
api_key: Optional[str] = FieldInfo(alias="apiKey", default=None)

base_url: Optional[str] = FieldInfo(alias="baseURL", default=None)

__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
def __getattr__(self, attr: str) -> object: ...


class Provider(BaseModel):
models: Dict[str, ProviderModels]

Expand All @@ -116,7 +130,7 @@ class Provider(BaseModel):

npm: Optional[str] = None

options: Optional[Dict[str, object]] = None
options: Optional[ProviderOptions] = None


class Config(BaseModel):
Expand Down
15 changes: 15 additions & 0 deletions src/opencode_ai/types/event_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"EventMessageRemovedProperties",
"EventMessagePartUpdated",
"EventMessagePartUpdatedProperties",
"EventMessagePartRemoved",
"EventMessagePartRemovedProperties",
"EventStorageWrite",
"EventStorageWriteProperties",
"EventSessionUpdated",
Expand Down Expand Up @@ -136,6 +138,18 @@ class EventMessagePartUpdated(BaseModel):
type: Literal["message.part.updated"]


class EventMessagePartRemovedProperties(BaseModel):
message_id: str = FieldInfo(alias="messageID")

part_id: str = FieldInfo(alias="partID")


class EventMessagePartRemoved(BaseModel):
properties: EventMessagePartRemovedProperties

type: Literal["message.part.removed"]


class EventStorageWriteProperties(BaseModel):
key: str

Expand Down Expand Up @@ -235,6 +249,7 @@ class EventIdeInstalled(BaseModel):
EventMessageUpdated,
EventMessageRemoved,
EventMessagePartUpdated,
EventMessagePartRemoved,
EventStorageWrite,
EventSessionUpdated,
EventSessionDeleted,
Expand Down