Pass-through Adapter
The pass-through adapter is a transparent proxy for AI systems that already expose locally an OpenAI-compatible POST /v1/chat/completions endpoint.
It forwards requests from the relay client to your target and returns the response unchanged.
Installation
Example
pip install spectral-bridge-adapter-pass-through# or, with the CLI in a single step:pip install "spectral-bridge[pass-through]"
Usage
Via the CLI
The simplest way to use the pass-through adapter is through the spectral-bridge CLI.
The start command spawns it as a subprocess while connecting the relay client:
Example
spectral-bridge start \--relay-url wss://relay.example.com/connect \--adapter pass-through \--target <local-target-url>
Standalone
Alternatively, you can run the adapter as a standalone process:
Example
TARGET_URL=<local-target-url> \uvicorn \spectral_bridge_passthrough.app:app \--host 127.0.0.1 \--port 8000
Behavior
The adapter strips hop-by-hop and connection headers (Host, Content-Length, Connection, Transfer-Encoding, etc.) before forwarding.
All other headers from the relay client are passed through to the target unchanged.