providersession

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package providersession prepares the one provider runtime shape shared by interactive Claude sessions and management commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	Provider provider.Provider
	Runtime  *oauthproxy.Runtime
	BaseURL  string
	UseProxy bool
	// contains filtered or unexported fields
}

Session is the resolved provider view for one operation. Provider is always a copy, so preparing a session never mutates persisted configuration.

func Prepare

func Prepare(ctx context.Context, configured provider.Provider) (*Session, error)

Prepare discovers any missing API-key gateway models, starts the shared Anthropic Messages adapter when required, and returns the resolved endpoint.

func PrepareProxy added in v1.5.21

func PrepareProxy(ctx context.Context, configured provider.Provider) (*Session, error)

PrepareProxy provides the local Messages endpoint used by Codex's protocol adapter, including native Anthropic gateways that Claude can contact directly.

func (*Session) Close

func (s *Session) Close()

Close releases the embedded runtime. It is safe to call more than once.

Jump to

Keyboard shortcuts

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