Skip to content

Source code out of sync: Port 3000 Docker conflict fixes missing from GitHub repo #81

@rico007

Description

@rico007

Summary

The published npm package (agentic-flow@2.0.1-alpha.5) contains important bug fixes that are not reflected in the GitHub source code. This makes it difficult for contributors to understand the current codebase or submit PRs.

Bug That Was Fixed (in npm, not in GitHub source)

Problem: When using npx agentic-flow --agent coder --task "..." with OpenRouter or other proxy providers, the agent returns empty responses.

Root Cause: Docker Desktop commonly runs a service on port 3000, which intercepts proxy traffic before it reaches the agentic-flow proxy server. The hardcoded default port of 3000 caused all proxy requests to fail silently.

Fixes Present in npm Package (v2.0.1-alpha.5)

1. dist/cli-proxy.js (line ~50)

// OLD (hardcoded):
proxyPort = 3000;

// NEW (fixed):
proxyPort = parseInt(process.env.PROXY_PORT || '3001');

2. dist/agents/claudeAgentDirect.js - Fallback URLs

// OLD:
baseURL: process.env.OPENROUTER_PROXY_URL || 'http://localhost:3000'

// NEW:
baseURL: process.env.OPENROUTER_PROXY_URL || `http://localhost:${process.env.PROXY_PORT || '3001'}`

3. dist/agents/claudeAgentDirect.js - ANTHROPIC_BASE_URL passthrough

// NEW (added):
const baseURL = process.env.ANTHROPIC_BASE_URL;
return {
  model: envModel || 'claude-sonnet-4-5-20250929',
  apiKey,
  baseURL, // Use proxy URL if ANTHROPIC_BASE_URL is set
};

Request

Please sync the GitHub TypeScript source files with the published npm package so that:

  1. Contributors can see the actual current code
  2. Future PRs can be based on the correct source
  3. The build process is reproducible

Affected Files (TypeScript source needed)

  • src/cli-proxy.ts - proxyPort default change
  • src/agents/claudeAgentDirect.ts - fallback URLs + ANTHROPIC_BASE_URL

Environment

  • npm package version: 2.0.1-alpha.5
  • Node.js: 18+
  • Issue discovered on: macOS with Docker Desktop running on port 3000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions