microsoft / microsoft/foundry-dev-tools
Add custom HTTP headers for custom models
@MuyangAmigo is already working on this.
Since May 12, 2026.
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 260
- Avg merge
- 42m
- Merged PRs (30d)
- 29
Description
When adding custom models, the user can't supply any custom headers yet, e.g. tokens for CloudFlare authentication walls.
It is possible to manually edit ~/.aitk/models/my-models.yaml after adding the custom model:
version: v0.1
providers:
- name: Custom
models:
- name: model_name
chat_completion_url: https://my.entrypoint.com/v1/chat/completions
headers:
Authorization: "blabla"
CF-Access-Client-Id: <fill_in_manually>
CF-Access-Client-Secret: <fill_in_manually>
However, making edits through the GUI can cause these changes to be lost, and in general it does not seem to be an officially supported way of doing things.
When walking through the Add Custom Model workflow, it would be very convenient if it were possible to specify additional headers (besides the API key), for instance with another text input where you can simply specify it using comma-separated key-value pairs. E.g.:
CF-Access-Client-Id: "aaaaa",CF-Access-Client-Secret: "bbbbb"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.