Skip to content

Commit a73dff6

Browse files
authored
release: v3.11.1 (#219)
* release: v3.11.1 Add bu-2-0-mini-preview to the v2 supported model types and sync the OpenAPI snapshot. * fix: include latest API metadata fields Regenerate all API versions from the latest Cloud main specs, expose browser metadata creation and filtering, and support the new v4 run fields. * fix: address OpenAPI review feedback * docs: clarify v2 thinking level support
1 parent 4fcc60f commit a73dff6

38 files changed

Lines changed: 6188 additions & 5944 deletions

File tree

RUNBOOK.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ Follow existing patterns in the codebase. Read before writing.
107107
- **Python SDK type safety**: All resource methods return Pydantic model instances (via `model_validate()`), NOT dicts.
108108
- **Structured output**: V2 only. Python auto-converts Pydantic models via `output_schema`. TS uses Zod schemas via `{ schema }` option.
109109
- **Polling**: `await client.run()` polls `tasks.status()` (lightweight). `for await`/`for step in client.stream()` polls full `tasks.get()` and yields new `TaskStepView` steps.
110-
- **docs/openapi dir**: `task snapshot:save` calls `task docs:sync` which requires `docs/openapi/` to exist. Create it with `mkdir -p docs/openapi` if missing (e.g., on fresh clone).
110+
- **Docs OpenAPI dirs**: `task snapshot:save` calls `task docs:sync`, which updates both `docs/openapi/` and the `docs/cloud/openapi/` files consumed by Mintlify. Both directories must exist on a fresh clone.

Taskfile.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ tasks:
358358
- cp snapshots/v2.json docs/openapi/v2.json
359359
- cp snapshots/v3.json docs/openapi/v3.json
360360
- cp snapshots/v4.json docs/openapi/v4.json
361+
- python3 -m json.tool --indent 4 snapshots/v2.json docs/cloud/openapi/v2.json
362+
- python3 -m json.tool --indent 4 snapshots/v3.json docs/cloud/openapi/v3.json
363+
- python3 -m json.tool --indent 4 snapshots/v4.json docs/cloud/openapi/v4.json
361364

362365
docs:dev:
363366
desc: Start Mintlify docs dev server

browser-use-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "browser-use-sdk",
3-
"version": "3.11.0",
3+
"version": "3.11.1",
44
"description": "Official TypeScript SDK for the Browser Use API",
55
"repository": {
66
"type": "git",

browser-use-node/src/core/http.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ export class HttpClient {
5454
const url = new URL(`${this.baseUrl}${path}`);
5555
if (options?.query) {
5656
for (const [key, value] of Object.entries(options.query)) {
57-
if (value !== undefined && value !== null) {
57+
if (Array.isArray(value)) {
58+
for (const item of value) {
59+
if (item !== undefined && item !== null) {
60+
url.searchParams.append(key, String(item));
61+
}
62+
}
63+
} else if (value !== undefined && value !== null) {
5864
url.searchParams.set(key, String(value));
5965
}
6066
}

browser-use-node/src/generated/v2/types.ts

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,12 @@ export interface components {
772772
* @description The ID of the project
773773
*/
774774
projectId: string;
775+
/**
776+
* Tracing Disabled
777+
* @description Whether third-party LLM tracing is disabled for this project
778+
* @default false
779+
*/
780+
tracingDisabled: boolean;
775781
};
776782
/**
777783
* BrowserDownloadFile
@@ -893,6 +899,14 @@ export interface components {
893899
* @description Presigned URL to download the session recording. Only populated on `GET /api/v2/browsers/{id}`; always `null` in list responses.
894900
*/
895901
recordingUrl?: string | null;
902+
/**
903+
* Metadata
904+
* @description Caller-supplied labels set when the browser was created.
905+
* @default {}
906+
*/
907+
metadata: {
908+
[key: string]: string;
909+
};
896910
};
897911
/**
898912
* BrowserSessionListResponse
@@ -1010,6 +1024,20 @@ export interface components {
10101024
* @description Presigned URL to download the session recording, if recording was enabled. Only populated on GET /api/v2/browsers/{session_id}: the upload starts when the browser stops, so it is never ready in the stop response.
10111025
*/
10121026
recordingUrl?: string | null;
1027+
/**
1028+
* Recording Available
1029+
* @description False when a recording can never appear for this session: recording was disabled, or the browser stopped long enough ago that the upload is not coming. Only ever false from proof, so a failed recording lookup leaves it true. Clients polling for `recordingUrl` must stop when this is false.
1030+
* @default true
1031+
*/
1032+
recordingAvailable: boolean;
1033+
/**
1034+
* Metadata
1035+
* @description Caller-supplied labels set when the browser was created.
1036+
* @default {}
1037+
*/
1038+
metadata: {
1039+
[key: string]: string;
1040+
};
10131041
};
10141042
/**
10151043
* CannotDeleteSkillWhileGeneratingError
@@ -1060,6 +1088,13 @@ export interface components {
10601088
* @default us
10611089
*/
10621090
proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
1091+
/**
1092+
* Metadata
1093+
* @description Labels for this browser. Up to 10 key-value pairs. Filterable on the browsers list and in the dashboard history.
1094+
*/
1095+
metadata?: {
1096+
[key: string]: string;
1097+
} | null;
10631098
/**
10641099
* Timeout
10651100
* @description The timeout for the session in minutes. All users can use up to 240 minutes (4 hours). Browser sessions are charged $0.02/hour.
@@ -1273,7 +1308,7 @@ export interface components {
12731308
thinking: boolean;
12741309
/**
12751310
* Thinking Level
1276-
* @description Optional model reasoning depth. Omit this field to preserve the model provider default. Supported values depend on the selected model: most supported Claude models and GPT-5.1+ models support disabled/low/medium/high; Gemini Flash models support all four (disabled maps to Gemini's minimal level); Claude Fable 5, earlier GPT-5 models, Gemini 2.5 Pro, o3/o4, and Grok support low/medium/high; Gemini 3.1 Pro supports low/high; GLM supports disabled/high. Unsupported model/level combinations are rejected. API V2 cannot configure GLM or fixed-budget Claude thinking; use API V3 or V4 for those combinations.
1311+
* @description Optional model reasoning depth. Omit this field to preserve the provider default. API V2 accepts disabled/low/medium/high for browser-use-llm, browser-use-2.0, gemini-2.5-flash, gemini-3-flash-preview, gemini-3.5-flash, gemini-flash-latest, gemini-flash-lite-latest, gpt-5.5, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, claude-sonnet-5, claude-opus-4-7, claude-opus-4-8, and claude-opus-5; low/medium/high for gemini-2.5-pro, o3, and o4-mini; low/high for gemini-3-pro-preview and gemini-3.1-pro-preview; and disabled only for claude-sonnet-4-20250514, claude-sonnet-4-5-20250929, and claude-opus-4-5-20251101. For browser-use-llm, browser-use-2.0, Gemini 3 Flash, and Gemini 3.5 Flash, disabled maps to Google's minimal thinking level. For Gemini 2.5 Flash and the gemini-flash-latest variants, disabled maps to a zero thinking budget. bu-2-0-mini-preview does not support configurable thinking, so omit thinkingLevel for that model. Other V2 models reject an explicit level. API V2 cannot configure GLM thinking or enable fixed-budget Claude thinking; use API V3 or V4 for those combinations.
12771312
*/
12781313
thinkingLevel?: components["schemas"]["ThinkingLevel"] | null;
12791314
/**
@@ -2377,7 +2412,7 @@ export interface components {
23772412
* SupportedLLMs
23782413
* @enum {string}
23792414
*/
2380-
SupportedLLMs: "browser-use-llm" | "browser-use-2.0" | "gpt-4.1" | "gpt-4.1-mini" | "o4-mini" | "o3" | "gpt-5.5" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gemini-2.5-flash" | "gemini-2.5-pro" | "gemini-3-pro-preview" | "gemini-3.1-pro-preview" | "gemini-3-flash-preview" | "gemini-3.5-flash" | "gemini-flash-latest" | "gemini-flash-lite-latest" | "claude-sonnet-4-20250514" | "claude-sonnet-4-5-20250929" | "claude-sonnet-5" | "claude-opus-4-5-20251101" | "claude-opus-4-7" | "claude-opus-4-8" | "claude-opus-5" | "glm-5.2" | "minimax-m3" | "llama-4-maverick-17b-128e-instruct" | "claude-3-7-sonnet-20250219";
2415+
SupportedLLMs: "browser-use-llm" | "browser-use-2.0" | "bu-2-0-mini-preview" | "gpt-4.1" | "gpt-4.1-mini" | "o4-mini" | "o3" | "gpt-5.5" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gemini-2.5-flash" | "gemini-2.5-pro" | "gemini-3-pro-preview" | "gemini-3.1-pro-preview" | "gemini-3-flash-preview" | "gemini-3.5-flash" | "gemini-flash-latest" | "gemini-flash-lite-latest" | "claude-sonnet-4-20250514" | "claude-sonnet-4-5-20250929" | "claude-sonnet-5" | "claude-opus-4-5-20251101" | "claude-opus-4-7" | "claude-opus-4-8" | "claude-opus-5" | "glm-5.2" | "minimax-m3" | "llama-4-maverick-17b-128e-instruct" | "claude-3-7-sonnet-20250219";
23812416
/**
23822417
* TaskCreatedResponse
23832418
* @description Response model for creating a task
@@ -3971,6 +4006,8 @@ export interface operations {
39714006
list_browser_sessions_browsers_get: {
39724007
parameters: {
39734008
query?: {
4009+
/** @description Only browsers tagged with every one of these terms. `key` matches any value; `key=value` matches exactly. Repeat the param to require more than one (AND). */
4010+
metadata?: string[] | null;
39744011
pageSize?: number;
39754012
pageNumber?: number;
39764013
filterBy?: components["schemas"]["BrowserSessionStatus"] | null;

browser-use-node/src/generated/v3/types.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,12 @@ export interface components {
489489
* @description The ID of the project
490490
*/
491491
projectId: string;
492+
/**
493+
* Tracing Disabled
494+
* @description Whether third-party LLM tracing is disabled for this project
495+
* @default false
496+
*/
497+
tracingDisabled: boolean;
492498
};
493499
/**
494500
* BrowserDownloadFile
@@ -610,6 +616,14 @@ export interface components {
610616
* @description Presigned URL to download the session recording. Only populated on `GET /api/v2/browsers/{id}`; always `null` in list responses.
611617
*/
612618
recordingUrl?: string | null;
619+
/**
620+
* Metadata
621+
* @description Caller-supplied labels set when the browser was created.
622+
* @default {}
623+
*/
624+
metadata: {
625+
[key: string]: string;
626+
};
613627
};
614628
/**
615629
* BrowserSessionListResponse
@@ -727,6 +741,20 @@ export interface components {
727741
* @description Presigned URL to download the session recording, if recording was enabled. Only populated on GET /api/v2/browsers/{session_id}: the upload starts when the browser stops, so it is never ready in the stop response.
728742
*/
729743
recordingUrl?: string | null;
744+
/**
745+
* Recording Available
746+
* @description False when a recording can never appear for this session: recording was disabled, or the browser stopped long enough ago that the upload is not coming. Only ever false from proof, so a failed recording lookup leaves it true. Clients polling for `recordingUrl` must stop when this is false.
747+
* @default true
748+
*/
749+
recordingAvailable: boolean;
750+
/**
751+
* Metadata
752+
* @description Caller-supplied labels set when the browser was created.
753+
* @default {}
754+
*/
755+
metadata: {
756+
[key: string]: string;
757+
};
730758
};
731759
/**
732760
* BuAgentSessionStatus
@@ -778,6 +806,13 @@ export interface components {
778806
* @default us
779807
*/
780808
proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
809+
/**
810+
* Metadata
811+
* @description Labels for this browser. Up to 10 key-value pairs. Filterable on the browsers list and in the dashboard history.
812+
*/
813+
metadata?: {
814+
[key: string]: string;
815+
} | null;
781816
/**
782817
* Timeout
783818
* @description The timeout for the session in minutes. All users can use up to 240 minutes (4 hours). Browser sessions are charged $0.02/hour.
@@ -1918,6 +1953,8 @@ export interface operations {
19181953
list_browser_sessions_browsers_get: {
19191954
parameters: {
19201955
query?: {
1956+
/** @description Only browsers tagged with every one of these terms. `key` matches any value; `key=value` matches exactly. Repeat the param to require more than one (AND). */
1957+
metadata?: string[] | null;
19211958
pageSize?: number;
19221959
pageNumber?: number;
19231960
filterBy?: components["schemas"]["BrowserSessionStatus"] | null;

browser-use-node/src/generated/v4/types.ts

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,14 @@ export interface components {
671671
* @description Presigned URL to download the session recording. Only populated on `GET /api/v2/browsers/{id}`; always `null` in list responses.
672672
*/
673673
recordingUrl?: string | null;
674+
/**
675+
* Metadata
676+
* @description Caller-supplied labels set when the browser was created.
677+
* @default {}
678+
*/
679+
metadata: {
680+
[key: string]: string;
681+
};
674682
};
675683
/**
676684
* BrowserSessionListResponse
@@ -788,6 +796,14 @@ export interface components {
788796
* @description Presigned URL to download the session recording, if recording was enabled. Only populated on GET /api/v2/browsers/{session_id}: the upload starts when the browser stops, so it is never ready in the stop response.
789797
*/
790798
recordingUrl?: string | null;
799+
/**
800+
* Metadata
801+
* @description Caller-supplied labels set when the browser was created.
802+
* @default {}
803+
*/
804+
metadata: {
805+
[key: string]: string;
806+
};
791807
};
792808
/**
793809
* CreateBrowserSessionRequest
@@ -838,6 +854,13 @@ export interface components {
838854
* @default false
839855
*/
840856
enableRecording: boolean;
857+
/**
858+
* Metadata
859+
* @description Labels for this browser. Up to 10 key-value pairs. Filterable on the browsers list and in the dashboard history.
860+
*/
861+
metadata?: {
862+
[key: string]: string;
863+
} | null;
841864
};
842865
/**
843866
* CustomProxy
@@ -890,6 +913,23 @@ export interface components {
890913
/** Detail */
891914
detail?: components["schemas"]["ValidationError"][];
892915
};
916+
/**
917+
* InlineSecretSource
918+
* @description A value the caller supplies directly with the run.
919+
*/
920+
InlineSecretSource: {
921+
/**
922+
* Type
923+
* @constant
924+
*/
925+
type: "inline";
926+
/**
927+
* Value
928+
* Format: password
929+
* @description The secret itself. Limited to 4096 bytes once encoded for encryption; non-ASCII characters cost more than one byte each.
930+
*/
931+
value: string;
932+
};
893933
/**
894934
* InsufficientCreditsError
895935
* @description Error response when there are insufficient credits
@@ -1173,8 +1213,19 @@ export interface components {
11731213
/** Workspaceid */
11741214
workspaceId?: string | null;
11751215
browserSettings?: components["schemas"]["RunBrowserSettings"] | null;
1216+
/**
1217+
* Agentmail
1218+
* @description If true, provisions a persistent temporary email inbox (via AgentMail) for the run workspace. The agent receives the email address in its context and can send, receive, read, and reply to email. Set false to disable AgentMail for this run.
1219+
* @default false
1220+
*/
1221+
agentmail: boolean;
11761222
/** Attachedfileids */
11771223
attachedFileIds?: string[] | null;
1224+
/**
1225+
* Secretbindings
1226+
* @description Credentials this run may use without ever seeing them. The agent can ask the server to type a binding by alias on one of its allowed domains; it cannot read the value. Bindings are not persisted past the run.
1227+
*/
1228+
secretBindings?: components["schemas"]["SecretBinding"][] | null;
11781229
judge?: components["schemas"]["RunJudgeSettings"] | null;
11791230
/** Maxcostusd */
11801231
maxCostUsd?: number | string | null;
@@ -1332,6 +1383,31 @@ export interface components {
13321383
*/
13331384
updatedAt: string;
13341385
};
1386+
/**
1387+
* SecretBinding
1388+
* @description One credential this run may have typed into a browser field.
1389+
*
1390+
* The value never reaches the agent. It is encrypted at rest, kept out of the
1391+
* worker payload, and typed straight into the focused field by the server when
1392+
* the agent asks for the alias by name — and only while the page it is typing
1393+
* into is on one of `allowedDomains`.
1394+
*
1395+
* Run-scoped: bindings die with the run, so a follow-up run that needs the same
1396+
* credential must send it again.
1397+
*/
1398+
SecretBinding: {
1399+
/**
1400+
* Alias
1401+
* @description Name the agent refers to this secret by, e.g. "github_password".
1402+
*/
1403+
alias: string;
1404+
source: components["schemas"]["InlineSecretSource"];
1405+
/**
1406+
* Alloweddomains
1407+
* @description Hosts the secret may be typed into, e.g. ["github.com"]. A host covers its subdomains. Bare hostnames only — no scheme, port, path, or wildcard.
1408+
*/
1409+
allowedDomains: string[];
1410+
};
13351411
/**
13361412
* SessionInfo
13371413
* @description Lightweight metadata for one V4 session (its most recent run).
@@ -2660,6 +2736,8 @@ export interface operations {
26602736
list_browser_sessions_browsers_get: {
26612737
parameters: {
26622738
query?: {
2739+
/** @description Only browsers tagged with every one of these terms. `key` matches any value; `key=value` matches exactly. Repeat the param to require more than one (AND). */
2740+
metadata?: string[] | null;
26632741
pageSize?: number;
26642742
pageNumber?: number;
26652743
filterBy?: components["schemas"]["BrowserSessionStatus"] | null;

