feat: Add API key validation utility to prevent runtime crashes#20
Conversation
RaghavChamadiya
left a comment
There was a problem hiding this comment.
Great work here: validate_provider_config() and the doctor integration are genuinely useful additions that go beyond what the other PRs touch. We're merging #21 for the provider constructor fix, but your helpers.py changes (passing api_key explicitly in resolve_provider) and the doctor check are worth landing separately. Could you rebase on main after #21 merges and drop the anthropic.py/openai.py changes (they'll already be in)? Happy to merge the rest.
2685e6b to
b0e3839
Compare
There was a problem hiding this comment.
Rebased onto main, dropped the provider-file changes already merged in #21, and kept only the helpers/doctor/test updates. The branch is now squashed to one commit on top of main. Could you please take another look?
Summary
This prevents runtime errors when users attempt to use providers without proper API key setup.
Key Point
User steps remain unchanged.
New behavior: proactive configuration validation and warnings.
No extra CLI flags or modes required
Related Issues
Test Plan
pytest)ruff check .)npm run build) (if frontend changes)Checklist