Skip to content

Conversation

@utk7arsh
Copy link

@utk7arsh utk7arsh commented Jul 14, 2025

Summary of Changes

This PR implements comprehensive API key validation for OpenAI, Gemini, and Anthropic providers. The changes include:

  1. Enhanced Validation Logic:

    • Added immediate validation on API key entry
    • Implemented provider-specific validation endpoints
    • Added detailed error handling for common scenarios (401, 429, etc.)
  2. UI Improvements:

    • Added visual feedback indicators in SettingsView
    • Implemented success messages showing available models
    • Added provider-specific error guidance
    • Added 5-second timeout for status messages

Related Issue

Contributor's Self-Review Checklist

Please check the boxes that apply. This is a reminder of what we look for in a good pull request.

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding style and architectural patterns as described in DESIGN_PATTERNS.md.
  • I have added or updated relevant tests for my changes.
  • I have updated the documentation to reflect my changes (if applicable).
  • My changes have been tested locally and are working as expected.

Additional Context (Optional)

  • Each provider (OpenAI, Gemini, Anthropic) now validates API keys using their respective validation endpoints
  • Error messages are provider-specific and include guidance for common issues:
    • Invalid API key format (including Empty)
    • Rate limiting (429)
    • Authentication failures (401)
    • Network connectivity issues
    • Region/organization access issues.

One of the screenshots

image

Thanks @Surya-sourav and @samtiz for helping with my first PR in here.

- Added detailed validation feedback for OpenAI, Gemini, and Anthropic providers
- Improved error messages with specific guidance for each provider
- Added visual feedback in UI for validation status
- Enhanced success messages with model availability info

Fixes pickle-com#106
@Surya-sourav
Copy link
Contributor

@utk7arsh A Clean UI Implementation. A noice feedback to the user in the UI , for its API Validation , instead of looking into the elongated terminal Logs :

@samtiz @entry-sanio @jhyang0

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.

Validate API Key on Entry to Prevent Invalid Usage

2 participants