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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.31.0"
".": "0.32.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 11
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai/perplexity-c9a4aa7e01c6335588f6d246f5bc498d70ab7164bb8b753c7e031086af55cc64.yml
openapi_spec_hash: 4018d7234b9acf008622b921908b6329
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai/perplexity-bf28ac7f1a24d27aa2ba57b65aaf7fc99f492d28ab969f570d86abc339c842e9.yml
openapi_spec_hash: 2f086349fe584965e24e58bddbb91672
config_hash: 059988c88f0dc18e9e393daed94b5eb6
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.32.0 (2026-06-02)

Full Changelog: [v0.31.0...v0.32.0](https://github.com/perplexityai/perplexity-node/compare/v0.31.0...v0.32.0)

### Features

* **search:** add search_context_size to search and web_search tool ([8244b60](https://github.com/perplexityai/perplexity-node/commit/8244b60de27b12a0c996ce2edfee93bd3d8b3912))

## 0.31.0 (2026-05-30)

Full Changelog: [v0.30.1...v0.31.0](https://github.com/perplexityai/perplexity-node/compare/v0.30.1...v0.31.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@perplexity-ai/perplexity_ai",
"version": "0.31.0",
"version": "0.32.0",
"description": "The official TypeScript library for the Perplexity API",
"author": "Perplexity <api@perplexity.ai>",
"types": "dist/index.d.ts",
Expand Down
12 changes: 12 additions & 0 deletions src/resources/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,12 @@ export namespace ResponsesCreateParams {

max_tokens_per_page?: number;

/**
* Search context size (low, medium, high). Omit when supplying explicit max_tokens
* / max_tokens_per_page.
*/
search_context_size?: 'low' | 'medium' | 'high';

/**
* User's geographic location for search personalization
*/
Expand Down Expand Up @@ -1125,6 +1131,12 @@ export namespace ResponseCreateParams {

max_tokens_per_page?: number;

/**
* Search context size (low, medium, high). Omit when supplying explicit max_tokens
* / max_tokens_per_page.
*/
search_context_size?: 'low' | 'medium' | 'high';

/**
* User's geographic location for search personalization
*/
Expand Down
7 changes: 7 additions & 0 deletions src/resources/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ export interface SearchCreateParams {

search_before_date_filter?: string | null;

/**
* Controls how much content is retrieved per result. Larger sizes return more page
* content at higher cost. Defaults to "high". Omit when supplying explicit
* max_tokens / max_tokens_per_page.
*/
search_context_size?: 'low' | 'medium' | 'high';

search_domain_filter?: Array<string> | null;

search_language_filter?: Array<string> | null;
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.31.0'; // x-release-please-version
export const VERSION = '0.32.0'; // x-release-please-version
1 change: 1 addition & 0 deletions tests/api-resources/responses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe('resource responses', () => {
},
max_tokens: 0,
max_tokens_per_page: 0,
search_context_size: 'low',
user_location: {
city: 'city',
country: 'country',
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('resource search', () => {
max_tokens_per_page: 0,
search_after_date_filter: 'search_after_date_filter',
search_before_date_filter: 'search_before_date_filter',
search_context_size: 'low',
search_domain_filter: ['string'],
search_language_filter: ['string'],
search_mode: 'web',
Expand Down