chore: 🐝 Update SDK - Generate SDK 0.5.1#297
Conversation
* `OpenRouter.Benchmarks.GetBenchmarks()`: **Added** * `OpenRouter.Workspaces.ListBudgets()`: **Added** * `OpenRouter.Workspaces.DeleteBudget()`: **Added** * `OpenRouter.Workspaces.SetBudget()`: **Added** * `OpenRouter.Datasets.GetBenchmarksArtificialAnalysis()`: **Removed** (Breaking⚠️ ) * `OpenRouter.Datasets.GetBenchmarksDesignArena()`: **Removed** (Breaking⚠️ ) * `OpenRouter.Beta.Analytics.QueryAnalytics()`: `response.Data.Warnings` **Added** * `OpenRouter.Beta.Responses.Send()`: `request.ResponsesRequest` **Changed** * `OpenRouter.Chat.Send()`: * `request.ChatRequest.Plugins[].union(fusion).Preset` **Added** * `response` **Changed** * `OpenRouter.Embeddings.ListModels()`: `response.Data[].Reasoning` **Added** * `OpenRouter.Models.Get()`: `response.Data.Reasoning` **Added** * `OpenRouter.Models.List()`: `response.Data[].Reasoning` **Added** * `OpenRouter.Models.ListForUser()`: `response.Data[].Reasoning` **Added** * `OpenRouter.Presets.CreatePresetsChatCompletions()`: * `request.ChatRequest.Plugins[].union(fusion).Preset` **Added** * `OpenRouter.Presets.CreatePresetsMessages()`: `request.MessagesRequest` **Changed** * `OpenRouter.Presets.CreatePresetsResponses()`: `request.ResponsesRequest` **Changed**
6d27191 to
edfa291
Compare
There was a problem hiding this comment.
Perry's Review
Automated Speakeasy SDK regen bumping the Go SDK to 0.5.1 — adds Benchmarks.GetBenchmarks plus workspace-budget operations, removes the two Datasets.GetBenchmarks{ArtificialAnalysis,DesignArena} methods, and threads new response fields through the generated models.
Verdict: 🔁 Needs changes
Details
Risk: 🟡 Medium
CI: no checks reported on the head commit
The headline concern is that this regen ran on an older Speakeasy toolchain than the previous release: speakeasyVersion 1.778.0 → 1.761.1 and generationVersion 2.904.2 → 2.879.6 (see .speakeasy/gen.lock and .speakeasy/workflow.lock). That backward step is what reverts the go directive (1.25.10 → 1.22), the devcontainer image (go 1.25-bookworm → 1.22-bullseye), the internal union pointer-deref logic, and deletes the non-pointer-union-variants test case. Regenerating on the current CLI (>= 1.778.0) before merge would avoid shipping a downgraded artifact.
Findings (see inline comments):
- 🔴
.speakeasy/workflow.lock:1— generator downgraded vs the 0.5.0 release; reverts go.mod, devcontainer, and union utils - 🟡
go.mod:3— go directive reverted 1.25.10 → 1.22 while the README still states "requires Go 1.25 or higher" (manifest/doc drift) - 🟡
README.md:450— retry example imports a bare relative path instead of the fully-qualified module path; the documented snippet won't compile
Codex (HEAVY_SECONDARY_MODEL): 2 findings surfaced — the README:450 import (kept, corroborates Perry) and a datasets.go nil-request pagination panic (discarded: that code is byte-identical on main, out of this PR's differential scope).
Research: Per Speakeasy versioning docs, version bumps are driven only by info.version / document checksum / generator-feature changes — operation-level removals are not analyzed, so the two breaking method removals legitimately ship under a patch bump. Consumers pinning with a caret/tilde range will still be silently upgraded into the breaking change; a minor/major bump would be safer but is a generator-config decision, not a code defect.
Security: no concerns — secret-pattern grep on added lines clean; no auth/credential/streaming/tenant-isolation surface touched. Generated status-code error lists gained explicit codes (e.g. guardrails 401/404, datasets 429) — additive, no safeguard removed.
Test coverage: internal utils tests pass (go test ./internal/... green) and go build ./... is clean. Net loss of one union test case due to the generator downgrade.
Unresolved threads: none
Scope: first review (full)
Review: tier=large · model=claude-opus-latest · score=83.4
| @@ -1,20 +1,20 @@ | |||
| speakeasyVersion: 1.778.0 | |||
| speakeasyVersion: 1.761.1 | |||
There was a problem hiding this comment.
[blocker] Generator downgraded vs the 0.5.0 release — this regen is a backward step in the Speakeasy toolchain
Details
Why: speakeasyVersion drops 1.778.0 → 1.761.1 and generationVersion drops 2.904.2 → 2.879.6 (also in .speakeasy/gen.lock). Because Speakeasy's output is a pure function of the generator version + OpenAPI doc, running an older CLI than the previously released 0.5.0 regenerates older code. Concretely this push reverts:
go.mod:go 1.25.10→go 1.22.devcontainer/devcontainer.json:go:1-1.25-bookworm→go:1-1.22-bullseyeinternal/utils/union.go: the pointer-deref + nil-guard logic added in 0.5.0 (activeVariant.Type.Elem()/variantVal.Elem()) reverts to the non-.Elem()form- deletes
TestPickBestUnionCandidate_NonPointerUnionVariantsfrominternal/utils/union_test.go
The SDK still builds and internal/utils tests pass, so this is not a runtime break — but publishing 0.5.1 from a downgraded generator means losing the union-handling fix and Go-version bump that 0.5.0 shipped.
Fix: Re-run the Speakeasy workflow on the current CLI (>= 1.778.0, the version that produced 0.5.0) so the regen moves the toolchain forward rather than back, then re-open this PR with the resulting diff.
Prompt for agents
The Speakeasy generator version recorded in .speakeasy/workflow.lock and .speakeasy/gen.lock was downgraded (speakeasyVersion 1.778.0 -> 1.761.1, generationVersion 2.904.2 -> 2.879.6). This reverted go.mod (go 1.25.10 -> 1.22), .devcontainer/devcontainer.json (go 1.25-bookworm -> 1.22-bullseye), internal/utils/union.go pointer-deref logic, and deleted TestPickBestUnionCandidate_NonPointerUnionVariants. Re-run the Speakeasy generation workflow pinned to CLI >= 1.778.0 (the version that produced the 0.5.0 release) so the 0.5.1 regen steps the toolchain forward, then replace this PR's diff with the new output.
Reviewed at edfa291
| module github.com/OpenRouterTeam/go-sdk | ||
|
|
||
| go 1.25.10 | ||
| go 1.22 |
There was a problem hiding this comment.
[suggestion] go 1.22 reverts the Go directive while the README still requires Go 1.25 — manifest/doc drift
Details
Why: The go directive drops from 1.25.10 (on main) to 1.22, but README.md (untouched in the relevant section) still states "This SDK requires Go 1.25 or higher." Consumers reading the README will pin Go 1.25 while the module only requires 1.22 — and anyone who was relying on a 1.25-only stdlib feature would now silently build against 1.22. This is a side effect of the generator downgrade in .speakeasy/workflow.lock; fixing that finding will likely resolve this one too.
Fix: Regenerate on the current Speakeasy CLI so the go directive returns to 1.25.x, or — if 1.22 is intentional — update the README Requirements section to match.
Prompt for agents
go.mod line 3 declares `go 1.22` but README.md still says "This SDK requires Go 1.25 or higher." These must agree. Preferred fix: regenerate the SDK on Speakeasy CLI >= 1.778.0 so go.mod returns to go 1.25.x (matching the prior 0.5.0 release and the README). If targeting 1.22 is deliberate, instead update the README Requirements section to "requires Go 1.22 or higher".
Reviewed at edfa291
| "github.com/OpenRouterTeam/go-sdk/models/operations" | ||
| "github.com/OpenRouterTeam/go-sdk/retry" | ||
| "log" | ||
| "models/operations" |
There was a problem hiding this comment.
[suggestion] Retry example imports a bare models/operations path — the documented snippet won't compile
| "models/operations" | |
| "github.com/OpenRouterTeam/go-sdk/models/operations" |
Details
Why: This import was the fully-qualified github.com/OpenRouterTeam/go-sdk/models/operations on main and got rewritten to the bare relative path models/operations in this regen. Go does not resolve bare relative import paths, so go build on the documented retry example fails with package models/operations is not in std. Codex flagged the same line.
Reviewed at edfa291
SDK update
Versioning
Version Bump Type: [patch] - 🤖 (automated)
Tip
If updates to your OpenAPI document introduce breaking changes, be sure to update the
info.versionfield to trigger the correct version bump.Speakeasy supports manual control of SDK versioning through multiple methods.
Go SDK Changes:
OpenRouter.Benchmarks.GetBenchmarks(): AddedOpenRouter.Workspaces.ListBudgets(): AddedOpenRouter.Workspaces.DeleteBudget(): AddedOpenRouter.Workspaces.SetBudget(): AddedOpenRouter.Datasets.GetBenchmarksArtificialAnalysis(): Removed (BreakingOpenRouter.Datasets.GetBenchmarksDesignArena(): Removed (BreakingOpenRouter.Beta.Analytics.QueryAnalytics():response.Data.WarningsAddedOpenRouter.Beta.Responses.Send():request.ResponsesRequestChangedOpenRouter.Chat.Send():request.ChatRequest.Plugins[].union(fusion).PresetAddedresponseChangedOpenRouter.Embeddings.ListModels():response.Data[].ReasoningAddedOpenRouter.Models.Get():response.Data.ReasoningAddedOpenRouter.Models.List():response.Data[].ReasoningAddedOpenRouter.Models.ListForUser():response.Data[].ReasoningAddedOpenRouter.Presets.CreatePresetsChatCompletions():request.ChatRequest.Plugins[].union(fusion).PresetAddedOpenRouter.Presets.CreatePresetsMessages():request.MessagesRequestChangedOpenRouter.Presets.CreatePresetsResponses():request.ResponsesRequestChangedView full SDK changelog
OpenAPI Change Summary
View full report
Linting Report
0 errors, 1 warnings, 0 hintsView full report
GO CHANGELOG
core: 3.13.40 - 2026-03-23
🐛 Bug Fixes
core: 3.13.39 - 2026-03-23
🐛 Bug Fixes
core: 3.13.38 - 2026-03-23
🐛 Bug Fixes
core: 3.13.37 - 2026-03-23
🐛 Bug Fixes
core: 3.13.36 - 2026-03-12
🐛 Bug Fixes
core: 3.13.35 - 2026-03-12
🐛 Bug Fixes
core: 3.13.34 - 2026-03-11
🐛 Bug Fixes
Get(commit by @danielkov)core: 3.13.23 - 2026-03-11
🐛 Bug Fixes
core: 3.13.21 - 2026-03-04
🐛 Bug Fixes
core: 3.13.20 - 2026-02-27
🐛 Bug Fixes
core: 3.13.19 - 2026-02-27
🐛 Bug Fixes
core: 3.13.33 - 2026-02-24
🐛 Bug Fixes
core: 3.13.22 - 2026-02-24
🐛 Bug Fixes
core: 3.13.17 - 2026-02-23
🐛 Bug Fixes
core: 3.13.16 - 2026-02-21
🐛 Bug Fixes
core: 3.13.15 - 2026-02-19
🐛 Bug Fixes
core: 3.13.14 - 2026-02-18
🐛 Bug Fixes
core: 3.13.13 - 2026-02-18
🐛 Bug Fixes
core: 3.13.12 - 2026-01-29
🐛 Bug Fixes
core: 3.13.11 - 2026-01-23
🐛 Bug Fixes
core: 3.13.10 - 2026-01-11
🐛 Bug Fixes
core: 3.13.9 - 2026-01-07
🐛 Bug Fixes
core: 3.13.8 - 2026-01-03
🐛 Bug Fixes
core: 3.13.7 - 2025-12-18
🐛 Bug Fixes
core: 3.13.6 - 2025-12-02
🐛 Bug Fixes
core: 3.13.4 - 2025-11-25
🐝 New Features
core: 3.13.3 - 2025-11-24
🐝 New Features
inferUnionDiscriminators: truein gen.yaml (commit by @mfbx9da4)core: 3.13.2 - 2025-11-10
🐛 Bug Fixes
core: 3.13.5 - 2025-11-06
🐛 Bug Fixes
core: 3.13.1 - 2025-11-05
🐝 New Features
core: 3.12.1 - 2025-10-30
🐛 Bug Fixes
core: 3.13.0 - 2025-10-24
🐝 New Features
core: 3.12.0 - 2025-10-13
🐝 New Features
core: 3.11.1 - 2025-09-23
🐛 Bug Fixes
core: 3.11.0 - 2025-09-17
🐝 New Features
core: 3.10.1 - 2025-09-15
🔧 Chores
core: 3.9.7 - 2025-09-10
🐛 Bug Fixes
core: 3.10.0 - 2025-09-09
🐝 New Features
core: 3.9.6 - 2025-09-02
🐛 Bug Fixes
core: 3.9.5 - 2025-09-01
🔧 Chores
core: 3.9.4 - 2025-08-27
🔧 Chores
core: 3.9.3 - 2025-07-31
🐛 Bug Fixes
core: 3.9.2 - 2025-07-31
🐛 Bug Fixes
core: 3.9.1 - 2025-07-24
🔧 Chores
core: 3.9.0 - 2025-07-15
🐝 New Features
core: 3.8.1 - 2025-06-09
🐛 Bug Fixes
core: 3.8.0 - 2025-06-05
🐝 New Features
core: 3.7.5 - 2025-05-07
🐛 Bug Fixes
core: 3.7.4 - 2025-04-11
🐛 Bug Fixes
core: 3.7.3 - 2025-04-03
🐛 Bug Fixes
core: 3.7.2 - 2025-02-21
🐛 Bug Fixes
core: 3.7.1 - 2025-02-14
🐛 Bug Fixes
core: 3.7.0 - 2025-02-04
🐝 New Features
core: 3.6.12 - 2025-01-31
🐛 Bug Fixes
core: 3.6.11 - 2025-01-29
🐛 Bug Fixes
core: 3.6.10 - 2025-01-27
🐛 Bug Fixes
core: 3.6.9 - 2025-01-20
🐛 Bug Fixes
core: 3.6.8 - 2025-01-20
🐛 Bug Fixes
core: 3.6.7 - 2025-01-20
🐛 Bug Fixes
core: 3.6.5 - 2025-01-14
🐛 Bug Fixes
Content-Type: */*request header for relevant operations (commit by @tristanspeakeasy)core: 3.6.4 - 2025-01-14
🐛 Bug Fixes
core: 3.6.6 - 2025-01-13
🐛 Bug Fixes
core: 3.6.3 - 2025-01-13
🐛 Bug Fixes
core: 3.6.2 - 2024-12-16
🐛 Bug Fixes
core: 3.6.1 - 2024-12-13
🐛 Bug Fixes
core: 3.6.0 - 2024-12-12
🐝 New Features
core: 3.5.18 - 2024-12-06
🐛 Bug Fixes
core: 3.5.17 - 2024-11-22
🐛 Bug Fixes
core: 3.5.16 - 2024-11-12
🐛 Bug Fixes
core: 3.5.15 - 2024-10-31
🐛 Bug Fixes
core: 3.5.14 - 2024-10-09
🐛 Bug Fixes
core: 3.5.13 - 2024-10-07
🐛 Bug Fixes
core: 3.5.12 - 2024-09-27
🐛 Bug Fixes
core: 3.5.11 - 2024-09-25
🐛 Bug Fixes
core: 3.5.10 - 2024-09-25
🐛 Bug Fixes
core: 3.5.9 - 2024-09-18
🐛 Bug Fixes
core: 3.5.8 - 2024-09-11
🔧 Chores
core: 3.5.7 - 2024-09-10
🔧 Chores
core: 3.5.6 - 2024-09-05
🐛 Bug Fixes
core: 3.5.5 - 2024-08-16
🐛 Bug Fixes
core: 3.5.4 - 2024-08-13
🐛 Bug Fixes
core: 3.5.3 - 2024-08-01
🐛 Bug Fixes
core: 3.5.2 - 2024-07-23
🐛 Bug Fixes
defaultstatus code is available and considered succesful (commit by @disintegrator)core: 3.5.1 - 2024-07-23
🐛 Bug Fixes
core: 3.4.16 - 2024-07-16
🔧 Chores
core: 3.5.0 - 2024-07-11
🐝 New Features
core: 3.4.15 - 2024-07-09
🐛 Bug Fixes
core: 3.4.14 - 2024-06-21
🔧 Chores
core: 3.4.13 - 2024-06-20
🐛 Bug Fixes
core: 3.4.12 - 2024-06-17
🐛 Bug Fixes
core: 3.4.11 - 2024-06-03
🐛 Bug Fixes
core: 3.4.10 - 2024-05-21
🐛 Bug Fixes
core: 3.4.9 - 2024-05-21
🐛 Bug Fixes
core: 3.4.8 - 2024-05-09
🐛 Bug Fixes
core: 3.4.7 - 2024-04-25
🐛 Bug Fixes
core: 3.4.6 - 2024-04-07
♻️ Refactors
core: 3.4.5 - 2024-03-22
🐛 Bug Fixes
core: 3.4.4 - 2024-03-06
🐛 Bug Fixes
core: 3.4.3 - 2024-02-23
🐛 Bug Fixes
core: 3.4.2 - 2024-02-22
🐛 Bug Fixes
core: 3.4.1 - 2024-02-15
♻️ Refactors
core: 3.3.3 - 2024-02-13
🔧 Chores
core: 3.4.0 - 2024-02-12
🐝 New Features
core: 3.3.2 - 2024-02-02
🐛 Bug Fixes
core: 3.3.1 - 2024-01-16
🔧 Chores
core: 3.3.0 - 2023-12-19
🐝 New Features
core: 3.2.2 - 2023-12-14
🐛 Bug Fixes
core: 3.2.1 - 2023-12-14
🐛 Bug Fixes
core: 3.1.6 - 2023-12-06
🐛 Bug Fixes
🔧 Chores
core: 3.2.0 - 2023-12-05
🐝 New Features
core: 3.1.5 - 2023-11-14
🐛 Bug Fixes
core: 3.1.4 - 2023-11-09
🔧 Chores
core: 3.1.3 - 2023-11-09
🐛 Bug Fixes
core: 3.1.2 - 2023-11-08
🔧 Chores
core: 3.1.1 - 2023-11-07
🐛 Bug Fixes
core: 3.1.0 - 2023-11-01
🐝 New Features
core: 3.0.1 - 2023-11-01
🐛 Bug Fixes
core: 3.0.0 - 2023-10-24
🐝 New Features
core: 2.94.0 - 2023-10-20
🐝 New Features
core: 2.93.3 - 2023-10-20
🐛 Bug Fixes
core: 2.93.2 - 2023-10-19
🐛 Bug Fixes
core: 2.93.1 - 2023-10-19
🐛 Bug Fixes
core: 2.93.0 - 2023-10-18
🐝 New Features
core: 2.91.6 - 2023-10-18
🐛 Bug Fixes
core: 2.91.5 - 2023-10-13
🐛 Bug Fixes
core: 2.91.4 - 2023-10-06
🐛 Bug Fixes
core: 2.91.3 - 2023-10-05
🐛 Bug Fixes
core: 2.91.2 // globalSecurity: 2.82.2 - 2023-10-04
🐛 Bug Fixes
core: 2.91.1 - 2023-10-01
🐛 Bug Fixes
core: 2.91.0 - 2023-09-29
🐝 New Features
core: 2.90.0 - 2023-09-26
🐝 New Features
core: 2.89.3 - 2023-09-26
🐛 Bug Fixes
core: 2.89.2 - 2023-09-26
🐛 Bug Fixes
core: 2.89.1 - 2023-09-25
🐛 Bug Fixes
core: 2.88.4 - 2023-09-21
🐛 Bug Fixes
core: 2.89.0 - 2023-09-20
🐝 New Features
core: 2.88.3 - 2023-09-18
🔧 Chores
core: 2.88.2 - 2023-09-15
🐛 Bug Fixes
core: 2.88.1 - 2023-09-13
🐛 Bug Fixes
core: 2.88.0 - 2023-09-06
🐝 New Features
core: 2.86.4 - 2023-09-04
🐛 Bug Fixes
core: 2.86.3 - 2023-09-01
🐛 Bug Fixes
core: 2.86.2 - 2023-08-31
🐛 Bug Fixes
core: 2.86.1 - 2023-08-30
🐛 Bug Fixes
core: 2.86.0 - 2023-08-29
🐝 New Features
core: 2.85.0 - 2023-08-29
🐝 New Features
core: 2.84.2 - 2023-08-28
🐛 Bug Fixes
core: 2.84.1 - 2023-08-25
🐛 Bug Fixes
core: 2.84.0 - 2023-08-24
🐝 New Features
core: 2.83.1 - 2023-08-23
🐛 Bug Fixes
core: 2.83.0 - 2023-08-14
🐝 New Features
core: 2.82.0 - 2023-08-07
🐝 New Features
pagination: 2.82.6 - 2026-02-21
🐛 Bug Fixes
pagination: 2.82.5 - 2025-10-15
🐛 Bug Fixes
pagination: 2.82.4 - 2025-03-06
🐛 Bug Fixes
pagination: 2.82.3 - 2025-02-19
🐛 Bug Fixes
pagination: 2.82.2 - 2024-12-20
🐛 Bug Fixes
pagination: 2.82.1 - 2024-03-25
🐛 Bug Fixes
pagination: 2.82.0 - 2024-02-28
🐝 New Features
pagination: 2.81.2 - 2023-10-17
🐛 Bug Fixes
serverEvents: 0.1.7 - 2026-03-10
🐛 Bug Fixes
serverEvents: 0.1.6 - 2026-03-03
🐛 Bug Fixes
serverEvents: 0.1.5 - 2026-02-13
🐛 Bug Fixes
serverEvents: 0.1.4 - 2026-02-02
🐛 Bug Fixes
serverEvents: 0.1.3 - 2025-02-02
🐛 Bug Fixes
serverEvents: 0.1.2 - 2024-02-15
🐛 Bug Fixes
serverEvents: 0.1.1 - 2024-02-05
🐛 Bug Fixes
serverEvents: 0.1.0 - 2024-01-17
🐝 New Features
unions: 2.87.6 - 2026-03-12
🐝 New Features
unions: 2.87.5 - 2026-02-24
🐛 Bug Fixes
unions: 2.87.4 - 2026-02-12
🐝 New Features
unions: 2.87.3 - 2026-02-02
🐛 Bug Fixes
respectTitlesForPrimitiveUnionMembers) (commit by @mfbx9da4)unions: 2.87.2 - 2025-11-20
🔧 Fixes
unions: 2.87.1 - 2025-11-10
🐛 Bug Fixes
unions: 2.87.0 - 2025-10-23
🐝 New Features
unions: 2.86.0 - 2025-10-01
🐝 New Features
unions: 2.85.14 - 2025-08-29
🐛 Bug Fixes
unions: 2.85.13 - 2025-08-26
🐛 Bug Fixes
unions: 2.85.12 - 2025-07-03
🐛 Bug Fixes
unions: 2.85.11 - 2025-06-09
🐛 Bug Fixes
unions: 2.85.10 - 2024-11-05
🐛 Bug Fixes
unions: 2.85.9 - 2024-08-09
🐛 Bug Fixes
unions: 2.85.8 - 2024-05-17
🔧 Chores
unions: 2.85.7 - 2024-05-16
🐛 Bug Fixes
unions: 2.85.6 - 2024-05-14
🐛 Bug Fixes
unions: 2.85.5 - 2024-05-02
🐛 Bug Fixes
unions: 2.85.4 - 2024-02-29
🐛 Bug Fixes
unions: 2.85.3 - 2024-02-07
🐛 Bug Fixes
unions: 2.85.2 - 2023-12-14
🐛 Bug Fixes
unions: 2.85.1 - 2023-12-14
🐛 Bug Fixes
unions: 2.84.1 - 2023-10-31
🐛 Bug Fixes
unions: 2.85.0 - 2023-10-24
🐝 New Features
unions: 2.84.0 - 2023-10-18
🐝 New Features
unions: 2.83.1 - 2023-09-30
🐛 Bug Fixes
unions: 2.83.0 - 2023-09-15
🐝 New Features
unions: 2.82.0 - 2023-09-04
🐝 New Features
unions: 2.81.2 - 2023-08-07
🐛 Bug Fixes
Based on Speakeasy CLI 1.761.1
Last updated by Speakeasy workflow