Skip to content

Warn when Copilot API-proxy mode disables native web tools - #9420

Merged
lpcox merged 4 commits into
mainfrom
copilot/awf-copilot-fix-web-tools
Oct 3, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/awf-copilot-fix-web-tools

Conversation

Copilot AI commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Copilot API-proxy routing sets COPILOT_OFFLINE=true, which disables native web_fetch and web_search even when explicitly permitted. Allowlisted domains therefore remain unused without an explanation.

  • Startup diagnostic: Warn when Copilot sidecar routing is active and the domain allowlist is non-empty; preserve offline mode and credential isolation.
  • Workaround: Document shell curl with Copilot URL permissions. Squid continues enforcing the domain allowlist.
  • Coverage and compiler follow-up: Add warning/suppression regression tests and link upstream tracking for compiler diagnostics or an MCP fallback.

Example gh-aw configuration:

engine:
  id: copilot
  args: ["--allow-url", "osv.dev"]
network:
  allowed: ["osv.dev"]
tools:
  bash: ["curl"]

This enables fetching known URLs through curl; it does not restore native web tools.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix web-fetch and web-search tool availability in offline mode Warn when Copilot API-proxy mode disables native web tools Oct 3, 2026
Copilot AI requested a review from lpcox October 3, 2026 17:06
@lpcox
lpcox marked this pull request as ready for review October 3, 2026 17:15
Copilot AI balanced review requested due to automatic review settings October 3, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The sidecar documentation omits base-URL-only configurations that also set COPILOT_OFFLINE=true.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Adds diagnostics and guidance for Copilot web tools disabled by API-proxy offline mode.

Changes:

  • Warns when offline Copilot routing conflicts with allowlisted domains.
  • Adds regression tests and documents the curl workaround.
  • Documents the web-tool limitation in sidecar configuration.
File Description
src/​services/​credentials/​copilot-credential-env.ts Emits the startup warning.
src/​services/​credentials/​copilot-credential-env.test.ts Tests warning and suppression behavior.
docs/​troubleshooting.md Documents symptoms, cause, and workaround.
docs/​api-proxy-sidecar.md Notes offline-mode web-tool limitations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/api-proxy-sidecar.md Outdated
@lpcox

lpcox commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main and address review feedback

Copilot AI added 2 commits October 3, 2026 17:37
…ix-web-tools

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

Copilot AI commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main and address review feedback

Merged main and updated the COPILOT_OFFLINE condition to include COPILOT_PROVIDER_BASE_URL. The fix is in d6c118d.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-9420 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit b47aac7

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Generated by Smoke Claude for #9420

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

🔮 The oracle has spoken through Smoke Codex

@lpcox
lpcox enabled auto-merge (squash) October 3, 2026 18:02
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #9420

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

  • API status: ✅ PASS
  • GH check: ✅ PASS
  • File status: ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #9420 · claude · haiku45 · 24.3 AIC · ⊞ 6.2K · ◷
Add label ready-for-aw to run again

@github-actions github-actions Bot added smoke-claude smoke-copilot-network-isolation Copilot network-isolation egress smoke test labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed: api.github.com returned HTTP 403 (a response, curl exit 0)
✅ Blocked: example.com failed (self-signed cert error), reported as blocked
Overall: PASS. cc @lpcox

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

OTEL smoke test

  • ✅ S1 Module loading: otel.js loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled
  • ✅ S2 Tests: 3 suites, 68/68 passed
  • ✅ S3 Env forwarding: trace/parent IDs in env-passthrough.ts; OTEL vars in api-proxy-env-config.ts
  • ✅ S4 Token tracker: onUsage callback present in token-tracker-http.js
  • ✅ S5 Diagnostics: otel.jsonl present (1 line)

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Services smoke test:

  • Redis PING: ✅ PONG
  • pg_isready: ✅ accepting connections
  • psql SELECT 1: ✅ 1

Overall: PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct Mode)

Status: ✅ PASS

  • ✅ GitHub MCP connectivity verified
  • ✅ HTTP code: 200 (github.com reachable)
  • ✅ File write/read test passed
  • ✅ BYOK inference working (running in direct mode)

Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot — PR: "Warn when Copilot API-proxy mode disables native web tools"

  • ✅ GitHub MCP (last merged: "Fix Squid crashes with assertion failure in Claude inference")
  • ✅ github.com HTTP 200
  • ✅ File write/read
    PASS — @Copilot @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 92.91% 92.91% ➡️ +0.00%
Statements 91.38% 91.38% ➡️ +0.00%
Functions 89.55% 89.55% ➡️ +0.00%
Branches 85.04% 85.04% ➡️ +0.00%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/nvx/one-shot-adapter.ts 83.5% → 82.9% (-0.60%) 80.3% → 79.8% (-0.56%)
src/log-directory-setup.ts 96.8% → 100.0% (+3.18%) 96.9% → 100.0% (+3.13%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Chroot version comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.14 Python 3.12.14 ✅
Node.js v24.21.0 v22.23.2 ❌
Go go1.22.12 go1.22.12 ✅

Node.js differs between host and chroot, so not all tests passed. The smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Cloud Hypervisor + Copilot

  1. list_pull_requests MCP call: PASS (returned PR Route Copilot auto requests to Codex-compatible Responses models #9422)
  2. curl https://github.com: FAIL — bash tool denied all curl network calls ("Permission denied and could not request permission from user"), even to localhost; not an AWF firewall block, a sandbox tool restriction
  3. Write/read /tmp/gh-aw/agent/smoke-cloud-hypervisor-37142669328.txt: PASS
  4. curl (example.com/redacted) (expect blocked): FAIL — same curl permission restriction as Secret proxying #2, could not execute to confirm block

Overall: 2/4 checks verified; curl-based network checks (#2, #4) could not run due to sandbox denying all curl invocations, unrelated to firewall allow/deny logic.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Smoke Test

  • Merged PR review: ❌
  • PR detail lookup: ❌
  • Playwright title check: ❌
  • Temp file write/read: ✅
  • AWF build: ❌
  • Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ✅ 1/1 passed ✅ PASS
Bun hono ✅ 1/1 passed ✅ PASS
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ ok ✅ PASS
Go env ✅ ok ✅ PASS
Go uuid ✅ ok ✅ PASS
Java gson ✅ 1/1 passed ✅ PASS
Java caffeine ✅ 1/1 passed ✅ PASS
Node.js clsx ✅ all passed ✅ PASS
Node.js execa ✅ all passed ✅ PASS
Node.js p-limit ✅ all passed ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — PASS

Note: Java's first Maven run failed because ~/.m2 was root-owned, so Maven could not create ~/.m2/repository. I re-ran both Java projects with -Dmaven.repo.local=/tmp/gh-aw/agent/m2, and they passed. The runner's ~/.m2 ownership may be worth fixing.

Generated by Build Test Suite for #9420 · copilot · auto · 19.2 AIC · ⊞ 11.8K · ◷
Add label ready-for-aw to run again

@lpcox
lpcox merged commit c5042c7 into main Oct 3, 2026
132 of 137 checks passed
@lpcox
lpcox deleted the copilot/awf-copilot-fix-web-tools branch October 3, 2026 18:14

This branch was successfully deployed

1 active deployment
aoai-model — d6c118de Deployed Oct 3, 2026 by lpcox via conclusion #1867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[awf] copilot engine: web-fetch/web-search tools unavailable in COPILOT_OFFLINE api-proxy mode

3 participants