Repository navigation
.Net: fix Tavily pagination and image handling; add search options - #14670
Draft
Mani (manisrinivasan2k1) wants to merge 8 commits into
Draft
Mani (manisrinivasan2k1) wants to merge 8 commits into
Mani (manisrinivasan2k1) wants to merge 8 commits into
Conversation
- Apply Skip client-side: request top + skip results (capped at the Tavily max_results ceiling of 20) and drop the first skip results, instead of sending max_results = top - skip. - Validate Top against the Tavily maximum of 20 instead of 50. - Parenthesize IncludeImages checks so a missing images array no longer throws when IncludeImages is true. - Add Fast and UltraFast search depths (serialized as "fast" and "ultra-fast") and a Country option. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Keep the accepted Top range (1-50) unchanged; cap only the outgoing max_results request window at 20 using overflow-safe arithmetic. - Make the skip window tests internally consistent. - Remove the contradictory ChunksPerSource availability comment. - Add StartDate, EndDate, SafeSearch and IncludeDomainsMode options, serialized only when set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mani (manisrinivasan2k1)
deployed
to
github-app-auth
October 27, 2026 17:03 — with
GitHub Actions
Active
Adds a per-request X-Client-Name header unless the caller's HttpClient already sets one. User-Agent, Authorization, request bodies and results are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nduplicated HttpClient merges DefaultRequestHeaders into the request before the handler sees it, so the captured request carries the caller's single value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mani (manisrinivasan2k1)
deployed
to
github-app-auth
October 27, 2026 17:09 — with
GitHub Actions
Active
…ters search options Additive nullable options serialized only when set (explicit false is sent). Existing property types, defaults and request bodies are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mani (manisrinivasan2k1)
deployed
to
github-app-auth
October 27, 2026 17:18 — with
GitHub Actions
Active
…epths Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When image descriptions are not requested Tavily returns images as URL strings, which the url+description image model could not deserialize. A converter now reads either form; the object form keeps its required url and description. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…scription Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mani (manisrinivasan2k1)
deployed
to
github-app-auth
October 27, 2026 18:05 — with
GitHub Actions
Active
|
Mani (@manisrinivasan2k1) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This branch was successfully deployed
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.
Summary
Fixes in
TavilyTextSearch:max_resultswas computed astop - skip, soSkipnever skipped anything andTop == Skipsentmax_results: 0. Tavily has no offset parameter, so the connector now requeststop + skipresults (capped at Tavily's maximum of 20) and drops the firstskipclient-side.Skipvalues that push past the 20-result window return fewer thanTopresults.max_resultsis capped at Tavily's maximum of 20 (computed with overflow-safe arithmetic); the acceptedToprange is unchanged.$.images[0]; the parser now handles that response without changing public options.IncludeImages ?? false && Images is not nullparsed asIncludeImages ?? (false && …); withIncludeImages = trueand noimagesin the response the enumerators threw. The condition is now parenthesized.fastandultra-fastsearch depths (TavilySearchDepth.Fast/UltraFast, appended so existing values are unchanged) and optionalCountry,StartDate,EndDate,SafeSearch,IncludeDomainsMode,Language,FilterByLanguage,ExactMatchandAutoParametersoptions. They are sent only when set (IncludeDomainsModeonly when the request has include domains). Corrects thechunks_per_sourcedoc comment (1–3).X-Client-Name: semantic-kernel(added per request; not added when the caller'sHttpClientalready sets that header). The existingUser-Agent,Authorizationand request bodies are unchanged.Defaults, result shapes and exception types are unchanged; the
daysfilter is left as is.Validation
TavilyTextSearch: eight original cases, one image-shape diagnostic and one final image retest. Default search, same-response Top/Skip slicing, include-domain restriction, added option serialization and invalid-key 401 handling passed. Country with ultra-fast returns the API's expected 400; its option comment now documents the limitation.X-Client-Name: semantic-kernelwas observed. No server analytics ingestion or real-model agent test is claimed. API acceptance of date/language flags does not prove their semantic filtering accuracy.Behavior notes
Toprange is unchanged (1–50). Only the outgoingmax_resultsis capped at 20, soTopvalues above 20 now return at most 20 results; previously the larger value was sent to the API.include_answerbasic/advanced modes.IncludeAnswerkeeps its existing type.🤖 Generated with Claude Code