Skip to content

Add AI Search RPC Types#6102

Merged
danlapid merged 1 commit intocloudflare:mainfrom
G4brym:add-ai-search-rpc-types
Feb 20, 2026
Merged

Add AI Search RPC Types#6102
danlapid merged 1 commit intocloudflare:mainfrom
G4brym:add-ai-search-rpc-types

Conversation

@G4brym
Copy link
Copy Markdown
Member

@G4brym G4brym commented Feb 18, 2026

No description provided.

@G4brym G4brym requested review from a team as code owners February 18, 2026 11:42
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 18, 2026

Merging this PR will improve performance by 19.23%

⚡ 1 improved benchmark
✅ 69 untouched benchmarks
⏩ 129 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
jsonResponse[Response] 47.4 µs 39.8 µs +19.23%

Comparing G4brym:add-ai-search-rpc-types (6159082) with main (1ac33c5)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@G4brym G4brym force-pushed the add-ai-search-rpc-types branch from 1047ce2 to ab3f2c2 Compare February 18, 2026 12:19
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

What is the reason for all these [key: string]: unknown; properties in each of the types. Is it for some kind of forward compatibility?

@G4brym
Copy link
Copy Markdown
Member Author

G4brym commented Feb 18, 2026

Hey @petebacondarwin yes, all of theses [key: string]: unknown; for forward compability, in 2 different planes, inside the ai_search_options is because we keep adding new fields and settings all the times, and ideally we dont want to give ts type errors for users on older worker types versions
And on a different plane there is also chat completions format, that each model provider as different options, and since we forward most requests without changing the body, we also dont want to give users ts type errors for a field on a specific provider

@G4brym G4brym force-pushed the add-ai-search-rpc-types branch from ab3f2c2 to 6159082 Compare February 19, 2026 11:57
@danlapid danlapid merged commit c0f9d42 into cloudflare:main Feb 20, 2026
17 of 18 checks passed
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.

3 participants