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
216 changes: 145 additions & 71 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
version: 1.5.8
version: 1.5.9
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
160 changes: 159 additions & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2767,6 +2767,153 @@ components:
- 'content'
- 'tool_use_id'
type: 'object'
AnthropicToolUnion:
description: 'An Anthropic tool definition: a client-defined tool with a JSON Schema `input_schema`, or a server tool (bash, text editor, web search).'
example:
description: 'Get the current weather for a city.'
input_schema:
properties:
city:
type: 'string'
required:
- 'city'
type: 'object'
name: 'get_weather'
oneOf:
- properties:
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
defer_loading:
type: 'boolean'
description:
type: 'string'
input_schema:
additionalProperties: {}
properties:
properties: {}
required:
items:
type: 'string'
type:
- 'array'
- 'null'
type:
enum:
- 'object'
type: 'string'
required:
- 'type'
type: 'object'
name:
type: 'string'
strict:
type: 'boolean'
type:
enum:
- 'custom'
type: 'string'
required:
- 'name'
- 'input_schema'
type: 'object'
- properties:
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
name:
enum:
- 'bash'
type: 'string'
type:
enum:
- 'bash_20250124'
type: 'string'
required:
- 'type'
- 'name'
type: 'object'
- properties:
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
name:
enum:
- 'str_replace_editor'
type: 'string'
type:
enum:
- 'text_editor_20250124'
type: 'string'
required:
- 'type'
- 'name'
type: 'object'
- properties:
allowed_domains:
items:
type: 'string'
type:
- 'array'
- 'null'
blocked_domains:
items:
type: 'string'
type:
- 'array'
- 'null'
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
max_uses:
type:
- 'integer'
- 'null'
name:
enum:
- 'web_search'
type: 'string'
type:
enum:
- 'web_search_20250305'
type: 'string'
user_location:
$ref: '#/components/schemas/AnthropicWebSearchToolUserLocation'
required:
- 'type'
- 'name'
type: 'object'
- properties:
allowed_callers:
$ref: '#/components/schemas/AnthropicAllowedCallers'
allowed_domains:
items:
type: 'string'
type:
- 'array'
- 'null'
blocked_domains:
items:
type: 'string'
type:
- 'array'
- 'null'
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
max_uses:
type:
- 'integer'
- 'null'
name:
enum:
- 'web_search'
type: 'string'
type:
enum:
- 'web_search_20260209'
type: 'string'
user_location:
$ref: '#/components/schemas/AnthropicWebSearchToolUserLocation'
required:
- 'type'
- 'name'
type: 'object'
AnthropicToolUseBlock:
example:
caller:
Expand Down Expand Up @@ -18001,7 +18148,7 @@ components:
- 'data'
type: 'object'
MessagesToolAdditionBlock:
description: 'Loads a previously deferred tool (declared in `tools` with `defer_loading: true`) mid-conversation without invalidating the prompt cache. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.8.'
description: 'Adds a tool mid-conversation without invalidating the prompt cache: either a previously deferred tool (declared in `tools` with `defer_loading: true`, referenced by name) or a full inline `tool_definition`. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.8.'
example:
tool:
name: 'get_forecast'
Expand Down Expand Up @@ -18048,6 +18195,17 @@ components:
- 'type'
- 'server_name'
type: 'object'
- properties:
definition:
$ref: '#/components/schemas/AnthropicToolUnion'
type:
enum:
- 'tool_definition'
type: 'string'
required:
- 'type'
- 'definition'
type: 'object'
type:
enum:
- 'tool_addition'
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.802.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:3fad3b7ac8de59ec4f4ba9631c3b71f0f80a24cf6b81e2d94a49b04f4b8e7bb7
sourceBlobDigest: sha256:6325dd2741535f2f7ea1cda033bd00c77dc0bbfea7c0d114852bbe4c39c58555
sourceRevisionDigest: sha256:c144bf76df910b59591bbe058062e0b0002848a64215a34c051c673bc9719b48
sourceBlobDigest: sha256:0226b4622016bfe0b06eff18076148e3ef1fcbab905b9c75ae920debd61bb692
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:3fad3b7ac8de59ec4f4ba9631c3b71f0f80a24cf6b81e2d94a49b04f4b8e7bb7
sourceBlobDigest: sha256:6325dd2741535f2f7ea1cda033bd00c77dc0bbfea7c0d114852bbe4c39c58555
sourceRevisionDigest: sha256:c144bf76df910b59591bbe058062e0b0002848a64215a34c051c673bc9719b48
sourceBlobDigest: sha256:0226b4622016bfe0b06eff18076148e3ef1fcbab905b9c75ae920debd61bb692
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:ea2bbdfe9bb27b0a93a03bfdc7e62824fec946a5ac610374903d4268a04b420f
codeSamplesRevisionDigest: sha256:d7e2ef24a2f9f739a3b52cc1bbbfa5762e69ee2159ec3ce8decff23fb6187f41
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.802.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4466,4 +4466,14 @@ Based on:
### Generated
- [typescript v1.5.8] .
### Releases
- [NPM v1.5.8] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.8 - .
- [NPM v1.5.8] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.8 - .

## 2026-10-26 21:02:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.802.0 (2.948.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.5.9] .
### Releases
- [NPM v1.5.9] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.9 - .
56 changes: 56 additions & 0 deletions docs/models/anthropictoolunion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: "AnthropicToolUnion"
---

An Anthropic tool definition: a client-defined tool with a JSON Schema `input_schema`, or a server tool (bash, text editor, web search).


## Supported Types

### `models.AnthropicToolUnionCustom`

```typescript
const value: models.AnthropicToolUnionCustom = {
inputSchema: {
type: "object",
},
name: "get_weather",
};
```

### `models.AnthropicToolUnionBash20250124`

```typescript
const value: models.AnthropicToolUnionBash20250124 = {
name: "bash",
type: "bash_20250124",
};
```

### `models.AnthropicToolUnionTextEditor20250124`

```typescript
const value: models.AnthropicToolUnionTextEditor20250124 = {
name: "str_replace_editor",
type: "text_editor_20250124",
};
```

### `models.AnthropicToolUnionWebSearch20250305`

```typescript
const value: models.AnthropicToolUnionWebSearch20250305 = {
name: "web_search",
type: "web_search_20250305",
};
```

### `models.AnthropicToolUnionWebSearch20260209`

```typescript
const value: models.AnthropicToolUnionWebSearch20260209 = {
name: "web_search",
type: "web_search_20260209",
};
```

22 changes: 22 additions & 0 deletions docs/models/anthropictoolunionbash20250124.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "AnthropicToolUnionBash20250124"
---

## Example Usage

```typescript
import { AnthropicToolUnionBash20250124 } from "@openrouter/sdk/models";

let value: AnthropicToolUnionBash20250124 = {
name: "bash",
type: "bash_20250124",
};
```

## Fields

| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cacheControl` | [models.AnthropicCacheControlDirective](../models/anthropiccachecontroldirective.mdx) | ➖ | 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. | \{<br/>"type": "ephemeral"<br/>} |
| `name` | [models.AnthropicToolUnionNameBash](../models/anthropictoolunionnamebash.mdx) | ✔️ | N/A | |
| `type` | [models.AnthropicToolUnionTypeBash20250124](../models/anthropictooluniontypebash20250124.mdx) | ✔️ | N/A | |
Loading
Loading