oauthproxy

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderCodex   = "codex"
	ProviderGemini  = "gemini"
	ProviderChatGPT = "chatgpt"
)

Variables

This section is empty.

Functions

func AuthDir

func AuthDir() (string, error)

func BackendProvider

func BackendProvider(providerName string) (string, error)

func ValidateLoginProvider

func ValidateLoginProvider(providerName string) (string, error)

ValidateLoginProvider returns the canonical public OAuth provider name. Codex remains an internal backend and a legacy runtime value, but new logins use the ChatGPT name because both routes authenticate the same account.

Types

type LoginOptions

type LoginOptions struct {
	NoBrowser    bool
	CallbackPort int
}

type LoginResult

type LoginResult struct {
	Provider string
	Backend  string
	Path     string
}

func Login

func Login(ctx context.Context, providerName string, opts LoginOptions) (LoginResult, error)

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func Start

func Start(parent context.Context, providerName string) (*Runtime, error)

func StartCodexAPI

func StartCodexAPI(parent context.Context, endpoint, upstreamAPIKey, modelSpec string) (*Runtime, error)

StartCodexAPI starts an embedded CLIProxyAPI runtime configured with a Codex-compatible API key endpoint. The SDK supplies the current Codex request shape and client headers while ccl continues to expose Anthropic Messages.

func (*Runtime) APIKey

func (r *Runtime) APIKey() string

func (*Runtime) Endpoint

func (r *Runtime) Endpoint() string

func (*Runtime) Stop

func (r *Runtime) Stop()

Jump to

Keyboard shortcuts

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