browser-use-node/src/v2/resources/browsers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type UpdateBrowserSessionRequest = components["schemas"]["UpdateBrowserSessionRe
1010
type BrowserDownloadListResponse = components["schemas"]["BrowserDownloadListResponse"];
1111

1212
export interface BrowserListParams {
13+
metadata?: string[];
1314
pageSize?: number;
1415
pageNumber?: number;
1516
filterBy?: string;
@@ -27,6 +28,9 @@ export class Browsers {
2728

2829
/** Create a new browser session. */
2930
create(body: CreateBrowserBody = {}): Promise<BrowserSessionItemView> {
31+
if (body.metadata && Object.keys(body.metadata).length > 10) {
32+
throw new RangeError("metadata supports at most 10 key-value pairs");
33+
}
3034
if (body.proxyCountryCode) {
3135
body = { ...body, proxyCountryCode: body.proxyCountryCode.toLowerCase() as any };
3236
}

browser-use-node/src/v3/resources/browsers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ type UpdateBrowserSessionRequest = components["schemas"]["UpdateBrowserSessionRe
99
type BrowserDownloadListResponse = components["schemas"]["BrowserDownloadListResponse"];
1010

1111
export interface BrowserListParams {
12+
metadata?: string[];
1213
pageSize?: number;
1314
pageNumber?: number;
1415
filterBy?: string;
@@ -26,6 +27,9 @@ export class Browsers {
2627

2728
/** Create a standalone browser session. */
2829
create(body: Partial<CreateBrowserSessionRequest> = {}): Promise<BrowserSessionItemView> {
30+
if (body.metadata && Object.keys(body.metadata).length > 10) {
31+
throw new RangeError("metadata supports at most 10 key-value pairs");
32+
}
2933
return this.http.post<BrowserSessionItemView>("/browsers", body);
3034
}
3135

0 commit comments

Comments
 (0)