Fix SDK connection with plain URIs (no embedded credentials)#372
Open
ArnavAgrawal03 wants to merge 1 commit intomainfrom
Open
Fix SDK connection with plain URIs (no embedded credentials)#372ArnavAgrawal03 wants to merge 1 commit intomainfrom
ArnavAgrawal03 wants to merge 1 commit intomainfrom
Conversation
_setup_auth assumed every URI had @-embedded credentials, crashing with ValueError when given plain URIs like http://0.0.0.0:8000. Now handles the no-credentials case by using the URI directly as the base URL with no auth token.
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
ValueError: not enough values to unpackwhen connecting with a plain URI likehttp://0.0.0.0:8000_setup_authassumed every URI had@-embedded credentials (name:token@host), making it impossible to connect to a non-localhost server without auth@in the netloc: if present, parses credentials as before; if absent, uses the URI directly as the base URL with no auth tokenTest plan
Morphik(uri="http://0.0.0.0:8000")no longer crashesMorphik(uri="http://192.168.1.100:8000")works for LAN deploymentsMorphik()still defaults tohttp://localhost:8000name:token@host) continue to work as before🤖 Generated with Claude Code