Filter errors from environment information output #1118
Annotations
3 errors
genaiscript pr-review-commit:
packages/core/src/connection.ts#L113
The code throws an error if the `OPENAI_API_KEY` is missing, but it doesn't check if the `base` is a valid URL before this. This could lead to an error being thrown for the wrong reason. Consider checking the validity of `base` before throwing an error for a missing API key. 🔑
|
genaiscript pr-review-commit:
packages/core/src/constants.ts#L226
The `MODEL_PROVIDERS` array contains duplicate entries for `MODEL_PROVIDER_ANTHROPIC` and `MODEL_PROVIDER_HUGGINGFACE`. This could lead to confusion or unexpected behavior when iterating over providers. Please ensure each provider is listed only once. 🔄
|
genaiscript pr-review-commit:
packages/cli/src/info.ts#L58
The error handling logic inside the `envInfo` function only pushes errors to the result if the `error` option is set. This might lead to silent failures if the option is not set. Consider logging or handling errors in a way that ensures they are not completely ignored. 🚨
|
Loading