Files
zuolan 51f82993f5 fix(chat): forward extra_headers to all LLM calls in agentic pipeline
The chat capability silently dropped `extra_headers` from the active
LLM profile because three downstream call sites in `AgenticChatPipeline`
did not forward them:

- `_build_openai_client()` constructed `AsyncOpenAI` /
  `AsyncAzureOpenAI` without `default_headers`, so custom headers
  required by some gateways (e.g. a `User-Agent` override to bypass
  WAF allowlists that block `OpenAI/Python <ver>`) were lost on the
  native-tool-calling path.
- `_stream_messages` and `_run_react_fallback` invoked `llm_stream()`
  with `model`, `api_key`, `base_url`, `binding` but no
  `extra_headers`. The factory's `_resolve_call_config` treats this
  set of caller-provided fields as an explicit override and rebuilds
  `LLMConfig` with empty `extra_headers`, bypassing the catalog value
  loaded by `get_llm_config()`.

Pulls `extra_headers` from `llm_config` once in `__init__` and
forwards it from all three call sites.

Reproduce: configure an OpenAI-compatible gateway whose WAF rejects
the default `OpenAI/Python <ver>` User-Agent; set
`extra_headers: { "User-Agent": "Mozilla/5.0 ..." }` on the active
LLM profile in `model_catalog.json`. Before this change, chat returns
HTTP 403 "Your request was blocked." After, the override reaches the
gateway and chat succeeds.
2026-05-03 00:01:46 +08:00
..
2026-05-02 20:16:07 +08:00
2026-05-01 13:51:45 +08:00
2026-04-23 19:29:16 +08:00