[wrangler] Add --parse-type to ai-search create - #14952
Merged
petebacondarwin merged 1 commit intoAug 2, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 4bab1a0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
workers-devprod
requested review from
a team and
petebacondarwin
and removed request for
a team
July 31, 2026 12:50
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
5 tasks
Adds a --parse-type flag to `wrangler ai-search create` so a web-crawler instance can be created with parse_type set to `discover` rather than the default `sitemap`. The parse type could previously only be chosen through the interactive wizard, and that prompt was nested inside the "no --source supplied" branch — so it was unreachable whenever --source was passed, making `discover` impossible to set from a script. Parse-type resolution now happens in its own step before source selection. - New flag --parse-type with choices `sitemap` / `discover`. - Only valid for --type web-crawler; passing it with --type builtin or --type r2 errors, since the API stores the value for those source types but never reads it. - Forwarded as source_params.web_crawler.parse_type. - The interactive web flow now offers Discover alongside Sitemap. - Omitted in non-interactive mode when the flag is absent, so the API default (`sitemap`) still applies and existing scripts are unaffected.
petebacondarwin
force-pushed
the
nduarte/RAG-1541-ai-search-parse-type
branch
from
July 31, 2026 14:07
3bd86ff to
4bab1a0
Compare
petebacondarwin
approved these changes
Aug 1, 2026
workers-devprod
approved these changes
Aug 1, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes RAG-1541.
Adds a
--parse-typeflag towrangler ai-search createso a website data source can be created withparse_typeset todiscoverrather than the defaultsitemap.The parse type could previously only be chosen through the interactive wizard, and that prompt was nested inside the "no
--sourcesupplied" branch — so it was unreachable whenever--sourcewas passed, makingdiscoverimpossible to set from a script. Parse-type resolution now happens in its own step, before source selection.--parse-typewith choicessitemap/discover(sitemapreads XML sitemaps;discoverfollows links recursively).--type web-crawler; passing it with--type builtinor--type r2errors, since the API stores the value for those source types but never reads it.source_params.web_crawler.parse_type.DiscoveralongsideSitemap.sitemap) still applies and existing scripted invocations are unaffected.AiSearchSourceParams.web_crawler.parse_typewas typed as a barestring; it is now theAiSearchParseTypeunion.Example:
wrangler ai-search create my-instance --type web-crawler --source https://example.com --parse-type discoverwrangler ai-searchcommands are in open beta and not yet part of the published public Wrangler command docs; this flag will be documented alongside that command set. Note that thediscoverparse type is itself not yet in the public AI Search API docs either, so a docs update covering both is expected to follow separately.