centaurus-cli 3.1.2 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ import { ShellInputAgent } from "./services/shell-input-agent.js";
30
30
  import { apiClient } from "./services/api-client.js";
31
31
  import { conversationManager } from "./services/conversation-manager.js";
32
32
  import { aiServiceClient } from "./services/ai-service-client.js";
33
- import { isValidModel, getInvalidModelError, fetchModelsConfig, getModelConfigByIdAndName } from "./config/models.js";
33
+ import { isValidModel, getInvalidModelError, fetchModelsConfig, clearModelsCache, getModelConfigByIdAndName } from "./config/models.js";
34
34
  import { authenticateWithGoogle } from "./services/auth-handler.js";
35
35
  import { ContextManager } from "./context/context-manager.js";
36
36
  import { CommandDetector } from "./context/command-detector.js";
@@ -944,6 +944,7 @@ Begin executing now, starting with Step 1.`;
944
944
  this.onResponseCallback(responseMessage);
945
945
  }
946
946
  } else {
947
+ clearModelsCache();
947
948
  const modelsConfig = await fetchModelsConfig();
948
949
  const modelIndex = parseInt(selection, 10);
949
950
  if (isNaN(modelIndex) || modelIndex < 0 || modelIndex >= modelsConfig.models.length) {
@@ -951,6 +952,7 @@ Begin executing now, starting with Step 1.`;
951
952
  }
952
953
  const selectedModel = modelsConfig.models[modelIndex];
953
954
  this.configManager.set("model", selectedModel.id);
955
+ this.configManager.set("modelUid", selectedModel.uid);
954
956
  this.configManager.set("modelName", selectedModel.name);
955
957
  this.configManager.set("isLocalModel", false);
956
958
  if (this.onModelChange) {
@@ -1916,7 +1918,7 @@ Use /session-limits to check your quota status.`;
1916
1918
  quickLog(`[${(/* @__PURE__ */ new Date()).toISOString()}] [CLI] Failed to update token count: ${err}
1917
1919
  `);
1918
1920
  });
1919
- for await (const chunk of aiServiceClient.streamChat(selectedModel, messages, tools, environmentContext, mode, selectedModelThinkingConfig, myAbortController.signal)) {
1921
+ for await (const chunk of aiServiceClient.streamChat(selectedModel, messages, tools, environmentContext, mode, selectedModelThinkingConfig, myAbortController.signal, config.modelName || "", selectedModelConfig?.uid || config.modelUid || "")) {
1920
1922
  if (chunk.type === "file_descriptions") {
1921
1923
  this.embedFileDescriptionsInHistory(chunk.descriptions);
1922
1924
  continue;