pkg/

directory
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0

Directories

Path Synopsis
api
app
mcp
common
strutil
Package strutil holds small, dependency-free string helpers.
Package strutil holds small, dependency-free string helpers.
Package config loads configuration from environment variables.
Package config loads configuration from environment variables.
Package container wraps uber/dig with per-context modules.
Package container wraps uber/dig with per-context modules.
domain
ids
provider
Package provider is the single source of truth for the LLM provider names the gateway can route to.
Package provider is the single source of truth for the LLM provider names the gateway can route to.
infra
cache/cachetest
Package cachetest provides cache test doubles shared across app-layer tests.
Package cachetest provides cache test doubles shared across app-layer tests.
cache/semantic
Package semantic provides a Redis Stack (RediSearch) vector store used by the semantic cache plugin to look up and persist responses by embedding similarity, scoped per rule via a hashed tag.
Package semantic provides a Redis Stack (RediSearch) vector store used by the semantic cache plugin to look up and persist responses by embedding similarity, scoped per rule via a hashed tag.
configsync/grpc
Package grpc implements the config-sync gRPC transport: the control-plane server, the data-plane client, the connection hub, and the auth interceptors and credentials that secure the channel.
Package grpc implements the config-sync gRPC transport: the control-plane server, the data-plane client, the connection hub, and the auth interceptors and credentials that secure the channel.
database/migrations
Package migrations registers in-code schema migrations via init().
Package migrations registers in-code schema migrations via init().
metrics/playground
Package playground stores the metrics Event of playground proxy requests in Redis so the dashboard can fetch the trace by TraceID (the X-AG-Trace-Id echoed in the proxy response).
Package playground stores the metrics Event of playground proxy requests in Redis so the dashboard can fetch the trace by TraceID (the X-AG-Trace-Id echoed in the proxy response).
plugins/cors
Package cors implements a PreRequest CORS plugin that validates the request origin, applies CORS response headers, and short-circuits preflight requests.
Package cors implements a PreRequest CORS plugin that validates the request origin, applies CORS response headers, and short-circuits preflight requests.
plugins/llmcost
Package llmcost holds the model-pricing primitives shared by the LLM budget and cost cap plugins: glob matching of model slugs, price resolution, model downgrade, and the stateless cost cap decision engine.
Package llmcost holds the model-pricing primitives shared by the LLM budget and cost cap plugins: glob matching of model slugs, price resolution, model downgrade, and the stateless cost cap decision engine.
plugins/semanticcache
Package semanticcache implements a semantic response cache: on PreRequest it serves a cached response when a semantically similar request is found, and on PostResponse it stores successful upstream responses for future hits.
Package semanticcache implements a semantic response cache: on PreRequest it serves a cached response when a semantically similar request is found, and on PostResponse it stores successful upstream responses for future hits.
providers/openaicompat
Package openaicompat implements a provider client for arbitrary OpenAI-compatible Chat Completions endpoints (Together, Fireworks, vLLM, Ollama, self-hosted gateways, ...).
Package openaicompat implements a provider client for arbitrary OpenAI-compatible Chat Completions endpoints (Together, Fireworks, vLLM, Ollama, self-hosted gateways, ...).
repository/configsyncconn
Package configsyncconn provides the pgx-backed adapter over config_sync_connections: the write side the config-sync Hub calls best-effort to record data-plane stream lifecycle, and the read side the admin API lists.
Package configsyncconn provides the pgx-backed adapter over config_sync_connections: the write side the config-sync Hub calls best-effort to record data-plane stream lifecycle, and the read side the admin API lists.
repository/outbox
Package outbox provides the pgx-backed adapter for the config-snapshot change-marker outbox: an in-transaction appender the admin repositories share, plus the drain/prune reads the dispatcher runs.
Package outbox provides the pgx-backed adapter for the config-snapshot change-marker outbox: an in-transaction appender the admin repositories share, plus the drain/prune reads the dispatcher runs.
metrics module
runtimeconfig
Package server hosts the shared HTTP server lifecycle for admin and proxy.
Package server hosts the shared HTTP server lifecycle for admin and proxy.
router
Package router declares the ServerRouter contract wired into BaseServer.
Package router declares the ServerRouter contract wired into BaseServer.
Package version exposes build metadata injected via ldflags.
Package version exposes build metadata injected via ldflags.

Jump to

Keyboard shortcuts

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