Skip to content

extend-browserbase: update Extend SDK/model versions and add Go template - #108

Open
jordanalexmeyer wants to merge 2 commits into
browserbase:devfrom
jordanalexmeyer:update-extend-sdk-model-versions
Open

jordanalexmeyer wants to merge 2 commits into
browserbase:devfrom
jordanalexmeyer:update-extend-sdk-model-versions

Conversation

@jordanalexmeyer

@jordanalexmeyer jordanalexmeyer commented Sep 3, 2026

Copy link
Copy Markdown

Updates both existing extend-browserbase templates (TypeScript and Python) to the current Extend SDK releases and latest stable model versions, and adds a new Go version of the template.

Changes

SDK versions

  • TypeScript: extend-ai ^1.0.2^2.2.0. The only breaking change in 2.0.0 is in Zod schema conversion (release notes), which these templates don't use — the client surface used here (new ExtendClient({ token }), client.files.upload, client.extract) is unchanged.
  • Python: extend-ai >=1.0.0>=1.19.0 (current release; same major, no code changes needed).

Model versions (latest stable per the Extend model changelogs)

  • extraction_light baseVersion: 3.4.03.5.1 (upgraded default model, line-level citations by default).
  • parse_performance engineVersion: 1.0.12.0.0 (new layout detection, reading order, and table models; stable since 2026-05-01).

Config cleanup — removed fields that no longer exist in the current Extend API (2026-02-09):

  • parseConfig.advancedOptions: engine, agenticOcrEnabled, pageBreaksEnabled
  • extraction advancedOptions: advancedFigureParsingEnabled, plus the no-op empty pageRanges: [] and chunkingOptions: {}

New Go templatego/extend-browserbase

  • Mirrors the TS/Python flow: Stagehand Go SDK v4 (observeact on each receipt link), then Extend Go SDK v0.6.0 for extraction with a fully typed inline config (extend.ExtractConfigJSON / extend.ParseConfig), writing output/results/receipts.json and receipts.csv.
  • Downloads are retrieved per-file through the Browserbase Downloads REST API (/v1/downloads?sessionId=…) since there is no Browserbase Go SDK — same pattern as the Browserbase downloads docs. No ZIP handling needed.
  • Follows the go/hackernews conventions (Go 1.26, env vars for keys, README structure) and is indexed in the root README's GO column (scripts/check-readme-template-index.mjs passes; prettier realigned the table).
  • TS/Python READMEs now link to docs.extend.ai (docs.extend.app is a 301 redirect).

Verification

  • TypeScript template type-checks cleanly (tsc --noEmit --strict) against extend-ai 2.2.0, whose generated types encode the current API config schema.
  • Python template verified against extend-ai 1.19.0 (client constructor, files.upload, and extract signatures match usage; py_compile passes).
  • Live smoke test: ran the exact committed inline config against the production Extend API (extend extract sample-receipt.pdf --config ...) on a sample receipt PDF. Run exr_QL93ROiSGuoFzmatPNdKH reached PROCESSED with baseVersion: 3.5.1 / parse engineVersion: 2.0.0 echoed back in the run config, and all schema fields (vendor, date, receipt number, currency totals, three line items, payment method) were extracted correctly.
  • Go template: go vet and go build pass; gofmt clean. A throwaway test confirmed the typed Go config marshals to exactly the same JSON as the TS/Python config that passed the live production run above (reflect.DeepEqual on the decoded JSON).
  • The Browserbase download half of the flow was not re-run for any language; the TS/Python browser code is unchanged, and the Go browser code follows the existing go/hackernews template's Stagehand usage.

(I'm on the Extend team — these versions match what we currently document at docs.extend.ai.)


Note

Low Risk
Changes are sample templates and dependency/config updates; no production app auth or data paths are modified, though Extend major bump in TypeScript could affect consumers who fork only that template.

Overview
Adds a Go extend-browserbase template and aligns all three language variants on current Extend SDKs and extraction/parse model versions.

The new go/extend-browserbase flow mirrors the TS/Python demos: Stagehand V4 on Browserbase uses Observe/Act to click per-receipt downloads, then polls the Downloads REST API for individual files (not the session ZIP path used in TS/PY), saves them under output/documents/, and optionally runs Extend inline extraction with batched concurrent uploads and JSON/CSV output.

TypeScript bumps extend-ai to ^2.2.0; Python requires extend-ai>=1.19.0. Shared inline configs move extraction_light to baseVersion 3.5.1 and parse_performance to engineVersion 2.0.0, and drop Extend API fields that no longer exist (extra parseConfig.advancedOptions keys and unused extraction advancedOptions). README links switch from docs.extend.app to docs.extend.ai, and the root template table lists the new GO column entry for extend-browserbase.

Reviewed by Cursor Bugbot for commit 29a1c39. Bugbot is set up for automated code reviews on this repo. Configure here.

- Bump extend-ai to ^2.2.0 (TS) and >=1.19.0 (Python)
- Pin extraction_light baseVersion 3.5.1 and parse_performance
  engineVersion 2.0.0 (latest stable per the Extend model changelogs)
- Drop config fields removed from the current Extend API
  (parseConfig.advancedOptions.engine/agenticOcrEnabled/pageBreaksEnabled,
  advancedOptions.advancedFigureParsingEnabled) and empty no-op options
@socket-security

socket-security Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​extend-ai@​1.17.0 ⏵ 2.2.073 +1100100 +197 +1100
Addedgolang/​github.com/​extend-hq/​extend-go-sdk@​v0.6.075100100100100

View full report

- New go/extend-browserbase mirroring the TS/Python flow with the Stagehand
  Go SDK v4 and the Extend Go SDK v0.6.0 (typed inline extraction config)
- Downloads are fetched per-file via the Browserbase Downloads REST API
  since there is no Browserbase Go SDK
- Add the GO link to the extend-browserbase row in the root README
- Point the TS/Python READMEs at docs.extend.ai (docs.extend.app now redirects)
@jordanalexmeyer jordanalexmeyer changed the title extend-browserbase: update Extend SDK and model versions extend-browserbase: update Extend SDK/model versions and add Go template Sep 3, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 29a1c39. Configure here.

if list.Total == 0 {
return nil, errors.New("download timeout exceeded")
}
fmt.Printf("Timed out waiting for all downloads; continuing with %d of %d\n", list.Total, expected)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download poll uses missing total

High Severity

saveDownloadsWithRetry decides readiness from list.Total, but GET /v1/downloads only returns a downloads array. Total stays 0, so the loop always hits the timeout and returns download timeout exceeded even when files are already listed in downloads.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 29a1c39. Configure here.

} else {
fmt.Printf(" Skipping receipt %d\n", i+1)
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed acts counted as downloads

Medium Severity

Download clicks increment clicks whenever Act returns a nil error and never inspect Data.Success. In the Go SDK, a failed page action is a nil error with Success == false, so those clicks skip the scroll retry and inflate the expected download count.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 29a1c39. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant