Status: [UNTESTED] Endpoints found: http://localhost:8000/v1/chat/completions http://localhost:8000/v1/chat/completions` Source: https://github.com/kahiroka/auto-batching-proxy # Auto-Batching Proxy (v0.1) An OpenAI-compatible `POST /v1/chat/completions` proxy that queues independent client requests and multiplexes several of them into a single upstream Chat Completions call, then demultiplexes the reply back into independent per-client responses — while remaining a neutral batching mechanism used to study **Batch Isolation Failure (BIF)**. See `SPEC.md` for the base design (v0.1 scope: §16) and `SPEC2.md` for the response-format amendment (§1 below). ## Install ```bash python3 -m venv .venv .venv/bin/pip install -e ".[dev]" ``` ## Run ```bash export OPENAI_API_KEY=sk-... # or whatever env var config/default.yaml points at .venv/bin/python -m auto_batching_proxy.main .venv/bin/python -m auto_batching_proxy.main --verbose # or -v: see "Verbose mode" below ``` Config is loaded from `config/default.yaml` by default; point elsewhere with `PROXY_CONFIG=path/to/config.yaml`. Existing OpenAI-compatible clients can then be pointed at `http://localhost:8000/v1/chat/completions` unmodified. ## Config (`config/default.yaml`) ```yaml batch: batch_window_ms: 10 # dispatch once the oldest queued request has waited this long max_batch_size: 8 # dispatch once this many compatible requests are queued max_batch_tokens: 12000 # dispatch once estimated tokens in the group exceed this multiplex: mode: xml # xml | json | plain_delimited (SPEC §7) -- how REQs are serialized *into* the upstream call response_mode: native_json # native_json | prompt_only | proxy_delimiter (SPEC2 §1-5) -- how the # upstream is asked to shape its *reply*, independent of multiplex.mode capability_probe: enabled: false # if true, probe response_format support once at startup model: null # model to probe (required if enabled=true) compatibility_keys: # requests differing on any of these are isolated into - model # separate batches rat