isProperlyConfigured false if continue-proxy apiKeyLocation is NotFound

This commit is contained in:
Nate 2025-04-06 15:21:59 -07:00
parent cfcbee33a4
commit dfe852f274

View file

@ -1,4 +1,8 @@
import { ContinueProperties } from "@continuedev/config-yaml";
import {
ContinueProperties,
decodeSecretLocation,
SecretType,
} from "@continuedev/config-yaml";
import { ControlPlaneProxyInfo } from "../../../control-plane/analytics/IAnalyticsProvider.js";
import { Telemetry } from "../../../util/posthog.js";
@ -49,6 +53,18 @@ class ContinueProxy extends OpenAI {
};
}
isProperlyConfigured(): boolean {
if (!this.apiKeyLocation) {
return true;
}
const secretLocation = decodeSecretLocation(this.apiKeyLocation);
if (secretLocation.secretType === SecretType.NotFound) {
return false;
}
return true;
}
protected _getHeaders() {
const headers: any = super._getHeaders();
headers["x-continue-unique-id"] = Telemetry.uniqueId;