Remove custom LLM gateway ports for OpenCode, Crush, and Pi agents#29809
Remove custom LLM gateway ports for OpenCode, Crush, and Pi agents#29809
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f00d828e-e723-47ef-9c64-1758ad85da5b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Remove PiLLMGatewayPort (10004) constant from pkg/constants/constants.go - Remove incorrect OpenCodeLLMGatewayPort and CrushLLMGatewayPort entries from pkg/constants/README.md (these agents use copilot/claude/codex providers) - Remove PiLLMGatewayPort test entry from pkg/constants/spec_test.go - Remove dedicatedLLMGatewayPort from Pi engine (no longer has its own port) - Remove PI_API_BASE_URL gateway port assignment from Pi engine execution steps Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f00d828e-e723-47ef-9c64-1758ad85da5b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f00d828e-e723-47ef-9c64-1758ad85da5b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes the dedicated LLM gateway port configuration for the Pi engine and cleans up related constants/spec documentation to reflect that OpenCode/Crush/Pi do not require custom gateway ports.
Changes:
- Removed
PiLLMGatewayPortfrompkg/constantsand deleted its spec-test assertion. - Updated constants documentation to drop incorrect OpenCode/Crush gateway port entries.
- Removed Pi’s firewall-time
PI_API_BASE_URLoverride and the engine’s dedicated gateway port field usage. - Updated
daily-subagent-optimizer.lock.ymlsparse-checkout/restore lists to include Pi agent config files.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/pi_engine.go |
Stops injecting a dedicated Pi gateway port/base URL under AWF; updates firewall-related comment. |
pkg/constants/constants.go |
Removes the PiLLMGatewayPort constant. |
pkg/constants/spec_test.go |
Removes the spec assertion for PiLLMGatewayPort. |
pkg/constants/README.md |
Removes incorrect OpenCode/Crush gateway port documentation entries. |
.github/workflows/daily-subagent-optimizer.lock.yml |
Adds .pi / PI.md to the workflow’s sparse-checkout and base-restore lists. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 2
| // When the AWF firewall is enabled, set git identity environment variables | ||
| // for commit authorship. Pi uses the copilot/claude/codex LLM gateway ports | ||
| // directly (no dedicated Pi gateway port). | ||
| if firewallEnabled { | ||
| env["PI_API_BASE_URL"] = fmt.Sprintf("http://host.docker.internal:%d", constants.PiLLMGatewayPort) | ||
| maps.Copy(env, getGitIdentityEnvVars()) | ||
| } |
| constants.OpenCodeLLMGatewayPort // 10004 | ||
| constants.CrushLLMGatewayPort // 10005 | ||
| ``` | ||
|
|
🧪 Test Quality Sentinel ReportTest Quality Score: N/Ai️ No new or modified test functions — deletion only
SummaryThe only test change in this PR is removing 2 lines from This deletion correctly mirrors the removal of the No new tests were introduced and no existing test logic was modified — only dead test code was removed. Verdict
Language SupportTests analyzed:
|
Summary
Removes the custom dedicated LLM gateway ports for the OpenCode, Crush, and Pi agents. These agents run on the copilot/claude/codex LM providers and do not require separate ports. Port 10004 (
PiLLMGatewayPort) is removed as it should not exist; this aligns with a future version of the firewall that will not allocate this port.Changes
pkg/constants/constants.go: RemovePiLLMGatewayPort = 10004constant (Pi uses copilot/claude/codex providers)pkg/constants/README.md: Remove incorrectOpenCodeLLMGatewayPortandCrushLLMGatewayPortdocumentation entries (these constants never existed; these engines already use shared copilot/claude/codex gateway ports viaUniversalLLMConsumerEngine)pkg/constants/spec_test.go: RemovePiLLMGatewayPorttest entrypkg/workflow/pi_engine.go: RemovededicatedLLMGatewayPortfield andPI_API_BASE_URLgateway port assignment from execution steps; update comment to accurately describe the remaining firewall block (git identity env vars)