Directories
¶
| Path | Synopsis |
|---|---|
|
observability
Package observability is a true leaf (stdlib-only) holding cross-cutting counters that lower layers (scheduler) must record without importing handler/shared or app.
|
Package observability is a true leaf (stdlib-only) holding cross-cutting counters that lower layers (scheduler) must record without importing handler/shared or app. |
|
Package auth provides admin and downstream proxy authentication middleware with IP allowlisting and rate limiting.
|
Package auth provides admin and downstream proxy authentication middleware with IP allowlisting and rate limiting. |
|
cmd
|
|
|
migrate
command
Command metapi-migrate is a standalone CLI that transfers all 18 application tables between a SQLite database and a PostgreSQL database (either direction).
|
Command metapi-migrate is a standalone CLI that transfers all 18 application tables between a SQLite database and a PostgreSQL database (either direction). |
|
server
command
|
|
|
Package config loads and validates all server configuration from environment variables.
|
Package config loads and validates all server configuration from environment variables. |
|
Package e2e contains end-to-end integration tests for the proxy pipeline.
|
Package e2e contains end-to-end integration tests for the proxy pipeline. |
|
handler
|
|
|
admin
Package admin implements the REST API handlers for the admin dashboard.
|
Package admin implements the REST API handlers for the admin dashboard. |
|
proxy
Package proxyhandler implements the OpenAI-compatible proxy endpoint handlers.
|
Package proxyhandler implements the OpenAI-compatible proxy endpoint handlers. |
|
shared
Package shared provides common HTTP handler utilities used across admin and proxy handler packages.
|
Package shared provides common HTTP handler utilities used across admin and proxy handler packages. |
|
internal
|
|
|
golden
Package golden is a test-only snapshot harness for the protocol-conversion golden suites (P0-1).
|
Package golden is a test-only snapshot harness for the protocol-conversion golden suites (P0-1). |
|
httpclient
Package httpclient is the shared construction point for outbound HTTP transports and clients outside the platform site-proxy regime.
|
Package httpclient is the shared construction point for outbound HTTP transports and clients outside the platform site-proxy regime. |
|
pgtest
Package pgtest is a test-only helper for the PostgreSQL-gated suites (PG_TEST_DSN).
|
Package pgtest is a test-only helper for the PostgreSQL-gated suites (PG_TEST_DSN). |
|
ssrf
Package ssrf provides shared SSRF guards for outbound transports.
|
Package ssrf provides shared SSRF guards for outbound transports. |
|
version
Package version exposes the build-time version of the metapi binary.
|
Package version exposes the build-time version of the metapi binary. |
|
Package proxy implements the dual-loop proxy orchestration core with channel retry, session leasing, and failure classification.
|
Package proxy implements the dual-loop proxy orchestration core with channel retry, session leasing, and failure classification. |
|
types
Package types holds shared type definitions for the proxy module.
|
Package types holds shared type definitions for the proxy module. |
|
Package routing implements the token-based channel selection engine with Fibonacci backoff cooldown and weighted random distribution.
|
Package routing implements the token-based channel selection engine with Fibonacci backoff cooldown and weighted random distribution. |
|
Package scheduler manages background job schedulers for checkin, balance, cleanup, and aggregation.
|
Package scheduler manages background job schedulers for checkin, balance, cleanup, and aggregation. |
|
Package service contains the business logic layer: checkin, balance, notify, OAuth, and backup services.
|
Package service contains the business logic layer: checkin, balance, notify, OAuth, and backup services. |
|
catalogsync
Package catalogsync owns the model-catalog data source registry: a DB-persisted, ordered list of catalog sources (llm-metadata / models.dev presets plus operator-added custom URLs) that are fetched in order and merged first-wins into the runtime catalog snapshot consumed by routing and the models marketplace.
|
Package catalogsync owns the model-catalog data source registry: a DB-persisted, ordered list of catalog sources (llm-metadata / models.dev presets plus operator-added custom URLs) that are fetched in order and merged first-wins into the runtime catalog snapshot consumed by routing and the models marketplace. |
|
events
Package events is the single source of truth for structured event emission (F5).
|
Package events is the single source of truth for structured event emission (F5). |
|
pricing
Package pricing provides pure, database-free functions for normalizing upstream pricing signals into a canonical product model and converting pricing multipliers (ratios) into USD per million tokens.
|
Package pricing provides pure, database-free functions for normalizing upstream pricing signals into a canonical product model and converting pricing multipliers (ratios) into USD per million tokens. |
|
pricingcatalog
Package pricingcatalog serves official catalog pricing from models.dev as a cold-start cost signal for the token router.
|
Package pricingcatalog serves official catalog pricing from models.dev as a cold-start cost signal for the token router. |
|
prompt_filter
Package promptfilter implements a lightweight, pattern-based prompt safety filter that blocks high-risk prompts before they reach shared OAuth upstream accounts (Codex, Claude, Gemini CLI, Grok).
|
Package promptfilter implements a lightweight, pattern-based prompt safety filter that blocks high-risk prompts before they reach shared OAuth upstream accounts (Codex, Claude, Gemini CLI, Grok). |
|
Package store provides the database layer with SQLite and PostgreSQL dual-dialect support.
|
Package store provides the database layer with SQLite and PostgreSQL dual-dialect support. |
|
Package transform provides protocol conversion between OpenAI, Anthropic, Gemini, and Codex formats via a canonical intermediate representation.
|
Package transform provides protocol conversion between OpenAI, Anthropic, Gemini, and Codex formats via a canonical intermediate representation. |
|
anthropic/messages
Package messages bridges the text and client-function-tool subset of Anthropic Messages to OpenAI Chat Completions.
|
Package messages bridges the text and client-function-tool subset of Anthropic Messages to OpenAI Chat Completions. |
|
openai/completions
Package completions provides OpenAI Completions (legacy) transformer — pass-through.
|
Package completions provides OpenAI Completions (legacy) transformer — pass-through. |
|
openai/embeddings
Package embeddings provides OpenAI Embeddings transformer — pass-through.
|
Package embeddings provides OpenAI Embeddings transformer — pass-through. |
|
openai/images
Package images provides OpenAI Images transformer — pass-through.
|
Package images provides OpenAI Images transformer — pass-through. |
|
openai/responses
Package responses provides OpenAI Responses API transformer and compact mode.
|
Package responses provides OpenAI Responses API transformer and compact mode. |
|
Package web bundles the built React SPA frontend via go:embed.
|
Package web bundles the built React SPA frontend via go:embed. |
Click to show internal directories.
Click to hide internal directories.