Repository navigation
literouter v0.4.0
v0.4.0 — Stateless Responses Requests
Highlights
- A relay can be told to forget: the new per-relay option
strip_responses_stateremoves the Responses API's server-side state from a forwarded/v1/responsesrequest — every input item'sid, anyencrypted*field on an item (the encrypted reasoning chain), and the top-levelprevious_response_id. Message text,call_idand tool arguments are forwarded untouched. - Built for multi-resource Azure relays: Azure OpenAI stores items and encrypts reasoning content per resource. A relay that balances across several resources without session stickiness answers the next turn of a conversation with HTTP 400 (
The requested item was created under a different Azure OpenAI resource/The encrypted content for item rs_… could not be verified). Stripping makes every request a shape any resource in the pool accepts. - Visible when it fires: the request log records how many fields were removed (
… · stripped 8 Responses state fields), on both the buffered and the streamed path. A workaround nobody can see is one that gets debugged by guessing. - Said out loud when it cannot work: enabling it on a relay whose wire shape is not Responses —
openai,azure,anthropic, … — produces aconfig validatewarning instead of a switch that quietly does nothing. - In both front ends:
literouter providers add … --strip-responses-state(andproviders list --json), plus a "Stateless Responses requests" switch in the console's relay editor, shown only foropenai_responsesrelays, with Chinese and English copy.
Upgrade Notes
- The option is off by default and is written to
config.jsononly when on, so existing files load and behave exactly as before. - The configuration schema is unchanged; no migration is needed.
- A request with nothing to strip is still forwarded as the client's original bytes, so the same-protocol fast path keeps its zero-parse, zero-copy properties.
- With it on, the model no longer continues a hidden reasoning chain across turns and reasons again each turn. The visible conversation and the tool-call chain are unaffected. Turn it off again as soon as the relay routes consistently or strips on its side.
- This port is derived from codex-strip-proxy by AnnaofArendelle; the attribution is recorded in
NOTICE.
Installation
Download the archive for Linux x86_64, macOS arm64, or Windows x86_64 from the GitHub Release, verify its .sha256 file, and run literouter serve. Linux users can also install the latest binary with:
curl -fsSL https://raw.githubusercontent.com/YangQi0408/literouter/main/scripts/install.sh | bashThen open http://127.0.0.1:8787/ui/ to use the built-in Web Console.