router

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: GPL-3.0 Imports: 21 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 router serves the Anthropic API surface: it forwards traffic to the real API untouched, extends the advertised model list, and answers requests for the added models from their own provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router implements http.Handler for the intercepted Anthropic endpoints.

func New

func New(cfg *config.Config, registry *codex.Registry, backend *codex.Backend, transport http.RoundTripper, caPEM []byte) (*Router, error)

New builds a router. transport carries pass-through traffic to the upstream API and must not itself route through this proxy. caPEM may be nil.

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP dispatches one request.

Jump to

Keyboard shortcuts

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