From c970d96e916c3e1e33dd5b48bd110f1160d87645 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Thu, 15 Oct 2026 23:46:35 +0300 Subject: [PATCH] rdm upd --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bf168e4..bde8676 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ bantam.hpp all shared declarations (structs, prototypes, native Json type) util.cpp string building, UTF-8, prompt-injection filter, color, IDs, MD5 config.cpp config file parsing, env precedence, /models discovery json.cpp native RFC 8259 JSON engine, request building + response parsing -llm.cpp libcurl HTTP client, OpenCode headers, backoff, SSE streaming +llm.cpp libcurl HTTP client, custom headers, backoff, SSE streaming tools.cpp bash/read/write tools, oversized-result offloading session.cpp message copy, session save/load, compaction render.cpp terminal markdown renderer (native, box-drawing tables) @@ -326,13 +326,16 @@ that left an empty assistant message in the session), Bantam strips the last ### Custom request headers -All endpoints receive custom request headers mimicking OpenCode: -`User-Agent: opencode/1.18.31 ai-sdk/provider-utils/4.0.23 runtime/bun/1.3.14`, -`x-opencode-client: cli`, `x-opencode-project: global`, -`x-opencode-session: `, and a fresh `x-opencode-request: ` -per call (the 12-hex timestamp prefix in `x-opencode-request` is the bitwise -inverse of `x-opencode-session`). The `Authorization: Bearer ` header -is added whenever `api_key` is set and not `-`. +All requests to the `/chat/completions` and `/models` endpoints are sent with a +minimal, dependency-free header set (see `apply_llm_headers` / `http_get` in +`llm.cpp`): + +- `Content-Type: application/json` +- `Expect:` (empty) — suppresses the `Expect: 100-continue` round-trip so large + POST bodies are sent immediately and do not hang behind some proxies. +- `User-Agent: Mozilla/5.0 Bantam/nightly-cpp` +- `Authorization: Bearer ` — added only when `api_key` is set and is + not `-` (a real key, not the placeholder). ### Prompt-injection defense