adkvercel

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Copyright 2026 Alcova AI Licensed under the Apache License, Version 2.0.

Package adkvercel adapts Google ADK model requests to Vercel AI Gateway's provider-neutral Language Model V4 protocol.

Copyright 2026 Alcova AI Licensed under the Apache License, Version 2.0.

Index

Constants

View Source
const (
	DefaultBaseURL                    = "https://ai-gateway.vercel.sh/v4/ai"
	GatewayProtocolVersion            = "0.0.1"
	LanguageModelSpecificationVersion = "4"
	PinnedGatewayPackageVersion       = "4.0.74"
	PinnedVercelAISDKCommit           = "fe86f8fb03a08af90b05cb79df66d3230d1e2666"
)

Variables

View Source
var (
	ErrRequestNil        = errors.New("vercel: request is nil")
	ErrNoContents        = errors.New("vercel: request has no contents")
	ErrMissingFinish     = errors.New("vercel: stream ended without a finish event")
	ErrUnknownStreamPart = errors.New("vercel: unknown Language Model V4 stream part")
)

Functions

func NewModel

func NewModel(cfg Config) (model.LLM, error)

Types

type Config

type Config struct {
	APIKey     string
	BaseURL    string
	HTTPClient *http.Client
	Headers    http.Header
	Model      adkmodels.ModelConfig
}

type GatewayError

type GatewayError struct {
	StatusCode int
	Message    string
	Body       string
}

func (*GatewayError) Error

func (e *GatewayError) Error() string

type ToolInputError added in v0.1.8

type ToolInputError struct {
	ToolCallID string
	ToolName   string
	RawInput   string
	Err        error
}

ToolInputError retains the exact gateway tool arguments when JSON decoding fails. RawInput can contain sensitive data; callers must only persist it in explicitly enabled private diagnostic traces, never ordinary logs. Error deliberately excludes RawInput.

func (*ToolInputError) Error added in v0.1.8

func (e *ToolInputError) Error() string

func (*ToolInputError) Unwrap added in v0.1.8

func (e *ToolInputError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL