Skip to content

feat: support custom LLM headers#46

Draft
RuoJi6 wants to merge 1 commit into
chainreactors:masterfrom
RuoJi6:codex/custom-llm-headers
Draft

feat: support custom LLM headers#46
RuoJi6 wants to merge 1 commit into
chainreactors:masterfrom
RuoJi6:codex/custom-llm-headers

Conversation

@RuoJi6

@RuoJi6 RuoJi6 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • Add optional custom HTTP headers for LLM provider configuration.
  • Support headers from YAML, repeated --llm-header KEY=VALUE, and the Web UI/API.
  • Apply custom headers last for OpenAI-compatible and Anthropic chat/web-search requests so explicit User-Agent values can override defaults.
  • Validate and canonicalize header names, reject CR/LF values, and ignore empty header rows.

Validation

  • git diff --check upstream/master...HEAD
  • go test ./core/config ./pkg/agent/provider ./pkg/web
  • npm run build in web/frontend

Notes

  • Empty or omitted headers preserves existing default request header behavior.
  • This is intended for OpenAI-compatible providers that require headers such as User-Agent: Version: 5.10.0 openwarp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant