diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 86a714f7c..4b71c8574 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: e0679e5a284910df5d3e3ac0ee007f80 + docChecksum: feb609f21537ad0b6504ffa3655b1430 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 0.9.20 - configChecksum: 325a5d0965070972fc9bf176d389cc4c + releaseVersion: 0.9.21 + configChecksum: 573d31ce7c09eae86ccdbc8e13c02fba repoURL: https://github.com/OpenRouterTeam/go-sdk.git installationURL: https://github.com/OpenRouterTeam/go-sdk persistentEdits: - generation_id: 8ba0bdae-f657-4dc6-9d68-c5924aed81c1 - pristine_commit_hash: 50cb333124075eb2f2bd0f6791fdf7fbb6f46cab - pristine_tree_hash: 44a355f319846f0dc4e2b7cfcaa793662000ca15 + generation_id: e2dbd12b-4789-43eb-bc59-e2d5c25bf61f + pristine_commit_hash: d7a7b469cea1b0f861cb6b90fbcd5b48f2de9acb + pristine_tree_hash: d3065cd36818b6d61d0d0483ba63c0c2c39713df features: go: acceptHeaders: 2.81.2 @@ -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 @@ -4769,8 +4769,8 @@ trackedFiles: pristine_git_object: b9d41f5db0186098448a35cc3ed666da7aba92a8 docs/models/components/observabilityclickhousedestinationconfig.mdx: id: 400a37516006 - last_write_checksum: sha1:c241214085e0ee3fe631c1e94407992a3f7e50fe - pristine_git_object: 42d54dc3f24b08c8bd9a35f3258b7158336232d2 + last_write_checksum: sha1:1f0473422088be59c5dcb1d9c02151109b858e48 + pristine_git_object: db41a707c8105b54dfbae1b610b1f40ecd7ab58d docs/models/components/observabilityclickhousedestinationtype.mdx: id: d2ad8a38ed01 last_write_checksum: sha1:e36386c726b7db84b5b7c6887aafeb1e8887e45e @@ -4941,8 +4941,8 @@ trackedFiles: pristine_git_object: 91813d604ae544cfba45911d00e79b240078a831 docs/models/components/observabilitysnowflakedestinationconfig.mdx: id: 35fa31fc2361 - last_write_checksum: sha1:da96fb442befcd5f272a15932a32f66637bad103 - pristine_git_object: b0e0050cf009ee4bed646a164fec1c76d1e9cfdb + last_write_checksum: sha1:6fe3133880e472de5100a32368d4927a9edc1594 + pristine_git_object: 09e5f85326710ce628f08410d7e4e700b8f9246a docs/models/components/observabilitysnowflakedestinationtype.mdx: id: 4f22b5539b29 last_write_checksum: sha1:1841f51ed06a61a6675bc5ed7bc5e90f29af4743 @@ -11389,8 +11389,8 @@ trackedFiles: pristine_git_object: c4815062294f4459f86f83b512703b887f0d588e models/components/observabilityclickhousedestination.go: id: 9ed43d42fde0 - last_write_checksum: sha1:feaeda7379e25161e8050cad5212bfea8b0c186e - pristine_git_object: 402df8405c9572632309a429d932df052b73fd70 + last_write_checksum: sha1:38cf8f2b50e98a78ba73eb4f8b18d2c5d78948ff + pristine_git_object: 9f492426a838997930b79c9122e02f2ce8862fe9 models/components/observabilitydatadogdestination.go: id: c49de42b7688 last_write_checksum: sha1:6b1d327f78dc8294da562a82c68316ce407302ea @@ -11461,8 +11461,8 @@ trackedFiles: pristine_git_object: 3c59ba5463ba5c45112d284c654fb3745645c65c models/components/observabilitysnowflakedestination.go: id: 5d346f1af7bf - last_write_checksum: sha1:0febb3696449efce57eea5d8557e7584823ffb73 - pristine_git_object: e53aaebe7c57d28412e210e5b2352d26d0f6e282 + last_write_checksum: sha1:ac256b585f0925e4b6c597923092e26b87078416 + pristine_git_object: 488a6b65edd983e22896bee26976eb91963a92f3 models/components/observabilityweavedestination.go: id: d08ddab861ad last_write_checksum: sha1:270f713f0398eb29d93e911292f2bded716dbfba @@ -13361,8 +13361,8 @@ trackedFiles: pristine_git_object: 5e3a2cdf8cb4ed4f5378b712293cba9c82074f16 openrouter.go: id: 207ad004b774 - last_write_checksum: sha1:2c615e8da0b5eed45ba80d026fb0516dccac2ad5 - pristine_git_object: 302b1b8a7852a235c71e693f5987e175f565043d + last_write_checksum: sha1:34f0b746a28dbbd03cbf1df984690eb9cd675f26 + pristine_git_object: 980318b4c216e29e4d6126c15ce32af250f5e146 optionalnullable/optionalnullable.go: id: ce60f259ead3 last_write_checksum: sha1:d6aff1a420c31e025ea21d46cf056e305ae76fe8 @@ -17377,3 +17377,9 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: | + ## Go SDK Changes: + * `OpenRouter.Observability.List()`: `response.Data[]` **Changed** + * `OpenRouter.Observability.Create()`: `response.Data` **Changed** + * `OpenRouter.Observability.Get()`: `response.Data` **Changed** + * `OpenRouter.Observability.Update()`: `response.Data` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9d4399a42..f4e748312 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true go: - version: 0.9.20 + version: 0.9.21 additionalDependencies: {} baseErrorName: OpenRouterError clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 33196ee2a..2962417ea 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -19210,6 +19210,10 @@ components: password: minLength: 1 type: 'string' + shouldIncludeCacheWriteTokens: + default: false + description: 'Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.' + type: 'boolean' table: default: 'OPENROUTER_TRACES' type: 'string' @@ -20977,6 +20981,10 @@ components: schema: default: 'PUBLIC' type: 'string' + shouldIncludeCacheWriteTokens: + default: false + description: 'Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.' + type: 'boolean' table: default: 'OPENROUTER_TRACES' type: 'string' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d29268611..0b2d07984 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:0909671576c07e1a0bd2f2acc73f91ed68fc2e5932008c9167b22c4c231b54db - sourceBlobDigest: sha256:073568cfc022ee43c266b54e5e31372f20f801686f0587de4fe572cf431968be + sourceRevisionDigest: sha256:948b494092910f6dc539f79e4dfe1787cf9f16c8daf65cfbca84a1b07d4ff923 + sourceBlobDigest: sha256:169e0874624deb9182c48a4d88979a4ff2497a29150121dc8f69eb7e14b02f49 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:0909671576c07e1a0bd2f2acc73f91ed68fc2e5932008c9167b22c4c231b54db - sourceBlobDigest: sha256:073568cfc022ee43c266b54e5e31372f20f801686f0587de4fe572cf431968be + sourceRevisionDigest: sha256:948b494092910f6dc539f79e4dfe1787cf9f16c8daf65cfbca84a1b07d4ff923 + sourceBlobDigest: sha256:169e0874624deb9182c48a4d88979a4ff2497a29150121dc8f69eb7e14b02f49 codeSamplesNamespace: open-router-chat-completions-api-go-code-samples - codeSamplesRevisionDigest: sha256:d05e11a65b54001a21f135bffbf8bf474293acaf7ba39e6571dba47219d955af + codeSamplesRevisionDigest: sha256:2004d04dabfb814596c8653896d79ca0d6385ba3edbfa73c288c34c2688e2564 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/OVERVIEW.md b/OVERVIEW.md index b0016e496..6d4e6fb2d 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.9.20 +go get github.com/OpenRouterTeam/go-sdk@v0.9.21 ``` **Requirements:** Go 1.25 or higher diff --git a/README.md b/README.md index 31ef70828..f4d8bee39 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.9.20 +> go get github.com/OpenRouterTeam/go-sdk@v0.9.21 > ``` diff --git a/RELEASES.md b/RELEASES.md index 439d1b95b..bbcf6850a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2718,4 +2718,14 @@ Based on: ### Generated - [go v0.9.20] . ### Releases -- [Go v0.9.20] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.9.20 - . \ No newline at end of file +- [Go v0.9.20] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.9.20 - . + +## 2026-10-02 20:05:01 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.9.21] . +### Releases +- [Go v0.9.21] https://github.com/OpenRouterTeam/go-sdk/releases/tag/v0.9.21 - . \ No newline at end of file diff --git a/chat.go b/chat.go index 3ec067932..fedc9b46b 100644 --- a/chat.go +++ b/chat.go @@ -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 diff --git a/doc.go b/doc.go index 4f34b2f3f..1d7340ada 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.9.20 + go get github.com/OpenRouterTeam/go-sdk@v0.9.21 For full API documentation, visit: https://openrouter.ai/docs/client-sdks/go/overview diff --git a/docs/models/components/observabilityclickhousedestinationconfig.mdx b/docs/models/components/observabilityclickhousedestinationconfig.mdx index 42d54dc3f..db41a707c 100644 --- a/docs/models/components/observabilityclickhousedestinationconfig.mdx +++ b/docs/models/components/observabilityclickhousedestinationconfig.mdx @@ -4,11 +4,12 @@ title: "ObservabilityClickhouseDestinationConfig" ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `Database` | `string` | :heavy_check_mark: | N/A | -| `Headers` | map[string]`string` | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | -| `Host` | `string` | :heavy_check_mark: | N/A | -| `Password` | `string` | :heavy_check_mark: | N/A | -| `Table` | `*string` | :heavy_minus_sign: | N/A | -| `Username` | `string` | :heavy_check_mark: | If you have not set a specific username in ClickHouse, simply type in 'default' below. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `Database` | `string` | :heavy_check_mark: | N/A | +| `Headers` | map[string]`string` | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | +| `Host` | `string` | :heavy_check_mark: | N/A | +| `Password` | `string` | :heavy_check_mark: | N/A | +| `ShouldIncludeCacheWriteTokens` | `*bool` | :heavy_minus_sign: | Send the cache_write_tokens column (schema v2). Turn this on after the table has that column. | +| `Table` | `*string` | :heavy_minus_sign: | N/A | +| `Username` | `string` | :heavy_check_mark: | If you have not set a specific username in ClickHouse, simply type in 'default' below. | \ No newline at end of file diff --git a/docs/models/components/observabilitysnowflakedestinationconfig.mdx b/docs/models/components/observabilitysnowflakedestinationconfig.mdx index b0e0050cf..09e5f8532 100644 --- a/docs/models/components/observabilitysnowflakedestinationconfig.mdx +++ b/docs/models/components/observabilitysnowflakedestinationconfig.mdx @@ -4,12 +4,13 @@ title: "ObservabilitySnowflakeDestinationConfig" ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Account` | `string` | :heavy_check_mark: | N/A | -| `Database` | `*string` | :heavy_minus_sign: | N/A | -| `Headers` | map[string]`string` | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | -| `Schema` | `*string` | :heavy_minus_sign: | N/A | -| `Table` | `*string` | :heavy_minus_sign: | N/A | -| `Token` | `string` | :heavy_check_mark: | N/A | -| `Warehouse` | `*string` | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `Account` | `string` | :heavy_check_mark: | N/A | +| `Database` | `*string` | :heavy_minus_sign: | N/A | +| `Headers` | map[string]`string` | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | +| `Schema` | `*string` | :heavy_minus_sign: | N/A | +| `ShouldIncludeCacheWriteTokens` | `*bool` | :heavy_minus_sign: | Send the cache_write_tokens column (schema v2). Turn this on after the table has that column. | +| `Table` | `*string` | :heavy_minus_sign: | N/A | +| `Token` | `string` | :heavy_check_mark: | N/A | +| `Warehouse` | `*string` | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/example_test.go b/example_test.go index 4e2737569..bde009f82 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.9.20 + // Output: 0.9.21 } // Example demonstrates basic usage of the OpenRouter SDK for chat completions. diff --git a/examples/README.md b/examples/README.md index 5f7181b1d..c08b72a66 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.9.20 +require github.com/OpenRouterTeam/go-sdk v0.9.21 ``` 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.9.20 +go get github.com/OpenRouterTeam/go-sdk@v0.9.21 go run . ``` diff --git a/models/components/observabilityclickhousedestination.go b/models/components/observabilityclickhousedestination.go index 402df8405..9f492426a 100644 --- a/models/components/observabilityclickhousedestination.go +++ b/models/components/observabilityclickhousedestination.go @@ -14,7 +14,9 @@ type ObservabilityClickhouseDestinationConfig struct { Headers map[string]string `json:"headers,omitzero"` Host string `json:"host"` Password string `json:"password"` - Table *string `default:"OPENROUTER_TRACES" json:"table"` + // Send the cache_write_tokens column (schema v2). Turn this on after the table has that column. + ShouldIncludeCacheWriteTokens *bool `default:"false" json:"shouldIncludeCacheWriteTokens"` + Table *string `default:"OPENROUTER_TRACES" json:"table"` // If you have not set a specific username in ClickHouse, simply type in 'default' below. Username string `json:"username"` } @@ -58,6 +60,13 @@ func (o *ObservabilityClickhouseDestinationConfig) GetPassword() string { return o.Password } +func (o *ObservabilityClickhouseDestinationConfig) GetShouldIncludeCacheWriteTokens() *bool { + if o == nil { + return nil + } + return o.ShouldIncludeCacheWriteTokens +} + func (o *ObservabilityClickhouseDestinationConfig) GetTable() *string { if o == nil { return nil diff --git a/models/components/observabilitysnowflakedestination.go b/models/components/observabilitysnowflakedestination.go index e53aaebe7..488a6b65e 100644 --- a/models/components/observabilitysnowflakedestination.go +++ b/models/components/observabilitysnowflakedestination.go @@ -12,11 +12,13 @@ type ObservabilitySnowflakeDestinationConfig struct { Account string `json:"account"` Database *string `default:"SNOWFLAKE_LEARNING_DB" json:"database"` // Custom HTTP headers to include in requests to this destination. - Headers map[string]string `json:"headers,omitzero"` - Schema *string `default:"PUBLIC" json:"schema"` - Table *string `default:"OPENROUTER_TRACES" json:"table"` - Token string `json:"token"` - Warehouse *string `default:"COMPUTE_WH" json:"warehouse"` + Headers map[string]string `json:"headers,omitzero"` + Schema *string `default:"PUBLIC" json:"schema"` + // Send the cache_write_tokens column (schema v2). Turn this on after the table has that column. + ShouldIncludeCacheWriteTokens *bool `default:"false" json:"shouldIncludeCacheWriteTokens"` + Table *string `default:"OPENROUTER_TRACES" json:"table"` + Token string `json:"token"` + Warehouse *string `default:"COMPUTE_WH" json:"warehouse"` } func (o ObservabilitySnowflakeDestinationConfig) MarshalJSON() ([]byte, error) { @@ -58,6 +60,13 @@ func (o *ObservabilitySnowflakeDestinationConfig) GetSchema() *string { return o.Schema } +func (o *ObservabilitySnowflakeDestinationConfig) GetShouldIncludeCacheWriteTokens() *bool { + if o == nil { + return nil + } + return o.ShouldIncludeCacheWriteTokens +} + func (o *ObservabilitySnowflakeDestinationConfig) GetTable() *string { if o == nil { return nil diff --git a/openrouter.go b/openrouter.go index 302b1b8a7..980318b4c 100644 --- a/openrouter.go +++ b/openrouter.go @@ -73,20 +73,6 @@ type OpenRouter struct { Benchmarks *Benchmarks // BYOK endpoints BYOK *BYOK - // 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`. Chat *Chat // Task classification market-share endpoints Classifications *Classifications @@ -234,9 +220,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.9.20", + SDKVersion: "0.9.21", sdkConfiguration: config.SDKConfiguration{ - UserAgent: "speakeasy-sdk/go 0.9.20 2.914.0 1.0.0 github.com/OpenRouterTeam/go-sdk", + UserAgent: "speakeasy-sdk/go 0.9.21 2.914.0 1.0.0 github.com/OpenRouterTeam/go-sdk", Globals: globals.Globals{}, ServerList: ServerList, },