dsh-litellm-extra-headers: Injecting extra_headers into Request Body When Relaying via LiteLLM
When DSH calls OpenAI-compatible upstreams through reverse proxies such as LiteLLM, client HTTP headers are frequently dropped, so session-type fields must be written into the body's `extra_headers`. This article introduces the host plugin **dsh-litellm-extra-headers** maintained by chenyifawan-cell: for configured providers and upstream hosts, it merges `extra_headers` into the JSON payload of `POST /chat/completions` by patching `globalThis.fetch`. It explains the installation command, the `cordis.patch.yml` configuration items, the `session-id`/`uuid`/`fixed` value patterns and the two-layer whitelist design, and notes that the plugin runs with the permissions of the dsh process and remains inactive (lazy) when `providers`/`hosts` are empty.
Read More