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.16"
".": "0.1.0-alpha.17"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-7270b9e4859010d6680bcc92afcd6f7c679d80a2645f65d7097d19ce2e8cdc5a.yml
openapi_spec_hash: 5fcbfaedebfea62c17c74437a9728b04
config_hash: 38041c37df28a1c4383718e6d148dd0a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-dc00ba583508f76d4bda268d13d363a20df52f9dfd92dfd49d51c26d1fa07b17.yml
openapi_spec_hash: ce12e8bf326729776ad289e5af554dc3
config_hash: 2a888f284ea87b2dfdb7e548938a55ea
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.17 (2025-07-16)

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

### Features

* **api:** api update ([e76b574](https://github.com/sst/opencode-sdk-python/commit/e76b57439c37c0d3514e1497a4d1a78279844bdc))

## 0.1.0-alpha.16 (2025-07-15)

Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/sst/opencode-sdk-python/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ from opencode_ai.types import (
Keybinds,
McpLocal,
McpRemote,
Mode,
Model,
Provider,
ConfigProvidersResponse,
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.16"
version = "0.1.0-alpha.17"
description = "The official Python library for the opencode API"
dynamic = ["readme"]
license = "Apache-2.0"
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.16" # x-release-please-version
__version__ = "0.1.0-alpha.17" # x-release-please-version
29 changes: 7 additions & 22 deletions src/opencode_ai/types/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pydantic import Field as FieldInfo

from .config import ModeUnnamedTypeWithobjectParent0ModeUnnamedTypeWithobjectParent0Item
from . import mode
from .._utils import PropertyInfo
from .._models import BaseModel
from .keybinds import Keybinds
Expand All @@ -21,8 +21,6 @@
"ExperimentalHookSessionCompleted",
"Mcp",
"Mode",
"ModeBuild",
"ModePlan",
"Provider",
"ProviderModels",
"ProviderModelsCost",
Expand Down Expand Up @@ -55,32 +53,16 @@ class Experimental(BaseModel):
Mcp: TypeAlias = Annotated[Union[McpLocal, McpRemote], PropertyInfo(discriminator="type")]


class ModeBuild(BaseModel):
model: Optional[str] = None

prompt: Optional[str] = None

tools: Optional[Dict[str, bool]] = None


class ModePlan(BaseModel):
model: Optional[str] = None

prompt: Optional[str] = None

tools: Optional[Dict[str, bool]] = None


class Mode(BaseModel):
build: Optional[ModeBuild] = None
build: Optional[mode.Mode] = None

plan: Optional[ModePlan] = None
plan: Optional[mode.Mode] = None

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) -> ModeUnnamedTypeWithobjectParent0ModeUnnamedTypeWithobjectParent0Item: ...
def __getattr__(self, attr: str) -> mode.Mode: ...


class ProviderModelsCost(BaseModel):
Expand Down Expand Up @@ -161,6 +143,9 @@ class Config(BaseModel):
keybinds: Optional[Keybinds] = None
"""Custom keybind configurations"""

layout: Optional[Literal["auto", "stretch"]] = None
"""Layout to use for the TUI"""

log_level: Optional[LogLevel] = None
"""Minimum log level to write to log files"""

Expand Down
3 changes: 3 additions & 0 deletions src/opencode_ai/types/keybinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class Keybinds(BaseModel):
session_compact: str
"""Compact the session"""

session_export: str
"""Export session to editor"""

session_interrupt: str
"""Interrupt current session"""

Expand Down
15 changes: 15 additions & 0 deletions src/opencode_ai/types/mode1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, Optional

from .._models import BaseModel

__all__ = ["Mode"]


class Mode(BaseModel):
model: Optional[str] = None

prompt: Optional[str] = None

tools: Optional[Dict[str, bool]] = None