Skip to content

feat: add --custom-headers flag for custom endpoints - #5607

Open
kris3984 wants to merge 1 commit into
Aider-AI:mainfrom
kris3984:feature/custom-endpoint-headers
Open

feat: add --custom-headers flag for custom endpoints#5607
kris3984 wants to merge 1 commit into
Aider-AI:mainfrom
kris3984:feature/custom-endpoint-headers

Conversation

@kris3984

Copy link
Copy Markdown

Summary

Adds support for --custom-headers to pass custom HTTP headers to custom/BYOK OpenAI-compatible endpoints via LiteLLM.

Changes

  • aider/args.py: Added --custom-headers CLI flag accepting repeated key-value pairs (KEY=VALUE, KEY:VALUE) or JSON strings.
  • aider/models.py: Merged parsed headers into extra_params["extra_headers"] and forwarded them into model completion calls.
  • tests/basic/test_models.py: Added unit tests covering header parsing, initialization, and completion forwarding.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Krishnakumar Chandran seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kris3984

Copy link
Copy Markdown
Author

Fixes #2841

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.

2 participants