Skip to content

Conversation

@fern-support
Copy link
Collaborator

This PR modifies the _get_base_url() method to accept the optional token parameter in determining which base_url to return.

In the missing token case, the client will use the self-hosted url instead.

Comment on lines +161 to 164
elif token is None:
return LettaEnvironment.SELF_HOSTED.value
elif environment is not None:
return environment.value
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why this is before the environment check - if user specifies environment=LettaCloud but forgets to pass in token, would it be unexpected for it to use self_hosted rather than error?

@fern-support fern-support marked this pull request as draft January 7, 2025 22:54
@carenthomas carenthomas deleted the eden/support-custom-base-url branch January 15, 2025 02:20
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.

4 participants