Problem Statement
The configuration loader uses os.ExpandEnv, which silently replaces missing environment variables with empty strings. This leads to cryptic errors from providers (e.g., "API key is empty") rather than a clear diagnostic message about which environment variable is missing.
Proposed Solution
- Add a
Validate() error method to the Config struct in internal/core/config/config.go.
- Call validation after loading the configuration.
- Check for required fields like
Qdrant.URL, Qdrant.APIKey, and Embedding.APIKey.
- Provide clear error messages indicating which environment variable or config field is missing.
Problem Statement
The configuration loader uses
os.ExpandEnv, which silently replaces missing environment variables with empty strings. This leads to cryptic errors from providers (e.g., "API key is empty") rather than a clear diagnostic message about which environment variable is missing.Proposed Solution
Validate() errormethod to theConfigstruct ininternal/core/config/config.go.Qdrant.URL,Qdrant.APIKey, andEmbedding.APIKey.