Context
RemoteClaw is middleware that delegates LLM execution to CLI agents (Claude Code, Gemini, Codex, OpenCode); it does not dispatch LLM calls itself. The CLI agents manage their own provider/model selection. Prior cleanup PRs removed ~80 files of dead model-management surface left over from the pre-fork embedded execution path. This issue addresses a survivor.
Problem
src/agents/vercel-ai-gateway.ts exposes two functions:
getStaticVercelAiGatewayModelCatalog() — hard-coded fallback model list + cost metadata (lines 10-180)
discoverVercelAiGatewayModels() — HTTP discovery with static-catalog fallback (lines 186-207)
Neither has any external caller. getStaticVercelAiGatewayModelCatalog is called only from within discoverVercelAiGatewayModels. discoverVercelAiGatewayModels is not imported anywhere outside its own file.
Verification (run against current main):
rg "discoverVercelAiGatewayModels\(" src/ --type ts
# Only match: the declaration at src/agents/vercel-ai-gateway.ts:186
rg "getStaticVercelAiGatewayModelCatalog" src/ --type ts
# Only matches: within src/agents/vercel-ai-gateway.ts itself
Other "vercel-ai-gateway" string references in the codebase are unrelated to this file and must be preserved:
src/auth/provider-auth.ts:276 — provider-name → env-var lookup (AI_GATEWAY_API_KEY). Kept.
src/agents/provider-utils.ts:152 — model-ID formatting for provider strings. Kept.
src/plugins/bundled-plugin-metadata.generated.ts:3063+ — metadata describing the bundled npm package @remoteclaw/vercel-ai-gateway-provider (an external plugin package, not this file). Kept.
src/agents/model-auth-env-vars.ts:34 — env-var mapping. Kept.
- Tests referencing
"vercel-ai-gateway" as provider string (session-utils tests). Kept.
Tasks
Acceptance Criteria
- File
src/agents/vercel-ai-gateway.ts no longer exists
rg "getStaticVercelAiGatewayModelCatalog|discoverVercelAiGatewayModels" src/ returns no hits
rg "from.*[\"']\..*vercel-ai-gateway" src/ returns no hits (the generated plugin-metadata file references the external npm package, not this local file — that's fine)
tsc --noEmit clean
- Existing test suite passes with no new skips
Context
RemoteClaw is middleware that delegates LLM execution to CLI agents (Claude Code, Gemini, Codex, OpenCode); it does not dispatch LLM calls itself. The CLI agents manage their own provider/model selection. Prior cleanup PRs removed ~80 files of dead model-management surface left over from the pre-fork embedded execution path. This issue addresses a survivor.
Problem
src/agents/vercel-ai-gateway.tsexposes two functions:getStaticVercelAiGatewayModelCatalog()— hard-coded fallback model list + cost metadata (lines 10-180)discoverVercelAiGatewayModels()— HTTP discovery with static-catalog fallback (lines 186-207)Neither has any external caller.
getStaticVercelAiGatewayModelCatalogis called only from withindiscoverVercelAiGatewayModels.discoverVercelAiGatewayModelsis not imported anywhere outside its own file.Verification (run against current main):
Other
"vercel-ai-gateway"string references in the codebase are unrelated to this file and must be preserved:src/auth/provider-auth.ts:276— provider-name → env-var lookup (AI_GATEWAY_API_KEY). Kept.src/agents/provider-utils.ts:152— model-ID formatting for provider strings. Kept.src/plugins/bundled-plugin-metadata.generated.ts:3063+— metadata describing the bundled npm package@remoteclaw/vercel-ai-gateway-provider(an external plugin package, not this file). Kept.src/agents/model-auth-env-vars.ts:34— env-var mapping. Kept."vercel-ai-gateway"as provider string (session-utils tests). Kept.Tasks
src/agents/vercel-ai-gateway.tssrc/agents/vercel-ai-gateway.test.tsif presentsrc/agents/index.tsand similar for references)rg "from.*vercel-ai-gateway\"" src/should only return plugin-metadata generated file and external package referencestsc --noEmitand full test suiteAcceptance Criteria
src/agents/vercel-ai-gateway.tsno longer existsrg "getStaticVercelAiGatewayModelCatalog|discoverVercelAiGatewayModels" src/returns no hitsrg "from.*[\"']\..*vercel-ai-gateway" src/returns no hits (the generated plugin-metadata file references the external npm package, not this local file — that's fine)tsc --noEmitclean