From ec963bb99ac36d162552c76fb067e87144f21089 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 10 May 2026 14:49:46 +0000
Subject: [PATCH 1/4] feat(api): manual updates
---
.stats.yml | 4 ++--
README.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 8baafcff..76025cae 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/context-dev/context.dev-18e7692e180f911962f33787228afa2cf31f6c05ab23c6afb1ca4f82b108fba5.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-fbe2d24f3b2c3f46adc35ff5fe7f2585dcababa7d9b649bd6c48fcfdd6d700de.yml
openapi_spec_hash: 865bd1e346267d1e33f8ca63963c6aa3
-config_hash: 70354330f92ce169beabc98696ebb9a3
+config_hash: ff13935d1231ad44cd3822ffe39904b4
diff --git a/README.md b/README.md
index c4242d0e..760e1af3 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).
Use the Context Dev MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
-[](https://cursor.com/en-US/install-mcp?name=context.dev-mcp&config=eyJuYW1lIjoiY29udGV4dC5kZXYtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29udGV4dC1kZXYuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1jb250ZXh0LWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)
-[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context.dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fcontext-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-context-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D)
+[](https://cursor.com/en-US/install-mcp?name=context-dev-mcp&config=eyJuYW1lIjoiY29udGV4dC1kZXYtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29udGV4dC1kZXYuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1jb250ZXh0LWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)
+[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context-dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fcontext-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-context-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D)
> Note: You may need to set environment variables in your MCP client.
From 4a4e4bbc547662de263a307b213dd7eecd03a61d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 10 May 2026 14:51:44 +0000
Subject: [PATCH 2/4] feat(api): api update
---
.stats.yml | 4 +-
.../models/web_web_crawl_md_params.rb | 50 +++++++++--
.../models/web_web_crawl_md_response.rb | 5 +-
.../models/web_web_scrape_html_params.rb | 50 +++++++++--
.../models/web_web_scrape_md_params.rb | 50 +++++++++--
lib/context_dev/resources/web.rb | 14 ++-
.../models/web_web_crawl_md_params.rbi | 86 ++++++++++++++++---
.../models/web_web_crawl_md_response.rbi | 6 +-
.../models/web_web_scrape_html_params.rbi | 86 ++++++++++++++++---
.../models/web_web_scrape_md_params.rbi | 86 ++++++++++++++++---
rbi/context_dev/resources/web.rbi | 27 +++---
.../models/web_web_crawl_md_params.rbs | 36 ++++++--
.../models/web_web_scrape_html_params.rbs | 36 ++++++--
.../models/web_web_scrape_md_params.rbs | 36 ++++++--
sig/context_dev/resources/web.rbs | 6 +-
15 files changed, 468 insertions(+), 110 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 76025cae..19d31b57 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/context-dev/context.dev-fbe2d24f3b2c3f46adc35ff5fe7f2585dcababa7d9b649bd6c48fcfdd6d700de.yml
-openapi_spec_hash: 865bd1e346267d1e33f8ca63963c6aa3
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-c4963b57c26ac1a89f0ce8e04a280ee3d68e82d3fb02205623db6a53787112bc.yml
+openapi_spec_hash: e277a9c81fa4a02f838be17487555ead
config_hash: ff13935d1231ad44cd3822ffe39904b4
diff --git a/lib/context_dev/models/web_web_crawl_md_params.rb b/lib/context_dev/models/web_web_crawl_md_params.rb
index c3044f2f..8644a0e7 100644
--- a/lib/context_dev/models/web_web_crawl_md_params.rb
+++ b/lib/context_dev/models/web_web_crawl_md_params.rb
@@ -60,13 +60,12 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :max_pages, Integer, api_name: :maxPages
- # @!attribute parse_pdf
- # When true (default), PDF pages are fetched and their text layer is extracted and
- # converted to Markdown alongside HTML pages. When false, PDF pages are skipped
- # entirely (not included in results and not counted as failures).
+ # @!attribute pdf
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
#
- # @return [Boolean, nil]
- optional :parse_pdf, ContextDev::Internal::Type::Boolean, api_name: :parsePDF
+ # @return [ContextDev::Models::WebWebCrawlMdParams::Pdf, nil]
+ optional :pdf, -> { ContextDev::WebWebCrawlMdParams::Pdf }
# @!attribute shorten_base64_images
# Truncate base64-encoded image data in the Markdown output
@@ -102,7 +101,7 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer, api_name: :waitForMs
- # @!method initialize(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, parse_pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
+ # @!method initialize(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebCrawlMdParams} for more details.
#
@@ -122,7 +121,7 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
#
# @param max_pages [Integer] Maximum number of pages to crawl. Hard cap: 500.
#
- # @param parse_pdf [Boolean] When true (default), PDF pages are fetched and their text layer is extracted and
+ # @param pdf [ContextDev::Models::WebWebCrawlMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
#
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
#
@@ -135,6 +134,41 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load for each craw
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ # @!attribute end_
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ #
+ # @return [Integer, nil]
+ optional :end_, Integer, api_name: :end
+
+ # @!attribute should_parse
+ # When true, PDF pages are fetched and parsed. When false, PDF pages are skipped
+ # entirely (not included in results and not counted as failures).
+ #
+ # @return [Boolean, nil]
+ optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
+
+ # @!attribute start
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ #
+ # @return [Integer, nil]
+ optional :start, Integer
+
+ # @!method initialize(end_: nil, should_parse: nil, start: nil)
+ # Some parameter documentations has been truncated, see
+ # {ContextDev::Models::WebWebCrawlMdParams::Pdf} for more details.
+ #
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ #
+ # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
+ #
+ # @param should_parse [Boolean] When true, PDF pages are fetched and parsed. When false, PDF pages are skipped e
+ #
+ # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ end
end
end
end
diff --git a/lib/context_dev/models/web_web_crawl_md_response.rb b/lib/context_dev/models/web_web_crawl_md_response.rb
index a2527ccb..56d1bf8f 100644
--- a/lib/context_dev/models/web_web_crawl_md_response.rb
+++ b/lib/context_dev/models/web_web_crawl_md_response.rb
@@ -34,7 +34,8 @@ class Metadata < ContextDev::Internal::Type::BaseModel
required :num_failed, Integer, api_name: :numFailed
# @!attribute num_skipped
- # Number of URLs skipped (PDFs when parsePDF=false, or URLs not matching urlRegex)
+ # Number of URLs skipped (PDFs when pdf.shouldParse=false, or URLs not matching
+ # urlRegex)
#
# @return [Integer]
required :num_skipped, Integer, api_name: :numSkipped
@@ -59,7 +60,7 @@ class Metadata < ContextDev::Internal::Type::BaseModel
#
# @param num_failed [Integer] Number of pages that failed to crawl
#
- # @param num_skipped [Integer] Number of URLs skipped (PDFs when parsePDF=false, or URLs not matching urlRegex)
+ # @param num_skipped [Integer] Number of URLs skipped (PDFs when pdf.shouldParse=false, or URLs not matching ur
#
# @param num_succeeded [Integer] Number of pages successfully crawled
#
diff --git a/lib/context_dev/models/web_web_scrape_html_params.rb b/lib/context_dev/models/web_web_scrape_html_params.rb
index 615aec15..1ea825a1 100644
--- a/lib/context_dev/models/web_web_scrape_html_params.rb
+++ b/lib/context_dev/models/web_web_scrape_html_params.rb
@@ -27,13 +27,12 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :max_age_ms, Integer
- # @!attribute parse_pdf
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # returned wrapped in …. When false, PDF URLs are skipped
- # and a 400 WEBSITE_ACCESS_ERROR is returned.
+ # @!attribute pdf
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
#
- # @return [Boolean, nil]
- optional :parse_pdf, ContextDev::Internal::Type::Boolean
+ # @return [ContextDev::Models::WebWebScrapeHTMLParams::Pdf, nil]
+ optional :pdf, -> { ContextDev::WebWebScrapeHTMLParams::Pdf }
# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. If the request takes longer
@@ -50,7 +49,7 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer
- # @!method initialize(url:, include_frames: nil, max_age_ms: nil, parse_pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
+ # @!method initialize(url:, include_frames: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
#
@@ -60,13 +59,48 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
- # @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
+ # @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ # @!attribute end_
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ #
+ # @return [Integer, nil]
+ optional :end_, Integer, api_name: :end
+
+ # @!attribute should_parse
+ # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ # a 400 WEBSITE_ACCESS_ERROR is returned.
+ #
+ # @return [Boolean, nil]
+ optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
+
+ # @!attribute start
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ #
+ # @return [Integer, nil]
+ optional :start, Integer
+
+ # @!method initialize(end_: nil, should_parse: nil, start: nil)
+ # Some parameter documentations has been truncated, see
+ # {ContextDev::Models::WebWebScrapeHTMLParams::Pdf} for more details.
+ #
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ #
+ # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
+ #
+ # @param should_parse [Boolean] When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ #
+ # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ end
end
end
end
diff --git a/lib/context_dev/models/web_web_scrape_md_params.rb b/lib/context_dev/models/web_web_scrape_md_params.rb
index 8f31c3f1..98aa09d5 100644
--- a/lib/context_dev/models/web_web_scrape_md_params.rb
+++ b/lib/context_dev/models/web_web_scrape_md_params.rb
@@ -40,13 +40,12 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :max_age_ms, Integer
- # @!attribute parse_pdf
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # converted to Markdown. When false, PDF URLs are skipped and a 400
- # WEBSITE_ACCESS_ERROR is returned.
+ # @!attribute pdf
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
#
- # @return [Boolean, nil]
- optional :parse_pdf, ContextDev::Internal::Type::Boolean
+ # @return [ContextDev::Models::WebWebScrapeMdParams::Pdf, nil]
+ optional :pdf, -> { ContextDev::WebWebScrapeMdParams::Pdf }
# @!attribute shorten_base64_images
# Shorten base64-encoded image data in the Markdown output
@@ -76,7 +75,7 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer
- # @!method initialize(url:, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, parse_pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
+ # @!method initialize(url:, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeMdParams} for more details.
#
@@ -90,7 +89,7 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
- # @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
+ # @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
#
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
#
@@ -101,6 +100,41 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before conver
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ # @!attribute end_
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ #
+ # @return [Integer, nil]
+ optional :end_, Integer, api_name: :end
+
+ # @!attribute should_parse
+ # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ # a 400 WEBSITE_ACCESS_ERROR is returned.
+ #
+ # @return [Boolean, nil]
+ optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
+
+ # @!attribute start
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ #
+ # @return [Integer, nil]
+ optional :start, Integer
+
+ # @!method initialize(end_: nil, should_parse: nil, start: nil)
+ # Some parameter documentations has been truncated, see
+ # {ContextDev::Models::WebWebScrapeMdParams::Pdf} for more details.
+ #
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ #
+ # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
+ #
+ # @param should_parse [Boolean] When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ #
+ # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ end
end
end
end
diff --git a/lib/context_dev/resources/web.rb b/lib/context_dev/resources/web.rb
index 6f92b0f1..22686524 100644
--- a/lib/context_dev/resources/web.rb
+++ b/lib/context_dev/resources/web.rb
@@ -117,7 +117,7 @@ def screenshot(params = {})
# Performs a crawl starting from a given URL, extracts page content as Markdown,
# and returns results for all crawled pages.
#
- # @overload web_crawl_md(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, parse_pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
+ # @overload web_crawl_md(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
#
@@ -135,7 +135,7 @@ def screenshot(params = {})
#
# @param max_pages [Integer] Maximum number of pages to crawl. Hard cap: 500.
#
- # @param parse_pdf [Boolean] When true (default), PDF pages are fetched and their text layer is extracted and
+ # @param pdf [ContextDev::Models::WebWebCrawlMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
#
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
#
@@ -168,7 +168,7 @@ def web_crawl_md(params)
#
# Scrapes the given URL and returns the raw HTML content of the page.
#
- # @overload web_scrape_html(url:, include_frames: nil, max_age_ms: nil, parse_pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
+ # @overload web_scrape_html(url:, include_frames: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
#
@@ -176,7 +176,7 @@ def web_crawl_md(params)
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
- # @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
+ # @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
@@ -196,7 +196,6 @@ def web_scrape_html(params)
query: query.transform_keys(
include_frames: "includeFrames",
max_age_ms: "maxAgeMs",
- parse_pdf: "parsePDF",
timeout_ms: "timeoutMS",
wait_for_ms: "waitForMs"
),
@@ -251,7 +250,7 @@ def web_scrape_images(params)
#
# Scrapes the given URL into LLM usable Markdown.
#
- # @overload web_scrape_md(url:, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, parse_pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
+ # @overload web_scrape_md(url:, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
#
@@ -263,7 +262,7 @@ def web_scrape_images(params)
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
- # @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
+ # @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
#
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
#
@@ -289,7 +288,6 @@ def web_scrape_md(params)
include_images: "includeImages",
include_links: "includeLinks",
max_age_ms: "maxAgeMs",
- parse_pdf: "parsePDF",
shorten_base64_images: "shortenBase64Images",
timeout_ms: "timeoutMS",
use_main_content_only: "useMainContentOnly",
diff --git a/rbi/context_dev/models/web_web_crawl_md_params.rbi b/rbi/context_dev/models/web_web_crawl_md_params.rbi
index 41d2b33e..8d9c21f6 100644
--- a/rbi/context_dev/models/web_web_crawl_md_params.rbi
+++ b/rbi/context_dev/models/web_web_crawl_md_params.rbi
@@ -69,14 +69,13 @@ module ContextDev
sig { params(max_pages: Integer).void }
attr_writer :max_pages
- # When true (default), PDF pages are fetched and their text layer is extracted and
- # converted to Markdown alongside HTML pages. When false, PDF pages are skipped
- # entirely (not included in results and not counted as failures).
- sig { returns(T.nilable(T::Boolean)) }
- attr_reader :parse_pdf
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ sig { returns(T.nilable(ContextDev::WebWebCrawlMdParams::Pdf)) }
+ attr_reader :pdf
- sig { params(parse_pdf: T::Boolean).void }
- attr_writer :parse_pdf
+ sig { params(pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash).void }
+ attr_writer :pdf
# Truncate base64-encoded image data in the Markdown output
sig { returns(T.nilable(T::Boolean)) }
@@ -127,7 +126,7 @@ module ContextDev
max_age_ms: Integer,
max_depth: Integer,
max_pages: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash,
shorten_base64_images: T::Boolean,
timeout_ms: Integer,
url_regex: String,
@@ -158,10 +157,9 @@ module ContextDev
max_depth: nil,
# Maximum number of pages to crawl. Hard cap: 500.
max_pages: nil,
- # When true (default), PDF pages are fetched and their text layer is extracted and
- # converted to Markdown alongside HTML pages. When false, PDF pages are skipped
- # entirely (not included in results and not counted as failures).
- parse_pdf: nil,
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ pdf: nil,
# Truncate base64-encoded image data in the Markdown output
shorten_base64_images: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
@@ -191,7 +189,7 @@ module ContextDev
max_age_ms: Integer,
max_depth: Integer,
max_pages: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebCrawlMdParams::Pdf,
shorten_base64_images: T::Boolean,
timeout_ms: Integer,
url_regex: String,
@@ -203,6 +201,68 @@ module ContextDev
end
def to_hash
end
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ OrHash =
+ T.type_alias do
+ T.any(
+ ContextDev::WebWebCrawlMdParams::Pdf,
+ ContextDev::Internal::AnyHash
+ )
+ end
+
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :end_
+
+ sig { params(end_: Integer).void }
+ attr_writer :end_
+
+ # When true, PDF pages are fetched and parsed. When false, PDF pages are skipped
+ # entirely (not included in results and not counted as failures).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :should_parse
+
+ sig { params(should_parse: T::Boolean).void }
+ attr_writer :should_parse
+
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :start
+
+ sig { params(start: Integer).void }
+ attr_writer :start
+
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ sig do
+ params(
+ end_: Integer,
+ should_parse: T::Boolean,
+ start: Integer
+ ).returns(T.attached_class)
+ end
+ def self.new(
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ end_: nil,
+ # When true, PDF pages are fetched and parsed. When false, PDF pages are skipped
+ # entirely (not included in results and not counted as failures).
+ should_parse: nil,
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ start: nil
+ )
+ end
+
+ sig do
+ override.returns(
+ { end_: Integer, should_parse: T::Boolean, start: Integer }
+ )
+ end
+ def to_hash
+ end
+ end
end
end
end
diff --git a/rbi/context_dev/models/web_web_crawl_md_response.rbi b/rbi/context_dev/models/web_web_crawl_md_response.rbi
index c7254fcd..a8768a61 100644
--- a/rbi/context_dev/models/web_web_crawl_md_response.rbi
+++ b/rbi/context_dev/models/web_web_crawl_md_response.rbi
@@ -64,7 +64,8 @@ module ContextDev
sig { returns(Integer) }
attr_accessor :num_failed
- # Number of URLs skipped (PDFs when parsePDF=false, or URLs not matching urlRegex)
+ # Number of URLs skipped (PDFs when pdf.shouldParse=false, or URLs not matching
+ # urlRegex)
sig { returns(Integer) }
attr_accessor :num_skipped
@@ -90,7 +91,8 @@ module ContextDev
max_crawl_depth:,
# Number of pages that failed to crawl
num_failed:,
- # Number of URLs skipped (PDFs when parsePDF=false, or URLs not matching urlRegex)
+ # Number of URLs skipped (PDFs when pdf.shouldParse=false, or URLs not matching
+ # urlRegex)
num_skipped:,
# Number of pages successfully crawled
num_succeeded:,
diff --git a/rbi/context_dev/models/web_web_scrape_html_params.rbi b/rbi/context_dev/models/web_web_scrape_html_params.rbi
index 9eb380ff..1ada1fb6 100644
--- a/rbi/context_dev/models/web_web_scrape_html_params.rbi
+++ b/rbi/context_dev/models/web_web_scrape_html_params.rbi
@@ -34,14 +34,13 @@ module ContextDev
sig { params(max_age_ms: Integer).void }
attr_writer :max_age_ms
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # returned wrapped in …. When false, PDF URLs are skipped
- # and a 400 WEBSITE_ACCESS_ERROR is returned.
- sig { returns(T.nilable(T::Boolean)) }
- attr_reader :parse_pdf
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ sig { returns(T.nilable(ContextDev::WebWebScrapeHTMLParams::Pdf)) }
+ attr_reader :pdf
- sig { params(parse_pdf: T::Boolean).void }
- attr_writer :parse_pdf
+ sig { params(pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash).void }
+ attr_writer :pdf
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -65,7 +64,7 @@ module ContextDev
url: String,
include_frames: T::Boolean,
max_age_ms: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
timeout_ms: Integer,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
@@ -80,10 +79,9 @@ module ContextDev
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
max_age_ms: nil,
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # returned wrapped in …. When false, PDF URLs are skipped
- # and a 400 WEBSITE_ACCESS_ERROR is returned.
- parse_pdf: nil,
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ pdf: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
@@ -101,7 +99,7 @@ module ContextDev
url: String,
include_frames: T::Boolean,
max_age_ms: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
timeout_ms: Integer,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions
@@ -110,6 +108,68 @@ module ContextDev
end
def to_hash
end
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ OrHash =
+ T.type_alias do
+ T.any(
+ ContextDev::WebWebScrapeHTMLParams::Pdf,
+ ContextDev::Internal::AnyHash
+ )
+ end
+
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :end_
+
+ sig { params(end_: Integer).void }
+ attr_writer :end_
+
+ # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ # a 400 WEBSITE_ACCESS_ERROR is returned.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :should_parse
+
+ sig { params(should_parse: T::Boolean).void }
+ attr_writer :should_parse
+
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :start
+
+ sig { params(start: Integer).void }
+ attr_writer :start
+
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ sig do
+ params(
+ end_: Integer,
+ should_parse: T::Boolean,
+ start: Integer
+ ).returns(T.attached_class)
+ end
+ def self.new(
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ end_: nil,
+ # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ # a 400 WEBSITE_ACCESS_ERROR is returned.
+ should_parse: nil,
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ start: nil
+ )
+ end
+
+ sig do
+ override.returns(
+ { end_: Integer, should_parse: T::Boolean, start: Integer }
+ )
+ end
+ def to_hash
+ end
+ end
end
end
end
diff --git a/rbi/context_dev/models/web_web_scrape_md_params.rbi b/rbi/context_dev/models/web_web_scrape_md_params.rbi
index fb6b362a..f47d4f0e 100644
--- a/rbi/context_dev/models/web_web_scrape_md_params.rbi
+++ b/rbi/context_dev/models/web_web_scrape_md_params.rbi
@@ -46,14 +46,13 @@ module ContextDev
sig { params(max_age_ms: Integer).void }
attr_writer :max_age_ms
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # converted to Markdown. When false, PDF URLs are skipped and a 400
- # WEBSITE_ACCESS_ERROR is returned.
- sig { returns(T.nilable(T::Boolean)) }
- attr_reader :parse_pdf
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ sig { returns(T.nilable(ContextDev::WebWebScrapeMdParams::Pdf)) }
+ attr_reader :pdf
- sig { params(parse_pdf: T::Boolean).void }
- attr_writer :parse_pdf
+ sig { params(pdf: ContextDev::WebWebScrapeMdParams::Pdf::OrHash).void }
+ attr_writer :pdf
# Shorten base64-encoded image data in the Markdown output
sig { returns(T.nilable(T::Boolean)) }
@@ -94,7 +93,7 @@ module ContextDev
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebScrapeMdParams::Pdf::OrHash,
shorten_base64_images: T::Boolean,
timeout_ms: Integer,
use_main_content_only: T::Boolean,
@@ -116,10 +115,9 @@ module ContextDev
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
max_age_ms: nil,
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # converted to Markdown. When false, PDF URLs are skipped and a 400
- # WEBSITE_ACCESS_ERROR is returned.
- parse_pdf: nil,
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ pdf: nil,
# Shorten base64-encoded image data in the Markdown output
shorten_base64_images: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
@@ -144,7 +142,7 @@ module ContextDev
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebScrapeMdParams::Pdf,
shorten_base64_images: T::Boolean,
timeout_ms: Integer,
use_main_content_only: T::Boolean,
@@ -155,6 +153,68 @@ module ContextDev
end
def to_hash
end
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ OrHash =
+ T.type_alias do
+ T.any(
+ ContextDev::WebWebScrapeMdParams::Pdf,
+ ContextDev::Internal::AnyHash
+ )
+ end
+
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :end_
+
+ sig { params(end_: Integer).void }
+ attr_writer :end_
+
+ # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ # a 400 WEBSITE_ACCESS_ERROR is returned.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :should_parse
+
+ sig { params(should_parse: T::Boolean).void }
+ attr_writer :should_parse
+
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :start
+
+ sig { params(start: Integer).void }
+ attr_writer :start
+
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ sig do
+ params(
+ end_: Integer,
+ should_parse: T::Boolean,
+ start: Integer
+ ).returns(T.attached_class)
+ end
+ def self.new(
+ # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
+ # Must be greater than or equal to start when both are provided.
+ end_: nil,
+ # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
+ # a 400 WEBSITE_ACCESS_ERROR is returned.
+ should_parse: nil,
+ # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
+ start: nil
+ )
+ end
+
+ sig do
+ override.returns(
+ { end_: Integer, should_parse: T::Boolean, start: Integer }
+ )
+ end
+ def to_hash
+ end
+ end
end
end
end
diff --git a/rbi/context_dev/resources/web.rbi b/rbi/context_dev/resources/web.rbi
index 24d629a7..81df2caa 100644
--- a/rbi/context_dev/resources/web.rbi
+++ b/rbi/context_dev/resources/web.rbi
@@ -122,7 +122,7 @@ module ContextDev
max_age_ms: Integer,
max_depth: Integer,
max_pages: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash,
shorten_base64_images: T::Boolean,
timeout_ms: Integer,
url_regex: String,
@@ -153,10 +153,9 @@ module ContextDev
max_depth: nil,
# Maximum number of pages to crawl. Hard cap: 500.
max_pages: nil,
- # When true (default), PDF pages are fetched and their text layer is extracted and
- # converted to Markdown alongside HTML pages. When false, PDF pages are skipped
- # entirely (not included in results and not counted as failures).
- parse_pdf: nil,
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ pdf: nil,
# Truncate base64-encoded image data in the Markdown output
shorten_base64_images: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
@@ -181,7 +180,7 @@ module ContextDev
url: String,
include_frames: T::Boolean,
max_age_ms: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
timeout_ms: Integer,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
@@ -196,10 +195,9 @@ module ContextDev
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
max_age_ms: nil,
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # returned wrapped in …. When false, PDF URLs are skipped
- # and a 400 WEBSITE_ACCESS_ERROR is returned.
- parse_pdf: nil,
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ pdf: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
@@ -253,7 +251,7 @@ module ContextDev
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
- parse_pdf: T::Boolean,
+ pdf: ContextDev::WebWebScrapeMdParams::Pdf::OrHash,
shorten_base64_images: T::Boolean,
timeout_ms: Integer,
use_main_content_only: T::Boolean,
@@ -275,10 +273,9 @@ module ContextDev
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
max_age_ms: nil,
- # When true (default), PDF URLs are fetched and their text layer is extracted and
- # converted to Markdown. When false, PDF URLs are skipped and a 400
- # WEBSITE_ACCESS_ERROR is returned.
- parse_pdf: nil,
+ # PDF parsing controls. Use start/end to limit text extraction and OCR to an
+ # inclusive 1-based page range.
+ pdf: nil,
# Shorten base64-encoded image data in the Markdown output
shorten_base64_images: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
diff --git a/sig/context_dev/models/web_web_crawl_md_params.rbs b/sig/context_dev/models/web_web_crawl_md_params.rbs
index baaaaa10..7ab0fbb8 100644
--- a/sig/context_dev/models/web_web_crawl_md_params.rbs
+++ b/sig/context_dev/models/web_web_crawl_md_params.rbs
@@ -10,7 +10,7 @@ module ContextDev
max_age_ms: Integer,
max_depth: Integer,
max_pages: Integer,
- parse_pdf: bool,
+ pdf: ContextDev::WebWebCrawlMdParams::Pdf,
:shorten_base64_images => bool,
timeout_ms: Integer,
url_regex: String,
@@ -53,9 +53,11 @@ module ContextDev
def max_pages=: (Integer) -> Integer
- attr_reader parse_pdf: bool?
+ attr_reader pdf: ContextDev::WebWebCrawlMdParams::Pdf?
- def parse_pdf=: (bool) -> bool
+ def pdf=: (
+ ContextDev::WebWebCrawlMdParams::Pdf
+ ) -> ContextDev::WebWebCrawlMdParams::Pdf
attr_reader shorten_base64_images: bool?
@@ -86,7 +88,7 @@ module ContextDev
?max_age_ms: Integer,
?max_depth: Integer,
?max_pages: Integer,
- ?parse_pdf: bool,
+ ?pdf: ContextDev::WebWebCrawlMdParams::Pdf,
?shorten_base64_images: bool,
?timeout_ms: Integer,
?url_regex: String,
@@ -104,7 +106,7 @@ module ContextDev
max_age_ms: Integer,
max_depth: Integer,
max_pages: Integer,
- parse_pdf: bool,
+ pdf: ContextDev::WebWebCrawlMdParams::Pdf,
:shorten_base64_images => bool,
timeout_ms: Integer,
url_regex: String,
@@ -112,6 +114,30 @@ module ContextDev
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions
}
+
+ type pdf = { end_: Integer, should_parse: bool, start: Integer }
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ attr_reader end_: Integer?
+
+ def end_=: (Integer) -> Integer
+
+ attr_reader should_parse: bool?
+
+ def should_parse=: (bool) -> bool
+
+ attr_reader start: Integer?
+
+ def start=: (Integer) -> Integer
+
+ def initialize: (
+ ?end_: Integer,
+ ?should_parse: bool,
+ ?start: Integer
+ ) -> void
+
+ def to_hash: -> { end_: Integer, should_parse: bool, start: Integer }
+ end
end
end
end
diff --git a/sig/context_dev/models/web_web_scrape_html_params.rbs b/sig/context_dev/models/web_web_scrape_html_params.rbs
index f9c4a03d..7de61db2 100644
--- a/sig/context_dev/models/web_web_scrape_html_params.rbs
+++ b/sig/context_dev/models/web_web_scrape_html_params.rbs
@@ -5,7 +5,7 @@ module ContextDev
url: String,
include_frames: bool,
max_age_ms: Integer,
- parse_pdf: bool,
+ pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
timeout_ms: Integer,
wait_for_ms: Integer
}
@@ -25,9 +25,11 @@ module ContextDev
def max_age_ms=: (Integer) -> Integer
- attr_reader parse_pdf: bool?
+ attr_reader pdf: ContextDev::WebWebScrapeHTMLParams::Pdf?
- def parse_pdf=: (bool) -> bool
+ def pdf=: (
+ ContextDev::WebWebScrapeHTMLParams::Pdf
+ ) -> ContextDev::WebWebScrapeHTMLParams::Pdf
attr_reader timeout_ms: Integer?
@@ -41,7 +43,7 @@ module ContextDev
url: String,
?include_frames: bool,
?max_age_ms: Integer,
- ?parse_pdf: bool,
+ ?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
?timeout_ms: Integer,
?wait_for_ms: Integer,
?request_options: ContextDev::request_opts
@@ -51,11 +53,35 @@ module ContextDev
url: String,
include_frames: bool,
max_age_ms: Integer,
- parse_pdf: bool,
+ pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
timeout_ms: Integer,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions
}
+
+ type pdf = { end_: Integer, should_parse: bool, start: Integer }
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ attr_reader end_: Integer?
+
+ def end_=: (Integer) -> Integer
+
+ attr_reader should_parse: bool?
+
+ def should_parse=: (bool) -> bool
+
+ attr_reader start: Integer?
+
+ def start=: (Integer) -> Integer
+
+ def initialize: (
+ ?end_: Integer,
+ ?should_parse: bool,
+ ?start: Integer
+ ) -> void
+
+ def to_hash: -> { end_: Integer, should_parse: bool, start: Integer }
+ end
end
end
end
diff --git a/sig/context_dev/models/web_web_scrape_md_params.rbs b/sig/context_dev/models/web_web_scrape_md_params.rbs
index 9cca6f53..f1e893bd 100644
--- a/sig/context_dev/models/web_web_scrape_md_params.rbs
+++ b/sig/context_dev/models/web_web_scrape_md_params.rbs
@@ -7,7 +7,7 @@ module ContextDev
include_images: bool,
include_links: bool,
max_age_ms: Integer,
- parse_pdf: bool,
+ pdf: ContextDev::WebWebScrapeMdParams::Pdf,
:shorten_base64_images => bool,
timeout_ms: Integer,
use_main_content_only: bool,
@@ -37,9 +37,11 @@ module ContextDev
def max_age_ms=: (Integer) -> Integer
- attr_reader parse_pdf: bool?
+ attr_reader pdf: ContextDev::WebWebScrapeMdParams::Pdf?
- def parse_pdf=: (bool) -> bool
+ def pdf=: (
+ ContextDev::WebWebScrapeMdParams::Pdf
+ ) -> ContextDev::WebWebScrapeMdParams::Pdf
attr_reader shorten_base64_images: bool?
@@ -63,7 +65,7 @@ module ContextDev
?include_images: bool,
?include_links: bool,
?max_age_ms: Integer,
- ?parse_pdf: bool,
+ ?pdf: ContextDev::WebWebScrapeMdParams::Pdf,
?shorten_base64_images: bool,
?timeout_ms: Integer,
?use_main_content_only: bool,
@@ -77,13 +79,37 @@ module ContextDev
include_images: bool,
include_links: bool,
max_age_ms: Integer,
- parse_pdf: bool,
+ pdf: ContextDev::WebWebScrapeMdParams::Pdf,
:shorten_base64_images => bool,
timeout_ms: Integer,
use_main_content_only: bool,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions
}
+
+ type pdf = { end_: Integer, should_parse: bool, start: Integer }
+
+ class Pdf < ContextDev::Internal::Type::BaseModel
+ attr_reader end_: Integer?
+
+ def end_=: (Integer) -> Integer
+
+ attr_reader should_parse: bool?
+
+ def should_parse=: (bool) -> bool
+
+ attr_reader start: Integer?
+
+ def start=: (Integer) -> Integer
+
+ def initialize: (
+ ?end_: Integer,
+ ?should_parse: bool,
+ ?start: Integer
+ ) -> void
+
+ def to_hash: -> { end_: Integer, should_parse: bool, start: Integer }
+ end
end
end
end
diff --git a/sig/context_dev/resources/web.rbs b/sig/context_dev/resources/web.rbs
index 9c2579c3..aeffc007 100644
--- a/sig/context_dev/resources/web.rbs
+++ b/sig/context_dev/resources/web.rbs
@@ -36,7 +36,7 @@ module ContextDev
?max_age_ms: Integer,
?max_depth: Integer,
?max_pages: Integer,
- ?parse_pdf: bool,
+ ?pdf: ContextDev::WebWebCrawlMdParams::Pdf,
?shorten_base64_images: bool,
?timeout_ms: Integer,
?url_regex: String,
@@ -49,7 +49,7 @@ module ContextDev
url: String,
?include_frames: bool,
?max_age_ms: Integer,
- ?parse_pdf: bool,
+ ?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
?timeout_ms: Integer,
?wait_for_ms: Integer,
?request_options: ContextDev::request_opts
@@ -70,7 +70,7 @@ module ContextDev
?include_images: bool,
?include_links: bool,
?max_age_ms: Integer,
- ?parse_pdf: bool,
+ ?pdf: ContextDev::WebWebScrapeMdParams::Pdf,
?shorten_base64_images: bool,
?timeout_ms: Integer,
?use_main_content_only: bool,
From b582c05376102bb0cb6f8d4d8c9a2cefdef8c1ec Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 10 May 2026 16:06:06 +0000
Subject: [PATCH 3/4] feat(api): api update
---
.stats.yml | 4 ++--
.../models/web_web_crawl_md_params.rb | 13 ++++++++++++-
lib/context_dev/resources/web.rb | 4 +++-
.../models/web_web_crawl_md_params.rbi | 17 +++++++++++++++++
rbi/context_dev/resources/web.rbi | 6 ++++++
.../models/web_web_crawl_md_params.rbs | 7 +++++++
sig/context_dev/resources/web.rbs | 1 +
7 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 19d31b57..ddc345ad 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/context-dev/context.dev-c4963b57c26ac1a89f0ce8e04a280ee3d68e82d3fb02205623db6a53787112bc.yml
-openapi_spec_hash: e277a9c81fa4a02f838be17487555ead
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-f27c9584f74632a8c9603fce7190e3f63275a4ec4030da2a9475efb619618b3f.yml
+openapi_spec_hash: 224cb935536a4d999d9683f8c03ea32f
config_hash: ff13935d1231ad44cd3822ffe39904b4
diff --git a/lib/context_dev/models/web_web_crawl_md_params.rb b/lib/context_dev/models/web_web_crawl_md_params.rb
index 8644a0e7..28560505 100644
--- a/lib/context_dev/models/web_web_crawl_md_params.rb
+++ b/lib/context_dev/models/web_web_crawl_md_params.rb
@@ -73,6 +73,15 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :shorten_base64_images, ContextDev::Internal::Type::Boolean, api_name: :shortenBase64Images
+ # @!attribute stop_after_ms
+ # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
+ # checks the elapsed time and, if exceeded, returns the pages collected so far
+ # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
+ # min).
+ #
+ # @return [Integer, nil]
+ optional :stop_after_ms, Integer, api_name: :stopAfterMs
+
# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -101,7 +110,7 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer, api_name: :waitForMs
- # @!method initialize(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
+ # @!method initialize(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebCrawlMdParams} for more details.
#
@@ -125,6 +134,8 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
#
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
#
+ # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. After each scrape, the crawler c
+ #
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param url_regex [String] Regex pattern. Only URLs matching this pattern will be followed and scraped.
diff --git a/lib/context_dev/resources/web.rb b/lib/context_dev/resources/web.rb
index 22686524..6aaee2cd 100644
--- a/lib/context_dev/resources/web.rb
+++ b/lib/context_dev/resources/web.rb
@@ -117,7 +117,7 @@ def screenshot(params = {})
# Performs a crawl starting from a given URL, extracts page content as Markdown,
# and returns results for all crawled pages.
#
- # @overload web_crawl_md(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
+ # @overload web_crawl_md(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
#
@@ -139,6 +139,8 @@ def screenshot(params = {})
#
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
#
+ # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. After each scrape, the crawler c
+ #
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param url_regex [String] Regex pattern. Only URLs matching this pattern will be followed and scraped.
diff --git a/rbi/context_dev/models/web_web_crawl_md_params.rbi b/rbi/context_dev/models/web_web_crawl_md_params.rbi
index 8d9c21f6..c3dc457b 100644
--- a/rbi/context_dev/models/web_web_crawl_md_params.rbi
+++ b/rbi/context_dev/models/web_web_crawl_md_params.rbi
@@ -84,6 +84,16 @@ module ContextDev
sig { params(shorten_base64_images: T::Boolean).void }
attr_writer :shorten_base64_images
+ # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
+ # checks the elapsed time and, if exceeded, returns the pages collected so far
+ # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
+ # min).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stop_after_ms
+
+ sig { params(stop_after_ms: Integer).void }
+ attr_writer :stop_after_ms
+
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
@@ -128,6 +138,7 @@ module ContextDev
max_pages: Integer,
pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash,
shorten_base64_images: T::Boolean,
+ stop_after_ms: Integer,
timeout_ms: Integer,
url_regex: String,
use_main_content_only: T::Boolean,
@@ -162,6 +173,11 @@ module ContextDev
pdf: nil,
# Truncate base64-encoded image data in the Markdown output
shorten_base64_images: nil,
+ # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
+ # checks the elapsed time and, if exceeded, returns the pages collected so far
+ # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
+ # min).
+ stop_after_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
@@ -191,6 +207,7 @@ module ContextDev
max_pages: Integer,
pdf: ContextDev::WebWebCrawlMdParams::Pdf,
shorten_base64_images: T::Boolean,
+ stop_after_ms: Integer,
timeout_ms: Integer,
url_regex: String,
use_main_content_only: T::Boolean,
diff --git a/rbi/context_dev/resources/web.rbi b/rbi/context_dev/resources/web.rbi
index 81df2caa..eb36a545 100644
--- a/rbi/context_dev/resources/web.rbi
+++ b/rbi/context_dev/resources/web.rbi
@@ -124,6 +124,7 @@ module ContextDev
max_pages: Integer,
pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash,
shorten_base64_images: T::Boolean,
+ stop_after_ms: Integer,
timeout_ms: Integer,
url_regex: String,
use_main_content_only: T::Boolean,
@@ -158,6 +159,11 @@ module ContextDev
pdf: nil,
# Truncate base64-encoded image data in the Markdown output
shorten_base64_images: nil,
+ # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
+ # checks the elapsed time and, if exceeded, returns the pages collected so far
+ # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
+ # min).
+ stop_after_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
diff --git a/sig/context_dev/models/web_web_crawl_md_params.rbs b/sig/context_dev/models/web_web_crawl_md_params.rbs
index 7ab0fbb8..8d39e42e 100644
--- a/sig/context_dev/models/web_web_crawl_md_params.rbs
+++ b/sig/context_dev/models/web_web_crawl_md_params.rbs
@@ -12,6 +12,7 @@ module ContextDev
max_pages: Integer,
pdf: ContextDev::WebWebCrawlMdParams::Pdf,
:shorten_base64_images => bool,
+ stop_after_ms: Integer,
timeout_ms: Integer,
url_regex: String,
use_main_content_only: bool,
@@ -63,6 +64,10 @@ module ContextDev
def shorten_base64_images=: (bool) -> bool
+ attr_reader stop_after_ms: Integer?
+
+ def stop_after_ms=: (Integer) -> Integer
+
attr_reader timeout_ms: Integer?
def timeout_ms=: (Integer) -> Integer
@@ -90,6 +95,7 @@ module ContextDev
?max_pages: Integer,
?pdf: ContextDev::WebWebCrawlMdParams::Pdf,
?shorten_base64_images: bool,
+ ?stop_after_ms: Integer,
?timeout_ms: Integer,
?url_regex: String,
?use_main_content_only: bool,
@@ -108,6 +114,7 @@ module ContextDev
max_pages: Integer,
pdf: ContextDev::WebWebCrawlMdParams::Pdf,
:shorten_base64_images => bool,
+ stop_after_ms: Integer,
timeout_ms: Integer,
url_regex: String,
use_main_content_only: bool,
diff --git a/sig/context_dev/resources/web.rbs b/sig/context_dev/resources/web.rbs
index aeffc007..84b30171 100644
--- a/sig/context_dev/resources/web.rbs
+++ b/sig/context_dev/resources/web.rbs
@@ -38,6 +38,7 @@ module ContextDev
?max_pages: Integer,
?pdf: ContextDev::WebWebCrawlMdParams::Pdf,
?shorten_base64_images: bool,
+ ?stop_after_ms: Integer,
?timeout_ms: Integer,
?url_regex: String,
?use_main_content_only: bool,
From 0354107faeecde2f6d85557011f7cd55231c6736 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 10 May 2026 16:06:32 +0000
Subject: [PATCH 4/4] release: 1.18.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 10 ++++++++++
Gemfile.lock | 2 +-
README.md | 2 +-
lib/context_dev/version.rb | 2 +-
5 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 6a197bef..4ce109ae 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.17.0"
+ ".": "1.18.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c66d4af6..1c8104c9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# Changelog
+## 1.18.0 (2026-05-10)
+
+Full Changelog: [v1.17.0...v1.18.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.17.0...v1.18.0)
+
+### Features
+
+* **api:** api update ([b582c05](https://github.com/context-dot-dev/context-ruby-sdk/commit/b582c05376102bb0cb6f8d4d8c9a2cefdef8c1ec))
+* **api:** api update ([4a4e4bb](https://github.com/context-dot-dev/context-ruby-sdk/commit/4a4e4bbc547662de263a307b213dd7eecd03a61d))
+* **api:** manual updates ([ec963bb](https://github.com/context-dot-dev/context-ruby-sdk/commit/ec963bb99ac36d162552c76fb067e87144f21089))
+
## 1.17.0 (2026-05-09)
Full Changelog: [v1.16.0...v1.17.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.16.0...v1.17.0)
diff --git a/Gemfile.lock b/Gemfile.lock
index 0ed99eac..8a5a6cc8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
- context.dev (1.17.0)
+ context.dev (1.18.0)
cgi
connection_pool
diff --git a/README.md b/README.md
index 760e1af3..69cd7cae 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
```ruby
-gem "context.dev", "~> 1.17.0"
+gem "context.dev", "~> 1.18.0"
```
diff --git a/lib/context_dev/version.rb b/lib/context_dev/version.rb
index a28a32bb..639d93ed 100644
--- a/lib/context_dev/version.rb
+++ b/lib/context_dev/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module ContextDev
- VERSION = "1.17.0"
+ VERSION = "1.18.0"
end