Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.140.0"
".": "0.141.0"
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [0.141.0](https://github.com/kernel/kernel-python-sdk/compare/v0.140.0...v0.141.0) (2026-11-05)


### Features

* Add customer-managed VGS vault card payments ([01c7767](https://github.com/kernel/kernel-python-sdk/commit/01c7767ccc13cd14521048a974c255bc583eb73c))
* Move GPU browsers to L40S-3Q and 6Q vGPU profiles ([d3eb44c](https://github.com/kernel/kernel-python-sdk/commit/d3eb44c75ecf31727e72b8fb7d780c31ac2ecdde))
* Remove SerpApi and Valyu search providers ([1eec830](https://github.com/kernel/kernel-python-sdk/commit/1eec830f4de4e1aabf2890119967e4a6d3e5633c))
* Return access_token_rejected code when Link rejects a customer-supplied token ([3f9a384](https://github.com/kernel/kernel-python-sdk/commit/3f9a3844fd95e262f55f798a2f2601d105cf9512))


### Bug Fixes

* generate VGS card aliases in the TypeScript SDK ([814e522](https://github.com/kernel/kernel-python-sdk/commit/814e522467a6d436d73fa27381b944b3d46d03ca))

## [0.140.0](https://github.com/kernel/kernel-python-sdk/compare/v0.139.0...v0.140.0) (2026-11-04)


Expand Down
5 changes: 5 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,11 @@ from kernel.types.vaults import (
VaultItemOperationResponse,
VaultPaymentMethod,
VaultWebmcpBinding,
VgsCardInput,
VgsCardState,
VgsCardVaultItemSpec,
VgsWalletState,
VgsWalletVaultItemSpec,
WalletVaultItemSpec,
WalletVaultItemState,
WebmcpInvokeVaultItemOperationRequest,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kernel"
version = "0.140.0"
version = "0.141.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "kernel"
__version__ = "0.140.0" # x-release-please-version
__version__ = "0.141.0" # x-release-please-version
8 changes: 4 additions & 4 deletions src/kernel/resources/browsers/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def create(
creation.

video_memory: Video memory (VRAM) for a GPU browser session. Requires gpu=true. Defaults to
2GiB, which comes with 4 vCPU and 6GiB memory. 4GiB comes with 8 vCPU and 12GiB
memory.
3GiB, which comes with 4 vCPU and 6GiB memory. 6GiB comes with 8 vCPU and 12GiB
memory. 2GiB and 4GiB are deprecated aliases for 3GiB and 6GiB.

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). For GPU images, the default is
Expand Down Expand Up @@ -1176,8 +1176,8 @@ async def create(
creation.

video_memory: Video memory (VRAM) for a GPU browser session. Requires gpu=true. Defaults to
2GiB, which comes with 4 vCPU and 6GiB memory. 4GiB comes with 8 vCPU and 12GiB
memory.
3GiB, which comes with 4 vCPU and 6GiB memory. 6GiB comes with 8 vCPU and 12GiB
memory. 2GiB and 4GiB are deprecated aliases for 3GiB and 6GiB.

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). For GPU images, the default is
Expand Down
6 changes: 2 additions & 4 deletions src/kernel/resources/search/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def with_streaming_response(self) -> ProvidersResourceWithStreamingResponse:
def list(
self,
*,
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "valyu", "octen", "you", "tavily", "serpapi"]
| Omit = omit,
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "octen", "you", "tavily"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -113,8 +112,7 @@ def with_streaming_response(self) -> AsyncProvidersResourceWithStreamingResponse
async def list(
self,
*,
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "valyu", "octen", "you", "tavily", "serpapi"]
| Omit = omit,
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "octen", "you", "tavily"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
92 changes: 88 additions & 4 deletions src/kernel/resources/vault_provider_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,56 @@ def create(
"""
...

@overload
def create(
self,
*,
credentials: vault_provider_config_create_params.VaultVgsProviderConfigRequestCredentials,
name: str,
provider: Literal["vgs"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> VaultProviderConfig:
"""Register a configuration shared across the organization's projects.

Names are
unique within the organization; duplicate names return 409 without replacing
credentials. A configuration serves many wallets. Secret credentials are never
returned. Requires an organization-scoped credential or dashboard
authentication; project-scoped credentials receive 403.

Args:
credentials: A VGS service account with the aliases:read scope on the customer's vault, which
Kernel uses to reveal the aliases each purchase sends.

name: Unique within the organization.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
...

@required_args(["credentials", "name", "provider"])
def create(
self,
*,
credentials: vault_provider_config_create_params.VaultLinkProviderConfigRequestCredentials
| vault_provider_config_create_params.VaultAgentCardProviderConfigRequestCredentials,
| vault_provider_config_create_params.VaultAgentCardProviderConfigRequestCredentials
| vault_provider_config_create_params.VaultVgsProviderConfigRequestCredentials,
name: str,
provider: Literal["link"] | Literal["agentcard"],
provider: Literal["link"] | Literal["agentcard"] | Literal["vgs"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -454,14 +496,56 @@ async def create(
"""
...

@overload
async def create(
self,
*,
credentials: vault_provider_config_create_params.VaultVgsProviderConfigRequestCredentials,
name: str,
provider: Literal["vgs"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> VaultProviderConfig:
"""Register a configuration shared across the organization's projects.

Names are
unique within the organization; duplicate names return 409 without replacing
credentials. A configuration serves many wallets. Secret credentials are never
returned. Requires an organization-scoped credential or dashboard
authentication; project-scoped credentials receive 403.

Args:
credentials: A VGS service account with the aliases:read scope on the customer's vault, which
Kernel uses to reveal the aliases each purchase sends.

name: Unique within the organization.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
...

@required_args(["credentials", "name", "provider"])
async def create(
self,
*,
credentials: vault_provider_config_create_params.VaultLinkProviderConfigRequestCredentials
| vault_provider_config_create_params.VaultAgentCardProviderConfigRequestCredentials,
| vault_provider_config_create_params.VaultAgentCardProviderConfigRequestCredentials
| vault_provider_config_create_params.VaultVgsProviderConfigRequestCredentials,
name: str,
provider: Literal["link"] | Literal["agentcard"],
provider: Literal["link"] | Literal["agentcard"] | Literal["vgs"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
5 changes: 3 additions & 2 deletions src/kernel/types/browser_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ class BrowserCreateParams(TypedDict, total=False):
video_memory: BrowserVideoMemory
"""Video memory (VRAM) for a GPU browser session.

Requires gpu=true. Defaults to 2GiB, which comes with 4 vCPU and 6GiB memory.
4GiB comes with 8 vCPU and 12GiB memory.
Requires gpu=true. Defaults to 3GiB, which comes with 4 vCPU and 6GiB memory.
6GiB comes with 8 vCPU and 12GiB memory. 2GiB and 4GiB are deprecated aliases
for 3GiB and 6GiB.
"""

viewport: BrowserViewport
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/types/browser_video_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__all__ = ["BrowserVideoMemory"]

BrowserVideoMemory: TypeAlias = Literal["2GiB", "4GiB"]
BrowserVideoMemory: TypeAlias = Literal["3GiB", "6GiB", "2GiB", "4GiB"]
110 changes: 0 additions & 110 deletions src/kernel/types/provider_target_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"SearchParallelTargetOptionsAdvancedSettingsExcerptSettings",
"SearchParallelTargetOptionsAdvancedSettingsFetchPolicy",
"SearchParallelTargetOptionsAdvancedSettingsSourcePolicy",
"SearchValyuTarget",
"SearchValyuTargetOptions",
"SearchOctenTarget",
"SearchOctenTargetOptions",
"SearchOctenTargetOptionsFullContent",
Expand All @@ -40,8 +38,6 @@
"SearchYouTargetOptionsExtractionFullPage",
"SearchTavilyTarget",
"SearchTavilyTargetOptions",
"SearchSerpAPITarget",
"SearchSerpAPITargetOptions",
]


Expand Down Expand Up @@ -335,57 +331,6 @@ class SearchParallelTarget(TypedDict, total=False):
options: SearchParallelTargetOptions


class SearchValyuTargetOptions(TypedDict, total=False):
fast_mode: bool
"""Trade depth for latency."""

historical_cache: bool
"""Allow historical cached results."""

include_abstracts: bool
"""Include abstracts for academic sources."""

instructions: str
"""Natural-language retrieval guidance."""

is_tool_call: bool
"""Mark the search as an agent tool call."""

max_num_results: int
"""Provider-native count. Lower-only alias for max_results."""

max_price: float
"""Provider-native USD-per-thousand-results price ceiling. Forwarded to Valyu."""

relevance_threshold: float
"""Provider-native minimum relevance threshold.

Not a normalized cross-provider score.
"""

response_length: Literal["short", "medium", "large", "max"]
"""Provider result-content length preset."""

search_type: str
"""Corpus selector, including all, web, proprietary, and news.

Provider corpus choice may change billing; Kernel does not force web-only
searches.
"""

source_biases: SequenceNotStr[str]
"""Bias retrieval toward these sources."""

url_only: bool
"""Return URLs without content."""


class SearchValyuTarget(TypedDict, total=False):
provider: Required[Literal["valyu"]]

options: SearchValyuTargetOptions


class SearchOctenTargetOptionsFullContent(TypedDict, total=False):
enable: bool

Expand Down Expand Up @@ -575,68 +520,13 @@ class SearchTavilyTarget(TypedDict, total=False):
options: SearchTavilyTargetOptions


class SearchSerpAPITargetOptions(TypedDict, total=False):
engine: Required[str]
"""SerpApi engine identifier.

The Kernel integration currently supports google only.
"""

device: Literal["desktop", "mobile", "tablet"]
"""Device profile used for the search."""

filter: Literal[0, 1]
"""Google duplicate-content filter."""

gl: str
"""Two-letter Google country code."""

google_domain: str
"""Google domain to search when using the google engine."""

hl: str
"""Interface language code."""

location: str
"""Free-form geographic location used for localized results."""

nfpr: Literal[0, 1]
"""Google auto-correction filter."""

no_cache: bool
"""When true, bypass SerpApi cached results when supported."""

num: int
"""Number of results requested from the search engine."""

safe: Literal["active", "off"]
"""Safe-search setting for engines that support it."""

start: int
"""Zero-based result offset for pagination."""

tbm: str
"""Google vertical search selector, such as images, video, news, or shopping."""

tbs: str
"""Google time and search modifiers, including freshness filters."""


class SearchSerpAPITarget(TypedDict, total=False):
provider: Required[Literal["serpapi"]]

options: SearchSerpAPITargetOptions


ProviderTargetParam: TypeAlias = Union[
SearchBraveTarget,
SearchExaTarget,
SearchPerplexityTarget,
SearchContextTarget,
SearchParallelTarget,
SearchValyuTarget,
SearchOctenTarget,
SearchYouTarget,
SearchTavilyTarget,
SearchSerpAPITarget,
]
2 changes: 1 addition & 1 deletion src/kernel/types/search/provider_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class ProviderListParams(TypedDict, total=False):
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "valyu", "octen", "you", "tavily", "serpapi"]
slug: Literal["brave", "exa", "perplexity", "context", "parallel", "octen", "you", "tavily"]
"""Optional concrete provider slug filter.

Omit to list every provider. A slug that is not listed returns an empty array.
Expand Down
Loading
Loading