feat(core): add ZILLIZ_PROJECT_NAME environment variable for configurable project name #203
+25
−11
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
This PR adds support for configuring the Zilliz Cloud project name via the
ZILLIZ_PROJECT_NAME
environment variable, addressing the issue where "Default Project" was previously hardcoded.Problem
Previously, when auto-resolving cluster addresses from a Zilliz Cloud token, the system was hardcoded to look for a project named "Default Project". This limitation prevented users from using different project names in their Zilliz Cloud accounts.
Solution
ZILLIZ_PROJECT_NAME
environment variableClusterManager.getAddressFromToken()
to accept an optional project name parameterZILLIZ_PROJECT_NAME
environment variableChanges
packages/core/src/vectordb/zilliz-utils.ts
: UpdatedgetAddressFromToken
method to support configurable project namespackages/mcp/src/config.ts
: AddedzillizProjectName
to configuration interface.env.example
: Added example configuration forZILLIZ_PROJECT_NAME
docs/getting-started/environment-variables.md
: Documented the new environment variablepackages/mcp/README.md
: Added configuration example for the new variableTesting
pnpm build
ZILLIZ_PROJECT_NAME
is not set, the system defaults to "Default Project" as beforeBreaking Changes
None - this change is fully backward compatible.
Related Issues
This addresses the limitation where users couldn't specify custom project names when using Zilliz Cloud's auto-resolution feature.