Skip to content

Conversation

RauchenwaldC
Copy link

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

  • Added support for the ZILLIZ_PROJECT_NAME environment variable
  • Modified ClusterManager.getAddressFromToken() to accept an optional project name parameter
  • The system now uses the following priority:
    1. Explicit project name parameter (if provided)
    2. ZILLIZ_PROJECT_NAME environment variable
    3. Falls back to "Default Project" for backward compatibility
  • Improved error messages to show available projects when the specified project is not found

Changes

  • packages/core/src/vectordb/zilliz-utils.ts: Updated getAddressFromToken method to support configurable project names
  • packages/mcp/src/config.ts: Added zillizProjectName to configuration interface
  • .env.example: Added example configuration for ZILLIZ_PROJECT_NAME
  • docs/getting-started/environment-variables.md: Documented the new environment variable
  • packages/mcp/README.md: Added configuration example for the new variable

Testing

  • Successfully built all packages with pnpm build
  • Maintains backward compatibility - existing configurations will continue to work without any changes
  • When ZILLIZ_PROJECT_NAME is not set, the system defaults to "Default Project" as before

Breaking 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.

…able project name

- Add support for ZILLIZ_PROJECT_NAME environment variable to configure Zilliz Cloud project name
- Update getAddressFromToken method to use configurable project name with fallback to 'Default Project'
- Add improved error messages showing available projects when project not found
- Update documentation and examples to include ZILLIZ_PROJECT_NAME configuration
- Maintain backward compatibility by defaulting to 'Default Project' when not specified
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.

1 participant