feat: add OpenRouter to CLI installer

Closed
CL
6mo ago
+65-3

Summary

oh-my-openagent engine already supports OpenRouter at runtime. This change adds OpenRouter as a first-class provider during the CLI/TUI installation flow.

What's added

  • bunx oh-my-openagent install --openrouter <yes|no> — CLI flag
  • TUI installer prompt for OpenRouter subscription selection
  • Auto-detect existing OpenRouter config from openrouter/ model prefix or OPENROUTER_API_KEY env var
  • Provider availability mapping (hasOpenRouter) in src/cli/provider-availability.ts
  • Install config validation for --openrouter arguments
  • Model fallback type coverage (openrouter added to KnownProvider union)
  • Test mocks/helpers updated to include hasOpenRouter field
  • AGENTS.md — documents OpenRouter integration gap checklist (technical debt, not personal subscriptions)

What's NOT changed

  • Runtime OpenRouter support (already existed via model routing)
  • model-requirements.ts fallback chains (deferred per AGENTS.md gap doc)

Verification

  • bun test: installer, TUI, model-fallback tests updated and passing

Files changed

13 files, +65 / -3 lines.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Summary by cubic

Adds OpenRouter as a first-class provider in the CLI/TUI installer. Users can now choose OpenRouter during setup, and model fallback recognizes it.

  • New Features
    • Adds --openrouter <yes|no> to bunx oh-my-openagent install and a TUI prompt.
    • Auto-detects OpenRouter via openrouter/ model prefix or OPENROUTER_API_KEY.
    • Introduces hasOpenRouter across types, provider availability mapping, arg validation, and config summary.
    • Updates model fallback to include OpenRouter; tests and docs (gap checklist in AGENTS.md) updated.