The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { ResponsesRequestToolFunction } from "@openrouter/sdk/models";
let value: ResponsesRequestToolFunction = {
name: "get_weather",
parameters: {
"properties": {
"location": {
"description": "The city and state",
"type": "string",
},
"unit": {
"enum": [
"celsius",
"fahrenheit",
],
"type": "string",
"x-speakeasy-unknown-values": "allow",
},
},
"required": [
"location",
],
"type": "object",
},
type: "function",
};
Fields
| Field | Type | Required | Description |
|---|---|---|---|
description | string | :heavy_minus_sign: | N/A |
name | string | :heavy_check_mark: | N/A |
parameters | Record<string, *any*> | :heavy_check_mark: | N/A |
strict | boolean | :heavy_minus_sign: | N/A |
type | ”function” | :heavy_check_mark: | N/A |