diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d61f8031..82c155dc 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: caac864a63590c606b41bec4dc14605c + docChecksum: cf4f2577fb6aa3e9b6c9749ea7a11b7a docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.37 - configChecksum: e6d8b63fc7bd210ad1d1ecc312806321 + releaseVersion: 1.1.38 + configChecksum: 852b26b5c60d1a2e7881165023644389 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 608a46a7-429b-48c6-8699-d16731c878bc - pristine_commit_hash: 2777c48141cbc8fe07e3a3549f8f1af47acc6cfc - pristine_tree_hash: fe3277494b4a63a4d2b33f9d7322733b0dbbf7d8 + generation_id: 68678169-ef2a-428f-be67-92b8f3fd798d + pristine_commit_hash: 516d29e2b74ee99293e1396768864268fe069aed + pristine_tree_hash: c10e55b58ee70ce7d19bfc7581098cd04d82f7b2 features: python: acceptHeaders: 3.0.0 @@ -2094,8 +2094,8 @@ trackedFiles: pristine_git_object: 967c0e2abcf18d52589d674bdf45d0414050b71f docs/components/fusionservertoolconfig.mdx: id: 87976811b0c3 - last_write_checksum: sha1:8a58d7b7e23d6d87245bfffc6cf51b4dfc727a28 - pristine_git_object: 0298d1599c2ccb7b670ffb83f2819a7d4b79882d + last_write_checksum: sha1:bd70befd16ce6827cc72a4f6696107939f09c4ea + pristine_git_object: 8f50dd371eb44e23976c16f907d802f77743b0ec docs/components/fusionservertoolconfigeffort.mdx: id: f5ce0fbc94aa last_write_checksum: sha1:6cefaed8456c5ca47af14755dcfa0df67589f59a @@ -7106,8 +7106,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:38f99adac24471d98fbd954d61a55e27464f26d8 - pristine_git_object: f7c1548e22be50b3785d9b3279ba77126880670a + last_write_checksum: sha1:9bdd842ddb4463c974aecfd9be8c46c99bb68480 + pristine_git_object: 7bcca3ad227ca6e5cc80284e4b3aec20164c90a3 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7134,8 +7134,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:9cb9b8fd59bf4dc8d651655e73cf3a1b3c807e5c - pristine_git_object: 108b9bc8d4f1906d05970781032777fa49d62271 + last_write_checksum: sha1:cccf07809887714e342029e1df6ec25d54eb19e9 + pristine_git_object: 590bde78735894705b30be7be589833ac3180a39 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a @@ -8094,8 +8094,8 @@ trackedFiles: pristine_git_object: 6c8ceeaf14e361cee78935da98ce2da718e7f47a src/openrouter/components/fusionservertoolconfig.py: id: 0d1d229c531f - last_write_checksum: sha1:f08a8e18f7facc1a37b98c22368eae5d61d8431d - pristine_git_object: c79f92d3f403907bd9050057ade40e2c4f873745 + last_write_checksum: sha1:ae916c888591401bd74ff6e66254a8567ef5913b + pristine_git_object: 4f5a6e9c4b941ec790ec5803f3e8f83d5f67060f src/openrouter/components/fusionsource.py: id: ce20a4a9f32f last_write_checksum: sha1:d38e02465da7d7d4caed6a25b3602709236d9ce6 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 87919155..40e1f788 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.37 + version: 1.1.38 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 68c52809..d53c9413 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -8993,7 +8993,7 @@ components: cache_control: $ref: '#/components/schemas/AnthropicCacheControlDirective' max_completion_tokens: - description: 'Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, no cap is sent and each inner call uses its model''s own output limit.' + description: 'Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted.' example: 16384 type: 'integer' max_tool_calls: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2d534b21..d3298f75 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:234f799a1e4397e1de55002eecd2857a73a64b8b2d21866992cc26a54839177d - sourceBlobDigest: sha256:9d4e3131ce755ff88a42ebd99ba033811205107857227d24eb61b72640aed2f7 + sourceRevisionDigest: sha256:ba591e9a42e8b6408d22788658dcdc0fd4d75c65985beed024f52e116587ef4b + sourceBlobDigest: sha256:920f108528fa073be18dea836b219bd2fcadb26e3e70f1dd7fe3701152ea7b77 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:234f799a1e4397e1de55002eecd2857a73a64b8b2d21866992cc26a54839177d - sourceBlobDigest: sha256:9d4e3131ce755ff88a42ebd99ba033811205107857227d24eb61b72640aed2f7 + sourceRevisionDigest: sha256:ba591e9a42e8b6408d22788658dcdc0fd4d75c65985beed024f52e116587ef4b + sourceBlobDigest: sha256:920f108528fa073be18dea836b219bd2fcadb26e3e70f1dd7fe3701152ea7b77 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:da62d7d140e8ebe725de8aa2dd8e45bd967b84464962dd66f1ddf1b2c210665c + codeSamplesRevisionDigest: sha256:f4ed1d1626d5bec0fec777705eb14e798019d4402eb028fb51dfebd4481411a3 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index a2a99aaf..1f1d5bba 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1159,4 +1159,14 @@ Based on: ### Generated - [python v1.1.37] . ### Releases -- [PyPI v1.1.37] https://pypi.org/project/openrouter/1.1.37 - . \ No newline at end of file +- [PyPI v1.1.37] https://pypi.org/project/openrouter/1.1.37 - . + +## 2026-08-09 02:20:28 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.38] . +### Releases +- [PyPI v1.1.38] https://pypi.org/project/openrouter/1.1.38 - . \ No newline at end of file diff --git a/docs/components/fusionservertoolconfig.mdx b/docs/components/fusionservertoolconfig.mdx index 0298d159..8f50dd37 100644 --- a/docs/components/fusionservertoolconfig.mdx +++ b/docs/components/fusionservertoolconfig.mdx @@ -11,7 +11,7 @@ Configuration for the openrouter:fusion server tool. | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `analysis_models` | List[*str*] | :heavy_minus_sign: | Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | | `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} | -| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, no cap is sent and each inner call uses its model's own output limit. | 16384 | +| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted. | 16384 | | `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps each panelist (analysis model) and the analyst 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 4. Capped at 16. | 12 | | `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request. | ~anthropic/claude-opus-latest | | `reasoning` | [Optional[components.FusionServerToolConfigReasoning]](../components/fusionservertoolconfigreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking. | | diff --git a/pyproject.toml b/pyproject.toml index f7c1548e..7bcca3ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.37" +version = "1.1.38" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 108b9bc8..590bde78 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.1.37" +__version__: str = "1.1.38" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.37 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.38 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/fusionservertoolconfig.py b/src/openrouter/components/fusionservertoolconfig.py index c79f92d3..4f5a6e9c 100644 --- a/src/openrouter/components/fusionservertoolconfig.py +++ b/src/openrouter/components/fusionservertoolconfig.py @@ -100,7 +100,7 @@ class FusionServerToolConfigTypedDict(TypedDict): cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict] r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.""" max_completion_tokens: NotRequired[int] - r"""Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, no cap is sent and each inner call uses its model's own output limit.""" + r"""Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted.""" max_tool_calls: NotRequired[int] r"""Maximum number of tool-calling steps each panelist (analysis model) and the analyst 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 4. Capped at 16.""" model: NotRequired[str] @@ -123,7 +123,7 @@ class FusionServerToolConfig(BaseModel): r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.""" max_completion_tokens: Optional[int] = None - r"""Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, no cap is sent and each inner call uses its model's own output limit.""" + r"""Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted.""" max_tool_calls: Optional[int] = None r"""Maximum number of tool-calling steps each panelist (analysis model) and the analyst 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 4. Capped at 16.""" diff --git a/uv.lock b/uv.lock index 9d0a994e..c7dec4e8 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.37" +version = "1.1.38" source = { editable = "." } dependencies = [ { name = "httpcore" },