Skip to content

feat(cli): multi-provider LLM setup wizard#64

Merged
robotlearning123 merged 4 commits intoagent-next:mainfrom
robotlearning123:feat/setup-wizard
Mar 16, 2026
Merged

feat(cli): multi-provider LLM setup wizard#64
robotlearning123 merged 4 commits intoagent-next:mainfrom
robotlearning123:feat/setup-wizard

Conversation

@robotlearning123
Copy link
Member

Summary

  • Redesign the call-use setup wizard to support 4 LLM providers: OpenAI, OpenRouter, Google Gemini, and Grok (xAI)
  • Provider selection via numbered menu; provider-specific API keys collected automatically
  • OpenAI and Google cover LLM + TTS with one key; OpenRouter and Grok ask for an additional OpenAI key for TTS
  • _check_env() and doctor are now provider-aware via CALL_USE_LLM_PROVIDER env var
  • .env file hardened to 0600 permissions (contains secrets)

Design

Infrastructure → LLM Provider → Provider Keys → STT Key → Optional → .env
(LiveKit/SIP)   (1-4 menu)     (per provider)  (Deepgram)  (API_KEY)

Providers:

# Provider Keys TTS
1 OpenAI OPENAI_API_KEY included
2 OpenRouter OPENROUTER_API_KEY + OPENAI_API_KEY via OpenAI
3 Google Gemini GOOGLE_API_KEY included
4 Grok (xAI) XAI_API_KEY + OPENAI_API_KEY via OpenAI

Test plan

  • 67 tests pass, 100% line coverage on cli.py
  • Provider-specific wizard flow tested end-to-end (all 4 providers)
  • _check_env dual-key requirement tested for grok and openrouter
  • doctor tested with non-default provider (google)
  • .env file permission test (0600)
  • Validation retry (invalid URL, invalid key, invalid provider choice)
  • Existing .env overwrite protection
  • Existing env var defaults in prompts

🤖 Generated with Claude Code

robotlearning123 and others added 4 commits March 16, 2026 09:43
Redesign the setup wizard to support OpenAI, OpenRouter, Google Gemini,
and Grok (xAI) as LLM providers instead of hardcoding OpenAI+Deepgram.
The doctor command and _check_env are now provider-aware, reading
CALL_USE_LLM_PROVIDER from the environment to determine which API keys
to validate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Sanitize \r in _prompt_key and defensively strip \r\n in .env write
- Add _check_env tests for grok/openrouter dual-key requirement
- Add doctor test for google provider key checking
- Add setup verification test for google provider
- Refactor optional key loop to reuse _prompt_key(required=False)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set restrictive permissions on the generated .env file since it contains
API keys and secrets. Addresses L3 (Gemini) review finding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The validator field in key_def dicts is typed as `object` which mypy
correctly flags as not callable. Add explicit `callable()` check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@robotlearning123 robotlearning123 merged commit 9483b6e into agent-next:main Mar 16, 2026
7 checks passed
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.

1 participant