Skip to content

Remove custom LLM gateway ports for OpenCode, Crush, and Pi agents#29809

Merged
pelikhan merged 3 commits intomainfrom
copilot/remove-custom-ports-agents
May 2, 2026
Merged

Remove custom LLM gateway ports for OpenCode, Crush, and Pi agents#29809
pelikhan merged 3 commits intomainfrom
copilot/remove-custom-ports-agents

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

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: Remove PiLLMGatewayPort = 10004 constant (Pi uses copilot/claude/codex providers)
  • pkg/constants/README.md: Remove incorrect OpenCodeLLMGatewayPort and CrushLLMGatewayPort documentation entries (these constants never existed; these engines already use shared copilot/claude/codex gateway ports via UniversalLLMConsumerEngine)
  • pkg/constants/spec_test.go: Remove PiLLMGatewayPort test entry
  • pkg/workflow/pi_engine.go: Remove dedicatedLLMGatewayPort field and PI_API_BASE_URL gateway port assignment from execution steps; update comment to accurately describe the remaining firewall block (git identity env vars)

Copilot AI and others added 3 commits May 2, 2026 18:46
- 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>
@pelikhan pelikhan marked this pull request as ready for review May 2, 2026 18:57
Copilot AI review requested due to automatic review settings May 2, 2026 18:57
@pelikhan pelikhan merged commit 5c3ca95 into main May 2, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/remove-custom-ports-agents branch May 2, 2026 18:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 PiLLMGatewayPort from pkg/constants and deleted its spec-test assertion.
  • Updated constants documentation to drop incorrect OpenCode/Crush gateway port entries.
  • Removed Pi’s firewall-time PI_API_BASE_URL override and the engine’s dedicated gateway port field usage.
  • Updated daily-subagent-optimizer.lock.yml sparse-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

Comment thread pkg/workflow/pi_engine.go
Comment on lines +220 to 225
// 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())
}
Comment thread pkg/constants/README.md
constants.OpenCodeLLMGatewayPort // 10004
constants.CrushLLMGatewayPort // 10005
```

@github-actions github-actions Bot mentioned this pull request May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🧪 Test Quality Sentinel Report

Test Quality Score: N/A

i️ No new or modified test functions — deletion only

Metric Value
Changed test files 1 (pkg/constants/spec_test.go)
New/modified tests analyzed 0
Lines removed from tests 2
Lines added to tests 0

Summary

The only test change in this PR is removing 2 lines from TestSpec_NetworkPorts_Values in pkg/constants/spec_test.go — specifically the table row that verified PiLLMGatewayPort = 10004.

This deletion correctly mirrors the removal of the PiLLMGatewayPort constant from pkg/constants/constants.go. The test cleanup is appropriate and expected when a constant is deleted.

No new tests were introduced and no existing test logic was modified — only dead test code was removed.


Verdict

Check passed. No new or modified test functions to analyze. The test change is a correct cleanup matching the production code deletion.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 0 new/modified test functions
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests

🧪 Test quality analysis by Test Quality Sentinel · ● 981.8K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: N/A score. No new or modified test functions to analyze. The only test change (2 lines removed) is a correct cleanup matching the deletion of PiLLMGatewayPort from production code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants