Skip to content

gut(agents): remove dead Vercel AI Gateway model catalog file#2483

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/2477-vercel-ai-gateway-dead-file
Apr 22, 2026
Merged

gut(agents): remove dead Vercel AI Gateway model catalog file#2483
alexey-pelykh merged 1 commit intomainfrom
gut/2477-vercel-ai-gateway-dead-file

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Closes #2477.

Summary

src/agents/vercel-ai-gateway.ts exposed a static model catalog
(getStaticVercelAiGatewayModelCatalog) and an HTTP discovery helper
(discoverVercelAiGatewayModels) with static-catalog fallback. Neither had
any external caller
— all exports were referenced only within the file
itself, so removal has zero API surface impact.

Why it's dead

RemoteClaw delegates LLM invocation to CLI agents (Claude Code, Gemini, Codex,
OpenCode), which own their own provider catalogs. A middleware-side catalog is
Pi-era embedded-execution debt from OpenClaw — no current consumer.

What stays

Unrelated "vercel-ai-gateway" provider-string references (pointing at the
external @remoteclaw/vercel-ai-gateway-provider npm plugin, not this file)
are preserved unchanged:

File Purpose
src/auth/provider-auth.ts:276 Provider → env-var (AI_GATEWAY_API_KEY) lookup
src/agents/provider-utils.ts:152 Model-ID formatting for vercel-ai-gateway/<model> strings
src/agents/model-auth-env-vars.ts:34 Env-var mapping
src/plugins/bundled-plugin-metadata.generated.ts Metadata for the external plugin package
src/gateway/session-utils.test.ts Provider-string test fixtures

What's removed

  • 2 exported functions: getStaticVercelAiGatewayModelCatalog, discoverVercelAiGatewayModels
  • 7 exported constants: VERCEL_AI_GATEWAY_PROVIDER_ID, _BASE_URL, _DEFAULT_MODEL_ID, _DEFAULT_MODEL_REF, _DEFAULT_CONTEXT_WINDOW, _DEFAULT_MAX_TOKENS, _DEFAULT_COST
  • 1 MODULE_ATTESTATIONS record (2 entries, removed atomically with the file)
  • Internal helpers and type definitions

Net: 1 file changed, 208 deletions(-).

Verification

Against origin/main:

# Acceptance criteria from #2477
[ ! -f src/agents/vercel-ai-gateway.ts ]                                            # deleted
rg "getStaticVercelAiGatewayModelCatalog|discoverVercelAiGatewayModels" src/        # 0 hits
rg 'from.*["'"'"']\..*vercel-ai-gateway' src/                                        # 0 hits
pnpm tsgo                                                                            # PASS
pnpm test:fast                                                                       # 7296 passed / 3 skipped (baseline preserved)

Fork-integrity gates:

  • scripts/check-attestations.mjs — PASS (91 modules / 313 attestations — 2 entries removed atomically with the file)
  • scripts/check-no-zombie-imports.mjs — PASS (straight delete, not a tombstone)
  • scripts/check-obsolescence-audit.mjs — PASS (baseline 49 unchanged)
  • scripts/check-throwing-stub-callers.mjs — PASS (0 violations)
  • scripts/check-stub-debt.mjs — PASS (fork-boundary-mock baseline 132 unchanged)
  • scripts/ci/check-rebrand-leakage.sh — PASS

Test plan

  • CI green (build + test + lint + docs + fork-integrity gates)
  • No regression in preserved "vercel-ai-gateway" provider-string code paths — covered by existing session-utils.test.ts fixtures

🤖 Generated with Claude Code

`src/agents/vercel-ai-gateway.ts` exposed a static model catalog
(`getStaticVercelAiGatewayModelCatalog`) and an HTTP discovery helper
(`discoverVercelAiGatewayModels`) with static-catalog fallback. Neither
had any external caller — all exports were referenced only within the
file.

Pre-fork embedded-execution debt. RemoteClaw delegates LLM invocation
to CLI agents (Claude Code, Gemini, Codex, OpenCode), which own their
own provider catalogs. No middleware-side catalog is needed.

MODULE_ATTESTATIONS entries removed atomically with the file.

Preserved (unrelated `"vercel-ai-gateway"` provider-string references,
not this file):
- src/auth/provider-auth.ts:276 — env-var lookup
- src/agents/provider-utils.ts:152 — model-ID formatting
- src/agents/model-auth-env-vars.ts:34 — env-var mapping
- src/plugins/bundled-plugin-metadata.generated.ts — metadata for the
  external `@remoteclaw/vercel-ai-gateway-provider` npm plugin
- src/gateway/session-utils.test.ts — provider-string test fixtures

AC verification:
- `rg "getStaticVercelAiGatewayModelCatalog|discoverVercelAiGatewayModels" src/`
  → 0 hits
- `rg 'from.*["'"'"']\..*vercel-ai-gateway' src/` → 0 hits
- `pnpm tsgo` → PASS
- `pnpm test:fast` → 7296 passed / 3 skipped (baseline preserved)
- All fork-integrity gates (attestation, zombie-import, obsolescence,
  throwing-stub-callers, stub-debt, rebrand) → PASS

Closes #2477.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh merged commit 41a859c into main Apr 22, 2026
15 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/2477-vercel-ai-gateway-dead-file branch April 22, 2026 19:11
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.

refactor(agents): remove dead Vercel AI Gateway model catalog file

1 participant