Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
lockVersion: 2.0.0
id: 9eea3e30-2722-4060-973b-57b7f1f75dc0
management:
docChecksum: f6287b44eec441ca9cbf10af1348f07e
docChecksum: ea28f73445d5aaf00200db46ac3c5ef3
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 0.9.8
configChecksum: bfcebb1c4851823b945f667a6850f7b8
releaseVersion: 0.9.9
configChecksum: 04ef64a6bd1d23c094ab865366d391fa
repoURL: https://github.com/OpenRouterTeam/go-sdk.git
installationURL: https://github.com/OpenRouterTeam/go-sdk
persistentEdits:
generation_id: 296c36d4-1b9c-4cb1-8686-ecdad7684599
pristine_commit_hash: 587aa4716843881bc29e0a2067a0f71e8870ff92
pristine_tree_hash: 63e694cfcf5ab707e1dd72787004f73f147fc19b
generation_id: cb3c1aa0-de9a-4ff1-a35a-71e0ddf12487
pristine_commit_hash: eae091031016319c6a968f48dfe6afdfe3cf1e09
pristine_tree_hash: 04c580c54522d695b17f24fbe1987c415878f579
features:
go:
acceptHeaders: 2.81.2
Expand Down Expand Up @@ -105,8 +105,8 @@ trackedFiles:
pristine_git_object: 300f5ee15b73e7ecfd6b16e25d132ad1e4af8442
chat.go:
id: 81535ccb3ff5
last_write_checksum: sha1:bf12b147b40656ae0086e01601410f01ae94e039
pristine_git_object: 3ec067932ab585739098c417f40010f895bed95e
last_write_checksum: sha1:3fe05c99a2a3f927bac689dc6dd9f0e6c51bc7b3
pristine_git_object: fedc9b46b5d2a7a4fc521b1af68b563cf4e116d8
classifications.go:
id: 711367120ab6
last_write_checksum: sha1:1503d324707d56ecefdc2ec29ada40857bbff956
Expand Down Expand Up @@ -6581,8 +6581,8 @@ trackedFiles:
pristine_git_object: d11bcca08713060dd9e5b41ad311978fcabddfbf
docs/models/components/speechrequest.mdx:
id: 572bb1b07290
last_write_checksum: sha1:d0111ebee077afcc88e88c106b10d0ffd7efe56e
pristine_git_object: 03bd63abed61b9e03665702d75c3d29b164af47d
last_write_checksum: sha1:cbef1f055fd6db8bd56d21b8bc5de3ccb6aa9420
pristine_git_object: 22cc6b16ecf2e9673820f3fbfdad32ffc1020207
docs/models/components/speechrequestprovider.mdx:
id: 70ddc64fe615
last_write_checksum: sha1:0b345acd1029103dca5e9dbe7e3480cad15266d7
Expand Down Expand Up @@ -11833,8 +11833,8 @@ trackedFiles:
pristine_git_object: 282892fcabc303c6f383535c88d640ecd1bf35be
models/components/speechrequest.go:
id: c5f83d3285eb
last_write_checksum: sha1:599dbe517a8be002f7ae7a12c911aaffd6ae254b
pristine_git_object: e50e827a82fd4fe04967bf53fbda14d27764b94c
last_write_checksum: sha1:84c62bd8941851aad6b3f2bd3fdc6ddc93540543
pristine_git_object: a0609b62ced0f9cdb40fae551206c6266ee35a73
models/components/stopservertoolswhencondition.go:
id: 6c12d61377dc
last_write_checksum: sha1:600037f2c92bb83b31cc6469a5ce9a169ee82b09
Expand Down Expand Up @@ -12913,8 +12913,8 @@ trackedFiles:
pristine_git_object: 5e3a2cdf8cb4ed4f5378b712293cba9c82074f16
openrouter.go:
id: 207ad004b774
last_write_checksum: sha1:b850529c36cacc083c65d841d8abd21bc594f8b0
pristine_git_object: ef00634cbed3b5a1c57fa2950a862eff826e6781
last_write_checksum: sha1:06474f4f87f7096780907fdb3dafc13f2841bb5f
pristine_git_object: eda1b766ba47965f651ae75830245513c88d6a98
optionalnullable/optionalnullable.go:
id: ce60f259ead3
last_write_checksum: sha1:d6aff1a420c31e025ea21d46cf056e305ae76fe8
Expand Down Expand Up @@ -16798,7 +16798,3 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: |
## Go SDK Changes:
* `OpenRouter.Tools.ListTools()`: **Added**
* `OpenRouter.Tools.GetTool()`: **Added**
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
go:
version: 0.9.8
version: 0.9.9
additionalDependencies: {}
baseErrorName: OpenRouterError
clientServerStatusCodesAsErrors: true
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28405,7 +28405,7 @@ components:
maxLength: 256
type: 'string'
speed:
description: 'Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.'
description: 'Playback speed multiplier. Honored by models that support it (e.g. OpenAI TTS). Other providers either ignore it or return a 400 for a non-default value when the model has no speed control.'
example: 1
format: 'double'
type: 'number'
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:db2283c5cdc8d6469924f497c85210ea2ac9060b28c79fba996852a0926ab9ce
sourceBlobDigest: sha256:ba113aff532fbcc75a71f9dcf99d3b4e88c5dce39d7331f9e806a59d946b442a
sourceRevisionDigest: sha256:8a427f5d7fc1e0ef614462d1fdcbda3eb601e25cb6a63c9f419224de83b15d47
sourceBlobDigest: sha256:ce7769e5f691b863f0c923c61a1bce14276837303a8b2392030410e09c7b6375
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:db2283c5cdc8d6469924f497c85210ea2ac9060b28c79fba996852a0926ab9ce
sourceBlobDigest: sha256:ba113aff532fbcc75a71f9dcf99d3b4e88c5dce39d7331f9e806a59d946b442a
sourceRevisionDigest: sha256:8a427f5d7fc1e0ef614462d1fdcbda3eb601e25cb6a63c9f419224de83b15d47
sourceBlobDigest: sha256:ce7769e5f691b863f0c923c61a1bce14276837303a8b2392030410e09c7b6375
codeSamplesNamespace: open-router-chat-completions-api-go-code-samples
codeSamplesRevisionDigest: sha256:22269985c136aa58cfea5c13f05342d3bb6db3db3acebac7bcd2da81f0f380e6
codeSamplesRevisionDigest: sha256:e57d80e08cf6a69c8b00ba70c4674fe199c2220f22f4ff5ca419abc7782bc40a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
2 changes: 1 addition & 1 deletion OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.8
go get github.com/OpenRouterTeam/go-sdk@v0.9.9
```

**Requirements:** Go 1.25 or higher
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.8
> go get github.com/OpenRouterTeam/go-sdk@v0.9.9
> ```

<!-- No Summary [summary] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2598,4 +2598,14 @@ Based on:
### Generated
- [go v0.9.8] .
### Releases
- [Go v0.9.8] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.9.8 - .
- [Go v0.9.8] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.9.8 - .

## 2026-09-30 00:01:37
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.9.9] .
### Releases
- [Go v0.9.9] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.9.9 - .
14 changes: 0 additions & 14 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ import (
"net/url"
)

// Chat - Stream a chat completion with an intern
// Sends a prompt to one of your interns and streams the reply as OpenAI-compatible server-sent events ending with `[DONE]`. The run executes on the intern, which may pause to ask you something. It then streams one `openrouter.provide_input` tool call and finishes with `finish_reason: "tool_calls"`, and the run stays open on the intern.
//
// Every response, whether it ends with `stop`, `tool_calls` or `error`, is followed by a final chunk with empty `choices` that carries `session_id`, then `data: [DONE]`. That chunk carries the `usage` the intern reported for the run, after `stop` or `error`, and `null` when the intern reported none. After `tool_calls` its `usage` is `null` because the turn is not over. Read through `[DONE]`: the `session_id` you need to reply arrives after the `tool_calls` finish chunk.
//
// To answer, send a second request with the same `session_id`, the assistant message echoing that tool call, and a `tool` message whose `tool_call_id` is the tool call id and whose `content` is the answer. The answer is delivered to the run that asked and the stream continues from where it paused. A question stays open for its interaction deadline (5 minutes by default) and the run is cancelled when that passes. Rejected replies do not extend the deadline.
//
// Closing the connection after the `[DONE]` that follows `finish_reason: "tool_calls"` keeps the run alive. Disconnecting while a response is still streaming cancels the run. The stream writes a `: keepalive` comment whenever nothing else has been written for 30 seconds, so a disconnect is noticed within that interval even while the intern is silent.
//
// A run the intern ends while you are still connected, by cancellation or by a deadline, ends the stream with a `finish_reason: "error"` chunk carrying `410` and reason `run_ended`, then the final empty-`choices` chunk and `[DONE]`. That error reports only an ending the intern confirmed. A connection that breaks without that confirmation ends with reason `stream_severed`, and a client that has already disconnected is promised no final event.
//
// Set `approval_mode` to `manual` to have the intern ask before approval-bearing tools such as the shell. Omitted, the run self-drives and consents on your behalf. The mode belongs to the run started by that prompt and must be repeated on later prompts.
//
// Available to interns programme members. Callers outside the programme receive `404` for every path under `/api/v1/interns`.
type Chat struct {
rootSDK *OpenRouter
sdkConfiguration config.SDKConfiguration
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.8
go get github.com/OpenRouterTeam/go-sdk@v0.9.9

For full API documentation, visit: https://openrouter.ai/docs/client-sdks/go/overview

Expand Down
Loading
Loading