## Python SDK Changes:

* `open_router.api_keys.list()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.data.[]` **Changed** **Breaking** ⚠️
* `open_router.guardrails.get()`:  `response.data` **Changed** **Breaking** ⚠️
* `open_router.o_auth.create_auth_code()`:  `response.data.app_id` **Changed** **Breaking** ⚠️
* `open_router.guardrails.bulk_unassign_members()`:  `response.unassigned_count` **Changed** **Breaking** ⚠️
* `open_router.guardrails.bulk_unassign_keys()`:  `response.unassigned_count` **Changed** **Breaking** ⚠️
* `open_router.guardrails.bulk_assign_members()`:  `response.assigned_count` **Changed** **Breaking** ⚠️
* `open_router.guardrails.list_guardrail_member_assignments()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.total_count` **Changed** **Breaking** ⚠️
* `open_router.beta.responses.send()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response` **Changed** **Breaking** ⚠️
* `open_router.analytics.get_user_activity()`: 
  *  `request` **Changed**
  *  `response.data.[]` **Changed** **Breaking** ⚠️
  *  `error.status[404]` **Added**
* `open_router.chat.send()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response` **Changed** **Breaking** ⚠️
* `open_router.embeddings.generate()`: 
  *  `request.provider` **Changed** **Breaking** ⚠️
  *  `response` **Changed** **Breaking** ⚠️
* `open_router.embeddings.list_models()`:  `response.data.[]` **Changed** **Breaking** ⚠️
* `open_router.generations.get_generation()`:  `response.data` **Changed** **Breaking** ⚠️
* `open_router.models.count()`:  `response.data.count` **Changed** **Breaking** ⚠️
* `open_router.models.list()`:  `response.data.[]` **Changed** **Breaking** ⚠️
* `open_router.models.list_for_user()`:  `response.data.[]` **Changed** **Breaking** ⚠️
* `open_router.endpoints.list_zdr_endpoints()`:  `response.data.[]` **Changed** **Breaking** ⚠️
* `open_router.guardrails.bulk_assign_keys()`:  `response.assigned_count` **Changed** **Breaking** ⚠️
* `open_router.guardrails.list_member_assignments()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.total_count` **Changed** **Breaking** ⚠️
* `open_router.api_keys.create()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.data` **Changed** **Breaking** ⚠️
* `open_router.api_keys.update()`: 
  *  `request.limit` **Changed** **Breaking** ⚠️
  *  `response.data` **Changed** **Breaking** ⚠️
* `open_router.api_keys.get()`:  `response.data` **Changed** **Breaking** ⚠️
* `open_router.api_keys.get_current_key_metadata()`:  `response.data` **Changed** **Breaking** ⚠️
* `open_router.guardrails.list()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response` **Changed** **Breaking** ⚠️
* `open_router.guardrails.create()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.data` **Changed** **Breaking** ⚠️
* `open_router.endpoints.list()`:  `response.data` **Changed** **Breaking** ⚠️
* `open_router.guardrails.update()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.data` **Changed** **Breaking** ⚠️
* `open_router.guardrails.list_key_assignments()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.total_count` **Changed** **Breaking** ⚠️
* `open_router.guardrails.list_guardrail_key_assignments()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.total_count` **Changed** **Breaking** ⚠️
* `open_router.organization.list_members()`: **Added**
* `open_router.rerank.rerank()`: **Added**
* `open_router.credits.create_coinbase_charge()`: **Deleted** **Breaking** ⚠️
* `open_router.video_generation.list_videos_models()`: **Added**
* `open_router.video_generation.get_video_content()`: **Added**
* `open_router.video_generation.get_generation()`: **Added**
* `open_router.video_generation.generate()`: **Added**
This commit is contained in:
speakeasybot
2026-04-14 00:40:46 +00:00
parent e8953c70bd
commit 0a9e60481a
440 changed files with 35765 additions and 32535 deletions
+12 -12
View File
@@ -5,15 +5,15 @@ from .chatcontentcachecontrol import (
ChatContentCacheControl,
ChatContentCacheControlTypedDict,
)
from .chatwebsearchservertool import (
ChatWebSearchServerTool,
ChatWebSearchServerToolTypedDict,
)
from .chatwebsearchshorthand import (
ChatWebSearchShorthand,
ChatWebSearchShorthandTypedDict,
)
from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict
from .openrouterwebsearchservertool import (
OpenRouterWebSearchServerTool,
OpenRouterWebSearchServerToolTypedDict,
)
from openrouter.types import (
BaseModel,
Nullable,
@@ -27,9 +27,6 @@ from typing import Any, Dict, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
ChatFunctionToolType = Literal["function",]
class ChatFunctionToolFunctionFunctionTypedDict(TypedDict):
r"""Function definition for tool calling"""
@@ -89,20 +86,23 @@ class ChatFunctionToolFunctionFunction(BaseModel):
return m
ChatFunctionToolType = Literal["function",]
class ChatFunctionToolFunctionTypedDict(TypedDict):
type: ChatFunctionToolType
function: ChatFunctionToolFunctionFunctionTypedDict
r"""Function definition for tool calling"""
type: ChatFunctionToolType
cache_control: NotRequired[ChatContentCacheControlTypedDict]
r"""Cache control for the content part"""
class ChatFunctionToolFunction(BaseModel):
type: ChatFunctionToolType
function: ChatFunctionToolFunctionFunction
r"""Function definition for tool calling"""
type: ChatFunctionToolType
cache_control: Optional[ChatContentCacheControl] = None
r"""Cache control for the content part"""
@@ -111,7 +111,7 @@ ChatFunctionToolTypedDict = TypeAliasType(
"ChatFunctionToolTypedDict",
Union[
DatetimeServerToolTypedDict,
ChatWebSearchServerToolTypedDict,
OpenRouterWebSearchServerToolTypedDict,
ChatFunctionToolFunctionTypedDict,
ChatWebSearchShorthandTypedDict,
],
@@ -123,7 +123,7 @@ ChatFunctionTool = Annotated[
Union[
Annotated[ChatFunctionToolFunction, Tag("function")],
Annotated[DatetimeServerTool, Tag("openrouter:datetime")],
Annotated[ChatWebSearchServerTool, Tag("openrouter:web_search")],
Annotated[OpenRouterWebSearchServerTool, Tag("openrouter:web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview_2025_03_11")],