internal/

directory
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT

Directories

Path Synopsis
adapters
generic
Package generic provides a generic OpenAI-compatible backend for custom providers.
Package generic provides a generic OpenAI-compatible backend for custom providers.
api
v1
Package v1 implements the OpenAI-compatible /v1/...
Package v1 implements the OpenAI-compatible /v1/...
Package cli holds the pure helpers of the command line: argument parsing and text formatting with no dependency on the server.
Package cli holds the pure helpers of the command line: argument parsing and text formatting with no dependency on the server.
Package config holds the runtime configuration populated from environment variables with optional .env file support.
Package config holds the runtime configuration populated from environment variables with optional .env file support.
Package credentialcipher encrypts stored credential data at rest with AES-256-GCM.
Package credentialcipher encrypts stored credential data at rest with AES-256-GCM.
Package dashboard serves the admin SPA and its backing JSON API.
Package dashboard serves the admin SPA and its backing JSON API.
db
Package db manages the embedded database handles.
Package db manages the embedded database handles.
migrate
Package migrate owns the forward-only SQLite migration registry and runner.
Package migrate owns the forward-only SQLite migration registry and runner.
migrations
Package migrations owns numbered SQLite schema changes.
Package migrations owns numbered SQLite schema changes.
record
Package record owns GORM persistence structs.
Package record owns GORM persistence structs.
Package errors defines standard error types used across llm-router services.
Package errors defines standard error types used across llm-router services.
Package httpapi owns the HTTP route tables shared by both listeners.
Package httpapi owns the HTTP route tables shared by both listeners.
Package httpkit holds shared HTTP transport helpers for the API surfaces.
Package httpkit holds shared HTTP transport helpers for the API surfaces.
Package i18n translates the text the command line prints for a person: help, errors and status labels.
Package i18n translates the text the command line prints for a person: help, errors and status labels.
Package instance guards one llm-router process per database.
Package instance guards one llm-router process per database.
Package logging provides the bracket log handler for llm-router plus the events handler that persists records at or above the configured level to the events database while rendering them to stderr.
Package logging provides the bracket log handler for llm-router plus the events handler that persists records at or above the configured level to the events database while rendering them to stderr.
Package models compatibility additions: OpenAI prior-generation and Anthropic-compatible wire types plus the router-side async stores backing responses, conversations, assistants, threads, runs and message batches.
Package models compatibility additions: OpenAI prior-generation and Anthropic-compatible wire types plus the router-side async stores backing responses, conversations, assistants, threads, runs and message batches.
Package netguard owns the outbound-address policy: which destinations the router may dial on behalf of untrusted input (client-supplied URLs, plugin requests, third-party proxy feeds).
Package netguard owns the outbound-address policy: which destinations the router may dial on behalf of untrusted input (client-supplied URLs, plugin requests, third-party proxy feeds).
Package requestsource identifies which listener served a request.
Package requestsource identifies which listener served a request.
Package server wires all services together and starts the HTTP servers.
Package server wires all services together and starts the HTTP servers.
services
batches
SQLiteService persists batches in SQLite: one header row in message_batches plus ordered child rows in message_batch_entries and message_batch_results.
SQLiteService persists batches in SQLite: one header row in message_batches plus ordered child rows in message_batch_entries and message_batch_results.
config
Package config manages RouterConfiguration persisted in the instance_settings row.
Package config manages RouterConfiguration persisted in the instance_settings row.
datamanagement
GORM-backed data management.
GORM-backed data management.
doctor
GORM-backed database inspection and repair.
GORM-backed database inspection and repair.
events
Package events owns operator telemetry: append-only event records with free-form metadata keys, retention pruning, and filtered queries for GET /api/events.
Package events owns operator telemetry: append-only event records with free-form metadata keys, retention pruning, and filtered queries for GET /api/events.
healthcheck
Package healthcheck owns failure-triggered credential health verification.
Package healthcheck owns failure-triggered credential health verification.
luaplugin/statepool
Package statepool holds idle Lua states in per-key buckets.
Package statepool holds idle Lua states in per-key buckets.
maintenance
GORM-backed maintenance scheduling.
GORM-backed maintenance scheduling.
metrics
Package metrics implements the Metrics Service for tracking API usage.
Package metrics implements the Metrics Service for tracking API usage.
pluginrepo
Package pluginrepo manages external plugin repositories (the plugin store).
Package pluginrepo manages external plugin repositories (the plugin store).
proxypool
Package proxypool adapts the proxypool library to router policy and storage.
Package proxypool adapts the proxypool library to router policy and storage.
router
Package router implements the Router Service.
Package router implements the Router Service.
token
Package token implements the Internal Token Service.
Package token implements the Internal Token Service.
videojobs
Package videojobs persists router-side video generation jobs.
Package videojobs persists router-side video generation jobs.
Package testutil provides shared test utilities for llm-router tests.
Package testutil provides shared test utilities for llm-router tests.
mockplugin
Package mockplugin owns deterministic Lua plugin fixtures for Go tests.
Package mockplugin owns deterministic Lua plugin fixtures for Go tests.
Package updater checks GitHub releases and replaces the running binary.
Package updater checks GitHub releases and replaces the running binary.
Package util provides shared utility functions for the llm-router framework.
Package util provides shared utility functions for the llm-router framework.
Package version owns the Version struct plus Parse/String helpers.
Package version owns the Version struct plus Parse/String helpers.

Jump to

Keyboard shortcuts

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