Skip to content

Wire 60db provider into the CLI (accept --provider 60db, fix cost table, validate SIXTYDB_API_KEY) - #47

Open
nickstrooo-bot wants to merge 2 commits into
tsensei:mainfrom
nickstrooo-bot:wire-60db-cli
Open

nickstrooo-bot wants to merge 2 commits into
tsensei:mainfrom
nickstrooo-bot:wire-60db-cli

Conversation

@nickstrooo-bot

Copy link
Copy Markdown

Follow-up to #46: it adds the 60db LLM/TTS providers, but as merged they aren't usable end to end.

Note: this branch is stacked on #46 (one commit, 9e3ff84). If #46 is merged first, this PR's diff shrinks to just the wiring commit below.

What was broken

  1. --provider 60db and --tts-provider 60db[-stream|-ws] are rejected by commander's .choices() in src/cli/args.ts, so the README example (openreels "the dawn of stoicism" --provider 60db --tts-provider 60db) fails at arg parsing.
  2. pnpm typecheck fails: ttsPerChar in src/cli/cost-estimator.ts is Record<TTSProviderKey, number> and lacks the three new keys.
  3. validate-env.ts had no SIXTYDB_API_KEY requirement, so a missing key died as an unhandled error instead of the standard missing-key listing.

What this changes

  • src/cli/args.ts: add "60db" to --provider choices; add "60db", "60db-stream", "60db-ws" to --tts-provider choices.
  • src/cli/cost-estimator.ts: add 60db to LLM_PRICING and the three TTS keys to ttsPerChar, using 60db's published pay-as-you-go rates (TTS $0.02/1K chars, chat $0.50/1M tokens in+out — 60db.ai/pricing).
  • src/cli/validate-env.ts: require SIXTYDB_API_KEY when the LLM provider is 60db or the TTS provider is any 60db surface.
  • Tests (20 new): args.test.ts — runtime parseArgs for all four flags; validate-env.test.ts — missing key exits 1 naming SIXTYDB_API_KEY, present key passes, not required when 60db isn't used; cost-estimator.test.ts — 60db LLM/TTS rates; factory.test.ts — mocked 60db LLM/TTS/cloud-aligner wiring.

Verification

  • pnpm typecheck — clean (was failing before this change).
  • pnpm test — full suite 443/443 pass.
  • pnpm lint (biome check .) — repo-wide counts identical to main (188 errors / 305 warnings / 285 infos, all pre-existing); this change adds no new diagnostics.
  • Live 60db calls were not tested (no API key); constructor/key-missing paths are covered by tests. The CLI now accepts the flags and reports the missing key up front:
$ openreels "test topic" --provider 60db --tts-provider 60db
Missing required API keys:
  SIXTYDB_API_KEY         MISSING   https://60db.ai

A note on who we are: we're a small crew that picks up stalled open-source work and finishes it — happy to iterate on this if you'd like anything changed. Best way to reach us is right here on GitHub (reply in this PR, or open an issue on our fork, nickstrooo-bot/OpenReels).

Dev-develope and others added 2 commits June 10, 2026 15:16
PR tsensei#46 adds the 60db LLM/TTS providers, but as merged they are not
usable end to end:
- --provider 60db and --tts-provider 60db[-stream|-ws] are rejected by
  commander's .choices() in src/cli/args.ts
- pnpm typecheck fails: ttsPerChar lacks the three new TTSProviderKey
  members
- validate-env.ts has no SIXTYDB_API_KEY requirement, so a missing key
  dies as an unhandled error instead of the standard listing

This wires all three up, using 60db's published pay-as-you-go rates
(TTS $0.02/1K chars, chat $0.50/1M tokens, 60db.ai/pricing), and adds
20 tests across args, validate-env, cost-estimator, and factory.
@strix-security

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

This branch has not been deployed

No deployments
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.

2 participants