Skip to content

Commit 1eec830

Browse files
feat: Remove SerpApi and Valyu search providers
Stainless-Generated-From: 2aa8d2fe0ba81ebd7471092b293912543963453d
1 parent 31e11ee commit 1eec830

3 files changed

Lines changed: 3 additions & 115 deletions

File tree

‎src/kernel/resources/search/providers.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ def with_streaming_response(self) -> ProvidersResourceWithStreamingResponse:
4848
def list(
4949
self,
5050
*,
51-
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "valyu", "octen", "you", "tavily", "serpapi"]
52-
| Omit = omit,
51+
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "octen", "you", "tavily"] | Omit = omit,
5352
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5453
# The extra values given here take precedence over values defined on the client or passed to this method.
5554
extra_headers: Headers | None = None,
@@ -113,8 +112,7 @@ def with_streaming_response(self) -> AsyncProvidersResourceWithStreamingResponse
113112
async def list(
114113
self,
115114
*,
116-
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "valyu", "octen", "you", "tavily", "serpapi"]
117-
| Omit = omit,
115+
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "octen", "you", "tavily"] | Omit = omit,
118116
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
119117
# The extra values given here take precedence over values defined on the client or passed to this method.
120118
extra_headers: Headers | None = None,

‎src/kernel/types/provider_target_param.py‎

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
"SearchParallelTargetOptionsAdvancedSettingsExcerptSettings",
2929
"SearchParallelTargetOptionsAdvancedSettingsFetchPolicy",
3030
"SearchParallelTargetOptionsAdvancedSettingsSourcePolicy",
31-
"SearchValyuTarget",
32-
"SearchValyuTargetOptions",
3331
"SearchOctenTarget",
3432
"SearchOctenTargetOptions",
3533
"SearchOctenTargetOptionsFullContent",
@@ -40,8 +38,6 @@
4038
"SearchYouTargetOptionsExtractionFullPage",
4139
"SearchTavilyTarget",
4240
"SearchTavilyTargetOptions",
43-
"SearchSerpAPITarget",
44-
"SearchSerpAPITargetOptions",
4541
]
4642

4743

@@ -335,57 +331,6 @@ class SearchParallelTarget(TypedDict, total=False):
335331
options: SearchParallelTargetOptions
336332

337333

338-
class SearchValyuTargetOptions(TypedDict, total=False):
339-
fast_mode: bool
340-
"""Trade depth for latency."""
341-
342-
historical_cache: bool
343-
"""Allow historical cached results."""
344-
345-
include_abstracts: bool
346-
"""Include abstracts for academic sources."""
347-
348-
instructions: str
349-
"""Natural-language retrieval guidance."""
350-
351-
is_tool_call: bool
352-
"""Mark the search as an agent tool call."""
353-
354-
max_num_results: int
355-
"""Provider-native count. Lower-only alias for max_results."""
356-
357-
max_price: float
358-
"""Provider-native USD-per-thousand-results price ceiling. Forwarded to Valyu."""
359-
360-
relevance_threshold: float
361-
"""Provider-native minimum relevance threshold.
362-
363-
Not a normalized cross-provider score.
364-
"""
365-
366-
response_length: Literal["short", "medium", "large", "max"]
367-
"""Provider result-content length preset."""
368-
369-
search_type: str
370-
"""Corpus selector, including all, web, proprietary, and news.
371-
372-
Provider corpus choice may change billing; Kernel does not force web-only
373-
searches.
374-
"""
375-
376-
source_biases: SequenceNotStr[str]
377-
"""Bias retrieval toward these sources."""
378-
379-
url_only: bool
380-
"""Return URLs without content."""
381-
382-
383-
class SearchValyuTarget(TypedDict, total=False):
384-
provider: Required[Literal["valyu"]]
385-
386-
options: SearchValyuTargetOptions
387-
388-
389334
class SearchOctenTargetOptionsFullContent(TypedDict, total=False):
390335
enable: bool
391336

@@ -575,68 +520,13 @@ class SearchTavilyTarget(TypedDict, total=False):
575520
options: SearchTavilyTargetOptions
576521

577522

578-
class SearchSerpAPITargetOptions(TypedDict, total=False):
579-
engine: Required[str]
580-
"""SerpApi engine identifier.
581-
582-
The Kernel integration currently supports google only.
583-
"""
584-
585-
device: Literal["desktop", "mobile", "tablet"]
586-
"""Device profile used for the search."""
587-
588-
filter: Literal[0, 1]
589-
"""Google duplicate-content filter."""
590-
591-
gl: str
592-
"""Two-letter Google country code."""
593-
594-
google_domain: str
595-
"""Google domain to search when using the google engine."""
596-
597-
hl: str
598-
"""Interface language code."""
599-
600-
location: str
601-
"""Free-form geographic location used for localized results."""
602-
603-
nfpr: Literal[0, 1]
604-
"""Google auto-correction filter."""
605-
606-
no_cache: bool
607-
"""When true, bypass SerpApi cached results when supported."""
608-
609-
num: int
610-
"""Number of results requested from the search engine."""
611-
612-
safe: Literal["active", "off"]
613-
"""Safe-search setting for engines that support it."""
614-
615-
start: int
616-
"""Zero-based result offset for pagination."""
617-
618-
tbm: str
619-
"""Google vertical search selector, such as images, video, news, or shopping."""
620-
621-
tbs: str
622-
"""Google time and search modifiers, including freshness filters."""
623-
624-
625-
class SearchSerpAPITarget(TypedDict, total=False):
626-
provider: Required[Literal["serpapi"]]
627-
628-
options: SearchSerpAPITargetOptions
629-
630-
631523
ProviderTargetParam: TypeAlias = Union[
632524
SearchBraveTarget,
633525
SearchExaTarget,
634526
SearchPerplexityTarget,
635527
SearchContextTarget,
636528
SearchParallelTarget,
637-
SearchValyuTarget,
638529
SearchOctenTarget,
639530
SearchYouTarget,
640531
SearchTavilyTarget,
641-
SearchSerpAPITarget,
642532
]

‎src/kernel/types/search/provider_list_params.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class ProviderListParams(TypedDict, total=False):
11-
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "valyu", "octen", "you", "tavily", "serpapi"]
11+
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "octen", "you", "tavily"]
1212
"""Optional concrete provider slug filter.
1313
1414
Omit to list every provider. A slug that is not listed returns an empty array.

0 commit comments

Comments
 (0)