internal/

directory
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT

Directories

Path Synopsis
Package adapter defines the contract every upstream provider satisfies, plus the small shared helpers around it (ReadNormalizedResponse, the InboundHeaders context helper).
Package adapter defines the contract every upstream provider satisfies, plus the small shared helpers around it (ReadNormalizedResponse, the InboundHeaders context helper).
anthropic
Package anthropic implements the Adapter as a transparent passthrough to a native Anthropic Messages API (api.anthropic.com or a compatible endpoint).
Package anthropic implements the Adapter as a transparent passthrough to a native Anthropic Messages API (api.anthropic.com or a compatible endpoint).
openaichat
Package openaichat implements the Adapter against any OpenAI-ChatCompletions upstream.
Package openaichat implements the Adapter against any OpenAI-ChatCompletions upstream.
Package config loads shim configuration from a .env file and the process environment.
Package config loads shim configuration from a .env file and the process environment.
Package launcher implements `shim run`: locate `claude`, inject the ANTHROPIC_BASE_URL + ANTHROPIC_API_KEY env vars pointing at the local shim server, and exec it with the user's args.
Package launcher implements `shim run`: locate `claude`, inject the ANTHROPIC_BASE_URL + ANTHROPIC_API_KEY env vars pointing at the local shim server, and exec it with the user's args.
Package measure aggregates per-request measurements in memory so shim can answer the question "what are you actually doing to my traffic?" loudly, in a single JSON payload exposed at /v1/metrics.
Package measure aggregates per-request measurements in memory so shim can answer the question "what are you actually doing to my traffic?" loudly, in a single JSON payload exposed at /v1/metrics.
Package obslog wraps log/slog with a redacting JSON handler.
Package obslog wraps log/slog with a redacting JSON handler.
Package server wires shim's HTTP routes and owns the per-request translation flow.
Package server wires shim's HTTP routes and owns the per-request translation flow.
Package translate converts Anthropic Messages API requests/responses to and from OpenAI ChatCompletions shape.
Package translate converts Anthropic Messages API requests/responses to and from OpenAI ChatCompletions shape.

Jump to

Keyboard shortcuts

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