feat(api): api update

This commit is contained in:
stainless-app[bot] 2025-07-16 14:53:47 +00:00
parent 94575f6882
commit f1d9d8f9ec
5 changed files with 29 additions and 25 deletions

View file

@ -1,4 +1,4 @@
configured_endpoints: 22 configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-7270b9e4859010d6680bcc92afcd6f7c679d80a2645f65d7097d19ce2e8cdc5a.yml openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-dc00ba583508f76d4bda268d13d363a20df52f9dfd92dfd49d51c26d1fa07b17.yml
openapi_spec_hash: 5fcbfaedebfea62c17c74437a9728b04 openapi_spec_hash: ce12e8bf326729776ad289e5af554dc3
config_hash: 38041c37df28a1c4383718e6d148dd0a config_hash: 2a888f284ea87b2dfdb7e548938a55ea

1
api.md
View file

@ -74,6 +74,7 @@ from opencode_ai.types import (
Keybinds, Keybinds,
McpLocal, McpLocal,
McpRemote, McpRemote,
Mode,
Model, Model,
Provider, Provider,
ConfigProvidersResponse, ConfigProvidersResponse,

View file

@ -5,7 +5,7 @@ from typing_extensions import Literal, Annotated, TypeAlias
from pydantic import Field as FieldInfo from pydantic import Field as FieldInfo
from .config import ModeUnnamedTypeWithobjectParent0ModeUnnamedTypeWithobjectParent0Item from . import mode
from .._utils import PropertyInfo from .._utils import PropertyInfo
from .._models import BaseModel from .._models import BaseModel
from .keybinds import Keybinds from .keybinds import Keybinds
@ -21,8 +21,6 @@ __all__ = [
"ExperimentalHookSessionCompleted", "ExperimentalHookSessionCompleted",
"Mcp", "Mcp",
"Mode", "Mode",
"ModeBuild",
"ModePlan",
"Provider", "Provider",
"ProviderModels", "ProviderModels",
"ProviderModelsCost", "ProviderModelsCost",
@ -55,32 +53,16 @@ class Experimental(BaseModel):
Mcp: TypeAlias = Annotated[Union[McpLocal, McpRemote], PropertyInfo(discriminator="type")] 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): class Mode(BaseModel):
build: Optional[ModeBuild] = None build: Optional[mode.Mode] = None
plan: Optional[ModePlan] = None plan: Optional[mode.Mode] = None
if TYPE_CHECKING: if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted. # Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g. # To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')` # `getattr(obj, '$type')`
def __getattr__(self, attr: str) -> ModeUnnamedTypeWithobjectParent0ModeUnnamedTypeWithobjectParent0Item: ... def __getattr__(self, attr: str) -> mode.Mode: ...
class ProviderModelsCost(BaseModel): class ProviderModelsCost(BaseModel):
@ -161,6 +143,9 @@ class Config(BaseModel):
keybinds: Optional[Keybinds] = None keybinds: Optional[Keybinds] = None
"""Custom keybind configurations""" """Custom keybind configurations"""
layout: Optional[Literal["auto", "stretch"]] = None
"""Layout to use for the TUI"""
log_level: Optional[LogLevel] = None log_level: Optional[LogLevel] = None
"""Minimum log level to write to log files""" """Minimum log level to write to log files"""

View file

@ -86,6 +86,9 @@ class Keybinds(BaseModel):
session_compact: str session_compact: str
"""Compact the session""" """Compact the session"""
session_export: str
"""Export session to editor"""
session_interrupt: str session_interrupt: str
"""Interrupt current session""" """Interrupt current session"""

View file

@ -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