HttpChatConfig
Config for HttpChatProvider: the caller's own SSE chat backend, not a named vendor.
Parameters
the backend URL to POST to. Blank means "not configured" — HttpChatProvider reports AiFailure.NoKey for that, same bucket the three vendor providers use for a missing key, since this provider has no separate "no endpoint" reason in the shared AiFailure enum.
an app-defined string forwarded to the backend as-is (e.g. which persona/prompt-pack to use). llm-chat doesn't know or validate the values — the backend does. null (the default) means the "mode" key is left off the request body entirely, not sent as "mode": null — a backend with a closed mode allowlist can then treat "no mode" and "an unrecognized mode" differently, e.g. defaulting the former to ordinary chat and 400ing the latter.
an app-defined string forwarded to the backend as-is (e.g. which screen/page the caller is on, for a backend that folds that into its system prompt). Same omit-when-null wire rule as mode: left off the request body entirely rather than sent as "route": null.
sent as this request's Origin header when non-null, for a backend that allow-lists origins as a lightweight check on a public, keyless chat endpoint. Native engines (OkHttp/Darwin/CIO) send whatever is set here; a real browser (wasmJs) refuses to let a script override Origin — it's a forbidden header per the Fetch spec — so this is a no-op there and the browser's own Origin goes out instead.
when true, a stream that closes having emitted at least one AiChunk.
Token but never a data: [DONE] line is reported as AiChunk.Failed (reason AiFailure.
Network, AiChunk.Failed.detail naming the partial length) instead of success — for a backend whose contract guarantees [DONE] as the terminal event. Defaults to false because [DONE] is otherwise optional in this provider's wire contract (see class doc) — a backend that never sends it and simply closes the connection on a clean finish would otherwise misreport every successful reply as cut off.