From de17f18fbf32d065a22680c06210baaf7ed9c9b8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 27 Jan 2026 19:56:53 +0000
Subject: [PATCH 1/2] feat(api): manual updates
---
.stats.yml | 6 +-
api.md | 3 +
src/client.ts | 6 ++
src/resources/index.ts | 3 +
src/resources/responses.ts | 198 +++++++++++++++++++++++++++----------
5 files changed, 159 insertions(+), 57 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 730dc57..9ee7c51 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 6
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-6ce12aa99a5f333ab79b62256b6e78ffeaf103c08f199c90e8122b9496bb0e85.yml
-openapi_spec_hash: 22caa3446c4d9eaadbf185d5a70e8810
-config_hash: 2a2b777ab44d79bde60bf3d1b5a2ed7b
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-3ee0511fa1bf59b2bb44d947f7d884fd8522ef872d33bab141874941b76f1dd7.yml
+openapi_spec_hash: 394bbfe74954625b70de9c85d553e3d0
+config_hash: c7d506cdee510785b58defa1a626e20b
diff --git a/api.md b/api.md
index a7971ab..2c84497 100644
--- a/api.md
+++ b/api.md
@@ -42,6 +42,9 @@ Types:
- Annotation
- ContentPart
- ErrorInfo
+- FunctionCallOutputItem
+- FunctionTool
+- InputItem
- OutputItem
- ResponseStreamChunk
- ResponsesCreateParams
diff --git a/src/client.ts b/src/client.ts
index b109e01..11dd6e3 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -20,6 +20,9 @@ import {
Annotation,
ContentPart,
ErrorInfo,
+ FunctionCallOutputItem,
+ FunctionTool,
+ InputItem,
OutputItem,
ResponseCreateParams,
ResponseCreateParamsNonStreaming,
@@ -757,6 +760,9 @@ export declare namespace Perplexity {
type Annotation as Annotation,
type ContentPart as ContentPart,
type ErrorInfo as ErrorInfo,
+ type FunctionCallOutputItem as FunctionCallOutputItem,
+ type FunctionTool as FunctionTool,
+ type InputItem as InputItem,
type OutputItem as OutputItem,
type ResponseStreamChunk as ResponseStreamChunk,
type ResponsesCreateParams as ResponsesCreateParams,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 68ec53a..17a23e3 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -8,6 +8,9 @@ export {
type Annotation,
type ContentPart,
type ErrorInfo,
+ type FunctionCallOutputItem,
+ type FunctionTool,
+ type InputItem,
type OutputItem,
type ResponseStreamChunk,
type ResponsesCreateParams,
diff --git a/src/resources/responses.ts b/src/resources/responses.ts
index 734dd4a..5b7c45c 100644
--- a/src/resources/responses.ts
+++ b/src/resources/responses.ts
@@ -79,10 +79,139 @@ export interface ErrorInfo {
type?: string;
}
+export interface FunctionCallOutputItem {
+ id: string;
+
+ /**
+ * JSON string of arguments
+ */
+ arguments: string;
+
+ /**
+ * Correlates with function_call_output input
+ */
+ call_id: string;
+
+ name: string;
+
+ /**
+ * Status of a response or output item
+ */
+ status: 'completed' | 'failed' | 'in_progress' | 'requires_action';
+
+ type: 'function_call';
+
+ /**
+ * Base64-encoded opaque signature for thinking models
+ */
+ thought_signature?: string;
+}
+
+export interface FunctionTool {
+ /**
+ * The name of the function
+ */
+ name: string;
+
+ type: 'function';
+
+ /**
+ * A description of what the function does
+ */
+ description?: string;
+
+ /**
+ * JSON Schema defining the function's parameters
+ */
+ parameters?: { [key: string]: unknown };
+
+ /**
+ * Whether to enable strict schema validation
+ */
+ strict?: boolean;
+}
+
+export type InputItem =
+ | InputItem.InputMessage
+ | InputItem.FunctionCallOutputInput
+ | InputItem.FunctionCallInput;
+
+export namespace InputItem {
+ export interface InputMessage {
+ /**
+ * Message content - either a string or array of content parts
+ */
+ content: string | Array;
+
+ role: 'user' | 'assistant' | 'system' | 'developer';
+
+ type: 'message';
+ }
+
+ export namespace InputMessage {
+ export interface ContentPartArray {
+ type: 'input_text' | 'input_image';
+
+ image_url?: string;
+
+ text?: string;
+ }
+ }
+
+ export interface FunctionCallOutputInput {
+ /**
+ * The call_id from function_call output
+ */
+ call_id: string;
+
+ /**
+ * Function result (JSON string)
+ */
+ output: string;
+
+ type: 'function_call_output';
+
+ /**
+ * Function name (required by some providers)
+ */
+ name?: string;
+
+ /**
+ * Base64-encoded signature from function_call
+ */
+ thought_signature?: string;
+ }
+
+ export interface FunctionCallInput {
+ /**
+ * Function arguments (JSON string)
+ */
+ arguments: string;
+
+ /**
+ * The call_id that correlates with function_call_output
+ */
+ call_id: string;
+
+ /**
+ * The function name
+ */
+ name: string;
+
+ type: 'function_call';
+
+ /**
+ * Base64-encoded signature for thinking models
+ */
+ thought_signature?: string;
+ }
+}
+
export type OutputItem =
| OutputItem.MessageOutputItem
| OutputItem.SearchResultsOutputItem
- | OutputItem.FetchURLResultsOutputItem;
+ | OutputItem.FetchURLResultsOutputItem
+ | FunctionCallOutputItem;
export namespace OutputItem {
export interface MessageOutputItem {
@@ -98,7 +227,7 @@ export namespace OutputItem {
/**
* Status of a response or output item
*/
- status: 'completed' | 'failed' | 'in_progress';
+ status: 'completed' | 'failed' | 'in_progress' | 'requires_action';
type: 'message';
}
@@ -231,7 +360,7 @@ export namespace ResponseStreamChunk {
/**
* Status of a response or output item
*/
- status: 'completed' | 'failed' | 'in_progress';
+ status: 'completed' | 'failed' | 'in_progress' | 'requires_action';
error?: ResponsesAPI.ErrorInfo;
@@ -295,7 +424,7 @@ export namespace ResponseStreamChunk {
/**
* Status of a response or output item
*/
- status: 'completed' | 'failed' | 'in_progress';
+ status: 'completed' | 'failed' | 'in_progress' | 'requires_action';
error?: ResponsesAPI.ErrorInfo;
@@ -358,7 +487,7 @@ export namespace ResponseStreamChunk {
/**
* Status of a response or output item
*/
- status: 'completed' | 'failed' | 'in_progress';
+ status: 'completed' | 'failed' | 'in_progress' | 'requires_action';
error?: ResponsesAPI.ErrorInfo;
@@ -769,9 +898,9 @@ export namespace ResponseStreamChunk {
export interface ResponsesCreateParams {
/**
- * Input content - either a string or array of input messages
+ * Input content - either a string or array of input items
*/
- input: string | Array;
+ input: string | Array;
/**
* System instructions for the model
@@ -831,31 +960,10 @@ export interface ResponsesCreateParams {
/**
* Tools available to the model
*/
- tools?: Array;
+ tools?: Array;
}
export namespace ResponsesCreateParams {
- export interface InputMessageArray {
- /**
- * Message content - either a string or array of content parts
- */
- content: string | Array;
-
- role: 'user' | 'assistant' | 'system' | 'developer';
-
- type?: 'message';
- }
-
- export namespace InputMessageArray {
- export interface ContentPartArray {
- type: 'input_text' | 'input_image';
-
- image_url?: string;
-
- text?: string;
- }
- }
-
export interface Reasoning {
/**
* How much effort the model should spend on reasoning
@@ -1002,7 +1110,7 @@ export interface ResponseCreateResponse {
/**
* Status of a response or output item
*/
- status: 'completed' | 'failed' | 'in_progress';
+ status: 'completed' | 'failed' | 'in_progress' | 'requires_action';
error?: ErrorInfo;
@@ -1019,9 +1127,9 @@ export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCr
export interface ResponseCreateParamsBase {
/**
- * Input content - either a string or array of input messages
+ * Input content - either a string or array of input items
*/
- input: string | Array;
+ input: string | Array;
/**
* System instructions for the model
@@ -1081,31 +1189,10 @@ export interface ResponseCreateParamsBase {
/**
* Tools available to the model
*/
- tools?: Array;
+ tools?: Array;
}
export namespace ResponseCreateParams {
- export interface InputMessageArray {
- /**
- * Message content - either a string or array of content parts
- */
- content: string | Array;
-
- role: 'user' | 'assistant' | 'system' | 'developer';
-
- type?: 'message';
- }
-
- export namespace InputMessageArray {
- export interface ContentPartArray {
- type: 'input_text' | 'input_image';
-
- image_url?: string;
-
- text?: string;
- }
- }
-
export interface Reasoning {
/**
* How much effort the model should spend on reasoning
@@ -1206,6 +1293,9 @@ export declare namespace Responses {
type Annotation as Annotation,
type ContentPart as ContentPart,
type ErrorInfo as ErrorInfo,
+ type FunctionCallOutputItem as FunctionCallOutputItem,
+ type FunctionTool as FunctionTool,
+ type InputItem as InputItem,
type OutputItem as OutputItem,
type ResponseStreamChunk as ResponseStreamChunk,
type ResponsesCreateParams as ResponsesCreateParams,
From 3fe2c2ce8aaab9adaf3731193d8c2a1db25b6fb6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 27 Jan 2026 19:57:10 +0000
Subject: [PATCH 2/2] release: 0.23.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 8 ++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 788b0fa..97bce11 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.22.0"
+ ".": "0.23.0"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4bb4a9e..2cd5fac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.23.0 (2026-01-27)
+
+Full Changelog: [v0.22.0...v0.23.0](https://github.com/perplexityai/perplexity-node/compare/v0.22.0...v0.23.0)
+
+### Features
+
+* **api:** manual updates ([de17f18](https://github.com/perplexityai/perplexity-node/commit/de17f18fbf32d065a22680c06210baaf7ed9c9b8))
+
## 0.22.0 (2026-01-24)
Full Changelog: [v0.21.0...v0.22.0](https://github.com/perplexityai/perplexity-node/compare/v0.21.0...v0.22.0)
diff --git a/package.json b/package.json
index 492ac00..814f0fd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@perplexity-ai/perplexity_ai",
- "version": "0.22.0",
+ "version": "0.23.0",
"description": "The official TypeScript library for the Perplexity API",
"author": "Perplexity ",
"types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index db66d33..d77fad4 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.22.0'; // x-release-please-version
+export const VERSION = '0.23.0'; // x-release-please-version