feat(api): api update

This commit is contained in:
stainless-app[bot] 2025-07-24 01:49:21 +00:00
parent 8b4a7b17fc
commit 4c0117a6c5
4 changed files with 34 additions and 3 deletions

View file

@ -59,6 +59,8 @@ class AssistantMessage(BaseModel):
cost: float
mode: str
api_model_id: str = FieldInfo(alias="modelID")
path: Path

View file

@ -24,6 +24,7 @@ __all__ = [
"ProviderModels",
"ProviderModelsCost",
"ProviderModelsLimit",
"ProviderOptions",
]
@ -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]
@ -116,7 +130,7 @@ class Provider(BaseModel):
npm: Optional[str] = None
options: Optional[Dict[str, object]] = None
options: Optional[ProviderOptions] = None
class Config(BaseModel):

View file

@ -31,6 +31,8 @@ __all__ = [
"EventMessageRemovedProperties",
"EventMessagePartUpdated",
"EventMessagePartUpdatedProperties",
"EventMessagePartRemoved",
"EventMessagePartRemovedProperties",
"EventStorageWrite",
"EventStorageWriteProperties",
"EventSessionUpdated",
@ -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
@ -235,6 +249,7 @@ EventListResponse: TypeAlias = Annotated[
EventMessageUpdated,
EventMessageRemoved,
EventMessagePartUpdated,
EventMessagePartRemoved,
EventStorageWrite,
EventSessionUpdated,
EventSessionDeleted,