feat: support custom headers in customai resource type#8364
Draft
feat: support custom headers in customai resource type#8364
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
8a96dd7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0cbe65ca.windmill.pages.dev |
| Branch Preview URL: | https://add-customai-headers.windmill.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow users to add custom HTTP headers to the
customairesource type. When the hub updates the resource type to include aheadersfield (a JSON object mapping header names to values), those headers will be sent on every AI request for that resource.Changes
headers: HashMap<String, String>field (with#[serde(default)]) toAIStandardResourceandProviderResourcestructsAIRequestConfigand apply them in the API proxy'sprepare_request()build_http_requestclosure for AI agent executionTest plan
headersfield still work (backwards-compatible via#[serde(default)])"headers": {"X-Custom": "test"}and verify the header is sent on AI requestsAI_HTTP_HEADERS(resource headers take precedence)Generated with Claude Code