fix(honcho): use placeholder API key for local instances that don't require auth#3639
Closed
fix(honcho): use placeholder API key for local instances that don't require auth#3639
Conversation
…equire auth The Honcho SDK requires a non-empty api_key string, but local instances (localhost/127.0.0.1/::1) don't need authentication. Use 'local' as a placeholder when no key is configured and the base URL points to a local server. Co-authored-by: ygd58 <ygd58@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Honcho SDK requires a non-empty
api_keystring, but self-hosted local instances (localhost/127.0.0.1/::1) don't need authentication. This uses"local"as a placeholder when no key is configured and the base URL points to a local server.Salvaged from #3570 by @ygd58 with authorship preserved. #3560 by @devorun is a duplicate.
Changes
honcho_integration/client.py: detect local URLs, use placeholder keyTest plan