mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
## Python SDK Changes:
* `open_router.beta.responses.send()`: * `request` **Changed** **Breaking** ⚠️ * `response` **Changed** **Breaking** ⚠️ * `open_router.presets.create_presets_responses()`: `request` **Changed** **Breaking** ⚠️ * `open_router.presets.create_presets_chat_completions()`: `request` **Changed** **Breaking** ⚠️ * `open_router.chat.send()`: `request` **Changed** **Breaking** ⚠️ * `open_router.workspaces.set_budget()`: **Added** * `open_router.o_auth.create_auth_code()`: * `request.workspace_id` **Added** * `error.status[403]` **Added** * `open_router.files.download()`: **Added** * `open_router.models.get()`: **Added** * `open_router.workspaces.list_budgets()`: **Added** * `open_router.workspaces.delete_budget()`: **Added** * `open_router.datasets.get_benchmarks_artificial_analysis()`: **Added** * `open_router.beta.analytics.query_analytics()`: `response.data.warnings` **Added** * `open_router.files.delete()`: **Added** * `open_router.files.retrieve()`: **Added** * `open_router.files.upload()`: **Added** * `open_router.embeddings.list_models()`: `response.data.[].benchmarks` **Added** * `open_router.models.list()`: * `request` **Changed** * `response.data.[].benchmarks` **Added** * `open_router.models.list_for_user()`: `response.data.[].benchmarks` **Added** * `open_router.files.list()`: **Added** * `open_router.presets.create_presets_messages()`: `request` **Changed** * `open_router.datasets.get_benchmarks_design_arena()`: **Added**
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .subagentnestedtool import SubagentNestedTool, SubagentNestedToolTypedDict
|
||||
from .subagentreasoning import SubagentReasoning, SubagentReasoningTypedDict
|
||||
from openrouter.types import BaseModel
|
||||
from typing import List, Optional
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
|
||||
|
||||
class SubagentServerToolConfigTypedDict(TypedDict):
|
||||
r"""Configuration for the openrouter:subagent server tool."""
|
||||
|
||||
instructions: NotRequired[str]
|
||||
r"""System instructions for the subagent. When omitted, the subagent responds with no system prompt of its own."""
|
||||
max_completion_tokens: NotRequired[int]
|
||||
r"""Maximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies."""
|
||||
max_tool_calls: NotRequired[int]
|
||||
r"""Maximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Accepted and validated but not yet enforced on the subagent call."""
|
||||
model: NotRequired[str]
|
||||
r"""Slug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model."""
|
||||
reasoning: NotRequired[SubagentReasoningTypedDict]
|
||||
r"""Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking."""
|
||||
temperature: NotRequired[float]
|
||||
r"""Sampling temperature forwarded to the subagent call. When omitted, the provider's default applies."""
|
||||
tools: NotRequired[List[SubagentNestedToolTypedDict]]
|
||||
r"""Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the subagent tool itself."""
|
||||
|
||||
|
||||
class SubagentServerToolConfig(BaseModel):
|
||||
r"""Configuration for the openrouter:subagent server tool."""
|
||||
|
||||
instructions: Optional[str] = None
|
||||
r"""System instructions for the subagent. When omitted, the subagent responds with no system prompt of its own."""
|
||||
|
||||
max_completion_tokens: Optional[int] = None
|
||||
r"""Maximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies."""
|
||||
|
||||
max_tool_calls: Optional[int] = None
|
||||
r"""Maximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Accepted and validated but not yet enforced on the subagent call."""
|
||||
|
||||
model: Optional[str] = None
|
||||
r"""Slug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model."""
|
||||
|
||||
reasoning: Optional[SubagentReasoning] = None
|
||||
r"""Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking."""
|
||||
|
||||
temperature: Optional[float] = None
|
||||
r"""Sampling temperature forwarded to the subagent call. When omitted, the provider's default applies."""
|
||||
|
||||
tools: Optional[List[SubagentNestedTool]] = None
|
||||
r"""Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the subagent tool itself."""
|
||||
Reference in New Issue
Block a user