codex-convert-proxy 0.1.4

A high-performance proxy server that converts between different AI API formats
Documentation
[package]
name = "codex-convert-proxy"
version = "0.1.4"
edition = "2024"
description = "A high-performance proxy server that converts between different AI API formats"
license = "MIT OR Apache-2.0"
repository = "https://github.com/soddygo/codex-convert-proxy"
keywords = ["proxy", "ai", "openai", "api", "conversion"]
categories = ["web-programming", "network-programming"]

[features]
# Default = full proxy server binary.
default = ["server"]

# Library: providers + conversion + types. For embedding the conversion logic
# in other Rust applications without pulling in Pingora / the proxy server.
lib = ["async-trait"]

# Server: the full standalone proxy binary (depends on `lib`, adds config
# parsing, the Pingora HTTP server, CLI, and logging).
server = [
    "lib",
    "url",
    "clap",
    "tracing-subscriber",
    "tracing-appender",
    "pingora/lb",
    "pingora/rustls",
    "pingora-core/rustls",
    "pingora-http",
    "pingora-proxy/rustls",
]

# Telemetry: OpenTelemetry exporters for tracing/metrics. Independent of
# server vs lib; combine as needed.
telemetry = [
    "opentelemetry",
    "opentelemetry_sdk",
    "opentelemetry-otlp",
    "tracing-opentelemetry",
]

[dependencies]
# Core (always available with lib or full)
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.0", features = ["full"] }
thiserror = "2.0"
anyhow = "1.0"
http = "1"
http-body-util = "0.1.3"
bytes = "1"
tracing = "0.1"
memchr = "2.5"

# HTTP client for manual upstream requests
reqwest = { version = "0.13", default-features = false, features = ["json", "native-tls"] }

# CLI (binary feature)
clap = { version = "4", features = ["derive"], optional = true }

# Logging (binary feature)
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
tracing-appender = { version = "0.2", optional = true }

# OpenTelemetry integration (telemetry-lib feature)
opentelemetry = { version = "0.31", features = ["trace", "metrics"], optional = true }
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio"], optional = true }
opentelemetry-otlp = { version = "0.31", optional = true }
tracing-opentelemetry = { version = "0.32", optional = true }

# Pingora (server feature)
pingora = { version = "0.8", optional = true }
pingora-core = { version = "0.8", optional = true }
pingora-http = { version = "0.8", optional = true }
pingora-proxy = { version = "0.8", optional = true }

# Utilities
uuid = { version = "1.0", features = ["v4"] }
async-trait = { version = "0.1", optional = true }
chrono = { version = "0.4", features = ["serde"] }
url = { version = "2.5", optional = true }

[[bin]]
name = "codex-convert-proxy"
path = "src/main.rs"
# The proxy binary requires the full server stack. With only `lib` enabled
# the crate is consumable as a library but the binary won't compile.
required-features = ["server"]

[dev-dependencies]
tokio-test = "0.4"