Skip to content

Dead LLM provider code + zero-caller stubs cleanup #2363

@alexey-pelykh

Description

@alexey-pelykh

Summary

Disposition registry deep audit (2026-04-15) identified dead code that should be removed:

MBP Violations — Dead LLM Provider Code (~470 lines, zero callers)

File What Lines
extensions/qwen-portal-auth/ (entire dir) LLM provider OAuth plugin — same category as 40+ excluded providers ~100
src/agents/ollama-stream.ts Dead Ollama LLM streaming implementation ~300
src/plugin-sdk/minimax-portal-auth.ts Dead SDK re-exports for excluded minimax extension ~20
src/plugin-sdk/google-gemini-cli-auth.ts Dead SDK re-exports for excluded Gemini CLI auth extension ~20
src/agents/model-auth-markers.ts Dead LLM credential type constants (only caller is ollama-stream.ts) ~30
src/plugin-sdk/provider-auth-result.ts LLM OAuth builder (only caller is qwen-portal-auth) ~20

These survived because they sit under INCLUDE parent directory rules (src/agents/, extensions/, src/plugin-sdk/) rather than having explicit per-file EXCLUDE-GUT dispositions.

Zero-Caller Stubs — Immediate GUT Candidates (66 files)

66 EXCLUDE-STUB entries in the disposition registry have zero live callers. The stubs serve no purpose — they can be deleted with no breakage. Full list from grep 'candidate for GUT' upstream/disposition.tsv in the HQ repo.

Key clusters:

  • src/agents/ — 20+ dead stubs (Pi model resolver, bootstrap cache, identity file, model fallback, etc.)
  • src/acp/ — 2 dead stubs (ACP manager utils)
  • extensions/acpx/ — 2 dead stubs (config, runtime)
  • src/secrets/ — 1 dead stub (provider env vars)

Acceptance Criteria

  • All 6 MBP violation files deleted from fork
  • All 66 zero-caller stubs deleted from fork
  • Disposition registry updated: EXCLUDE-STUB → EXCLUDE-GUT for each deleted file
  • pnpm check passes after deletion
  • pnpm test passes after deletion (or tests referencing deleted stubs are also removed)

Notes

  • These are all zero-blast-radius deletions — no alive code imports any of them
  • The remaining 15 EXCLUDE-STUB entries with live callers are separate tracked debt
  • Disposition registry already classifies them correctly; this issue is about executing the deletions in the fork

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions