Skip to content

Return deferred search content in Go SDK - #192

Closed
chruffins wants to merge 1 commit into
mainfrom
hypeship/search-content-retrieval
Closed

chruffins wants to merge 1 commit into
mainfrom
hypeship/search-content-retrieval

Conversation

@chruffins

@chruffins chruffins commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • return the generated search contents response from Search.Contents.Fetch
  • add generated response/result models and refresh search request docs

Testing

  • go test . -run TestSearchContent
  • go vet ./...

Note

Medium Risk
Breaking change to Fetch's signature and behavior (typed response vs error-only), plus updated semantics for browser-backed retrieval and billing that integrators must follow.

Overview
Enables deferred search result content retrieval in the Go SDK: Search.Contents.Fetch now unmarshals and returns *Response (contents, search_id, usage, warnings) instead of only signaling success with error. New generated types include Response, ResponseContent, and ResponseContentError.

This replaces the previous stub that documented a 404-only placeholder. Callers must update to handle the new return value (res, err := ...). api.md documents the Response type and updated method signature; the integration test discards the response with _.

Search content option and result field docs are refreshed across search.go and searchcontent.go to match the API: retained provider content vs browser fetch for source (auto / provider / browser), max_age_hours semantics, temporary browser provisioning and 429 partial behavior for source=auto, and clarified cache_status / fetched_at / usage content_fetches wording.

Reviewed by Cursor Bugbot for commit 3b32fce. Configure here.

@chruffins

Copy link
Copy Markdown
Contributor Author

Superseded by the Stainless-generated release PR #193, which includes this SDK update.

@chruffins chruffins closed this Sep 30, 2026
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