models

package
v0.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package models is the config-time catalog of model-provider kinds.

Each provider kind (`openai`, `anthropic`, `google`, `bedrock`, `vertex`, `borrowed`) lives in its own file. New picks the right constructor by config.Provider; in-tree providers return an adk model.LLM the runtime hands to llmagent.New.

This package owns the full client/wire: providers construct their own SDK clients and implement model.LLM directly. The runtime stays out of provider details; it just calls New and wires the returned LLM into the agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSession

func WithSession(ctx context.Context, ss *mcp.ServerSession) context.Context

WithSession attaches an MCP server session to ctx so the borrowed provider can route GenerateContent back to the connected client. Set by the mcp-stdio transport.

Types

type LLM

type LLM = adkmodel.LLM

LLM is the agent-side interface providers must satisfy. It is ADK's model.LLM verbatim; aliasing keeps callers off the ADK import while preserving the contract llmagent.New consumes.

func New

func New(ref config.ModelRef, entry config.ModelEntry) (LLM, error)

New builds an LLM for the model entry referenced by ref. It is the single entry point the runtime uses; the provider files in this package supply the per-kind constructors.

Jump to

Keyboard shortcuts

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