Skip to content

feat(wrangler): add custom metadata to instance creation on ai search#13721

Merged
emily-shen merged 1 commit into
cloudflare:mainfrom
danielgek:dleal/add-custom-metadata-ai-search
May 5, 2026
Merged

feat(wrangler): add custom metadata to instance creation on ai search#13721
emily-shen merged 1 commit into
cloudflare:mainfrom
danielgek:dleal/add-custom-metadata-ai-search

Conversation

@danielgek

@danielgek danielgek commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #RAG-1145.

Adds ability to specify custom metadata on instance creation on AI Search


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: it will automatically generated by docs component
900_Cast-About-Photography_272A8079___Merkat
Open in Devin Review

@changeset-bot

changeset-bot Bot commented Apr 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 578ef4c

The changes in this PR will be included in the next version bump.

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

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Apr 29, 2026
@workers-devprod workers-devprod requested review from a team and emily-shen and removed request for a team April 29, 2026 12:18
@workers-devprod

workers-devprod commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Apr 29, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13721

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13721

miniflare

npm i https://pkg.pr.new/miniflare@13721

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13721

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13721

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13721

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13721

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13721

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13721

wrangler

npm i https://pkg.pr.new/wrangler@13721

commit: 578ef4c

@emily-shen emily-shen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we let users provide a json file? or even only support a json file? this is a pretty common pattern across wrangler for setting secrets, configuring r2, kv etc.

so something like --custom-metadata-schema=schema.json

schema.json

{
title : text,
foo: number,
...
}

since CLI flags is quite unwieldy once you get past one or two.

@danielgek danielgek force-pushed the dleal/add-custom-metadata-ai-search branch from 98de6f1 to 4d43e39 Compare April 30, 2026 13:09
@danielgek

Copy link
Copy Markdown
Contributor Author

@emily-shen added and option to add as metadata as json, left the interactive one because, most of the use we have seen on this is with 2 or 3 fields

@danielgek danielgek requested a review from emily-shen April 30, 2026 14:06
Comment thread .changeset/ai-search-create-custom-metadata.md Outdated
Comment thread packages/wrangler/src/ai-search/create.ts Outdated
Comment thread packages/wrangler/src/ai-search/create.ts
Comment thread packages/wrangler/src/ai-search/create.ts

@emily-shen emily-shen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approving to unblock you, pending the previous comments being addressed

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 1, 2026
@danielgek danielgek force-pushed the dleal/add-custom-metadata-ai-search branch from 4d43e39 to e2e179a Compare May 4, 2026 10:32
@danielgek

Copy link
Copy Markdown
Contributor Author

@emily-shen addressed all the comments!

@danielgek danielgek requested a review from emily-shen May 4, 2026 10:32
devin-ai-integration[bot]

This comment was marked as resolved.

@danielgek danielgek force-pushed the dleal/add-custom-metadata-ai-search branch 2 times, most recently from 0f625dc to d942da8 Compare May 4, 2026 10:50
@danielgek danielgek force-pushed the dleal/add-custom-metadata-ai-search branch from d942da8 to 578ef4c Compare May 4, 2026 13:14
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@emily-shen emily-shen merged commit 58899d8 into cloudflare:main May 5, 2026
51 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants