From 17f20a687efdd187f588d770bbd8d31013d42a4b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 10 Mar 2026 02:44:05 +0000
Subject: [PATCH 01/27] chore(internal): update dependencies to address
dependabot vulnerabilities
---
package.json | 11 +++++++++++
yarn.lock | 39 ++++++---------------------------------
2 files changed, 17 insertions(+), 33 deletions(-)
diff --git a/package.json b/package.json
index 67ef33c..a649926 100644
--- a/package.json
+++ b/package.json
@@ -50,6 +50,17 @@
"typescript": "5.8.3",
"typescript-eslint": "8.31.1"
},
+ "overrides": {
+ "minimatch": "^9.0.5"
+ },
+ "pnpm": {
+ "overrides": {
+ "minimatch": "^9.0.5"
+ }
+ },
+ "resolutions": {
+ "minimatch": "^9.0.5"
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
diff --git a/yarn.lock b/yarn.lock
index fc9f262..078f09a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1219,15 +1219,7 @@ baseline-browser-mapping@^2.9.0:
resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz#3b6af0bc032445bca04de58caa9a87cfe921cbb3"
integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==
-brace-expansion@^1.1.7:
- version "1.1.12"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843"
- integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==
- dependencies:
- balanced-match "^1.0.0"
- concat-map "0.0.1"
-
-brace-expansion@^2.0.1:
+brace-expansion@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
@@ -1395,11 +1387,6 @@ commander@^10.0.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
-concat-map@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
- integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
-
convert-source-map@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
@@ -2600,26 +2587,12 @@ mimic-fn@^2.1.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
-minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
- integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
- dependencies:
- brace-expansion "^1.1.7"
-
-minimatch@^5.0.1:
- version "5.1.6"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
- integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
- dependencies:
- brace-expansion "^2.0.1"
-
-minimatch@^9.0.4:
- version "9.0.5"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
- integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
+minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2, minimatch@^5.0.1, minimatch@^9.0.4, minimatch@^9.0.5:
+ version "9.0.9"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.9.tgz#9b0cb9fcb78087f6fd7eababe2511c4d3d60574e"
+ integrity sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==
dependencies:
- brace-expansion "^2.0.1"
+ brace-expansion "^2.0.2"
minimist@^1.2.6:
version "1.2.6"
From 3b86286059a92b246e2edad7d477b9f26e7377a3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 17 Mar 2026 08:17:04 +0000
Subject: [PATCH 02/27] chore(internal): tweak CI branches
---
.github/workflows/ci.yml | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dc936bc..ac597c4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,12 +1,14 @@
name: CI
on:
push:
- branches-ignore:
- - 'generated'
- - 'codegen/**'
- - 'integrated/**'
- - 'stl-preview-head/**'
- - 'stl-preview-base/**'
+ branches:
+ - '**'
+ - '!integrated/**'
+ - '!stl-preview-head/**'
+ - '!stl-preview-base/**'
+ - '!generated'
+ - '!codegen/**'
+ - 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
From 6d6d1d990d8a3f398a43bd2a36bbc99eb7a63da6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 20 Mar 2026 03:04:30 +0000
Subject: [PATCH 03/27] refactor(tests): switch from prism to steady
---
CONTRIBUTING.md | 2 +-
scripts/mock | 26 ++++++++++-----------
scripts/test | 16 ++++++-------
tests/api-resources/beta/findall.test.ts | 6 ++---
tests/api-resources/beta/task-group.test.ts | 12 ++++------
tests/api-resources/beta/task-run.test.ts | 3 +--
6 files changed, 29 insertions(+), 36 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 54dc56d..e1f535d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -65,7 +65,7 @@ $ pnpm link --global parallel-web
## Running tests
-Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
+Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.
```sh
$ ./scripts/mock
diff --git a/scripts/mock b/scripts/mock
index bcf3b39..38201de 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -19,34 +19,34 @@ fi
echo "==> Starting mock server with URL ${URL}"
-# Run prism mock on the given spec
+# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
+ npm exec --package=@stdy/cli@0.19.3 -- steady --version
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
+ npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" &> .stdy.log &
- # Wait for server to come online (max 30s)
+ # Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
attempts=0
- while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
+ while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do
+ if ! kill -0 $! 2>/dev/null; then
+ echo
+ cat .stdy.log
+ exit 1
+ fi
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
- echo "Timed out waiting for Prism server to start"
- cat .prism.log
+ echo "Timed out waiting for Steady server to start"
+ cat .stdy.log
exit 1
fi
echo -n "."
sleep 0.1
done
- if grep -q "✖ fatal" ".prism.log"; then
- cat .prism.log
- exit 1
- fi
-
echo
else
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
+ npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 7bce051..af1c7a5 100755
--- a/scripts/test
+++ b/scripts/test
@@ -9,8 +9,8 @@ GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
-function prism_is_running() {
- curl --silent "http://localhost:4010" >/dev/null 2>&1
+function steady_is_running() {
+ curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1
}
kill_server_on_port() {
@@ -25,7 +25,7 @@ function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}
-if ! is_overriding_api_base_url && ! prism_is_running ; then
+if ! is_overriding_api_base_url && ! steady_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT
@@ -36,19 +36,19 @@ fi
if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
-elif ! prism_is_running ; then
- echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
+elif ! steady_is_running ; then
+ echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
- echo -e "spec to the prism command:"
+ echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets${NC}"
echo
exit 1
else
- echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
+ echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}"
echo
fi
diff --git a/tests/api-resources/beta/findall.test.ts b/tests/api-resources/beta/findall.test.ts
index c4c3b5b..1b07a2b 100644
--- a/tests/api-resources/beta/findall.test.ts
+++ b/tests/api-resources/beta/findall.test.ts
@@ -140,8 +140,7 @@ describe('resource findall', () => {
});
});
- // Mock server doesn't support text/event-stream responses
- test.skip('events', async () => {
+ test('events', async () => {
const responsePromise = client.beta.findall.events('findall_id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
@@ -152,8 +151,7 @@ describe('resource findall', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Mock server doesn't support text/event-stream responses
- test.skip('events: request options and params are passed correctly', async () => {
+ test('events: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.beta.findall.events(
diff --git a/tests/api-resources/beta/task-group.test.ts b/tests/api-resources/beta/task-group.test.ts
index 4fe45b6..94709df 100644
--- a/tests/api-resources/beta/task-group.test.ts
+++ b/tests/api-resources/beta/task-group.test.ts
@@ -97,8 +97,7 @@ describe('resource taskGroup', () => {
});
});
- // Mock server doesn't support text/event-stream responses
- test.skip('events', async () => {
+ test('events', async () => {
const responsePromise = client.beta.taskGroup.events('taskgroup_id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
@@ -109,8 +108,7 @@ describe('resource taskGroup', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Mock server doesn't support text/event-stream responses
- test.skip('events: request options and params are passed correctly', async () => {
+ test('events: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.beta.taskGroup.events(
@@ -121,8 +119,7 @@ describe('resource taskGroup', () => {
).rejects.toThrow(Parallel.NotFoundError);
});
- // Mock server doesn't support text/event-stream responses
- test.skip('getRuns', async () => {
+ test('getRuns', async () => {
const responsePromise = client.beta.taskGroup.getRuns('taskgroup_id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
@@ -133,8 +130,7 @@ describe('resource taskGroup', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Mock server doesn't support text/event-stream responses
- test.skip('getRuns: request options and params are passed correctly', async () => {
+ test('getRuns: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.beta.taskGroup.getRuns(
diff --git a/tests/api-resources/beta/task-run.test.ts b/tests/api-resources/beta/task-run.test.ts
index 2319b54..79e347f 100644
--- a/tests/api-resources/beta/task-run.test.ts
+++ b/tests/api-resources/beta/task-run.test.ts
@@ -60,8 +60,7 @@ describe('resource taskRun', () => {
});
});
- // Mock server doesn't support text/event-stream responses
- test.skip('events', async () => {
+ test('events', async () => {
const responsePromise = client.beta.taskRun.events('run_id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
From 8f03ca85200f5e5635d89e2462d0c7caa5ea71cb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 20 Mar 2026 22:57:21 +0000
Subject: [PATCH 04/27] feat(api): task to GA v1
task to GA v1
has type aliasing, want to see if they generate properly
---
.stats.yml | 8 +-
api.md | 7 +
src/client.ts | 12 +
src/resources/beta/api.md | 12 +-
src/resources/beta/beta.ts | 11 +-
src/resources/beta/findall.ts | 10 +-
src/resources/beta/index.ts | 8 +-
src/resources/beta/task-group.ts | 8 +-
src/resources/beta/task-run.ts | 358 +++++----------------------
src/resources/index.ts | 6 +
src/resources/task-run.ts | 357 +++++++++++++++++++++++---
tests/api-resources/task-run.test.ts | 29 ++-
12 files changed, 462 insertions(+), 364 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index d30019d..78ef153 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 22
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-970b780e86490322cc3c7e2b57f140ca6766a3d9f6e0d3402837ebaf7c2183fc.yml
-openapi_spec_hash: 34f784ce2dec796048e6780924bae08f
-config_hash: a398d153133d8884bed4e5256a0ae818
+configured_endpoints: 21
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-4c5daa70b1b504ddfe167bd7cb0546603015728bf61c87fbb7dfe8f63dd2cc68.yml
+openapi_spec_hash: 7f9fde767931feceec531529c9a1c19d
+config_hash: 84377e96caa95526984350fcc3c5b4c7
diff --git a/api.md b/api.md
index fff6b5d..1d0c8ba 100644
--- a/api.md
+++ b/api.md
@@ -13,20 +13,27 @@ Types:
- AutoSchema
- Citation
+- ErrorEvent
- FieldBasis
- JsonSchema
+- McpServer
+- McpToolCall
- RunInput
- TaskRun
+- TaskRunEvent
- TaskRunJsonOutput
- TaskRunResult
- TaskRunTextOutput
- TaskSpec
- TextSchema
+- Webhook
+- TaskRunEventsResponse
Methods:
- client.taskRun.create({ ...params }) -> TaskRun
- client.taskRun.retrieve(runID) -> TaskRun
+- client.taskRun.events(runID) -> TaskRunEventsResponse
- client.taskRun.result(runID, { ...params }) -> TaskRunResult
# [Beta](src/resources/beta/api.md)
diff --git a/src/client.ts b/src/client.ts
index 99463c0..032242a 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -20,17 +20,23 @@ import { APIPromise } from './core/api-promise';
import {
AutoSchema,
Citation,
+ ErrorEvent,
FieldBasis,
JsonSchema,
+ McpServer,
+ McpToolCall,
RunInput,
TaskRun,
TaskRunCreateParams,
+ TaskRunEvent,
+ TaskRunEventsResponse,
TaskRunJsonOutput,
TaskRunResult,
TaskRunResultParams,
TaskRunTextOutput,
TaskSpec,
TextSchema,
+ Webhook,
} from './resources/task-run';
import { Beta } from './resources/beta/beta';
import { type Fetch } from './internal/builtin-types';
@@ -750,14 +756,20 @@ export declare namespace Parallel {
type TaskRun as TaskRun,
type AutoSchema as AutoSchema,
type Citation as Citation,
+ type ErrorEvent as ErrorEvent,
type FieldBasis as FieldBasis,
type JsonSchema as JsonSchema,
+ type McpServer as McpServer,
+ type McpToolCall as McpToolCall,
type RunInput as RunInput,
+ type TaskRunEvent as TaskRunEvent,
type TaskRunJsonOutput as TaskRunJsonOutput,
type TaskRunResult as TaskRunResult,
type TaskRunTextOutput as TaskRunTextOutput,
type TaskSpec as TaskSpec,
type TextSchema as TextSchema,
+ type Webhook as Webhook,
+ type TaskRunEventsResponse as TaskRunEventsResponse,
type TaskRunCreateParams as TaskRunCreateParams,
type TaskRunResultParams as TaskRunResultParams,
};
diff --git a/src/resources/beta/api.md b/src/resources/beta/api.md
index ed3542d..8caa653 100644
--- a/src/resources/beta/api.md
+++ b/src/resources/beta/api.md
@@ -20,21 +20,21 @@ Methods:
Types:
+- ParallelBeta
+- TaskRunEventsResponse
- BetaRunInput
- BetaTaskRunResult
-- ErrorEvent
+- Webhook
- McpServer
- McpToolCall
-- ParallelBeta
- TaskRunEvent
-- Webhook
-- TaskRunEventsResponse
+- ErrorEvent
Methods:
-- client.beta.taskRun.create({ ...params }) -> TaskRun
+- client.beta.taskRun.create({ ...params }) -> TaskRun
- client.beta.taskRun.events(runID) -> TaskRunEventsResponse
-- client.beta.taskRun.result(runID, { ...params }) -> BetaTaskRunResult
+- client.beta.taskRun.result(runID, { ...params }) -> TaskRunResult
## TaskGroup
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index fd499a6..f907447 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -65,9 +65,6 @@ export class Beta extends APIResource {
/**
* Extracts relevant content from specific web URLs.
- *
- * To access this endpoint, pass the `parallel-beta` header with the value
- * `search-extract-2025-10-10`.
*/
extract(params: BetaExtractParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
@@ -427,15 +424,15 @@ export declare namespace Beta {
export {
TaskRun as TaskRun,
+ type ParallelBeta as ParallelBeta,
+ type TaskRunEventsResponse as TaskRunEventsResponse,
type BetaRunInput as BetaRunInput,
type BetaTaskRunResult as BetaTaskRunResult,
- type ErrorEvent as ErrorEvent,
+ type Webhook as Webhook,
type McpServer as McpServer,
type McpToolCall as McpToolCall,
- type ParallelBeta as ParallelBeta,
type TaskRunEvent as TaskRunEvent,
- type Webhook as Webhook,
- type TaskRunEventsResponse as TaskRunEventsResponse,
+ type ErrorEvent as ErrorEvent,
type TaskRunCreateParams as TaskRunCreateParams,
type TaskRunResultParams as TaskRunResultParams,
};
diff --git a/src/resources/beta/findall.ts b/src/resources/beta/findall.ts
index dcbd930..486027c 100644
--- a/src/resources/beta/findall.ts
+++ b/src/resources/beta/findall.ts
@@ -284,7 +284,7 @@ export interface FindAllEnrichInput {
/**
* List of MCP servers to use for the task.
*/
- mcp_servers?: Array | null;
+ mcp_servers?: Array | null;
/**
* Processor to use for the task.
@@ -435,7 +435,7 @@ export interface FindAllRunInput {
/**
* Webhooks for Task Runs.
*/
- webhook?: BetaTaskRunAPI.Webhook | null;
+ webhook?: TaskRunAPI.Webhook | null;
}
export namespace FindAllRunInput {
@@ -668,7 +668,7 @@ export type FindAllEventsResponse =
| FindAllSchemaUpdatedEvent
| FindAllRunStatusEvent
| FindAllCandidateMatchStatusEvent
- | BetaTaskRunAPI.ErrorEvent;
+ | TaskRunAPI.ErrorEvent;
export interface FindAllCreateParams {
/**
@@ -710,7 +710,7 @@ export interface FindAllCreateParams {
/**
* Body param: Webhooks for Task Runs.
*/
- webhook?: BetaTaskRunAPI.Webhook | null;
+ webhook?: TaskRunAPI.Webhook | null;
/**
* Header param: Optional header to specify the beta version(s) to enable.
@@ -775,7 +775,7 @@ export interface FindAllEnrichParams {
/**
* Body param: List of MCP servers to use for the task.
*/
- mcp_servers?: Array | null;
+ mcp_servers?: Array | null;
/**
* Body param: Processor to use for the task.
diff --git a/src/resources/beta/index.ts b/src/resources/beta/index.ts
index 50d9d9f..cca4f66 100644
--- a/src/resources/beta/index.ts
+++ b/src/resources/beta/index.ts
@@ -60,15 +60,15 @@ export {
} from './task-group';
export {
TaskRun,
+ type ParallelBeta,
+ type TaskRunEventsResponse,
type BetaRunInput,
type BetaTaskRunResult,
- type ErrorEvent,
+ type Webhook,
type McpServer,
type McpToolCall,
- type ParallelBeta,
type TaskRunEvent,
- type Webhook,
- type TaskRunEventsResponse,
+ type ErrorEvent,
type TaskRunCreateParams,
type TaskRunResultParams,
} from './task-run';
diff --git a/src/resources/beta/task-group.ts b/src/resources/beta/task-group.ts
index 109ee8a..c13665d 100644
--- a/src/resources/beta/task-group.ts
+++ b/src/resources/beta/task-group.ts
@@ -201,8 +201,8 @@ export interface TaskGroupStatus {
*/
export type TaskGroupEventsResponse =
| TaskGroupEventsResponse.TaskGroupStatusEvent
- | BetaTaskRunAPI.TaskRunEvent
- | BetaTaskRunAPI.ErrorEvent;
+ | TaskRunAPI.TaskRunEvent
+ | TaskRunAPI.ErrorEvent;
export namespace TaskGroupEventsResponse {
/**
@@ -231,7 +231,7 @@ export namespace TaskGroupEventsResponse {
*
* May indicate completion, cancellation, or failure.
*/
-export type TaskGroupGetRunsResponse = BetaTaskRunAPI.TaskRunEvent | BetaTaskRunAPI.ErrorEvent;
+export type TaskGroupGetRunsResponse = TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
export interface TaskGroupCreateParams {
/**
@@ -246,7 +246,7 @@ export interface TaskGroupAddRunsParams {
* request. If you'd like to add more runs, split them across multiple TaskGroup
* POST requests.
*/
- inputs: Array;
+ inputs: Array;
/**
* Body param: Specification for a task.
diff --git a/src/resources/beta/task-run.ts b/src/resources/beta/task-run.ts
index f05382b..cb7cb2c 100644
--- a/src/resources/beta/task-run.ts
+++ b/src/resources/beta/task-run.ts
@@ -1,7 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
-import * as BetaTaskRunAPI from './task-run';
import * as Shared from '../shared';
import * as TaskRunAPI from '../task-run';
import { APIPromise } from '../../core/api-promise';
@@ -13,6 +12,8 @@ import { path } from '../../internal/utils/path';
/**
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
* - Output metadata: citations, excerpts, reasoning, and confidence per field
+ *
+ * @deprecated Use GA Task Run instead
*/
export class TaskRun extends APIResource {
/**
@@ -21,10 +22,12 @@ export class TaskRun extends APIResource {
* Returns immediately with a run object in status 'queued'.
*
* Beta features can be enabled by setting the 'parallel-beta' header.
+ *
+ * @deprecated Use GA Task Run instead
*/
create(params: TaskRunCreateParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
- return this._client.post('/v1/tasks/runs?beta=true', {
+ return this._client.post('/v1/tasks/runs', {
body,
...options,
headers: buildHeaders([
@@ -42,6 +45,8 @@ export class TaskRun extends APIResource {
*
* For task runs that did not have enable_events set to true during creation, the
* frequency of events will be reduced.
+ *
+ * @deprecated Use GA Task Run instead
*/
events(runID: string, options?: RequestOptions): APIPromise> {
return this._client.get(path`/v1beta/tasks/runs/${runID}/events`, {
@@ -56,14 +61,16 @@ export class TaskRun extends APIResource {
/**
* Retrieves a run result by run_id, blocking until the run is completed.
+ *
+ * @deprecated Use GA Task Run instead
*/
result(
runID: string,
params: TaskRunResultParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
const { betas, ...query } = params ?? {};
- return this._client.get(path`/v1/tasks/runs/${runID}/result?beta=true`, {
+ return this._client.get(path`/v1/tasks/runs/${runID}/result`, {
query,
...options,
headers: buildHeaders([
@@ -74,243 +81,6 @@ export class TaskRun extends APIResource {
}
}
-/**
- * Task run input with additional beta fields.
- */
-export interface BetaRunInput {
- /**
- * Input to the task, either text or a JSON object.
- */
- input: string | { [key: string]: unknown };
-
- /**
- * Processor to use for the task.
- */
- processor: string;
-
- /**
- * Controls tracking of task run execution progress. When set to true, progress
- * events are recorded and can be accessed via the
- * [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
- * false, no progress events are tracked. Note that progress tracking cannot be
- * enabled after a run has been created. The flag is set to true by default for
- * premium processors (pro and above). To enable this feature in your requests,
- * specify `events-sse-2025-07-24` as one of the values in `parallel-beta` header
- * (for API calls) or `betas` param (for the SDKs).
- */
- enable_events?: boolean | null;
-
- /**
- * Optional list of MCP servers to use for the run. To enable this feature in your
- * requests, specify `mcp-server-2025-07-17` as one of the values in
- * `parallel-beta` header (for API calls) or `betas` param (for the SDKs).
- */
- mcp_servers?: Array | null;
-
- /**
- * User-provided metadata stored with the run. Keys and values must be strings with
- * a maximum length of 16 and 512 characters respectively.
- */
- metadata?: { [key: string]: string | number | boolean } | null;
-
- /**
- * Interaction ID to use as context for this request.
- */
- previous_interaction_id?: string | null;
-
- /**
- * Source policy for web search results.
- *
- * This policy governs which sources are allowed/disallowed in results.
- */
- source_policy?: Shared.SourcePolicy | null;
-
- /**
- * Specification for a task.
- *
- * Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
- * Not specifying a TaskSpec is the same as setting an auto output schema.
- *
- * For convenience bare strings are also accepted as input or output schemas.
- */
- task_spec?: TaskRunAPI.TaskSpec | null;
-
- /**
- * Webhooks for Task Runs.
- */
- webhook?: Webhook | null;
-}
-
-/**
- * Result of a beta task run. Available only if beta headers are specified.
- */
-export interface BetaTaskRunResult {
- /**
- * Output from the task conforming to the output schema.
- */
- output: BetaTaskRunResult.BetaTaskRunTextOutput | BetaTaskRunResult.BetaTaskRunJsonOutput;
-
- /**
- * Beta task run object with status 'completed'.
- */
- run: TaskRunAPI.TaskRun;
-}
-
-export namespace BetaTaskRunResult {
- /**
- * Output from a task that returns text.
- */
- export interface BetaTaskRunTextOutput {
- /**
- * Basis for the output. To include per-list-element basis entries, send the
- * `parallel-beta` header with the value `field-basis-2025-11-25` when creating the
- * run.
- */
- basis: Array;
-
- /**
- * Text output from the task.
- */
- content: string;
-
- /**
- * The type of output being returned, as determined by the output schema of the
- * task spec.
- */
- type: 'text';
-
- /**
- * Always None.
- */
- beta_fields?: { [key: string]: unknown } | null;
-
- /**
- * MCP tool calls made by the task.
- */
- mcp_tool_calls?: Array | null;
- }
-
- /**
- * Output from a task that returns JSON.
- */
- export interface BetaTaskRunJsonOutput {
- /**
- * Basis for the output. To include per-list-element basis entries, send the
- * `parallel-beta` header with the value `field-basis-2025-11-25` when creating the
- * run.
- */
- basis: Array;
-
- /**
- * Output from the task as a native JSON object, as determined by the output schema
- * of the task spec.
- */
- content: { [key: string]: unknown };
-
- /**
- * The type of output being returned, as determined by the output schema of the
- * task spec.
- */
- type: 'json';
-
- /**
- * Always None.
- */
- beta_fields?: { [key: string]: unknown } | null;
-
- /**
- * MCP tool calls made by the task.
- */
- mcp_tool_calls?: Array | null;
-
- /**
- * Output schema for the Task Run. Populated only if the task was executed with an
- * auto schema.
- */
- output_schema?: { [key: string]: unknown } | null;
- }
-}
-
-/**
- * Event indicating an error.
- */
-export interface ErrorEvent {
- /**
- * Error.
- */
- error: Shared.ErrorObject;
-
- /**
- * Event type; always 'error'.
- */
- type: 'error';
-}
-
-/**
- * MCP server configuration.
- */
-export interface McpServer {
- /**
- * Name of the MCP server.
- */
- name: string;
-
- /**
- * URL of the MCP server.
- */
- url: string;
-
- /**
- * List of allowed tools for the MCP server.
- */
- allowed_tools?: Array | null;
-
- /**
- * Headers for the MCP server.
- */
- headers?: { [key: string]: string } | null;
-
- /**
- * Type of MCP server being configured. Always `url`.
- */
- type?: 'url';
-}
-
-/**
- * Result of an MCP tool call.
- */
-export interface McpToolCall {
- /**
- * Arguments used to call the MCP tool.
- */
- arguments: string;
-
- /**
- * Name of the MCP server.
- */
- server_name: string;
-
- /**
- * Identifier for the tool call.
- */
- tool_call_id: string;
-
- /**
- * Name of the tool being called.
- */
- tool_name: string;
-
- /**
- * Output received from the tool call, if successful.
- */
- content?: string | null;
-
- /**
- * Error message if the tool call failed.
- */
- error?: string | null;
-}
-
/**
* Model for the parallel-beta header.
*/
@@ -323,61 +93,14 @@ export type ParallelBeta =
| 'field-basis-2025-11-25'
| (string & {});
-/**
- * Event when a task run transitions to a non-active status.
- *
- * May indicate completion, cancellation, or failure.
- */
-export interface TaskRunEvent {
- /**
- * Cursor to resume the event stream. Always empty for non Task Group runs.
- */
- event_id: string | null;
-
- /**
- * Task run object.
- */
- run: TaskRunAPI.TaskRun;
-
- /**
- * Event type; always 'task_run.state'.
- */
- type: 'task_run.state';
-
- /**
- * Task run input with additional beta fields.
- */
- input?: BetaRunInput | null;
-
- /**
- * Output from the run; included only if requested and if status == `completed`.
- */
- output?: TaskRunAPI.TaskRunTextOutput | TaskRunAPI.TaskRunJsonOutput | null;
-}
-
-/**
- * Webhooks for Task Runs.
- */
-export interface Webhook {
- /**
- * URL for the webhook.
- */
- url: string;
-
- /**
- * Event types to send the webhook notifications for.
- */
- event_types?: Array<'task_run.status'>;
-}
-
/**
* A progress update for a task run.
*/
export type TaskRunEventsResponse =
| TaskRunEventsResponse.TaskRunProgressStatsEvent
| TaskRunEventsResponse.TaskRunProgressMessageEvent
- | TaskRunEvent
- | ErrorEvent;
+ | TaskRunAPI.TaskRunEvent
+ | TaskRunAPI.ErrorEvent;
export namespace TaskRunEventsResponse {
/**
@@ -449,6 +172,41 @@ export namespace TaskRunEventsResponse {
}
}
+/**
+ * @deprecated Use parallel.types.task_run.TaskRunInput instead
+ */
+export type BetaRunInput = TaskRunAPI.RunInput;
+
+/**
+ * @deprecated Use parallel.types.task_run.TaskRunResult instead
+ */
+export type BetaTaskRunResult = TaskRunAPI.TaskRunResult;
+
+/**
+ * @deprecated Use parallel.types.task_run.Webhook instead
+ */
+export type Webhook = TaskRunAPI.Webhook;
+
+/**
+ * @deprecated Use parallel.types.task_run.McpServer instead
+ */
+export type McpServer = TaskRunAPI.McpServer;
+
+/**
+ * @deprecated Use parallel.types.task_run.McpToolCall instead
+ */
+export type McpToolCall = TaskRunAPI.McpToolCall;
+
+/**
+ * @deprecated Use parallel.types.task_run.TaskRunEvent instead
+ */
+export type TaskRunEvent = TaskRunAPI.TaskRunEvent;
+
+/**
+ * @deprecated Use parallel.types.task_run.ErrorEvent instead
+ */
+export type ErrorEvent = TaskRunAPI.ErrorEvent;
+
export interface TaskRunCreateParams {
/**
* Body param: Input to the task, either text or a JSON object.
@@ -466,18 +224,14 @@ export interface TaskRunCreateParams {
* [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
* false, no progress events are tracked. Note that progress tracking cannot be
* enabled after a run has been created. The flag is set to true by default for
- * premium processors (pro and above). To enable this feature in your requests,
- * specify `events-sse-2025-07-24` as one of the values in `parallel-beta` header
- * (for API calls) or `betas` param (for the SDKs).
+ * premium processors (pro and above).
*/
enable_events?: boolean | null;
/**
- * Body param: Optional list of MCP servers to use for the run. To enable this
- * feature in your requests, specify `mcp-server-2025-07-17` as one of the values
- * in `parallel-beta` header (for API calls) or `betas` param (for the SDKs).
+ * Body param: Optional list of MCP servers to use for the run.
*/
- mcp_servers?: Array | null;
+ mcp_servers?: Array | null;
/**
* Body param: User-provided metadata stored with the run. Keys and values must be
@@ -510,7 +264,7 @@ export interface TaskRunCreateParams {
/**
* Body param: Webhooks for Task Runs.
*/
- webhook?: Webhook | null;
+ webhook?: TaskRunAPI.Webhook | null;
/**
* Header param: Optional header to specify the beta version(s) to enable.
@@ -532,15 +286,15 @@ export interface TaskRunResultParams {
export declare namespace TaskRun {
export {
+ type ParallelBeta as ParallelBeta,
+ type TaskRunEventsResponse as TaskRunEventsResponse,
type BetaRunInput as BetaRunInput,
type BetaTaskRunResult as BetaTaskRunResult,
- type ErrorEvent as ErrorEvent,
+ type Webhook as Webhook,
type McpServer as McpServer,
type McpToolCall as McpToolCall,
- type ParallelBeta as ParallelBeta,
type TaskRunEvent as TaskRunEvent,
- type Webhook as Webhook,
- type TaskRunEventsResponse as TaskRunEventsResponse,
+ type ErrorEvent as ErrorEvent,
type TaskRunCreateParams as TaskRunCreateParams,
type TaskRunResultParams as TaskRunResultParams,
};
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 709471e..2514db6 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -6,14 +6,20 @@ export {
TaskRun,
type AutoSchema,
type Citation,
+ type ErrorEvent,
type FieldBasis,
type JsonSchema,
+ type McpServer,
+ type McpToolCall,
type RunInput,
+ type TaskRunEvent,
type TaskRunJsonOutput,
type TaskRunResult,
type TaskRunTextOutput,
type TaskSpec,
type TextSchema,
+ type Webhook,
+ type TaskRunEventsResponse,
type TaskRunCreateParams,
type TaskRunResultParams,
} from './task-run';
diff --git a/src/resources/task-run.ts b/src/resources/task-run.ts
index 9b1300e..07b9070 100644
--- a/src/resources/task-run.ts
+++ b/src/resources/task-run.ts
@@ -2,7 +2,10 @@
import { APIResource } from '../core/resource';
import * as Shared from './shared';
+import * as BetaTaskRunAPI from './beta/task-run';
import { APIPromise } from '../core/api-promise';
+import { Stream } from '../core/streaming';
+import { buildHeaders } from '../internal/headers';
import { RequestOptions } from '../internal/request-options';
import { path } from '../internal/utils/path';
@@ -18,8 +21,16 @@ export class TaskRun extends APIResource {
*
* Beta features can be enabled by setting the 'parallel-beta' header.
*/
- create(body: TaskRunCreateParams, options?: RequestOptions): APIPromise {
- return this._client.post('/v1/tasks/runs', { body, ...options });
+ create(params: TaskRunCreateParams, options?: RequestOptions): APIPromise {
+ const { betas, ...body } = params;
+ return this._client.post('/v1/tasks/runs', {
+ body,
+ ...options,
+ headers: buildHeaders([
+ { ...(betas?.toString() != null ? { 'parallel-beta': betas?.toString() } : undefined) },
+ options?.headers,
+ ]),
+ });
}
/**
@@ -31,15 +42,40 @@ export class TaskRun extends APIResource {
return this._client.get(path`/v1/tasks/runs/${runID}`, options);
}
+ /**
+ * Streams events for a task run.
+ *
+ * Returns a stream of events showing progress updates and state changes for the
+ * task run.
+ *
+ * For task runs that did not have enable_events set to true during creation, the
+ * frequency of events will be reduced.
+ */
+ events(runID: string, options?: RequestOptions): APIPromise> {
+ return this._client.get(path`/v1/tasks/runs/${runID}/events`, {
+ ...options,
+ headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
+ stream: true,
+ }) as APIPromise>;
+ }
+
/**
* Retrieves a run result by run_id, blocking until the run is completed.
*/
result(
runID: string,
- query: TaskRunResultParams | null | undefined = {},
+ params: TaskRunResultParams | null | undefined = {},
options?: RequestOptions,
): APIPromise {
- return this._client.get(path`/v1/tasks/runs/${runID}/result`, { query, ...options });
+ const { betas, ...query } = params ?? {};
+ return this._client.get(path`/v1/tasks/runs/${runID}/result`, {
+ query,
+ ...options,
+ headers: buildHeaders([
+ { ...(betas?.toString() != null ? { 'parallel-beta': betas?.toString() } : undefined) },
+ options?.headers,
+ ]),
+ });
}
}
@@ -74,6 +110,21 @@ export interface Citation {
title?: string | null;
}
+/**
+ * Event indicating an error.
+ */
+export interface ErrorEvent {
+ /**
+ * Error.
+ */
+ error: Shared.ErrorObject;
+
+ /**
+ * Event type; always 'error'.
+ */
+ type: 'error';
+}
+
/**
* Citations and reasoning supporting one field of a task output.
*/
@@ -115,6 +166,71 @@ export interface JsonSchema {
type?: 'json';
}
+/**
+ * MCP server configuration.
+ */
+export interface McpServer {
+ /**
+ * Name of the MCP server.
+ */
+ name: string;
+
+ /**
+ * URL of the MCP server.
+ */
+ url: string;
+
+ /**
+ * List of allowed tools for the MCP server.
+ */
+ allowed_tools?: Array | null;
+
+ /**
+ * Headers for the MCP server.
+ */
+ headers?: { [key: string]: string } | null;
+
+ /**
+ * Type of MCP server being configured. Always `url`.
+ */
+ type?: 'url';
+}
+
+/**
+ * Result of an MCP tool call.
+ */
+export interface McpToolCall {
+ /**
+ * Arguments used to call the MCP tool.
+ */
+ arguments: string;
+
+ /**
+ * Name of the MCP server.
+ */
+ server_name: string;
+
+ /**
+ * Identifier for the tool call.
+ */
+ tool_call_id: string;
+
+ /**
+ * Name of the tool being called.
+ */
+ tool_name: string;
+
+ /**
+ * Output received from the tool call, if successful.
+ */
+ content?: string | null;
+
+ /**
+ * Error message if the tool call failed.
+ */
+ error?: string | null;
+}
+
/**
* Request to run a task.
*/
@@ -129,6 +245,21 @@ export interface RunInput {
*/
processor: string;
+ /**
+ * Controls tracking of task run execution progress. When set to true, progress
+ * events are recorded and can be accessed via the
+ * [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
+ * false, no progress events are tracked. Note that progress tracking cannot be
+ * enabled after a run has been created. The flag is set to true by default for
+ * premium processors (pro and above).
+ */
+ enable_events?: boolean | null;
+
+ /**
+ * Optional list of MCP servers to use for the run.
+ */
+ mcp_servers?: Array | null;
+
/**
* User-provided metadata stored with the run. Keys and values must be strings with
* a maximum length of 16 and 512 characters respectively.
@@ -156,6 +287,11 @@ export interface RunInput {
* For convenience bare strings are also accepted as input or output schemas.
*/
task_spec?: TaskSpec | null;
+
+ /**
+ * Webhooks for Task Runs.
+ */
+ webhook?: Webhook | null;
}
/**
@@ -220,6 +356,38 @@ export interface TaskRun {
warnings?: Array | null;
}
+/**
+ * Event when a task run transitions to a non-active status.
+ *
+ * May indicate completion, cancellation, or failure.
+ */
+export interface TaskRunEvent {
+ /**
+ * Cursor to resume the event stream. Always empty for non Task Group runs.
+ */
+ event_id: string | null;
+
+ /**
+ * Task run object.
+ */
+ run: TaskRun;
+
+ /**
+ * Event type; always 'task_run.state'.
+ */
+ type: 'task_run.state';
+
+ /**
+ * Request to run a task.
+ */
+ input?: RunInput | null;
+
+ /**
+ * Output from the run; included only if requested and if status == `completed`.
+ */
+ output?: TaskRunTextOutput | TaskRunJsonOutput | null;
+}
+
/**
* Output from a task that returns JSON.
*/
@@ -244,19 +412,16 @@ export interface TaskRunJsonOutput {
type: 'json';
/**
- * Additional fields from beta features used in this task run. When beta features
- * are specified during both task run creation and result retrieval, this field
- * will be empty and instead the relevant beta attributes will be directly included
- * in the `BetaTaskRunJsonOutput` or corresponding output type. However, if beta
- * features were specified during task run creation but not during result
- * retrieval, this field will contain the dump of fields from those beta features.
- * Each key represents the beta feature version (one amongst parallel-beta headers)
- * and the values correspond to the beta feature attributes, if any. For now, only
- * MCP server beta features have attributes. For example,
- * `{mcp-server-2025-07-17: [{'server_name':'mcp_server', 'tool_call_id': 'tc_123', ...}]}}`
+ * @deprecated Deprecated. mcp-server-2025-07-17 is now included directly in the
+ * output (e.g. mcp_tool_calls).
*/
beta_fields?: { [key: string]: unknown } | null;
+ /**
+ * MCP tool calls made by the task.
+ */
+ mcp_tool_calls?: Array | null;
+
/**
* Output schema for the Task Run. Populated only if the task was executed with an
* auto schema.
@@ -300,18 +465,15 @@ export interface TaskRunTextOutput {
type: 'text';
/**
- * Additional fields from beta features used in this task run. When beta features
- * are specified during both task run creation and result retrieval, this field
- * will be empty and instead the relevant beta attributes will be directly included
- * in the `BetaTaskRunJsonOutput` or corresponding output type. However, if beta
- * features were specified during task run creation but not during result
- * retrieval, this field will contain the dump of fields from those beta features.
- * Each key represents the beta feature version (one amongst parallel-beta headers)
- * and the values correspond to the beta feature attributes, if any. For now, only
- * MCP server beta features have attributes. For example,
- * `{mcp-server-2025-07-17: [{'server_name':'mcp_server', 'tool_call_id': 'tc_123', ...}]}}`
+ * @deprecated Deprecated. mcp-server-2025-07-17 is now included directly in the
+ * output (e.g. mcp_tool_calls).
*/
beta_fields?: { [key: string]: unknown } | null;
+
+ /**
+ * MCP tool calls made by the task.
+ */
+ mcp_tool_calls?: Array | null;
}
/**
@@ -353,37 +515,146 @@ export interface TextSchema {
type?: 'text';
}
+/**
+ * Webhooks for Task Runs.
+ */
+export interface Webhook {
+ /**
+ * URL for the webhook.
+ */
+ url: string;
+
+ /**
+ * Event types to send the webhook notifications for.
+ */
+ event_types?: Array<'task_run.status'>;
+}
+
+/**
+ * A progress update for a task run.
+ */
+export type TaskRunEventsResponse =
+ | TaskRunEventsResponse.TaskRunProgressStatsEvent
+ | TaskRunEventsResponse.TaskRunProgressMessageEvent
+ | TaskRunEvent
+ | ErrorEvent;
+
+export namespace TaskRunEventsResponse {
+ /**
+ * A progress update for a task run.
+ */
+ export interface TaskRunProgressStatsEvent {
+ /**
+ * Completion percentage of the task run. Ranges from 0 to 100 where 0 indicates no
+ * progress and 100 indicates completion.
+ */
+ progress_meter: number;
+
+ /**
+ * Source stats describing progress so far.
+ */
+ source_stats: TaskRunProgressStatsEvent.SourceStats;
+
+ /**
+ * Event type; always 'task_run.progress_stats'.
+ */
+ type: 'task_run.progress_stats';
+ }
+
+ export namespace TaskRunProgressStatsEvent {
+ /**
+ * Source stats describing progress so far.
+ */
+ export interface SourceStats {
+ /**
+ * Number of sources considered in processing the task.
+ */
+ num_sources_considered: number | null;
+
+ /**
+ * Number of sources read in processing the task.
+ */
+ num_sources_read: number | null;
+
+ /**
+ * A sample of URLs of sources read in processing the task.
+ */
+ sources_read_sample: Array | null;
+ }
+ }
+
+ /**
+ * A message for a task run progress update.
+ */
+ export interface TaskRunProgressMessageEvent {
+ /**
+ * Progress update message.
+ */
+ message: string;
+
+ /**
+ * Timestamp of the message.
+ */
+ timestamp: string | null;
+
+ /**
+ * Event type; always starts with 'task_run.progress_msg'.
+ */
+ type:
+ | 'task_run.progress_msg.plan'
+ | 'task_run.progress_msg.search'
+ | 'task_run.progress_msg.result'
+ | 'task_run.progress_msg.tool_call'
+ | 'task_run.progress_msg.exec_status';
+ }
+}
+
export interface TaskRunCreateParams {
/**
- * Input to the task, either text or a JSON object.
+ * Body param: Input to the task, either text or a JSON object.
*/
input: string | { [key: string]: unknown };
/**
- * Processor to use for the task.
+ * Body param: Processor to use for the task.
*/
processor: string;
/**
- * User-provided metadata stored with the run. Keys and values must be strings with
- * a maximum length of 16 and 512 characters respectively.
+ * Body param: Controls tracking of task run execution progress. When set to true,
+ * progress events are recorded and can be accessed via the
+ * [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
+ * false, no progress events are tracked. Note that progress tracking cannot be
+ * enabled after a run has been created. The flag is set to true by default for
+ * premium processors (pro and above).
+ */
+ enable_events?: boolean | null;
+
+ /**
+ * Body param: Optional list of MCP servers to use for the run.
+ */
+ mcp_servers?: Array | null;
+
+ /**
+ * Body param: User-provided metadata stored with the run. Keys and values must be
+ * strings with a maximum length of 16 and 512 characters respectively.
*/
metadata?: { [key: string]: string | number | boolean } | null;
/**
- * Interaction ID to use as context for this request.
+ * Body param: Interaction ID to use as context for this request.
*/
previous_interaction_id?: string | null;
/**
- * Source policy for web search results.
+ * Body param: Source policy for web search results.
*
* This policy governs which sources are allowed/disallowed in results.
*/
source_policy?: Shared.SourcePolicy | null;
/**
- * Specification for a task.
+ * Body param: Specification for a task.
*
* Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
* Not specifying a TaskSpec is the same as setting an auto output schema.
@@ -391,25 +662,49 @@ export interface TaskRunCreateParams {
* For convenience bare strings are also accepted as input or output schemas.
*/
task_spec?: TaskSpec | null;
+
+ /**
+ * Body param: Webhooks for Task Runs.
+ */
+ webhook?: Webhook | null;
+
+ /**
+ * Header param: Optional header to specify the beta version(s) to enable.
+ */
+ betas?: Array;
}
export interface TaskRunResultParams {
+ /**
+ * Query param
+ */
timeout?: number;
+
+ /**
+ * Header param: Optional header to specify the beta version(s) to enable.
+ */
+ betas?: Array;
}
export declare namespace TaskRun {
export {
type AutoSchema as AutoSchema,
type Citation as Citation,
+ type ErrorEvent as ErrorEvent,
type FieldBasis as FieldBasis,
type JsonSchema as JsonSchema,
+ type McpServer as McpServer,
+ type McpToolCall as McpToolCall,
type RunInput as RunInput,
type TaskRun as TaskRun,
+ type TaskRunEvent as TaskRunEvent,
type TaskRunJsonOutput as TaskRunJsonOutput,
type TaskRunResult as TaskRunResult,
type TaskRunTextOutput as TaskRunTextOutput,
type TaskSpec as TaskSpec,
type TextSchema as TextSchema,
+ type Webhook as Webhook,
+ type TaskRunEventsResponse as TaskRunEventsResponse,
type TaskRunCreateParams as TaskRunCreateParams,
type TaskRunResultParams as TaskRunResultParams,
};
diff --git a/tests/api-resources/task-run.test.ts b/tests/api-resources/task-run.test.ts
index 1246671..cc4997d 100644
--- a/tests/api-resources/task-run.test.ts
+++ b/tests/api-resources/task-run.test.ts
@@ -26,6 +26,16 @@ describe('resource taskRun', () => {
const response = await client.taskRun.create({
input: 'What was the GDP of France in 2023?',
processor: 'base',
+ enable_events: true,
+ mcp_servers: [
+ {
+ name: 'name',
+ url: 'url',
+ allowed_tools: ['string'],
+ headers: { foo: 'string' },
+ type: 'url',
+ },
+ ],
metadata: { foo: 'string' },
previous_interaction_id: 'previous_interaction_id',
source_policy: {
@@ -45,6 +55,8 @@ describe('resource taskRun', () => {
},
input_schema: 'string',
},
+ webhook: { url: 'url', event_types: ['task_run.status'] },
+ betas: ['mcp-server-2025-07-17'],
});
});
@@ -59,6 +71,17 @@ describe('resource taskRun', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
+ test('events', async () => {
+ const responsePromise = client.taskRun.events('run_id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
test('result', async () => {
const responsePromise = client.taskRun.result('run_id');
const rawResponse = await responsePromise.asResponse();
@@ -73,7 +96,11 @@ describe('resource taskRun', () => {
test('result: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- client.taskRun.result('run_id', { timeout: 0 }, { path: '/_stainless_unknown_path' }),
+ client.taskRun.result(
+ 'run_id',
+ { timeout: 0, betas: ['mcp-server-2025-07-17'] },
+ { path: '/_stainless_unknown_path' },
+ ),
).rejects.toThrow(Parallel.NotFoundError);
});
});
From 3a21ec1835ddec9cc45d06af52d78151821a5c50 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 21 Mar 2026 03:42:17 +0000
Subject: [PATCH 05/27] chore(tests): bump steady to v0.19.4
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index 38201de..e1c19e8 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.19.3 -- steady --version
+ npm exec --package=@stdy/cli@0.19.4 -- steady --version
- npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index af1c7a5..8cf5220 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
echo
exit 1
From 85850b6a1088b370d9dbf47cf45db2b630e3a51d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 21 Mar 2026 03:46:31 +0000
Subject: [PATCH 06/27] chore(tests): bump steady to v0.19.5
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index e1c19e8..ab814d3 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.19.4 -- steady --version
+ npm exec --package=@stdy/cli@0.19.5 -- steady --version
- npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 8cf5220..907f7be 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
echo
exit 1
From 44b28740646b26bde693e3c784b9fa0b0916864b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 24 Mar 2026 03:44:21 +0000
Subject: [PATCH 07/27] chore(internal): update gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 2412bb7..c85fe68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.prism.log
+.stdy.log
node_modules
yarn-error.log
codegen.log
From 1fa3c6ae2305c44adab524a02e34289d7d84ea8f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 24 Mar 2026 03:48:53 +0000
Subject: [PATCH 08/27] chore(tests): bump steady to v0.19.6
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index ab814d3..b319bdf 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.19.5 -- steady --version
+ npm exec --package=@stdy/cli@0.19.6 -- steady --version
- npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 907f7be..8061e04 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
echo
exit 1
From a67ea61a1c016afbe9f6a32168baf1df5f1267a3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 25 Mar 2026 02:48:32 +0000
Subject: [PATCH 09/27] chore(ci): skip lint on metadata-only changes
Note that we still want to run tests, as these depend on the metadata.
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ac597c4..5b20c1d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/parallel-sdk-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
@@ -38,7 +38,7 @@ jobs:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/parallel-sdk-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
permissions:
contents: read
id-token: write
From 5334631e16969bb918233659cd253c10ac181e25 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 25 Mar 2026 02:49:01 +0000
Subject: [PATCH 10/27] chore(tests): bump steady to v0.19.7
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index b319bdf..09eb49f 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.19.6 -- steady --version
+ npm exec --package=@stdy/cli@0.19.7 -- steady --version
- npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 8061e04..a7cf561 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
echo
exit 1
From 94d54418380cf7b76bc7b2418fe0c38d9b4adf52 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 27 Mar 2026 04:45:47 +0000
Subject: [PATCH 11/27] chore(internal): update multipart form array
serialization
---
scripts/mock | 4 ++--
scripts/test | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index 09eb49f..290e21b 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -24,7 +24,7 @@ if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stdy/cli@0.19.7 -- steady --version
- npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index a7cf561..a1ebb5e 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo
exit 1
From 46fa759aca57b99b388a6328a23fd116894ec6e8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 28 Mar 2026 05:13:06 +0000
Subject: [PATCH 12/27] chore(internal): codegen related update
---
yarn.lock | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/yarn.lock b/yarn.lock
index 078f09a..e5e2a93 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1220,9 +1220,9 @@ baseline-browser-mapping@^2.9.0:
integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==
brace-expansion@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
- integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.3.tgz#0493338bdd58e319b1039c67cf7ee439892c01d9"
+ integrity sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==
dependencies:
balanced-match "^1.0.0"
From 5fe5db092909bcbb5c7d311b4f08d8ab946f91f8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 1 Apr 2026 06:11:43 +0000
Subject: [PATCH 13/27] chore(tests): bump steady to v0.20.1
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index 290e21b..15c2994 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.19.7 -- steady --version
+ npm exec --package=@stdy/cli@0.20.1 -- steady --version
- npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index a1ebb5e..7431f9f 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo
exit 1
From a6a363c06a5a21f94b39cd6cf8741ddf6182ed6d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 1 Apr 2026 06:15:43 +0000
Subject: [PATCH 14/27] chore(tests): bump steady to v0.20.2
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index 15c2994..5cd7c15 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.20.1 -- steady --version
+ npm exec --package=@stdy/cli@0.20.2 -- steady --version
- npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 7431f9f..a9d718c 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo
exit 1
From bd31a9abae974f70562da9389b155d2f9e583cfc Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 8 Apr 2026 00:16:12 +0000
Subject: [PATCH 15/27] feat(api): Update OpenAPI spec
---
.stats.yml | 4 ++--
src/resources/beta/task-group.ts | 8 +++++++-
tests/api-resources/beta/task-group.test.ts | 1 +
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 78ef153..e297159 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 21
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-4c5daa70b1b504ddfe167bd7cb0546603015728bf61c87fbb7dfe8f63dd2cc68.yml
-openapi_spec_hash: 7f9fde767931feceec531529c9a1c19d
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-8870e80e4ae564fa22febb630c65e14d914b4f48fcf76a9953c99e860704764a.yml
+openapi_spec_hash: fddc70c809ae1d3101d4b805265abb5a
config_hash: 84377e96caa95526984350fcc3c5b4c7
diff --git a/src/resources/beta/task-group.ts b/src/resources/beta/task-group.ts
index c13665d..aa1aaa2 100644
--- a/src/resources/beta/task-group.ts
+++ b/src/resources/beta/task-group.ts
@@ -49,8 +49,9 @@ export class TaskGroup extends APIResource {
params: TaskGroupAddRunsParams,
options?: RequestOptions,
): APIPromise {
- const { betas, ...body } = params;
+ const { refresh_status, betas, ...body } = params;
return this._client.post(path`/v1beta/tasks/groups/${taskGroupID}/runs`, {
+ query: { refresh_status },
body,
...options,
headers: buildHeaders([
@@ -248,6 +249,11 @@ export interface TaskGroupAddRunsParams {
*/
inputs: Array;
+ /**
+ * Query param
+ */
+ refresh_status?: boolean;
+
/**
* Body param: Specification for a task.
*
diff --git a/tests/api-resources/beta/task-group.test.ts b/tests/api-resources/beta/task-group.test.ts
index 94709df..3164594 100644
--- a/tests/api-resources/beta/task-group.test.ts
+++ b/tests/api-resources/beta/task-group.test.ts
@@ -81,6 +81,7 @@ describe('resource taskGroup', () => {
webhook: { url: 'url', event_types: ['task_run.status'] },
},
],
+ refresh_status: true,
default_task_spec: {
output_schema: {
json_schema: {
From 5601518a366f2d003c4435d937f04bd0b2f4c033 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 8 Apr 2026 00:25:37 +0000
Subject: [PATCH 16/27] feat(api): Remove full_content from OpenAPI Spec
---
.stats.yml | 4 ++--
src/resources/beta/beta.ts | 28 +--------------------------
tests/api-resources/beta/beta.test.ts | 1 -
3 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index e297159..14cb97f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 21
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-8870e80e4ae564fa22febb630c65e14d914b4f48fcf76a9953c99e860704764a.yml
-openapi_spec_hash: fddc70c809ae1d3101d4b805265abb5a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-728ba63c23bc2eb4fe37b429fb084ed7600ae50c8c652aeb0c787216c3ece07a.yml
+openapi_spec_hash: 3568175d488fc927f1710b3ebca87cfc
config_hash: 84377e96caa95526984350fcc3c5b4c7
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index f907447..0fd6631 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -180,11 +180,6 @@ export interface ExtractResult {
*/
excerpts?: Array | null;
- /**
- * Full content from the URL formatted as markdown, if requested.
- */
- full_content?: string | null;
-
/**
* Publish date of the webpage in YYYY-MM-DD format, if available.
*/
@@ -291,8 +286,7 @@ export interface BetaExtractParams {
/**
* Body param: Include excerpts from each URL relevant to the search objective and
- * queries. Note that if neither objective nor search_queries is provided, excerpts
- * are redundant with full content.
+ * queries.
*/
excerpts?: boolean | ExcerptSettings;
@@ -301,12 +295,6 @@ export interface BetaExtractParams {
*/
fetch_policy?: FetchPolicy | null;
- /**
- * Body param: Include full content from each URL. Note that if neither objective
- * nor search_queries is provided, excerpts are redundant with full content.
- */
- full_content?: boolean | BetaExtractParams.FullContentSettings;
-
/**
* Body param: If provided, focuses extracted content on the specified search
* objective.
@@ -325,20 +313,6 @@ export interface BetaExtractParams {
betas?: Array;
}
-export namespace BetaExtractParams {
- /**
- * Optional settings for returning full content.
- */
- export interface FullContentSettings {
- /**
- * Optional limit on the number of characters to include in the full content for
- * each url. Full content always starts at the beginning of the page and is
- * truncated at the limit if necessary.
- */
- max_chars_per_result?: number | null;
- }
-}
-
export interface BetaSearchParams {
/**
* Body param: Optional settings to configure excerpt generation.
diff --git a/tests/api-resources/beta/beta.test.ts b/tests/api-resources/beta/beta.test.ts
index bbd84c2..304ccdd 100644
--- a/tests/api-resources/beta/beta.test.ts
+++ b/tests/api-resources/beta/beta.test.ts
@@ -28,7 +28,6 @@ describe('resource beta', () => {
max_age_seconds: 86400,
timeout_seconds: 60,
},
- full_content: true,
objective: 'objective',
search_queries: ['string'],
betas: ['mcp-server-2025-07-17'],
From 1ede4ba052196d020b05ad4aee529d757601d3bd Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 9 Apr 2026 07:31:13 +0000
Subject: [PATCH 17/27] chore(internal): codegen related update
---
src/internal/utils/env.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/internal/utils/env.ts b/src/internal/utils/env.ts
index 2d84800..cc5fa0f 100644
--- a/src/internal/utils/env.ts
+++ b/src/internal/utils/env.ts
@@ -9,10 +9,10 @@
*/
export const readEnv = (env: string): string | undefined => {
if (typeof (globalThis as any).process !== 'undefined') {
- return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
+ return (globalThis as any).process.env?.[env]?.trim() || undefined;
}
if (typeof (globalThis as any).Deno !== 'undefined') {
- return (globalThis as any).Deno.env?.get?.(env)?.trim();
+ return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
}
return undefined;
};
From 31fdbd0279c88476b7ad7eafdf28d50a8747c3c5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 10 Apr 2026 23:31:11 +0000
Subject: [PATCH 18/27] feat(api): Add Search and Extract v1 and associated
types
---
.stats.yml | 8 +-
api.md | 18 ++
scripts/detect-breaking-changes | 1 +
src/client.ts | 50 ++++
src/resources/beta/api.md | 6 +-
src/resources/beta/beta.ts | 115 ++++-----
src/resources/beta/task-group.ts | 6 +-
src/resources/beta/task-run.ts | 7 +
src/resources/index.ts | 12 +
src/resources/task-run.ts | 7 +
src/resources/top-level.ts | 345 ++++++++++++++++++++++++++
tests/api-resources/beta/beta.test.ts | 1 +
tests/api-resources/top-level.test.ts | 75 ++++++
13 files changed, 574 insertions(+), 77 deletions(-)
create mode 100644 src/resources/top-level.ts
create mode 100644 tests/api-resources/top-level.test.ts
diff --git a/.stats.yml b/.stats.yml
index 14cb97f..c8b869e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 21
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-728ba63c23bc2eb4fe37b429fb084ed7600ae50c8c652aeb0c787216c3ece07a.yml
-openapi_spec_hash: 3568175d488fc927f1710b3ebca87cfc
-config_hash: 84377e96caa95526984350fcc3c5b4c7
+configured_endpoints: 23
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-44048676c9b07d49ed9dbee5fad53d145eddaea5ba682b6557681c5a7e04f8ed.yml
+openapi_spec_hash: e239787937742b1bc15e7f211fe3c518
+config_hash: 42d4e6039ef223ba2a824414a94da176
diff --git a/api.md b/api.md
index 1d0c8ba..1c15dbb 100644
--- a/api.md
+++ b/api.md
@@ -1,3 +1,21 @@
+# Parallel
+
+Types:
+
+- ExcerptSettings
+- ExtractError
+- ExtractResponse
+- ExtractResult
+- FetchPolicy
+- SearchResult
+- UsageItem
+- WebSearchResult
+
+Methods:
+
+- client.extract({ ...params }) -> ExtractResponse
+- client.search({ ...params }) -> SearchResult
+
# Shared
Types:
diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes
index e7ddd5b..dca3fbb 100755
--- a/scripts/detect-breaking-changes
+++ b/scripts/detect-breaking-changes
@@ -7,6 +7,7 @@ cd "$(dirname "$0")/.."
echo "==> Detecting breaking changes"
TEST_PATHS=(
+ tests/api-resources/top-level.test.ts
tests/api-resources/task-run.test.ts
tests/api-resources/beta/beta.test.ts
tests/api-resources/beta/task-run.test.ts
diff --git a/src/client.ts b/src/client.ts
index 032242a..53d8ad4 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -16,6 +16,19 @@ import { VERSION } from './version';
import * as Errors from './core/error';
import * as Uploads from './core/uploads';
import * as API from './resources/index';
+import * as TopLevelAPI from './resources/top-level';
+import {
+ ExcerptSettings,
+ ExtractError,
+ ExtractParams,
+ ExtractResponse,
+ ExtractResult,
+ FetchPolicy,
+ SearchParams,
+ SearchResult,
+ UsageItem,
+ WebSearchResult,
+} from './resources/top-level';
import { APIPromise } from './core/api-promise';
import {
AutoSchema,
@@ -220,6 +233,23 @@ export class Parallel {
return this.baseURL !== 'https://api.parallel.ai';
}
+ /**
+ * Extracts relevant content from specific web URLs.
+ */
+ extract(
+ body: TopLevelAPI.ExtractParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this.post('/v1/extract', { body, ...options });
+ }
+
+ /**
+ * Searches the web.
+ */
+ search(body: TopLevelAPI.SearchParams, options?: RequestOptions): APIPromise {
+ return this.post('/v1/search', { body, ...options });
+ }
+
protected defaultQuery(): Record | undefined {
return this._options.defaultQuery;
}
@@ -742,6 +772,13 @@ export class Parallel {
/**
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
* - Output metadata: citations, excerpts, reasoning, and confidence per field
+ *
+ * Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
+ * - Submit hundreds or thousands of Tasks as a single group
+ * - Observe group progress and receive results as they complete
+ * - Real-time updates via Server-Sent Events (SSE)
+ * - Add tasks to an existing group while it is running
+ * - Group-level retry and error aggregation
*/
taskRun: API.TaskRun = new API.TaskRun(this);
beta: API.Beta = new API.Beta(this);
@@ -752,6 +789,19 @@ Parallel.Beta = Beta;
export declare namespace Parallel {
export type RequestOptions = Opts.RequestOptions;
+ export {
+ type ExcerptSettings as ExcerptSettings,
+ type ExtractError as ExtractError,
+ type ExtractResponse as ExtractResponse,
+ type ExtractResult as ExtractResult,
+ type FetchPolicy as FetchPolicy,
+ type SearchResult as SearchResult,
+ type UsageItem as UsageItem,
+ type WebSearchResult as WebSearchResult,
+ type ExtractParams as ExtractParams,
+ type SearchParams as SearchParams,
+ };
+
export {
type TaskRun as TaskRun,
type AutoSchema as AutoSchema,
diff --git a/src/resources/beta/api.md b/src/resources/beta/api.md
index 8caa653..eb5aef7 100644
--- a/src/resources/beta/api.md
+++ b/src/resources/beta/api.md
@@ -3,13 +3,13 @@
Types:
- ExcerptSettings
-- ExtractError
- ExtractResponse
- ExtractResult
-- FetchPolicy
- SearchResult
-- UsageItem
- WebSearchResult
+- ExtractError
+- FetchPolicy
+- UsageItem
Methods:
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index 0fd6631..aa30c9f 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -2,6 +2,7 @@
import { APIResource } from '../../core/resource';
import * as Shared from '../shared';
+import * as TopLevelAPI from '../top-level';
import * as FindAllAPI from './findall';
import {
FindAll,
@@ -114,28 +115,6 @@ export interface ExcerptSettings {
max_chars_total?: number | null;
}
-/**
- * Extract error details.
- */
-export interface ExtractError {
- /**
- * Content returned for http client or server errors, if any.
- */
- content: string | null;
-
- /**
- * Error type.
- */
- error_type: string;
-
- /**
- * HTTP status code, if available.
- */
- http_status_code: number | null;
-
- url: string;
-}
-
/**
* Fetch result.
*/
@@ -143,7 +122,7 @@ export interface ExtractResponse {
/**
* Extract errors: requested URLs not in the results.
*/
- errors: Array;
+ errors: Array;
/**
* Extract request ID, e.g. `extract_cad0a6d2dec046bd95ae900527d880e7`
@@ -158,7 +137,7 @@ export interface ExtractResponse {
/**
* Usage metrics for the extract request.
*/
- usage?: Array | null;
+ usage?: Array | null;
/**
* Warnings for the extract request, if any.
@@ -180,6 +159,11 @@ export interface ExtractResult {
*/
excerpts?: Array | null;
+ /**
+ * Full content from the URL formatted as markdown, if requested.
+ */
+ full_content?: string | null;
+
/**
* Publish date of the webpage in YYYY-MM-DD format, if available.
*/
@@ -191,28 +175,6 @@ export interface ExtractResult {
title?: string | null;
}
-/**
- * Policy for live fetching web results.
- */
-export interface FetchPolicy {
- /**
- * If false, fallback to cached content older than max-age if live fetch fails or
- * times out. If true, returns an error instead.
- */
- disable_cache_fallback?: boolean;
-
- /**
- * Maximum age of cached content in seconds to trigger a live fetch. Minimum value
- * 600 seconds (10 minutes).
- */
- max_age_seconds?: number | null;
-
- /**
- * Timeout in seconds for fetching live content if unavailable in cache.
- */
- timeout_seconds?: number | null;
-}
-
/**
* Output for the Search API.
*/
@@ -230,7 +192,7 @@ export interface SearchResult {
/**
* Usage metrics for the search request.
*/
- usage?: Array | null;
+ usage?: Array | null;
/**
* Warnings for the search request, if any.
@@ -238,21 +200,6 @@ export interface SearchResult {
warnings?: Array | null;
}
-/**
- * Usage item for a single operation.
- */
-export interface UsageItem {
- /**
- * Count of the SKU.
- */
- count: number;
-
- /**
- * Name of the SKU.
- */
- name: string;
-}
-
/**
* A single search result from the web search API.
*/
@@ -278,6 +225,12 @@ export interface WebSearchResult {
title?: string | null;
}
+export type ExtractError = TopLevelAPI.ExtractError;
+
+export type FetchPolicy = TopLevelAPI.FetchPolicy;
+
+export type UsageItem = TopLevelAPI.UsageItem;
+
export interface BetaExtractParams {
/**
* Body param
@@ -286,14 +239,21 @@ export interface BetaExtractParams {
/**
* Body param: Include excerpts from each URL relevant to the search objective and
- * queries.
+ * queries. Note that if neither objective nor search_queries is provided, excerpts
+ * are redundant with full content.
*/
excerpts?: boolean | ExcerptSettings;
/**
* Body param: Policy for live fetching web results.
*/
- fetch_policy?: FetchPolicy | null;
+ fetch_policy?: TopLevelAPI.FetchPolicy | null;
+
+ /**
+ * Body param: Include full content from each URL. Note that if neither objective
+ * nor search_queries is provided, excerpts are redundant with full content.
+ */
+ full_content?: boolean | BetaExtractParams.FullContentSettings;
/**
* Body param: If provided, focuses extracted content on the specified search
@@ -313,6 +273,20 @@ export interface BetaExtractParams {
betas?: Array;
}
+export namespace BetaExtractParams {
+ /**
+ * Optional settings for returning full content.
+ */
+ export interface FullContentSettings {
+ /**
+ * Optional limit on the number of characters to include in the full content for
+ * each url. Full content always starts at the beginning of the page and is
+ * truncated at the limit if necessary.
+ */
+ max_chars_per_result?: number | null;
+ }
+}
+
export interface BetaSearchParams {
/**
* Body param: Optional settings to configure excerpt generation.
@@ -322,7 +296,12 @@ export interface BetaSearchParams {
/**
* Body param: Policy for live fetching web results.
*/
- fetch_policy?: FetchPolicy | null;
+ fetch_policy?: TopLevelAPI.FetchPolicy | null;
+
+ /**
+ * Body param: ISO 3166-1 alpha-2 country code for geo-targeted search results.
+ */
+ location?: string | null;
/**
* @deprecated Body param: DEPRECATED: Use `excerpts.max_chars_per_result` instead.
@@ -385,13 +364,13 @@ Beta.FindAll = FindAll;
export declare namespace Beta {
export {
type ExcerptSettings as ExcerptSettings,
- type ExtractError as ExtractError,
type ExtractResponse as ExtractResponse,
type ExtractResult as ExtractResult,
- type FetchPolicy as FetchPolicy,
type SearchResult as SearchResult,
- type UsageItem as UsageItem,
type WebSearchResult as WebSearchResult,
+ type ExtractError as ExtractError,
+ type FetchPolicy as FetchPolicy,
+ type UsageItem as UsageItem,
type BetaExtractParams as BetaExtractParams,
type BetaSearchParams as BetaSearchParams,
};
diff --git a/src/resources/beta/task-group.ts b/src/resources/beta/task-group.ts
index aa1aaa2..18abd51 100644
--- a/src/resources/beta/task-group.ts
+++ b/src/resources/beta/task-group.ts
@@ -11,13 +11,15 @@ import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
/**
- * The Task Group API is currently in beta and enables batch execution of many independent Task runs with group-level monitoring and failure handling.
+ * The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
+ * - Output metadata: citations, excerpts, reasoning, and confidence per field
+ *
+ * Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
* - Submit hundreds or thousands of Tasks as a single group
* - Observe group progress and receive results as they complete
* - Real-time updates via Server-Sent Events (SSE)
* - Add tasks to an existing group while it is running
* - Group-level retry and error aggregation
- * Status: beta and subject to change.
*/
export class TaskGroup extends APIResource {
/**
diff --git a/src/resources/beta/task-run.ts b/src/resources/beta/task-run.ts
index cb7cb2c..c35888c 100644
--- a/src/resources/beta/task-run.ts
+++ b/src/resources/beta/task-run.ts
@@ -13,6 +13,13 @@ import { path } from '../../internal/utils/path';
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
* - Output metadata: citations, excerpts, reasoning, and confidence per field
*
+ * Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
+ * - Submit hundreds or thousands of Tasks as a single group
+ * - Observe group progress and receive results as they complete
+ * - Real-time updates via Server-Sent Events (SSE)
+ * - Add tasks to an existing group while it is running
+ * - Group-level retry and error aggregation
+ *
* @deprecated Use GA Task Run instead
*/
export class TaskRun extends APIResource {
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 2514db6..31ab9af 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -23,3 +23,15 @@ export {
type TaskRunCreateParams,
type TaskRunResultParams,
} from './task-run';
+export {
+ type ExcerptSettings,
+ type ExtractError,
+ type ExtractResponse,
+ type ExtractResult,
+ type FetchPolicy,
+ type SearchResult,
+ type UsageItem,
+ type WebSearchResult,
+ type ExtractParams,
+ type SearchParams,
+} from './top-level';
diff --git a/src/resources/task-run.ts b/src/resources/task-run.ts
index 07b9070..5982318 100644
--- a/src/resources/task-run.ts
+++ b/src/resources/task-run.ts
@@ -12,6 +12,13 @@ import { path } from '../internal/utils/path';
/**
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
* - Output metadata: citations, excerpts, reasoning, and confidence per field
+ *
+ * Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
+ * - Submit hundreds or thousands of Tasks as a single group
+ * - Observe group progress and receive results as they complete
+ * - Real-time updates via Server-Sent Events (SSE)
+ * - Add tasks to an existing group while it is running
+ * - Group-level retry and error aggregation
*/
export class TaskRun extends APIResource {
/**
diff --git a/src/resources/top-level.ts b/src/resources/top-level.ts
new file mode 100644
index 0000000..c9a1cfe
--- /dev/null
+++ b/src/resources/top-level.ts
@@ -0,0 +1,345 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import * as TopLevelAPI from './top-level';
+import * as Shared from './shared';
+
+/**
+ * Optional settings for returning relevant excerpts.
+ */
+export interface ExcerptSettings {
+ /**
+ * Optional upper bound on the total number of characters to include per url.
+ * Excerpts may contain fewer characters than this limit to maximize relevance and
+ * token efficiency. Values below 1000 will be automatically set to 1000.
+ */
+ max_chars_per_result?: number | null;
+}
+
+/**
+ * Extract error details.
+ */
+export interface ExtractError {
+ /**
+ * Content returned for http client or server errors, if any.
+ */
+ content: string | null;
+
+ /**
+ * Error type.
+ */
+ error_type: string;
+
+ /**
+ * HTTP status code, if available.
+ */
+ http_status_code: number | null;
+
+ url: string;
+}
+
+/**
+ * Extract response (GA).
+ */
+export interface ExtractResponse {
+ /**
+ * Extract errors: requested URLs not in the results.
+ */
+ errors: Array;
+
+ /**
+ * Extract request ID, e.g. `extract_cad0a6d2dec046bd95ae900527d880e7`
+ */
+ extract_id: string;
+
+ /**
+ * Successful extract results.
+ */
+ results: Array;
+
+ /**
+ * Usage metrics for the extract request.
+ */
+ usage?: Array | null;
+
+ /**
+ * Warnings for the extract request, if any.
+ */
+ warnings?: Array | null;
+}
+
+/**
+ * Extract result for a single URL.
+ */
+export interface ExtractResult {
+ /**
+ * Relevant excerpted content from the URL, formatted as markdown.
+ */
+ excerpts: Array;
+
+ /**
+ * URL associated with the search result.
+ */
+ url: string;
+
+ /**
+ * Full content from the URL formatted as markdown, if requested.
+ */
+ full_content?: string | null;
+
+ /**
+ * Publish date of the webpage in YYYY-MM-DD format, if available.
+ */
+ publish_date?: string | null;
+
+ /**
+ * Title of the webpage, if available.
+ */
+ title?: string | null;
+}
+
+/**
+ * Policy for live fetching web results.
+ */
+export interface FetchPolicy {
+ /**
+ * If false, fallback to cached content older than max-age if live fetch fails or
+ * times out. If true, returns an error instead.
+ */
+ disable_cache_fallback?: boolean;
+
+ /**
+ * Maximum age of cached content in seconds to trigger a live fetch. Minimum value
+ * 600 seconds (10 minutes).
+ */
+ max_age_seconds?: number | null;
+
+ /**
+ * Timeout in seconds for fetching live content if unavailable in cache.
+ */
+ timeout_seconds?: number | null;
+}
+
+/**
+ * Search response (GA).
+ */
+export interface SearchResult {
+ /**
+ * A list of search results, ordered by decreasing relevance.
+ */
+ results: Array;
+
+ /**
+ * Search ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`
+ */
+ search_id: string;
+
+ /**
+ * Usage metrics for the search request.
+ */
+ usage?: Array | null;
+
+ /**
+ * Warnings for the search request, if any.
+ */
+ warnings?: Array | null;
+}
+
+/**
+ * Usage item for a single operation.
+ */
+export interface UsageItem {
+ /**
+ * Count of the SKU.
+ */
+ count: number;
+
+ /**
+ * Name of the SKU.
+ */
+ name: string;
+}
+
+/**
+ * A single search result from the web search API.
+ */
+export interface WebSearchResult {
+ /**
+ * Relevant excerpted content from the URL, formatted as markdown.
+ */
+ excerpts: Array;
+
+ /**
+ * URL associated with the search result.
+ */
+ url: string;
+
+ /**
+ * Publish date of the webpage in YYYY-MM-DD format, if available.
+ */
+ publish_date?: string | null;
+
+ /**
+ * Title of the webpage, if available.
+ */
+ title?: string | null;
+}
+
+export interface ExtractParams {
+ /**
+ * URLs to extract content from. Up to 20 URLs.
+ */
+ urls: Array;
+
+ /**
+ * Advanced extract configuration.
+ */
+ advanced?: ExtractParams.Advanced | null;
+
+ /**
+ * The model generating this request and consuming the results. Enables
+ * optimizations and tailors default settings for the model's capabilities.
+ */
+ client_model?: string | null;
+
+ /**
+ * Upper bound on total characters across excerpts from all extracted results. Does
+ * not affect full_content if requested. Default is dynamic based on urls,
+ * objective, and client_model.
+ */
+ max_chars_total?: number | null;
+
+ /**
+ * As in SearchRequest, a natural-language description of the underlying question
+ * or goal driving the request. Used together with search_queries to focus excerpts
+ * on the most relevant content.
+ */
+ objective?: string | null;
+
+ /**
+ * Optional keyword search queries, as in SearchRequest. Used together with
+ * objective to focus excerpts on the most relevant content.
+ */
+ search_queries?: Array | null;
+}
+
+export namespace ExtractParams {
+ /**
+ * Advanced extract configuration.
+ */
+ export interface Advanced {
+ /**
+ * Optional settings for returning relevant excerpts.
+ */
+ excerpt_settings?: TopLevelAPI.ExcerptSettings | null;
+
+ /**
+ * Policy for live fetching web results.
+ */
+ fetch_policy?: TopLevelAPI.FetchPolicy | null;
+
+ /**
+ * Controls full content extraction. Set to true to enable with defaults, false to
+ * disable, or provide FullContentSettings for fine-grained control.
+ */
+ full_content?: Advanced.FullContentSettings | boolean;
+ }
+
+ export namespace Advanced {
+ /**
+ * Optional settings for returning full content.
+ */
+ export interface FullContentSettings {
+ /**
+ * Optional limit on the number of characters to include in the full content for
+ * each url. Full content always starts at the beginning of the page and is
+ * truncated at the limit if necessary.
+ */
+ max_chars_per_result?: number | null;
+ }
+ }
+}
+
+export interface SearchParams {
+ /**
+ * Concise keyword search queries, 3-6 words each. At least one query is required,
+ * provide 2-3 for best results. Used together with objective to focus results on
+ * the most relevant content.
+ */
+ search_queries: Array;
+
+ /**
+ * Advanced search configuration.
+ */
+ advanced?: SearchParams.Advanced | null;
+
+ /**
+ * The model generating this request and consuming the results. Enables
+ * optimizations and tailors default settings for the model's capabilities.
+ */
+ client_model?: string | null;
+
+ /**
+ * Upper bound on total characters across excerpts from all results. Default is
+ * dynamic based on search_queries, objective, and client_model.
+ */
+ max_chars_total?: number | null;
+
+ /**
+ * Search mode preset: supported values are basic and standard. Basic mode offers
+ * the lowest latency and works best with 2-3 high-quality search_queries. Standard
+ * mode provides higher quality with more advanced retrieval and compression.
+ */
+ mode?: 'basic' | 'standard' | null;
+
+ /**
+ * Natural-language description of the underlying question or goal driving the
+ * search. Used together with search_queries to focus results on the most relevant
+ * content. Should be self-contained with enough context to understand the intent
+ * of the search.
+ */
+ objective?: string | null;
+}
+
+export namespace SearchParams {
+ /**
+ * Advanced search configuration.
+ */
+ export interface Advanced {
+ /**
+ * Optional settings for returning relevant excerpts.
+ */
+ excerpt_settings?: TopLevelAPI.ExcerptSettings | null;
+
+ /**
+ * Policy for live fetching web results.
+ */
+ fetch_policy?: TopLevelAPI.FetchPolicy | null;
+
+ /**
+ * ISO 3166-1 alpha-2 country code for geo-targeted search results.
+ */
+ location?: string | null;
+
+ /**
+ * Source policy for web search results.
+ *
+ * This policy governs which sources are allowed/disallowed in results.
+ */
+ source_policy?: Shared.SourcePolicy | null;
+ }
+}
+
+export declare namespace TopLevel {
+ export {
+ type ExcerptSettings as ExcerptSettings,
+ type ExtractError as ExtractError,
+ type ExtractResponse as ExtractResponse,
+ type ExtractResult as ExtractResult,
+ type FetchPolicy as FetchPolicy,
+ type SearchResult as SearchResult,
+ type UsageItem as UsageItem,
+ type WebSearchResult as WebSearchResult,
+ type ExtractParams as ExtractParams,
+ type SearchParams as SearchParams,
+ };
+}
diff --git a/tests/api-resources/beta/beta.test.ts b/tests/api-resources/beta/beta.test.ts
index 304ccdd..bbd84c2 100644
--- a/tests/api-resources/beta/beta.test.ts
+++ b/tests/api-resources/beta/beta.test.ts
@@ -28,6 +28,7 @@ describe('resource beta', () => {
max_age_seconds: 86400,
timeout_seconds: 60,
},
+ full_content: true,
objective: 'objective',
search_queries: ['string'],
betas: ['mcp-server-2025-07-17'],
diff --git a/tests/api-resources/top-level.test.ts b/tests/api-resources/top-level.test.ts
new file mode 100644
index 0000000..0f81094
--- /dev/null
+++ b/tests/api-resources/top-level.test.ts
@@ -0,0 +1,75 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Parallel from 'parallel-web';
+
+const client = new Parallel({
+ apiKey: 'My API Key',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+describe('top level methods', () => {
+ test('extract: only required params', async () => {
+ const responsePromise = client.extract({ urls: ['string'] });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('extract: required and optional params', async () => {
+ const response = await client.extract({
+ urls: ['string'],
+ advanced: {
+ excerpt_settings: { max_chars_per_result: 0 },
+ fetch_policy: {
+ disable_cache_fallback: true,
+ max_age_seconds: 86400,
+ timeout_seconds: 60,
+ },
+ full_content: { max_chars_per_result: 0 },
+ },
+ client_model: 'claude-sonnet-4-6-20260401',
+ max_chars_total: 0,
+ objective: 'objective',
+ search_queries: ['string'],
+ });
+ });
+
+ test('search: only required params', async () => {
+ const responsePromise = client.search({ search_queries: ['string'] });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('search: required and optional params', async () => {
+ const response = await client.search({
+ search_queries: ['string'],
+ advanced: {
+ excerpt_settings: { max_chars_per_result: 0 },
+ fetch_policy: {
+ disable_cache_fallback: true,
+ max_age_seconds: 86400,
+ timeout_seconds: 60,
+ },
+ location: 'us',
+ source_policy: {
+ after_date: '2024-01-01',
+ exclude_domains: ['reddit.com', 'x.com', '.ai'],
+ include_domains: ['wikipedia.org', 'usa.gov', '.edu'],
+ },
+ },
+ client_model: 'claude-sonnet-4-6-20260401',
+ max_chars_total: 0,
+ mode: 'basic',
+ objective: 'objective',
+ });
+ });
+});
From 6f0e64e663419703cc87bf14f496880f7cdeff43 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 11 Apr 2026 06:35:03 +0000
Subject: [PATCH 19/27] docs: update examples
---
src/client.ts | 14 ++++++
src/resources/beta/beta.ts | 12 +++++
src/resources/beta/findall.ts | 85 ++++++++++++++++++++++++++++++++
src/resources/beta/task-group.ts | 39 +++++++++++++++
src/resources/task-run.ts | 23 +++++++++
5 files changed, 173 insertions(+)
diff --git a/src/client.ts b/src/client.ts
index 53d8ad4..a7bc5bc 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -235,6 +235,13 @@ export class Parallel {
/**
* Extracts relevant content from specific web URLs.
+ *
+ * @example
+ * ```ts
+ * const extractResponse = await client.extract({
+ * urls: ['string'],
+ * });
+ * ```
*/
extract(
body: TopLevelAPI.ExtractParams,
@@ -245,6 +252,13 @@ export class Parallel {
/**
* Searches the web.
+ *
+ * @example
+ * ```ts
+ * const searchResult = await client.search({
+ * search_queries: ['string'],
+ * });
+ * ```
*/
search(body: TopLevelAPI.SearchParams, options?: RequestOptions): APIPromise {
return this.post('/v1/search', { body, ...options });
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index aa30c9f..ef3f82c 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -66,6 +66,13 @@ export class Beta extends APIResource {
/**
* Extracts relevant content from specific web URLs.
+ *
+ * @example
+ * ```ts
+ * const extractResponse = await client.beta.extract({
+ * urls: ['string'],
+ * });
+ * ```
*/
extract(params: BetaExtractParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
@@ -81,6 +88,11 @@ export class Beta extends APIResource {
/**
* Searches the web.
+ *
+ * @example
+ * ```ts
+ * const searchResult = await client.beta.search();
+ * ```
*/
search(params: BetaSearchParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
diff --git a/src/resources/beta/findall.ts b/src/resources/beta/findall.ts
index 486027c..57474ae 100644
--- a/src/resources/beta/findall.ts
+++ b/src/resources/beta/findall.ts
@@ -26,6 +26,23 @@ export class FindAll extends APIResource {
* /v1beta/findall/runs/{findall_id}/events endpoint,
* - Or specifying a webhook with relevant event types during run creation to
* receive notifications.
+ *
+ * @example
+ * ```ts
+ * const findallRun = await client.beta.findall.create({
+ * entity_type: 'entity_type',
+ * generator: 'base',
+ * match_conditions: [
+ * {
+ * description:
+ * "Company must have SOC2 Type II certification (not Type I). Look for evidence in: trust centers, security/compliance pages, audit reports, or press releases specifically mentioning 'SOC2 Type II'. If no explicit SOC2 Type II mention is found, consider requirement not satisfied.",
+ * name: 'name',
+ * },
+ * ],
+ * match_limit: 0,
+ * objective: 'objective',
+ * });
+ * ```
*/
create(params: FindAllCreateParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
@@ -41,6 +58,13 @@ export class FindAll extends APIResource {
/**
* Retrieve a FindAll run.
+ *
+ * @example
+ * ```ts
+ * const findallRun = await client.beta.findall.retrieve(
+ * 'findall_id',
+ * );
+ * ```
*/
retrieve(
findallID: string,
@@ -59,6 +83,13 @@ export class FindAll extends APIResource {
/**
* Cancel a FindAll run.
+ *
+ * @example
+ * ```ts
+ * const response = await client.beta.findall.cancel(
+ * 'findall_id',
+ * );
+ * ```
*/
cancel(
findallID: string,
@@ -77,6 +108,23 @@ export class FindAll extends APIResource {
/**
* Add an enrichment to a FindAll run.
+ *
+ * @example
+ * ```ts
+ * const findallSchema = await client.beta.findall.enrich(
+ * 'findall_id',
+ * {
+ * output_schema: {
+ * json_schema: {
+ * additionalProperties: 'bar',
+ * properties: 'bar',
+ * required: 'bar',
+ * type: 'bar',
+ * },
+ * },
+ * },
+ * );
+ * ```
*/
enrich(
findallID: string,
@@ -101,6 +149,13 @@ export class FindAll extends APIResource {
* Optional event ID to resume from. timeout: Optional timeout in seconds. If None,
* keep connection alive as long as the run is going. If set, stop after specified
* duration.
+ *
+ * @example
+ * ```ts
+ * const response = await client.beta.findall.events(
+ * 'findall_id',
+ * );
+ * ```
*/
events(
findallID: string,
@@ -121,6 +176,14 @@ export class FindAll extends APIResource {
/**
* Extend a FindAll run by adding additional matches to the current match limit.
+ *
+ * @example
+ * ```ts
+ * const findallSchema = await client.beta.findall.extend(
+ * 'findall_id',
+ * { additional_match_limit: 0 },
+ * );
+ * ```
*/
extend(
findallID: string,
@@ -145,6 +208,14 @@ export class FindAll extends APIResource {
*
* The generated specification serves as a suggested starting point and can be
* further customized by the user.
+ *
+ * @example
+ * ```ts
+ * const findallSchema = await client.beta.findall.ingest({
+ * objective:
+ * 'Find all AI companies that raised Series A funding in 2024',
+ * });
+ * ```
*/
ingest(params: FindAllIngestParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
@@ -160,6 +231,13 @@ export class FindAll extends APIResource {
/**
* Retrieve the FindAll run result at the time of the request.
+ *
+ * @example
+ * ```ts
+ * const findallRunResult = await client.beta.findall.result(
+ * 'findall_id',
+ * );
+ * ```
*/
result(
findallID: string,
@@ -178,6 +256,13 @@ export class FindAll extends APIResource {
/**
* Get FindAll Run Schema
+ *
+ * @example
+ * ```ts
+ * const findallSchema = await client.beta.findall.schema(
+ * 'findall_id',
+ * );
+ * ```
*/
schema(
findallID: string,
diff --git a/src/resources/beta/task-group.ts b/src/resources/beta/task-group.ts
index 18abd51..7c642c3 100644
--- a/src/resources/beta/task-group.ts
+++ b/src/resources/beta/task-group.ts
@@ -24,6 +24,11 @@ import { path } from '../../internal/utils/path';
export class TaskGroup extends APIResource {
/**
* Initiates a TaskGroup to group and track multiple runs.
+ *
+ * @example
+ * ```ts
+ * const taskGroup = await client.beta.taskGroup.create();
+ * ```
*/
create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise {
return this._client.post('/v1beta/tasks/groups', {
@@ -35,6 +40,13 @@ export class TaskGroup extends APIResource {
/**
* Retrieves aggregated status across runs in a TaskGroup.
+ *
+ * @example
+ * ```ts
+ * const taskGroup = await client.beta.taskGroup.retrieve(
+ * 'taskgroup_id',
+ * );
+ * ```
*/
retrieve(taskGroupID: string, options?: RequestOptions): APIPromise {
return this._client.get(path`/v1beta/tasks/groups/${taskGroupID}`, {
@@ -45,6 +57,19 @@ export class TaskGroup extends APIResource {
/**
* Initiates multiple task runs within a TaskGroup.
+ *
+ * @example
+ * ```ts
+ * const taskGroupRunResponse =
+ * await client.beta.taskGroup.addRuns('taskgroup_id', {
+ * inputs: [
+ * {
+ * input: 'What was the GDP of France in 2023?',
+ * processor: 'base',
+ * },
+ * ],
+ * });
+ * ```
*/
addRuns(
taskGroupID: string,
@@ -68,6 +93,13 @@ export class TaskGroup extends APIResource {
*
* The connection will remain open for up to an hour as long as at least one run in
* the group is still active.
+ *
+ * @example
+ * ```ts
+ * const response = await client.beta.taskGroup.events(
+ * 'taskgroup_id',
+ * );
+ * ```
*/
events(
taskGroupID: string,
@@ -96,6 +128,13 @@ export class TaskGroup extends APIResource {
* specify the `last_event_id` parameter with the `event_id` of the last event in
* the stream. The stream will resume from the next event after the
* `last_event_id`.
+ *
+ * @example
+ * ```ts
+ * const response = await client.beta.taskGroup.getRuns(
+ * 'taskgroup_id',
+ * );
+ * ```
*/
getRuns(
taskGroupID: string,
diff --git a/src/resources/task-run.ts b/src/resources/task-run.ts
index 5982318..8e448d8 100644
--- a/src/resources/task-run.ts
+++ b/src/resources/task-run.ts
@@ -27,6 +27,14 @@ export class TaskRun extends APIResource {
* Returns immediately with a run object in status 'queued'.
*
* Beta features can be enabled by setting the 'parallel-beta' header.
+ *
+ * @example
+ * ```ts
+ * const taskRun = await client.taskRun.create({
+ * input: 'What was the GDP of France in 2023?',
+ * processor: 'base',
+ * });
+ * ```
*/
create(params: TaskRunCreateParams, options?: RequestOptions): APIPromise {
const { betas, ...body } = params;
@@ -44,6 +52,11 @@ export class TaskRun extends APIResource {
* Retrieves run status by run_id.
*
* The run result is available from the `/result` endpoint.
+ *
+ * @example
+ * ```ts
+ * const taskRun = await client.taskRun.retrieve('run_id');
+ * ```
*/
retrieve(runID: string, options?: RequestOptions): APIPromise {
return this._client.get(path`/v1/tasks/runs/${runID}`, options);
@@ -57,6 +70,11 @@ export class TaskRun extends APIResource {
*
* For task runs that did not have enable_events set to true during creation, the
* frequency of events will be reduced.
+ *
+ * @example
+ * ```ts
+ * const response = await client.taskRun.events('run_id');
+ * ```
*/
events(runID: string, options?: RequestOptions): APIPromise> {
return this._client.get(path`/v1/tasks/runs/${runID}/events`, {
@@ -68,6 +86,11 @@ export class TaskRun extends APIResource {
/**
* Retrieves a run result by run_id, blocking until the run is completed.
+ *
+ * @example
+ * ```ts
+ * const taskRunResult = await client.taskRun.result('run_id');
+ * ```
*/
result(
runID: string,
From dd4da4a330e651719013a4d6fc2634b1b65da246 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 12 Apr 2026 22:30:35 +0000
Subject: [PATCH 20/27] feat(api): manual - add AdvancedSearchSettings and
AdvancedExtractSettings models
---
.stats.yml | 2 +-
api.md | 2 +
src/client.ts | 4 ++
src/resources/index.ts | 2 +
src/resources/top-level.ts | 135 ++++++++++++++++++-------------------
yarn.lock | 6 +-
6 files changed, 78 insertions(+), 73 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index c8b869e..6cfd973 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 23
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-44048676c9b07d49ed9dbee5fad53d145eddaea5ba682b6557681c5a7e04f8ed.yml
openapi_spec_hash: e239787937742b1bc15e7f211fe3c518
-config_hash: 42d4e6039ef223ba2a824414a94da176
+config_hash: fe820a5a10ee48e143c9e49a153b23b4
diff --git a/api.md b/api.md
index 1c15dbb..482f31b 100644
--- a/api.md
+++ b/api.md
@@ -2,6 +2,8 @@
Types:
+- AdvancedExtractSettings
+- AdvancedSearchSettings
- ExcerptSettings
- ExtractError
- ExtractResponse
diff --git a/src/client.ts b/src/client.ts
index a7bc5bc..7bca661 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -18,6 +18,8 @@ import * as Uploads from './core/uploads';
import * as API from './resources/index';
import * as TopLevelAPI from './resources/top-level';
import {
+ AdvancedExtractSettings,
+ AdvancedSearchSettings,
ExcerptSettings,
ExtractError,
ExtractParams,
@@ -804,6 +806,8 @@ export declare namespace Parallel {
export type RequestOptions = Opts.RequestOptions;
export {
+ type AdvancedExtractSettings as AdvancedExtractSettings,
+ type AdvancedSearchSettings as AdvancedSearchSettings,
type ExcerptSettings as ExcerptSettings,
type ExtractError as ExtractError,
type ExtractResponse as ExtractResponse,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 31ab9af..c7e6560 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -24,6 +24,8 @@ export {
type TaskRunResultParams,
} from './task-run';
export {
+ type AdvancedExtractSettings,
+ type AdvancedSearchSettings,
type ExcerptSettings,
type ExtractError,
type ExtractResponse,
diff --git a/src/resources/top-level.ts b/src/resources/top-level.ts
index c9a1cfe..df66957 100644
--- a/src/resources/top-level.ts
+++ b/src/resources/top-level.ts
@@ -1,8 +1,69 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-import * as TopLevelAPI from './top-level';
import * as Shared from './shared';
+/**
+ * Advanced extract configuration.
+ */
+export interface AdvancedExtractSettings {
+ /**
+ * Optional settings for returning relevant excerpts.
+ */
+ excerpt_settings?: ExcerptSettings | null;
+
+ /**
+ * Policy for live fetching web results.
+ */
+ fetch_policy?: FetchPolicy | null;
+
+ /**
+ * Controls full content extraction. Set to true to enable with defaults, false to
+ * disable, or provide FullContentSettings for fine-grained control.
+ */
+ full_content?: AdvancedExtractSettings.FullContentSettings | boolean;
+}
+
+export namespace AdvancedExtractSettings {
+ /**
+ * Optional settings for returning full content.
+ */
+ export interface FullContentSettings {
+ /**
+ * Optional limit on the number of characters to include in the full content for
+ * each url. Full content always starts at the beginning of the page and is
+ * truncated at the limit if necessary.
+ */
+ max_chars_per_result?: number | null;
+ }
+}
+
+/**
+ * Advanced search configuration.
+ */
+export interface AdvancedSearchSettings {
+ /**
+ * Optional settings for returning relevant excerpts.
+ */
+ excerpt_settings?: ExcerptSettings | null;
+
+ /**
+ * Policy for live fetching web results.
+ */
+ fetch_policy?: FetchPolicy | null;
+
+ /**
+ * ISO 3166-1 alpha-2 country code for geo-targeted search results.
+ */
+ location?: string | null;
+
+ /**
+ * Source policy for web search results.
+ *
+ * This policy governs which sources are allowed/disallowed in results.
+ */
+ source_policy?: Shared.SourcePolicy | null;
+}
+
/**
* Optional settings for returning relevant excerpts.
*/
@@ -193,7 +254,7 @@ export interface ExtractParams {
/**
* Advanced extract configuration.
*/
- advanced?: ExtractParams.Advanced | null;
+ advanced?: AdvancedExtractSettings | null;
/**
* The model generating this request and consuming the results. Enables
@@ -222,43 +283,6 @@ export interface ExtractParams {
search_queries?: Array | null;
}
-export namespace ExtractParams {
- /**
- * Advanced extract configuration.
- */
- export interface Advanced {
- /**
- * Optional settings for returning relevant excerpts.
- */
- excerpt_settings?: TopLevelAPI.ExcerptSettings | null;
-
- /**
- * Policy for live fetching web results.
- */
- fetch_policy?: TopLevelAPI.FetchPolicy | null;
-
- /**
- * Controls full content extraction. Set to true to enable with defaults, false to
- * disable, or provide FullContentSettings for fine-grained control.
- */
- full_content?: Advanced.FullContentSettings | boolean;
- }
-
- export namespace Advanced {
- /**
- * Optional settings for returning full content.
- */
- export interface FullContentSettings {
- /**
- * Optional limit on the number of characters to include in the full content for
- * each url. Full content always starts at the beginning of the page and is
- * truncated at the limit if necessary.
- */
- max_chars_per_result?: number | null;
- }
- }
-}
-
export interface SearchParams {
/**
* Concise keyword search queries, 3-6 words each. At least one query is required,
@@ -270,7 +294,7 @@ export interface SearchParams {
/**
* Advanced search configuration.
*/
- advanced?: SearchParams.Advanced | null;
+ advanced?: AdvancedSearchSettings | null;
/**
* The model generating this request and consuming the results. Enables
@@ -300,37 +324,10 @@ export interface SearchParams {
objective?: string | null;
}
-export namespace SearchParams {
- /**
- * Advanced search configuration.
- */
- export interface Advanced {
- /**
- * Optional settings for returning relevant excerpts.
- */
- excerpt_settings?: TopLevelAPI.ExcerptSettings | null;
-
- /**
- * Policy for live fetching web results.
- */
- fetch_policy?: TopLevelAPI.FetchPolicy | null;
-
- /**
- * ISO 3166-1 alpha-2 country code for geo-targeted search results.
- */
- location?: string | null;
-
- /**
- * Source policy for web search results.
- *
- * This policy governs which sources are allowed/disallowed in results.
- */
- source_policy?: Shared.SourcePolicy | null;
- }
-}
-
export declare namespace TopLevel {
export {
+ type AdvancedExtractSettings as AdvancedExtractSettings,
+ type AdvancedSearchSettings as AdvancedSearchSettings,
type ExcerptSettings as ExcerptSettings,
type ExtractError as ExtractError,
type ExtractResponse as ExtractResponse,
diff --git a/yarn.lock b/yarn.lock
index e5e2a93..f6eae3c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1220,9 +1220,9 @@ baseline-browser-mapping@^2.9.0:
integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==
brace-expansion@^2.0.2:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.3.tgz#0493338bdd58e319b1039c67cf7ee439892c01d9"
- integrity sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae"
+ integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==
dependencies:
balanced-match "^1.0.0"
From b8890ddd516a127fec6802bf7285bd76dec62d36 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 14 Apr 2026 23:53:13 +0000
Subject: [PATCH 21/27] feat(api): Search/Extract v1 with advanced_settings and
max_results
---
.stats.yml | 4 ++--
src/resources/beta/findall.ts | 4 ++--
src/resources/top-level.ts | 10 ++++++++--
tests/api-resources/top-level.test.ts | 5 +++--
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 6cfd973..b7d708f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 23
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-44048676c9b07d49ed9dbee5fad53d145eddaea5ba682b6557681c5a7e04f8ed.yml
-openapi_spec_hash: e239787937742b1bc15e7f211fe3c518
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-7099c3aac2f0edacf413e426c176150404e1603f709cdd1f0af5c6689d33bd4f.yml
+openapi_spec_hash: eb61e027506aa339543ce33d7f052046
config_hash: fe820a5a10ee48e143c9e49a153b23b4
diff --git a/src/resources/beta/findall.ts b/src/resources/beta/findall.ts
index 57474ae..4c7e29c 100644
--- a/src/resources/beta/findall.ts
+++ b/src/resources/beta/findall.ts
@@ -498,7 +498,7 @@ export interface FindAllRunInput {
/**
* Maximum number of matches to find for this FindAll run. Must be between 5 and
- * 1000 (inclusive).
+ * 1000 (inclusive). May return fewer results.
*/
match_limit: number;
@@ -773,7 +773,7 @@ export interface FindAllCreateParams {
/**
* Body param: Maximum number of matches to find for this FindAll run. Must be
- * between 5 and 1000 (inclusive).
+ * between 5 and 1000 (inclusive). May return fewer results.
*/
match_limit: number;
diff --git a/src/resources/top-level.ts b/src/resources/top-level.ts
index df66957..b057dcf 100644
--- a/src/resources/top-level.ts
+++ b/src/resources/top-level.ts
@@ -56,6 +56,11 @@ export interface AdvancedSearchSettings {
*/
location?: string | null;
+ /**
+ * Upper bound on the number of results to return. Defaults to 10 if not provided.
+ */
+ max_results?: number | null;
+
/**
* Source policy for web search results.
*
@@ -254,7 +259,7 @@ export interface ExtractParams {
/**
* Advanced extract configuration.
*/
- advanced?: AdvancedExtractSettings | null;
+ advanced_settings?: AdvancedExtractSettings | null;
/**
* The model generating this request and consuming the results. Enables
@@ -294,7 +299,7 @@ export interface SearchParams {
/**
* Advanced search configuration.
*/
- advanced?: AdvancedSearchSettings | null;
+ advanced_settings?: AdvancedSearchSettings | null;
/**
* The model generating this request and consuming the results. Enables
@@ -312,6 +317,7 @@ export interface SearchParams {
* Search mode preset: supported values are basic and standard. Basic mode offers
* the lowest latency and works best with 2-3 high-quality search_queries. Standard
* mode provides higher quality with more advanced retrieval and compression.
+ * Defaults to standard when omitted.
*/
mode?: 'basic' | 'standard' | null;
diff --git a/tests/api-resources/top-level.test.ts b/tests/api-resources/top-level.test.ts
index 0f81094..1a79f2f 100644
--- a/tests/api-resources/top-level.test.ts
+++ b/tests/api-resources/top-level.test.ts
@@ -22,7 +22,7 @@ describe('top level methods', () => {
test('extract: required and optional params', async () => {
const response = await client.extract({
urls: ['string'],
- advanced: {
+ advanced_settings: {
excerpt_settings: { max_chars_per_result: 0 },
fetch_policy: {
disable_cache_fallback: true,
@@ -52,7 +52,7 @@ describe('top level methods', () => {
test('search: required and optional params', async () => {
const response = await client.search({
search_queries: ['string'],
- advanced: {
+ advanced_settings: {
excerpt_settings: { max_chars_per_result: 0 },
fetch_policy: {
disable_cache_fallback: true,
@@ -60,6 +60,7 @@ describe('top level methods', () => {
timeout_seconds: 60,
},
location: 'us',
+ max_results: 0,
source_policy: {
after_date: '2024-01-01',
exclude_domains: ['reddit.com', 'x.com', '.ai'],
From 1d73f543021f3f70cb1d30b9e0ee44c63a24fbd8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 18 Apr 2026 06:12:33 +0000
Subject: [PATCH 22/27] chore(tests): bump steady to v0.22.1
---
scripts/mock | 6 +++---
scripts/test | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/mock b/scripts/mock
index 5cd7c15..feebe5e 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
- npm exec --package=@stdy/cli@0.20.2 -- steady --version
+ npm exec --package=@stdy/cli@0.22.1 -- steady --version
- npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
+ npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
+ npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index a9d718c..19b8d0c 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo
exit 1
From 6db3155b02f1049c76954617410ddbe12bb81129 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 20 Apr 2026 06:42:36 +0000
Subject: [PATCH 23/27] feat(api): manual updates - update openapi spec
added session_id
---
.stats.yml | 4 +--
src/resources/beta/beta.ts | 14 ++++++++
src/resources/beta/task-run.ts | 17 +++++++++
src/resources/task-run.ts | 34 ++++++++++++++++++
src/resources/top-level.ts | 40 +++++++++++++++++++++
tests/api-resources/beta/beta.test.ts | 1 +
tests/api-resources/beta/task-group.test.ts | 1 +
tests/api-resources/beta/task-run.test.ts | 1 +
tests/api-resources/task-run.test.ts | 1 +
tests/api-resources/top-level.test.ts | 2 ++
10 files changed, 113 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index b7d708f..26be205 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 23
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-7099c3aac2f0edacf413e426c176150404e1603f709cdd1f0af5c6689d33bd4f.yml
-openapi_spec_hash: eb61e027506aa339543ce33d7f052046
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-c4cc922783460c6e65811d13c9abe35807a551c77c126d452806f93caaaf48fb.yml
+openapi_spec_hash: 99c9e48d4dafaca71f058107008d174b
config_hash: fe820a5a10ee48e143c9e49a153b23b4
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index ef3f82c..f62ae93 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -279,6 +279,13 @@ export interface BetaExtractParams {
*/
search_queries?: Array | null;
+ /**
+ * Body param: Session identifier for calls to search and extract made by an agent
+ * as part of a larger task. May be a user-generated random string (e.g. a uuid) or
+ * a session_id from a previous request.
+ */
+ session_id?: string | null;
+
/**
* Header param: Optional header to specify the beta version(s) to enable.
*/
@@ -357,6 +364,13 @@ export interface BetaSearchParams {
*/
search_queries?: Array | null;
+ /**
+ * Body param: Session identifier for calls to search and extract made by an agent
+ * as part of a larger task. May be a user-generated random string (e.g. a uuid) or
+ * a session_id from a previous request.
+ */
+ session_id?: string | null;
+
/**
* Body param: Source policy for web search results.
*
diff --git a/src/resources/beta/task-run.ts b/src/resources/beta/task-run.ts
index c35888c..f5c7466 100644
--- a/src/resources/beta/task-run.ts
+++ b/src/resources/beta/task-run.ts
@@ -225,6 +225,11 @@ export interface TaskRunCreateParams {
*/
processor: string;
+ /**
+ * Body param: Advanced search configuration for a task run.
+ */
+ advanced_settings?: TaskRunCreateParams.AdvancedSettings | null;
+
/**
* Body param: Controls tracking of task run execution progress. When set to true,
* progress events are recorded and can be accessed via the
@@ -279,6 +284,18 @@ export interface TaskRunCreateParams {
betas?: Array;
}
+export namespace TaskRunCreateParams {
+ /**
+ * Advanced search configuration for a task run.
+ */
+ export interface AdvancedSettings {
+ /**
+ * ISO 3166-1 alpha-2 country code for geo-targeted search results.
+ */
+ location?: string | null;
+ }
+}
+
export interface TaskRunResultParams {
/**
* Query param
diff --git a/src/resources/task-run.ts b/src/resources/task-run.ts
index 8e448d8..e41aea1 100644
--- a/src/resources/task-run.ts
+++ b/src/resources/task-run.ts
@@ -275,6 +275,11 @@ export interface RunInput {
*/
processor: string;
+ /**
+ * Advanced search configuration for a task run.
+ */
+ advanced_settings?: RunInput.AdvancedSettings | null;
+
/**
* Controls tracking of task run execution progress. When set to true, progress
* events are recorded and can be accessed via the
@@ -324,6 +329,18 @@ export interface RunInput {
webhook?: Webhook | null;
}
+export namespace RunInput {
+ /**
+ * Advanced search configuration for a task run.
+ */
+ export interface AdvancedSettings {
+ /**
+ * ISO 3166-1 alpha-2 country code for geo-targeted search results.
+ */
+ location?: string | null;
+ }
+}
+
/**
* Status of a task run.
*/
@@ -650,6 +667,11 @@ export interface TaskRunCreateParams {
*/
processor: string;
+ /**
+ * Body param: Advanced search configuration for a task run.
+ */
+ advanced_settings?: TaskRunCreateParams.AdvancedSettings | null;
+
/**
* Body param: Controls tracking of task run execution progress. When set to true,
* progress events are recorded and can be accessed via the
@@ -704,6 +726,18 @@ export interface TaskRunCreateParams {
betas?: Array;
}
+export namespace TaskRunCreateParams {
+ /**
+ * Advanced search configuration for a task run.
+ */
+ export interface AdvancedSettings {
+ /**
+ * ISO 3166-1 alpha-2 country code for geo-targeted search results.
+ */
+ location?: string | null;
+ }
+}
+
export interface TaskRunResultParams {
/**
* Query param
diff --git a/src/resources/top-level.ts b/src/resources/top-level.ts
index b057dcf..bbf67c6 100644
--- a/src/resources/top-level.ts
+++ b/src/resources/top-level.ts
@@ -4,6 +4,9 @@ import * as Shared from './shared';
/**
* Advanced extract configuration.
+ *
+ * These settings may impact result quality and latency unless used carefully. See
+ * https://docs.parallel.ai/search/advanced-extract-settings for more info.
*/
export interface AdvancedExtractSettings {
/**
@@ -39,6 +42,9 @@ export namespace AdvancedExtractSettings {
/**
* Advanced search configuration.
+ *
+ * These settings may impact result quality and latency unless used carefully. See
+ * https://docs.parallel.ai/search/advanced-search-settings for more info.
*/
export interface AdvancedSearchSettings {
/**
@@ -122,6 +128,13 @@ export interface ExtractResponse {
*/
results: Array;
+ /**
+ * Session identifier. Echoed back from the request if provided, otherwise
+ * generated by the server. Should be passed to future search and extract calls
+ * made by the agent as part of the same larger task.
+ */
+ session_id: string;
+
/**
* Usage metrics for the extract request.
*/
@@ -199,6 +212,13 @@ export interface SearchResult {
*/
search_id: string;
+ /**
+ * Session identifier, echoed back from the request if provided, otherwise
+ * generated by the server. Should be passed to future search and extract calls
+ * made by the agent as part of the same larger task.
+ */
+ session_id: string;
+
/**
* Usage metrics for the search request.
*/
@@ -258,6 +278,9 @@ export interface ExtractParams {
/**
* Advanced extract configuration.
+ *
+ * These settings may impact result quality and latency unless used carefully. See
+ * https://docs.parallel.ai/search/advanced-extract-settings for more info.
*/
advanced_settings?: AdvancedExtractSettings | null;
@@ -286,6 +309,13 @@ export interface ExtractParams {
* objective to focus excerpts on the most relevant content.
*/
search_queries?: Array | null;
+
+ /**
+ * Session identifier for calls to search and extract made by an agent as part of a
+ * larger task. May be a user-generated random string, e.g. a uuid, or a session_id
+ * returned by a previous request.
+ */
+ session_id?: string | null;
}
export interface SearchParams {
@@ -298,6 +328,9 @@ export interface SearchParams {
/**
* Advanced search configuration.
+ *
+ * These settings may impact result quality and latency unless used carefully. See
+ * https://docs.parallel.ai/search/advanced-search-settings for more info.
*/
advanced_settings?: AdvancedSearchSettings | null;
@@ -328,6 +361,13 @@ export interface SearchParams {
* of the search.
*/
objective?: string | null;
+
+ /**
+ * Session identifier for calls to search and extract made by an agent as part of a
+ * larger task. May be a user-generated random string, e.g. a uuid, or a session_id
+ * returned by a previous request.
+ */
+ session_id?: string | null;
}
export declare namespace TopLevel {
diff --git a/tests/api-resources/beta/beta.test.ts b/tests/api-resources/beta/beta.test.ts
index bbd84c2..846c650 100644
--- a/tests/api-resources/beta/beta.test.ts
+++ b/tests/api-resources/beta/beta.test.ts
@@ -31,6 +31,7 @@ describe('resource beta', () => {
full_content: true,
objective: 'objective',
search_queries: ['string'],
+ session_id: 'session_id',
betas: ['mcp-server-2025-07-17'],
});
});
diff --git a/tests/api-resources/beta/task-group.test.ts b/tests/api-resources/beta/task-group.test.ts
index 3164594..1587fe7 100644
--- a/tests/api-resources/beta/task-group.test.ts
+++ b/tests/api-resources/beta/task-group.test.ts
@@ -49,6 +49,7 @@ describe('resource taskGroup', () => {
{
input: 'What was the GDP of France in 2023?',
processor: 'base',
+ advanced_settings: { location: 'us' },
enable_events: true,
mcp_servers: [
{
diff --git a/tests/api-resources/beta/task-run.test.ts b/tests/api-resources/beta/task-run.test.ts
index 79e347f..bf203d6 100644
--- a/tests/api-resources/beta/task-run.test.ts
+++ b/tests/api-resources/beta/task-run.test.ts
@@ -26,6 +26,7 @@ describe('resource taskRun', () => {
const response = await client.beta.taskRun.create({
input: 'What was the GDP of France in 2023?',
processor: 'base',
+ advanced_settings: { location: 'us' },
enable_events: true,
mcp_servers: [
{
diff --git a/tests/api-resources/task-run.test.ts b/tests/api-resources/task-run.test.ts
index cc4997d..78f6fb6 100644
--- a/tests/api-resources/task-run.test.ts
+++ b/tests/api-resources/task-run.test.ts
@@ -26,6 +26,7 @@ describe('resource taskRun', () => {
const response = await client.taskRun.create({
input: 'What was the GDP of France in 2023?',
processor: 'base',
+ advanced_settings: { location: 'us' },
enable_events: true,
mcp_servers: [
{
diff --git a/tests/api-resources/top-level.test.ts b/tests/api-resources/top-level.test.ts
index 1a79f2f..f1b0ecd 100644
--- a/tests/api-resources/top-level.test.ts
+++ b/tests/api-resources/top-level.test.ts
@@ -35,6 +35,7 @@ describe('top level methods', () => {
max_chars_total: 0,
objective: 'objective',
search_queries: ['string'],
+ session_id: 'session_id',
});
});
@@ -71,6 +72,7 @@ describe('top level methods', () => {
max_chars_total: 0,
mode: 'basic',
objective: 'objective',
+ session_id: 'session_id',
});
});
});
From 425681c15c71e26b9e7bb6a7f1821eb801f51d96 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 21 Apr 2026 04:25:42 +0000
Subject: [PATCH 24/27] feat(api): Add Findall Candidates
client.beta.findall.candidates
---
.stats.yml | 4 +-
src/resources/beta/api.md | 3 +
src/resources/beta/beta.ts | 6 ++
src/resources/beta/findall.ts | 95 ++++++++++++++++++++++++
src/resources/beta/index.ts | 3 +
tests/api-resources/beta/findall.test.ts | 22 ++++++
6 files changed, 131 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 26be205..b047b54 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 23
+configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-c4cc922783460c6e65811d13c9abe35807a551c77c126d452806f93caaaf48fb.yml
openapi_spec_hash: 99c9e48d4dafaca71f058107008d174b
-config_hash: fe820a5a10ee48e143c9e49a153b23b4
+config_hash: 80e7ee7ad8e3424616aca7189ffd5ae7
diff --git a/src/resources/beta/api.md b/src/resources/beta/api.md
index eb5aef7..24adbf2 100644
--- a/src/resources/beta/api.md
+++ b/src/resources/beta/api.md
@@ -59,6 +59,8 @@ Methods:
Types:
- FindAllCandidateMatchStatusEvent
+- FindAllCandidatesRequest
+- FindAllCandidatesResponse
- FindAllEnrichInput
- FindAllExtendInput
- FindAllRun
@@ -76,6 +78,7 @@ Methods:
- client.beta.findall.create({ ...params }) -> FindAllRun
- client.beta.findall.retrieve(findallID, { ...params }) -> FindAllRun
- client.beta.findall.cancel(findallID, { ...params }) -> unknown
+- client.beta.findall.candidates({ ...params }) -> FindAllCandidatesResponse
- client.beta.findall.enrich(findallID, { ...params }) -> FindAllSchema
- client.beta.findall.events(findallID, { ...params }) -> FindAllEventsResponse
- client.beta.findall.extend(findallID, { ...params }) -> FindAllSchema
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index f62ae93..a2c5634 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -9,6 +9,9 @@ import {
FindAllCancelParams,
FindAllCancelResponse,
FindAllCandidateMatchStatusEvent,
+ FindAllCandidatesParams,
+ FindAllCandidatesRequest,
+ FindAllCandidatesResponse,
FindAllCreateParams,
FindAllEnrichInput,
FindAllEnrichParams,
@@ -431,6 +434,8 @@ export declare namespace Beta {
export {
FindAll as FindAll,
type FindAllCandidateMatchStatusEvent as FindAllCandidateMatchStatusEvent,
+ type FindAllCandidatesRequest as FindAllCandidatesRequest,
+ type FindAllCandidatesResponse as FindAllCandidatesResponse,
type FindAllEnrichInput as FindAllEnrichInput,
type FindAllExtendInput as FindAllExtendInput,
type FindAllRun as FindAllRun,
@@ -445,6 +450,7 @@ export declare namespace Beta {
type FindAllCreateParams as FindAllCreateParams,
type FindAllRetrieveParams as FindAllRetrieveParams,
type FindAllCancelParams as FindAllCancelParams,
+ type FindAllCandidatesParams as FindAllCandidatesParams,
type FindAllEnrichParams as FindAllEnrichParams,
type FindAllEventsParams as FindAllEventsParams,
type FindAllExtendParams as FindAllExtendParams,
diff --git a/src/resources/beta/findall.ts b/src/resources/beta/findall.ts
index 4c7e29c..a054365 100644
--- a/src/resources/beta/findall.ts
+++ b/src/resources/beta/findall.ts
@@ -106,6 +106,30 @@ export class FindAll extends APIResource {
});
}
+ /**
+ * Return ranked entity candidates matching a natural language objective.
+ *
+ * This endpoint performs a best-effort search optimised for low latency. For
+ * comprehensive match evaluation and enrichment, use the
+ * [FindAll API](https://docs.parallel.ai/findall-api/findall-quickstart).
+ *
+ * @example
+ * ```ts
+ * const findallCandidatesResponse =
+ * await client.beta.findall.candidates({
+ * entity_type: 'company',
+ * objective: 'objective',
+ * });
+ * ```
+ */
+ candidates(body: FindAllCandidatesParams, options?: RequestOptions): APIPromise {
+ return this._client.post('/v1beta/findall/candidates', {
+ body,
+ ...options,
+ headers: buildHeaders([{ 'parallel-beta': 'findall-2025-09-15' }, options?.headers]),
+ });
+ }
+
/**
* Add an enrichment to a FindAll run.
*
@@ -357,6 +381,56 @@ export namespace FindAllCandidateMatchStatusEvent {
}
}
+export interface FindAllCandidatesRequest {
+ /**
+ * Type of entity to search for.
+ */
+ entity_type: 'company' | 'people';
+
+ /**
+ * Natural language description of target entities.
+ */
+ objective: string;
+
+ /**
+ * Maximum number of candidates to return. Must be between 5 and 1000 (inclusive).
+ * May return fewer results. Defaults to 100.
+ */
+ match_limit?: number;
+}
+
+export interface FindAllCandidatesResponse {
+ /**
+ * Candidate set request ID. Example:
+ * `candidate_set_cad0a6d2dec046bd95ae900527d880e7`
+ */
+ candidate_set_id: string;
+
+ /**
+ * Ranked list of entity candidates.
+ */
+ candidates: Array;
+}
+
+export namespace FindAllCandidatesResponse {
+ export interface Candidate {
+ /**
+ * Descriptive text about the entity.
+ */
+ description: string;
+
+ /**
+ * Entity name.
+ */
+ name: string;
+
+ /**
+ * Canonical URL for the entity.
+ */
+ url: string;
+ }
+}
+
/**
* Input model for FindAll enrich.
*/
@@ -851,6 +925,24 @@ export interface FindAllCancelParams {
betas?: Array;
}
+export interface FindAllCandidatesParams {
+ /**
+ * Type of entity to search for.
+ */
+ entity_type: 'company' | 'people';
+
+ /**
+ * Natural language description of target entities.
+ */
+ objective: string;
+
+ /**
+ * Maximum number of candidates to return. Must be between 5 and 1000 (inclusive).
+ * May return fewer results. Defaults to 100.
+ */
+ match_limit?: number;
+}
+
export interface FindAllEnrichParams {
/**
* Body param: JSON schema for the enrichment output schema for the FindAll run.
@@ -933,6 +1025,8 @@ export interface FindAllSchemaParams {
export declare namespace FindAll {
export {
type FindAllCandidateMatchStatusEvent as FindAllCandidateMatchStatusEvent,
+ type FindAllCandidatesRequest as FindAllCandidatesRequest,
+ type FindAllCandidatesResponse as FindAllCandidatesResponse,
type FindAllEnrichInput as FindAllEnrichInput,
type FindAllExtendInput as FindAllExtendInput,
type FindAllRun as FindAllRun,
@@ -947,6 +1041,7 @@ export declare namespace FindAll {
type FindAllCreateParams as FindAllCreateParams,
type FindAllRetrieveParams as FindAllRetrieveParams,
type FindAllCancelParams as FindAllCancelParams,
+ type FindAllCandidatesParams as FindAllCandidatesParams,
type FindAllEnrichParams as FindAllEnrichParams,
type FindAllEventsParams as FindAllEventsParams,
type FindAllExtendParams as FindAllExtendParams,
diff --git a/src/resources/beta/index.ts b/src/resources/beta/index.ts
index cca4f66..9681d32 100644
--- a/src/resources/beta/index.ts
+++ b/src/resources/beta/index.ts
@@ -5,6 +5,8 @@ export {
FindAll,
Findall,
type FindAllCandidateMatchStatusEvent,
+ type FindAllCandidatesRequest,
+ type FindAllCandidatesResponse,
type FindAllEnrichInput,
type FindAllExtendInput,
type FindAllRun,
@@ -19,6 +21,7 @@ export {
type FindAllCreateParams,
type FindAllRetrieveParams,
type FindAllCancelParams,
+ type FindAllCandidatesParams,
type FindAllEnrichParams,
type FindAllEventsParams,
type FindAllExtendParams,
diff --git a/tests/api-resources/beta/findall.test.ts b/tests/api-resources/beta/findall.test.ts
index 1b07a2b..3049a66 100644
--- a/tests/api-resources/beta/findall.test.ts
+++ b/tests/api-resources/beta/findall.test.ts
@@ -95,6 +95,28 @@ describe('resource findall', () => {
).rejects.toThrow(Parallel.NotFoundError);
});
+ test('candidates: only required params', async () => {
+ const responsePromise = client.beta.findall.candidates({
+ entity_type: 'company',
+ objective: 'objective',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('candidates: required and optional params', async () => {
+ const response = await client.beta.findall.candidates({
+ entity_type: 'company',
+ objective: 'objective',
+ match_limit: 5,
+ });
+ });
+
test('enrich: only required params', async () => {
const responsePromise = client.beta.findall.enrich('findall_id', {
output_schema: {
From 819346366d51a9df23e8498ad81106e8855752e4 Mon Sep 17 00:00:00 2001
From: Edward He
Date: Mon, 20 Apr 2026 22:04:39 -0700
Subject: [PATCH 25/27] Type aliasing for beta classes
---
src/resources/beta/task-run.ts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/resources/beta/task-run.ts b/src/resources/beta/task-run.ts
index f5c7466..12673b8 100644
--- a/src/resources/beta/task-run.ts
+++ b/src/resources/beta/task-run.ts
@@ -189,6 +189,17 @@ export type BetaRunInput = TaskRunAPI.RunInput;
*/
export type BetaTaskRunResult = TaskRunAPI.TaskRunResult;
+/**
+ * Backwards-compatible namespace for `BetaTaskRunResult`.
+ * @deprecated Use `TaskRunJsonOutput` and `TaskRunTextOutput` from `task-run` instead.
+ */
+export namespace BetaTaskRunResult {
+ /** @deprecated Use `TaskRunAPI.TaskRunTextOutput` instead */
+ export type BetaTaskRunTextOutput = TaskRunAPI.TaskRunTextOutput;
+ /** @deprecated Use `TaskRunAPI.TaskRunJsonOutput` instead */
+ export type BetaTaskRunJsonOutput = TaskRunAPI.TaskRunJsonOutput;
+}
+
/**
* @deprecated Use parallel.types.task_run.Webhook instead
*/
From 86bcd301677c02492cdc41f59ab0865e79dd9592 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 21 Apr 2026 05:54:08 +0000
Subject: [PATCH 26/27] feat(api): Update OpenAPI spec
---
.stats.yml | 4 ++--
src/client.ts | 6 ++++++
src/resources/beta/beta.ts | 12 ++++++------
src/resources/beta/task-run.ts | 8 ++++----
src/resources/shared.ts | 6 ++++--
src/resources/task-run.ts | 16 ++++++++--------
src/resources/top-level.ts | 33 +++++++++++++++------------------
7 files changed, 45 insertions(+), 40 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index b047b54..ea4794f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 24
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-c4cc922783460c6e65811d13c9abe35807a551c77c126d452806f93caaaf48fb.yml
-openapi_spec_hash: 99c9e48d4dafaca71f058107008d174b
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-57e1c56be0942c131ab5f24d8620de166d0721ef7f3423532abc7027e5a989e7.yml
+openapi_spec_hash: e61f831e30d19590eb3138a1b1709d1d
config_hash: 80e7ee7ad8e3424616aca7189ffd5ae7
diff --git a/src/client.ts b/src/client.ts
index 7bca661..0177c07 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -238,6 +238,9 @@ export class Parallel {
/**
* Extracts relevant content from specific web URLs.
*
+ * The legacy Extract API reference is available
+ * [here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract).
+ *
* @example
* ```ts
* const extractResponse = await client.extract({
@@ -255,6 +258,9 @@ export class Parallel {
/**
* Searches the web.
*
+ * The legacy Search API reference is available
+ * [here](https://docs.parallel.ai/api-reference/legacy/search-beta/search).
+ *
* @example
* ```ts
* const searchResult = await client.search({
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index a2c5634..47f3388 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -283,9 +283,9 @@ export interface BetaExtractParams {
search_queries?: Array | null;
/**
- * Body param: Session identifier for calls to search and extract made by an agent
- * as part of a larger task. May be a user-generated random string (e.g. a uuid) or
- * a session_id from a previous request.
+ * Body param: Session identifier to track calls across separate search and extract
+ * calls, to be used as part of a larger task. Specifying it may give better
+ * contextual results for subsequent API calls.
*/
session_id?: string | null;
@@ -368,9 +368,9 @@ export interface BetaSearchParams {
search_queries?: Array | null;
/**
- * Body param: Session identifier for calls to search and extract made by an agent
- * as part of a larger task. May be a user-generated random string (e.g. a uuid) or
- * a session_id from a previous request.
+ * Body param: Session identifier to track calls across separate search and extract
+ * calls, to be used as part of a larger task. Specifying it may give better
+ * contextual results for subsequent API calls.
*/
session_id?: string | null;
diff --git a/src/resources/beta/task-run.ts b/src/resources/beta/task-run.ts
index 12673b8..4b83fe1 100644
--- a/src/resources/beta/task-run.ts
+++ b/src/resources/beta/task-run.ts
@@ -244,10 +244,10 @@ export interface TaskRunCreateParams {
/**
* Body param: Controls tracking of task run execution progress. When set to true,
* progress events are recorded and can be accessed via the
- * [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
- * false, no progress events are tracked. Note that progress tracking cannot be
- * enabled after a run has been created. The flag is set to true by default for
- * premium processors (pro and above).
+ * [Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
+ * no progress events are tracked. Note that progress tracking cannot be enabled
+ * after a run has been created. The flag is set to true by default for premium
+ * processors (pro and above).
*/
enable_events?: boolean | null;
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index 477a52c..1b43c5d 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -52,7 +52,8 @@ export interface SourcePolicy {
* List of domains to exclude from results. If specified, sources from these
* domains will be excluded. Accepts plain domains (e.g., example.com,
* subdomain.example.gov) or bare domain extension starting with a period (e.g.,
- * .gov, .edu, .co.uk).
+ * .gov, .edu, .co.uk). The combined number of domains in include_domains and
+ * exclude_domains cannot exceed 200.
*/
exclude_domains?: Array;
@@ -60,7 +61,8 @@ export interface SourcePolicy {
* List of domains to restrict the results to. If specified, only sources from
* these domains will be included. Accepts plain domains (e.g., example.com,
* subdomain.example.gov) or bare domain extension starting with a period (e.g.,
- * .gov, .edu, .co.uk).
+ * .gov, .edu, .co.uk). The combined number of domains in include_domains and
+ * exclude_domains cannot exceed 200.
*/
include_domains?: Array;
}
diff --git a/src/resources/task-run.ts b/src/resources/task-run.ts
index e41aea1..9399fc4 100644
--- a/src/resources/task-run.ts
+++ b/src/resources/task-run.ts
@@ -283,10 +283,10 @@ export interface RunInput {
/**
* Controls tracking of task run execution progress. When set to true, progress
* events are recorded and can be accessed via the
- * [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
- * false, no progress events are tracked. Note that progress tracking cannot be
- * enabled after a run has been created. The flag is set to true by default for
- * premium processors (pro and above).
+ * [Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
+ * no progress events are tracked. Note that progress tracking cannot be enabled
+ * after a run has been created. The flag is set to true by default for premium
+ * processors (pro and above).
*/
enable_events?: boolean | null;
@@ -675,10 +675,10 @@ export interface TaskRunCreateParams {
/**
* Body param: Controls tracking of task run execution progress. When set to true,
* progress events are recorded and can be accessed via the
- * [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
- * false, no progress events are tracked. Note that progress tracking cannot be
- * enabled after a run has been created. The flag is set to true by default for
- * premium processors (pro and above).
+ * [Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
+ * no progress events are tracked. Note that progress tracking cannot be enabled
+ * after a run has been created. The flag is set to true by default for premium
+ * processors (pro and above).
*/
enable_events?: boolean | null;
diff --git a/src/resources/top-level.ts b/src/resources/top-level.ts
index bbf67c6..8171ddd 100644
--- a/src/resources/top-level.ts
+++ b/src/resources/top-level.ts
@@ -110,7 +110,7 @@ export interface ExtractError {
}
/**
- * Extract response (GA).
+ * Extract response.
*/
export interface ExtractResponse {
/**
@@ -199,7 +199,7 @@ export interface FetchPolicy {
}
/**
- * Search response (GA).
+ * Search response.
*/
export interface SearchResult {
/**
@@ -291,9 +291,7 @@ export interface ExtractParams {
client_model?: string | null;
/**
- * Upper bound on total characters across excerpts from all extracted results. Does
- * not affect full_content if requested. Default is dynamic based on urls,
- * objective, and client_model.
+ * Upper bound on total characters across excerpts from all extracted results.
*/
max_chars_total?: number | null;
@@ -311,9 +309,9 @@ export interface ExtractParams {
search_queries?: Array | null;
/**
- * Session identifier for calls to search and extract made by an agent as part of a
- * larger task. May be a user-generated random string, e.g. a uuid, or a session_id
- * returned by a previous request.
+ * Session identifier to track calls across separate search and extract calls, to
+ * be used as part of a larger task. Specifying it may give better contextual
+ * results for subsequent API calls.
*/
session_id?: string | null;
}
@@ -341,18 +339,17 @@ export interface SearchParams {
client_model?: string | null;
/**
- * Upper bound on total characters across excerpts from all results. Default is
- * dynamic based on search_queries, objective, and client_model.
+ * Upper bound on total characters across excerpts from all results.
*/
max_chars_total?: number | null;
/**
- * Search mode preset: supported values are basic and standard. Basic mode offers
- * the lowest latency and works best with 2-3 high-quality search_queries. Standard
- * mode provides higher quality with more advanced retrieval and compression.
- * Defaults to standard when omitted.
+ * Search mode preset: supported values are `basic` and `advanced`. Basic mode
+ * offers the lowest latency and works best with 2-3 high-quality search_queries.
+ * Advanced mode provides higher quality with more advanced retrieval and
+ * compression. Defaults to `advanced` when omitted.
*/
- mode?: 'basic' | 'standard' | null;
+ mode?: 'basic' | 'advanced' | null;
/**
* Natural-language description of the underlying question or goal driving the
@@ -363,9 +360,9 @@ export interface SearchParams {
objective?: string | null;
/**
- * Session identifier for calls to search and extract made by an agent as part of a
- * larger task. May be a user-generated random string, e.g. a uuid, or a session_id
- * returned by a previous request.
+ * Session identifier to track calls across separate search and extract calls, to
+ * be used as part of a larger task. Specifying it may give better contextual
+ * results for subsequent API calls.
*/
session_id?: string | null;
}
From b125ed411dcd78011573830ce6dd28d61c5fc96e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 21 Apr 2026 05:54:34 +0000
Subject: [PATCH 27/27] release: 0.4.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 44 +++++++++++++++++++++++++++++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 0477999..2537c1f 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.3.2"
+ ".": "0.4.0"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d9ae804..3cd9e7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,49 @@
# Changelog
+## 0.4.0 (2026-04-21)
+
+Full Changelog: [v0.3.2...v0.4.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.3.2...v0.4.0)
+
+### Features
+
+* **api:** Add Findall Candidates ([425681c](https://github.com/parallel-web/parallel-sdk-typescript/commit/425681c15c71e26b9e7bb6a7f1821eb801f51d96))
+* **api:** Add Search and Extract v1 and associated types ([31fdbd0](https://github.com/parallel-web/parallel-sdk-typescript/commit/31fdbd0279c88476b7ad7eafdf28d50a8747c3c5))
+* **api:** manual - add AdvancedSearchSettings and AdvancedExtractSettings models ([dd4da4a](https://github.com/parallel-web/parallel-sdk-typescript/commit/dd4da4a330e651719013a4d6fc2634b1b65da246))
+* **api:** manual updates - update openapi spec ([6db3155](https://github.com/parallel-web/parallel-sdk-typescript/commit/6db3155b02f1049c76954617410ddbe12bb81129))
+* **api:** Remove full_content from OpenAPI Spec ([5601518](https://github.com/parallel-web/parallel-sdk-typescript/commit/5601518a366f2d003c4435d937f04bd0b2f4c033))
+* **api:** Search/Extract v1 with advanced_settings and max_results ([b8890dd](https://github.com/parallel-web/parallel-sdk-typescript/commit/b8890ddd516a127fec6802bf7285bd76dec62d36))
+* **api:** task to GA v1 ([8f03ca8](https://github.com/parallel-web/parallel-sdk-typescript/commit/8f03ca85200f5e5635d89e2462d0c7caa5ea71cb))
+* **api:** Update OpenAPI spec ([86bcd30](https://github.com/parallel-web/parallel-sdk-typescript/commit/86bcd301677c02492cdc41f59ab0865e79dd9592))
+* **api:** Update OpenAPI spec ([bd31a9a](https://github.com/parallel-web/parallel-sdk-typescript/commit/bd31a9abae974f70562da9389b155d2f9e583cfc))
+
+
+### Chores
+
+* **ci:** skip lint on metadata-only changes ([a67ea61](https://github.com/parallel-web/parallel-sdk-typescript/commit/a67ea61a1c016afbe9f6a32168baf1df5f1267a3))
+* **internal:** codegen related update ([1ede4ba](https://github.com/parallel-web/parallel-sdk-typescript/commit/1ede4ba052196d020b05ad4aee529d757601d3bd))
+* **internal:** codegen related update ([46fa759](https://github.com/parallel-web/parallel-sdk-typescript/commit/46fa759aca57b99b388a6328a23fd116894ec6e8))
+* **internal:** tweak CI branches ([3b86286](https://github.com/parallel-web/parallel-sdk-typescript/commit/3b86286059a92b246e2edad7d477b9f26e7377a3))
+* **internal:** update dependencies to address dependabot vulnerabilities ([17f20a6](https://github.com/parallel-web/parallel-sdk-typescript/commit/17f20a687efdd187f588d770bbd8d31013d42a4b))
+* **internal:** update gitignore ([44b2874](https://github.com/parallel-web/parallel-sdk-typescript/commit/44b28740646b26bde693e3c784b9fa0b0916864b))
+* **internal:** update multipart form array serialization ([94d5441](https://github.com/parallel-web/parallel-sdk-typescript/commit/94d54418380cf7b76bc7b2418fe0c38d9b4adf52))
+* **tests:** bump steady to v0.19.4 ([3a21ec1](https://github.com/parallel-web/parallel-sdk-typescript/commit/3a21ec1835ddec9cc45d06af52d78151821a5c50))
+* **tests:** bump steady to v0.19.5 ([85850b6](https://github.com/parallel-web/parallel-sdk-typescript/commit/85850b6a1088b370d9dbf47cf45db2b630e3a51d))
+* **tests:** bump steady to v0.19.6 ([1fa3c6a](https://github.com/parallel-web/parallel-sdk-typescript/commit/1fa3c6ae2305c44adab524a02e34289d7d84ea8f))
+* **tests:** bump steady to v0.19.7 ([5334631](https://github.com/parallel-web/parallel-sdk-typescript/commit/5334631e16969bb918233659cd253c10ac181e25))
+* **tests:** bump steady to v0.20.1 ([5fe5db0](https://github.com/parallel-web/parallel-sdk-typescript/commit/5fe5db092909bcbb5c7d311b4f08d8ab946f91f8))
+* **tests:** bump steady to v0.20.2 ([a6a363c](https://github.com/parallel-web/parallel-sdk-typescript/commit/a6a363c06a5a21f94b39cd6cf8741ddf6182ed6d))
+* **tests:** bump steady to v0.22.1 ([1d73f54](https://github.com/parallel-web/parallel-sdk-typescript/commit/1d73f543021f3f70cb1d30b9e0ee44c63a24fbd8))
+
+
+### Documentation
+
+* update examples ([6f0e64e](https://github.com/parallel-web/parallel-sdk-typescript/commit/6f0e64e663419703cc87bf14f496880f7cdeff43))
+
+
+### Refactors
+
+* **tests:** switch from prism to steady ([6d6d1d9](https://github.com/parallel-web/parallel-sdk-typescript/commit/6d6d1d990d8a3f398a43bd2a36bbc99eb7a63da6))
+
## 0.3.2 (2026-03-09)
Full Changelog: [v0.3.1...v0.3.2](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.3.1...v0.3.2)
diff --git a/package.json b/package.json
index a649926..4789bab 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "parallel-web",
- "version": "0.3.2",
+ "version": "0.4.0",
"description": "The official TypeScript library for the Parallel API",
"author": "Parallel ",
"types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index 64b8c32..4e7f788 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.3.2'; // x-release-please-version
+export const VERSION = '0.4.0'; // x-release-please-version