diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eb2b64d5..6cfcaf18 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,18 @@ lockVersion: 2.0.0 id: 9eea3e30-2722-4060-973b-57b7f1f75dc0 management: - docChecksum: cbbd5d542938008beaff4d6e86d102cf + docChecksum: 9d769fcdbe0919517da5781c6203f633 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 0.7.82 - configChecksum: 9896dfac8e380632f597de981ab540b2 + releaseVersion: 0.7.83 + configChecksum: 297e142deefe5aa36741cfa89efd87f1 repoURL: https://github.com/OpenRouterTeam/go-sdk.git installationURL: https://github.com/OpenRouterTeam/go-sdk persistentEdits: - generation_id: 969d12aa-86e5-4b5c-aad2-f96610d708d4 - pristine_commit_hash: 1a1e3b1e869279b0fc5dba35488e332ca1b19006 - pristine_tree_hash: f63df7eb6cb60f1c40c8444b9cbbbe0fecd4421c + generation_id: 2b81d95b-9e1e-4064-b273-a8f799939693 + pristine_commit_hash: dff0cca7d565702803d3c4b576df9535b57bc398 + pristine_tree_hash: 0ed20ac7d6a65fe4fbb5d3297f65ef091e1df292 features: go: acceptHeaders: 2.81.2 @@ -2219,8 +2219,8 @@ trackedFiles: pristine_git_object: bb0885efc789e5e1e94c6352d79b2582e83679a6 docs/models/components/fusionplugin.mdx: id: b4f3bf7714aa - last_write_checksum: sha1:e96e3b2067fc4226e59b061e732a53d671e85163 - pristine_git_object: 764cbc8236bb36b63414fc4c7a5f454f60a5e231 + last_write_checksum: sha1:3b96c554b5b0a0cd57059ce2d9143eb1ce201ccd + pristine_git_object: 3123da832ad6a62d29ff78549dfc2c6da6f31c2f docs/models/components/fusionpluginid.mdx: id: 9c0efb1d0838 last_write_checksum: sha1:d7c2fba173c1de6b5117d61388207f413da9e5e4 @@ -4343,8 +4343,8 @@ trackedFiles: pristine_git_object: 94a959054ca3a02742c909f6afffe028b1a7fe05 docs/models/components/presetenum.mdx: id: a729a415db80 - last_write_checksum: sha1:73beb30afaae1224aa606a77c10edb8463e51b8f - pristine_git_object: c6a0c133b9afc8b8926a56629b009c4d805d6eae + last_write_checksum: sha1:70fc61d72df0df09ea300ab676093b85abc3f47a + pristine_git_object: 1ae4dc9a2bd957ec67a8788584459021adcab348 docs/models/components/presetstatus.mdx: id: 63c862c75be9 last_write_checksum: sha1:8f96d9cc23f2c8970163f55ec150cd14b01680ad @@ -7963,8 +7963,8 @@ trackedFiles: pristine_git_object: 1ea5a756a2a475b432b444907ce37354ad60297d models/components/fusionplugin.go: id: ad7a63c688b2 - last_write_checksum: sha1:6299827fc656452ef4dcd862d3c9523cffd779ad - pristine_git_object: 59630f4856ec8e1423bae92715a4db067f12397b + last_write_checksum: sha1:24c572dc888c0021dee2586efb509337852b248b + pristine_git_object: 23600adcd53ee0cd5cfc7690f40f0ad1e3c7a97f models/components/fusionservertoolconfig.go: id: 11a6494de9f7 last_write_checksum: sha1:2add72c1b22a3ae8ab64c8ba9faec17d0c66edce @@ -9919,8 +9919,8 @@ trackedFiles: pristine_git_object: 5e3a2cdf8cb4ed4f5378b712293cba9c82074f16 openrouter.go: id: 207ad004b774 - last_write_checksum: sha1:529da82ef45a5110d55f6ddd1f544f69bb0d6e94 - pristine_git_object: 893e42a1d966b8d7a649b3a405af7483bf808de5 + last_write_checksum: sha1:8f8f6fa6bac3925a84b7c62d5c8b3c3f19ae2d75 + pristine_git_object: db4039e3426be1bca5728cfabfb92af348ed3366 optionalnullable/optionalnullable.go: id: ce60f259ead3 last_write_checksum: sha1:d6aff1a420c31e025ea21d46cf056e305ae76fe8 @@ -11846,6 +11846,3 @@ examples: "503": application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Go SDK Changes: - * `OpenRouter.Images.ListModelEndpoints()`: `response.Endpoints[].Pricing[].Unit.Enum(request)` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5526ec2b..647082ce 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true go: - version: 0.7.82 + version: 0.7.83 additionalDependencies: {} baseErrorName: OpenRouterError clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index c84b0f25..97dff940 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -9128,7 +9128,7 @@ components: model: '~anthropic/claude-opus-latest' properties: analysis_models: - description: 'Slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).' example: - '~anthropic/claude-opus-latest' - '~openai/gpt-latest' @@ -9139,24 +9139,24 @@ components: minItems: 1 type: 'array' enabled: - description: 'Set to false to disable the fusion plugin for this request. Defaults to true.' + description: 'Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true.' type: 'boolean' id: enum: - 'fusion' type: 'string' max_tool_calls: - description: '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.' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the 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.' example: 12 maximum: 16 minimum: 1 type: 'integer' model: - description: 'Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.' example: '~anthropic/claude-opus-latest' type: 'string' preset: - description: 'A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset''s analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.' + description: 'Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset''s analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.' enum: - 'general-high' - 'general-budget' @@ -9165,7 +9165,7 @@ components: type: 'string' x-speakeasy-unknown-values: allow tools: - description: 'Server tools available to panelist and analyst 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).' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst 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).' example: - parameters: excluded_domains: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 65f37f81..b2342f5b 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:1d4902bd89e36b96fa401284367d9fb8810a8171bc882d764639ebcf0235b798 - sourceBlobDigest: sha256:361e32c3d8c6135da4baffc0b72c358a21d8f447ca0ad02112b7e6948519749e + sourceRevisionDigest: sha256:bba9fa4a2886c2f0a7b9f1f640fea7fa2f52fb7d4a852fe37539650094e1eaa7 + sourceBlobDigest: sha256:0e2b628b896e777c0c20607bb0cbffa0f3a2c594f3263f82d1e7f1800a255f0f tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:1d4902bd89e36b96fa401284367d9fb8810a8171bc882d764639ebcf0235b798 - sourceBlobDigest: sha256:361e32c3d8c6135da4baffc0b72c358a21d8f447ca0ad02112b7e6948519749e + sourceRevisionDigest: sha256:bba9fa4a2886c2f0a7b9f1f640fea7fa2f52fb7d4a852fe37539650094e1eaa7 + sourceBlobDigest: sha256:0e2b628b896e777c0c20607bb0cbffa0f3a2c594f3263f82d1e7f1800a255f0f codeSamplesNamespace: open-router-chat-completions-api-go-code-samples - codeSamplesRevisionDigest: sha256:f93af3d02f9e52ab116f51aa1c2c6d4594f5729abb263359e55ab226e67fe869 + codeSamplesRevisionDigest: sha256:29555625c5a186bb503cc2124dcadcca89c2c4d91550b6195b61ea8f3c5a0ca9 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/OVERVIEW.md b/OVERVIEW.md index 9ee8ad87..dafc40f3 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -117,7 +117,7 @@ go get github.com/OpenRouterTeam/go-sdk For beta releases, pin an explicit version: ```bash -go get github.com/OpenRouterTeam/go-sdk@v0.7.82 +go get github.com/OpenRouterTeam/go-sdk@v0.7.83 ``` **Requirements:** Go 1.25 or higher diff --git a/README.md b/README.md index eb111b18..a674da08 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ To learn more, see the [API Reference](https://openrouter.ai/docs/sdks/go/api-re > This SDK is in **beta**. Pin to a specific version to avoid unexpected breaking changes: > > ```bash -> go get github.com/OpenRouterTeam/go-sdk@v0.7.82 +> go get github.com/OpenRouterTeam/go-sdk@v0.7.83 > ``` diff --git a/RELEASES.md b/RELEASES.md index 5d16dc06..a47b74b1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1348,4 +1348,14 @@ Based on: ### Generated - [go v0.7.82] . ### Releases -- [Go v0.7.82] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.7.82 - . \ No newline at end of file +- [Go v0.7.82] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.7.82 - . + +## 2026-08-25 22:46:34 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.7.83] . +### Releases +- [Go v0.7.83] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.7.83 - . \ No newline at end of file diff --git a/doc.go b/doc.go index 5b8267c3..02500b7d 100644 --- a/doc.go +++ b/doc.go @@ -6,7 +6,7 @@ provider selection, and unified billing. This SDK is in beta. Pin to a specific module version to avoid unexpected breaking changes: - go get github.com/OpenRouterTeam/go-sdk@v0.7.82 + go get github.com/OpenRouterTeam/go-sdk@v0.7.83 For full API documentation, visit: https://openrouter.ai/docs/client-sdks/go/overview diff --git a/docs/models/components/fusionplugin.mdx b/docs/models/components/fusionplugin.mdx index 764cbc82..3123da83 100644 --- a/docs/models/components/fusionplugin.mdx +++ b/docs/models/components/fusionplugin.mdx @@ -4,12 +4,12 @@ title: "FusionPlugin" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `AnalysisModels` | []`string` | :heavy_minus_sign: | Slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | -| `Enabled` | `*bool` | :heavy_minus_sign: | Set to false to disable the fusion plugin for this request. Defaults to true. | | -| `ID` | [components.FusionPluginID](../../models/components/fusionpluginid.mdx) | :heavy_check_mark: | N/A | | -| `MaxToolCalls` | `*int64` | :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` | `*string` | :heavy_minus_sign: | Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. | ~anthropic/claude-opus-latest | -| `Preset` | [*components.PresetEnum](../../models/components/presetenum.mdx) | :heavy_minus_sign: | A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. | general-high | -| `Tools` | [][components.FusionPluginTool](../../models/components/fusionplugintool.mdx) | :heavy_minus_sign: | Server tools available to panelist and analyst 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). | [
\{
"parameters": \{
"excluded_domains": [
"example.com"
]
},
"type": "openrouter:web_search"
},
\{
"type": "openrouter:web_fetch"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AnalysisModels` | []`string` | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | +| `Enabled` | `*bool` | :heavy_minus_sign: | Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true. | | +| `ID` | [components.FusionPluginID](../../models/components/fusionpluginid.mdx) | :heavy_check_mark: | N/A | | +| `MaxToolCalls` | `*int64` | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the 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` | `*string` | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. | ~anthropic/claude-opus-latest | +| `Preset` | [*components.PresetEnum](../../models/components/presetenum.mdx) | :heavy_minus_sign: | Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. | general-high | +| `Tools` | [][components.FusionPluginTool](../../models/components/fusionplugintool.mdx) | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst 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). | [
\{
"parameters": \{
"excluded_domains": [
"example.com"
]
},
"type": "openrouter:web_search"
},
\{
"type": "openrouter:web_fetch"
}
] | \ No newline at end of file diff --git a/docs/models/components/presetenum.mdx b/docs/models/components/presetenum.mdx index c6a0c133..1ae4dc9a 100644 --- a/docs/models/components/presetenum.mdx +++ b/docs/models/components/presetenum.mdx @@ -2,7 +2,7 @@ title: "PresetEnum" --- -A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. +Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. ## Example Usage diff --git a/example_test.go b/example_test.go index 7888f0b7..1a0cb7c1 100644 --- a/example_test.go +++ b/example_test.go @@ -18,7 +18,7 @@ func ExampleNew() { openrouter.WithSecurity("your-api-key"), ) fmt.Println(sdk.SDKVersion) - // Output: 0.7.82 + // Output: 0.7.83 } // Example demonstrates basic usage of the OpenRouter SDK for chat completions. diff --git a/examples/README.md b/examples/README.md index 872dde3b..cde5acaf 100644 --- a/examples/README.md +++ b/examples/README.md @@ -43,7 +43,7 @@ cd ../generation && go run . Each example pins a released SDK version in `go.mod`: ```go -require github.com/OpenRouterTeam/go-sdk v0.7.82 +require github.com/OpenRouterTeam/go-sdk v0.7.83 ``` This should match the version in [README.md](../README.md) and `.speakeasy/gen.lock` `releaseVersion`. CI runs `scripts/bump-examples.sh` after releases to keep these in sync. @@ -51,7 +51,7 @@ This should match the version in [README.md](../README.md) and `.speakeasy/gen.l To use a different version: ```bash -go get github.com/OpenRouterTeam/go-sdk@v0.7.82 +go get github.com/OpenRouterTeam/go-sdk@v0.7.83 go run . ``` diff --git a/models/components/fusionplugin.go b/models/components/fusionplugin.go index 59630f48..23600adc 100644 --- a/models/components/fusionplugin.go +++ b/models/components/fusionplugin.go @@ -32,7 +32,7 @@ func (e *FusionPluginID) UnmarshalJSON(data []byte) error { } } -// PresetEnum - A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. +// PresetEnum - Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. type PresetEnum string const ( @@ -486,18 +486,18 @@ func (f *FusionPluginTool) GetType() string { } type FusionPlugin struct { - // Slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). + // For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). AnalysisModels []string `json:"analysis_models,omitzero"` - // Set to false to disable the fusion plugin for this request. Defaults to true. + // Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true. Enabled *bool `json:"enabled,omitzero"` ID FusionPluginID `json:"id"` - // 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. + // For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the 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. MaxToolCalls *int64 `json:"max_tool_calls,omitzero"` - // Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. + // For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. Model *string `json:"model,omitzero"` - // A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. + // Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. Preset *PresetEnum `json:"preset,omitzero"` - // Server tools available to panelist and analyst 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). + // For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst 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). Tools []FusionPluginTool `json:"tools,omitzero"` } diff --git a/openrouter.go b/openrouter.go index 893e42a1..db4039e3 100644 --- a/openrouter.go +++ b/openrouter.go @@ -205,9 +205,9 @@ func WithTimeout(timeout time.Duration) SDKOption { // New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *OpenRouter { sdk := &OpenRouter{ - SDKVersion: "0.7.82", + SDKVersion: "0.7.83", sdkConfiguration: config.SDKConfiguration{ - UserAgent: "speakeasy-sdk/go 0.7.82 2.914.0 1.0.0 github.com/OpenRouterTeam/go-sdk", + UserAgent: "speakeasy-sdk/go 0.7.83 2.914.0 1.0.0 github.com/OpenRouterTeam/go-sdk", Globals: globals.Globals{}, ServerList: ServerList, },