lij768423-svg/grok2api-egress-enhancements

Grok2API & CPA egress quality guard with proxy recovery, quarantine, migration, and operations UI

What it solves

This project addresses quality degradation and connectivity issues when using multiple proxy nodes to access AI models (specifically Grok). It prevents "intelligence degradation" (where the model provides low-quality or non-reasoning responses) by monitoring output quality and automatically isolating failing or low-performance proxy nodes.

How it works

It functions as a set of enhancements and a sidecar process for grok2api. It employs several mechanisms to ensure high-quality output:

  • Quality Guard Sidecar: A separate process that audits TPS (Tokens Per Second), runs active probes with specific prompts, and isolates nodes that fall below performance thresholds.
  • Thinking Interception: It holds streaming responses to verify if actual "thinking" (reasoning tokens) is occurring. If a response is too short or lacks reasoning evidence, it is flagged as degraded, and the system automatically switches accounts and retries.
  • Egress Recovery: It implements fast recovery for fixed proxies, using asynchronous probes to check health after a connection failure without blocking subsequent requests unnecessarily.
  • Node Management: It provides a management interface to monitor degraded accounts, manage proxy nodes, and configure probe profiles (expected markers or throughput baselines).

Who it’s for

Developers and operators running large-scale AI API gateways or proxy stacks who need to maintain high output quality and reliability across a diverse pool of residential proxy nodes.

Highlights

  • Automated Node Isolation: Passively audits output speed and actively probes nodes to remove them from rotation when quality drops.
  • Reasoning Verification: Prevents "dumbed-down" responses by requiring a minimum amount of encrypted reasoning content before releasing the stream to the user.
  • Fast Proxy Recovery: Asynchronous health checks for failed nodes to ensure minimal downtime.
  • Sticky IP Rotation: Supports rotating sticky sessions (e.g., via 1024Proxy) when a node is deemed unhealthy.
  • Degraded Account Dashboard: A dedicated UI to track and manage accounts flagged for quality issues.

Related

  • Project
  • Project
  • Project
  • Project