Skip to content

Engine: bring-your-own-API-key tier (PROPOSAL §4 tier 3) — backlog, unscheduled #118

Description

@realproject7

Goal

PROPOSAL §4 defines a third engine tier — bring-your-own Anthropic API key for explicit pay-per-use — deferred at MVP (packages/engine/src/types.ts:3: "BYO-API post-MVP"). This ticket tracks it so the roadmap stays complete. Backlog / unscheduled — do not start without operator prioritization.

Context (verified on main @ fa26d60)

  • packages/engine/src/types.ts:85TranslationEngine interface both existing tiers implement
  • packages/engine/src/env.ts — currently STRIPS ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN from the CLI child env (to force subscription auth); a BYO tier is a separate direct-API engine, NOT a relaxation of this strip
  • Engine selector UI: src/settings-sheet.ts:63-66 (two segments today); pref type src/app-settings.ts:4
  • Credit metering: packages/engine/src/credit-ledger.ts (BYO turns carry real per-token cost — the gauge becomes literal)

Sketch (to be re-scoped when scheduled)

Direct Anthropic API engine (streaming, same TranslationEngine contract), key stored in macOS Keychain (never settings JSON/plaintext), third segment in Settings + onboarding, real cost surfaced via the existing gauge.

Security invariants (binding whenever this is built)

Key in Keychain only; never logged, never in argv (see #26 history), never in any file the archive/retention sweep touches.

Routing

Unscheduled backlog. Likely split quadwork (engine) + claude (Keychain/UI) when activated.

Part of #107 (backlog row).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions