Skip to content

feat: prompt for LLM provider and key instead of Coval proxy#7

Merged
callumreid merged 1 commit into
mainfrom
feat/prompt-for-llm-key
Mar 10, 2026
Merged

feat: prompt for LLM provider and key instead of Coval proxy#7
callumreid merged 1 commit into
mainfrom
feat/prompt-for-llm-key

Conversation

@callumreid

@callumreid callumreid commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the call to POST /v1/wizard/complete (Coval proxy endpoint that doesn't exist)
  • Adds an interactive prompt asking users to pick a provider (Anthropic / OpenAI / Gemini) and paste their API key
  • WIZARD_LLM_KEY + WIZARD_LLM_PROVIDER env vars still bypass the prompt for CI/scripted use
  • Updates tests to pass llmConfig explicitly instead of routing through env vars (72 tests, all passing)

New flow

◆  Which LLM provider should the wizard use to analyze your code?
   ● Anthropic (Claude)
   ○ OpenAI
   ○ Google Gemini

◆  Enter your Anthropic API key
   ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪

Summary

Breaking Changes:

  • callWizardLLM now accepts llmConfig: LLMConfig instead of apiKey parameter
  • Removed COVAL_WIZARD_ENDPOINT constant and Coval proxy endpoint dependency

Features:

  • Interactive LLM provider selection prompt with options (Anthropic/OpenAI/Google Gemini)
  • Interactive API key input with secure prompting; supports WIZARD_LLM_KEY and WIZARD_LLM_PROVIDER environment variables for CI/scripted use

Refactors:

  • Unified LLM configuration via new LLMConfig exported type across all providers
  • Test suite refactored to use explicit llmConfig objects instead of environment variables (72 tests updated)
Filename Change Type Lines Changed
src/llm.ts Interactive provider/key prompting & configuration refactor +65/-47
src/tests/llm.test.ts Tests refactored for explicit llmConfig +48/-63
src/index.ts Integration of getLLMConfig and llmConfig flow +5/-3

Remove the /v1/wizard/complete proxy endpoint (which doesn't exist) and
instead prompt users to select a provider (Anthropic/OpenAI/Gemini) and
paste their own API key. WIZARD_LLM_KEY/WIZARD_LLM_PROVIDER env vars
still bypass the prompt for CI/power users.
@callumreid callumreid merged commit 5cfe0ae into main Mar 10, 2026
2 checks passed
@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The changes refactor LLM configuration from environment-variable-based routing to explicit llmConfig objects. A new getLLMConfig() function prompts for provider and API key selection when WIZARD_LLM_KEY is absent, returning a structured LLMConfig type. callWizardLLM signature updated to accept llmConfig instead of apiKey. Provider adapters (Anthropic, OpenAI, Gemini) now consume LLMConfig directly. The Coval proxy fallback path removed. Tests converted to use explicit configuration objects, and the public COVAL_WIZARD_ENDPOINT constant eliminated.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed Title follows Conventional Commits v1.0.0 format with 'feat' type and clearly describes the main change: replacing Coval proxy with interactive LLM provider prompts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/prompt-for-llm-key

Comment @coderabbitai help to get the list of available commands and usage tips.

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