Support AWF proxy endpoints via AWF_COPILOT_PROXY#229
Merged
anticomputer merged 2 commits intomainfrom Apr 23, 2026
Merged
Conversation
When running inside an AWF sandbox, the API endpoint is a local proxy URL (e.g., http://172.30.0.30:10002) that the provider registry doesn't recognize. The AWF_COPILOT_PROXY env var names the upstream provider (e.g., 'api.githubcopilot.com') whose behaviour (headers, model defaults, catalog parsing) should be used with the proxy URL as base_url. This lets the taskflow agent work seamlessly through AWF's credential-isolating API proxy sidecar.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a mechanism for resolving provider-specific behavior (headers, catalog parsing, defaults) when AI_API_ENDPOINT points at an AWF (Agentic Workflow Firewall) local proxy whose netloc is not present in the provider registry.
Changes:
- Extend
get_provider()to recognizeAWF_COPILOT_PROXYand derive provider behavior from the named upstream provider while using the proxy URL asbase_url. - Expand
get_provider()docstring to document the AWF proxy behavior.
Show a summary per file
| File | Description |
|---|---|
src/seclab_taskflow_agent/capi.py |
Adds AWF proxy endpoint support by mapping proxy endpoints to an upstream provider’s behavior via AWF_COPILOT_PROXY. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 3
antonio-morales
previously approved these changes
Apr 23, 2026
- Use dataclasses.replace() instead of manual field reconstruction to avoid silently dropping fields if APIProvider gains new ones - Normalize AWF_COPILOT_PROXY input: accept both bare hostnames (api.githubcopilot.com) and full URLs (https://api.githubcopilot.com) - Add 4 test cases covering bare hostname, full URL, unknown upstream, and unset env var scenarios
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.
When running inside an AWF (Agentic Workflow Firewall) sandbox, the API endpoint is a local proxy URL (e.g.,
http://172.30.0.30:10002) that the provider registry doesn't recognize.This adds support for the
AWF_COPILOT_PROXYenv var, which names the upstream provider (e.g.,api.githubcopilot.com) whose behaviour (headers, model defaults, catalog parsing) should be used with the proxy URL asbase_url.The audit pipeline sets:
AI_API_ENDPOINT=http://172.30.0.30:10002(AWF sidecar)AWF_COPILOT_PROXY=api.githubcopilot.com(upstream provider)AI_API_TOKEN=placeholder(sidecar strips and injects real token)This lets the taskflow agent work seamlessly through AWF's credential-isolating API proxy sidecar without any hardcoded proxy addresses.