mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +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:
@@ -1,14 +1,26 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.types import BaseModel, Nullable
|
||||
from typing import Any, Dict, List, Literal, Optional
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
from openrouter.types import BaseModel, Nullable, UnrecognizedStr
|
||||
from openrouter.utils import validate_open_enum
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import Any, Dict, List, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
FusionPluginID = Literal["fusion",]
|
||||
|
||||
|
||||
PresetEnum = Union[
|
||||
Literal[
|
||||
"general-high",
|
||||
"general-budget",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence."""
|
||||
|
||||
|
||||
class FusionPluginToolTypedDict(TypedDict):
|
||||
type: str
|
||||
r"""Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\")."""
|
||||
@@ -34,6 +46,8 @@ class FusionPluginTypedDict(TypedDict):
|
||||
r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16."""
|
||||
model: NotRequired[str]
|
||||
r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset."""
|
||||
preset: NotRequired[PresetEnum]
|
||||
r"""A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence."""
|
||||
tools: NotRequired[List[FusionPluginToolTypedDict]]
|
||||
r"""Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."""
|
||||
|
||||
@@ -53,5 +67,10 @@ class FusionPlugin(BaseModel):
|
||||
model: Optional[str] = None
|
||||
r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset."""
|
||||
|
||||
preset: Annotated[
|
||||
Optional[PresetEnum], PlainValidator(validate_open_enum(False))
|
||||
] = None
|
||||
r"""A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence."""
|
||||
|
||||
tools: Optional[List[FusionPluginTool]] = None
|
||||
r"""Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."""
|
||||
|
||||
Reference in New Issue
Block a user