Skip to content

Add a BYOK provider #172

Description

@pacifio

Getting started: read CONTRIBUTING.md, run bun install, then bun run dev:app (Tauri dev build). Rust commands need export SDKROOT="$(xcrun --show-sdk-path)" on macOS, and crates are path-linked (no workspace) — run cargo from inside the crate directory. bun run test + bun run typecheck must stay green.

area:providers · ~1–2 h

Three small, mirrored additions wire in a new OpenAI-compatible provider
(pick one — e.g. Moonshot):

  1. src/features/settings/lib/providers.ts — catalog entry (id, name, env
    var, category, docs URL).
  2. src-tauri/src/commands/byok.rsENV_KEY_VARS row so the key is
    recognised in the user’s shell profile.
  3. src-tauri/src/commands/modelchat.rsprovider_endpoint() arm with the
    OpenAI-compatible base URL (only if the provider should be chat-capable).

Done when: the provider row shows in Settings → API Keys, a key exported
in your shell profile is detected, and (if chat-capable) a completion streams
in a feature that uses BYOK (e.g. commit-message generation).


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions