Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ClineProvider): Ensures all API keys are initialized before buildApiHandler #791

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samhvw8
Copy link

@samhvw8 samhvw8 commented Feb 5, 2025

Description

according to this code, we ensure when change all API-key need to init
https://github.com/openai/openai-node/blob/145ff671d3a8111c81497f6bc9cd0cb5053a6cb0/src/index.ts#L214-L234

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Ensures all API keys in apiConfiguration are initialized before calling buildApiHandler in ClineProvider.

  • Behavior:
    • Ensures all API keys in apiConfiguration are initialized to an empty string if undefined before calling buildApiHandler in ClineProvider.
  • Code:
    • Adds a loop in ClineProvider to iterate over apiConfiguration keys, checking for undefined API keys and setting them to an empty string.

This description was created by Ellipsis for bf3d97a. It will automatically update as commits are pushed.

- Added ApiKeyProperty type to ensure type safety when accessing API key properties
- Added runtime validation to ensure keys exist in apiConfiguration
- Fixed TypeScript error with string indexing of ApiConfiguration
- Ensures all API keys are initialized before buildApiHandler
Copy link

changeset-bot bot commented Feb 5, 2025

⚠️ No Changeset found

Latest commit: 087ef87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mrubens
Copy link
Collaborator

mrubens commented Feb 6, 2025

I'm just feeling nervous that this is a bandaid over something else more fundamental that's going on here. Is this an issue with existing bad data or are we continuing to create profiles with missing data?

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