Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: bugfix
description: >
Add enabled property to LLM proxy client.
16 changes: 15 additions & 1 deletion vscode/core/src/clients/ProfileSyncClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,26 @@ export class ProfileSyncClient {
// The Hub API returns the config.json content as a JSON-encoded string,
// so we need to parse it twice: once from the response, once from the string
const rawConfig = await response.json();
const config: { model?: string } =
const parsedConfig: { model?: string; enabled?: boolean | string } =
typeof rawConfig === "string" ? JSON.parse(rawConfig) : rawConfig;
const config = {
...parsedConfig,
enabled: parsedConfig.enabled !== "false" && parsedConfig.enabled !== false,
};
this.logger.info("LLM proxy configuration fetched successfully", {
model: config.model,
enabled: config.enabled,
});

if (config.enabled === false) {
this.logger.info("LLM proxy is not enabled");
this.llmProxyConfig = {
available: false,
endpoint: `${this.baseUrl}/llm-proxy/v1`,
};
return;
}

// Use external Hub URL with /llm-proxy/v1 path
this.llmProxyConfig = {
available: true,
Expand Down
Loading