extend-browserbase: update Extend SDK/model versions and add Go template - #108
jordanalexmeyer wants to merge 2 commits into
Conversation
- 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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- 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)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ 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) |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 29a1c39. Configure here.
| } else { | ||
| fmt.Printf(" Skipping receipt %d\n", i+1) | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 29a1c39. Configure here.


Updates both existing
extend-browserbasetemplates (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
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.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_lightbaseVersion:3.4.0→3.5.1(upgraded default model, line-level citations by default).parse_performanceengineVersion:1.0.1→2.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,pageBreaksEnabledadvancedOptions:advancedFigureParsingEnabled, plus the no-op emptypageRanges: []andchunkingOptions: {}New Go template —
go/extend-browserbaseobserve→acton each receipt link), then Extend Go SDK v0.6.0 for extraction with a fully typed inline config (extend.ExtractConfigJSON/extend.ParseConfig), writingoutput/results/receipts.jsonandreceipts.csv./v1/downloads?sessionId=…) since there is no Browserbase Go SDK — same pattern as the Browserbase downloads docs. No ZIP handling needed.go/hackernewsconventions (Go 1.26, env vars for keys, README structure) and is indexed in the root README's GO column (scripts/check-readme-template-index.mjspasses; prettier realigned the table).docs.extend.ai(docs.extend.appis a 301 redirect).Verification
tsc --noEmit --strict) againstextend-ai2.2.0, whose generated types encode the current API config schema.extend-ai1.19.0 (client constructor,files.upload, andextractsignatures match usage;py_compilepasses).extend extract sample-receipt.pdf --config ...) on a sample receipt PDF. Runexr_QL93ROiSGuoFzmatPNdKHreachedPROCESSEDwithbaseVersion: 3.5.1/ parseengineVersion: 2.0.0echoed back in the run config, and all schema fields (vendor, date, receipt number, currency totals, three line items, payment method) were extracted correctly.go vetandgo buildpass;gofmtclean. 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.DeepEqualon the decoded JSON).go/hackernewstemplate'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-browserbasetemplate and aligns all three language variants on current Extend SDKs and extraction/parse model versions.The new
go/extend-browserbaseflow 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 underoutput/documents/, and optionally runs Extend inline extraction with batched concurrent uploads and JSON/CSV output.TypeScript bumps
extend-aito^2.2.0; Python requiresextend-ai>=1.19.0. Shared inline configs moveextraction_lighttobaseVersion3.5.1 andparse_performancetoengineVersion2.0.0, and drop Extend API fields that no longer exist (extraparseConfig.advancedOptionskeys and unused extractionadvancedOptions). README links switch fromdocs.extend.apptodocs.extend.ai, and the root template table lists the new GO column entry forextend-browserbase.Reviewed by Cursor Bugbot for commit 29a1c39. Bugbot is set up for automated code reviews on this repo. Configure here.