@nomad-e/bluma-cli 0.0.26 → 0.0.27

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.
Files changed (2) hide show
  1. package/dist/main.js +11 -14
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1830,23 +1830,20 @@ var Agent = class {
1830
1830
  const nativeToolInvoker = new ToolInvoker();
1831
1831
  this.mcpClient = new MCPClient(nativeToolInvoker, eventBus2);
1832
1832
  this.feedbackSystem = new AdvancedFeedbackSystem();
1833
- const apiKey = "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";
1834
- const modelName = "openrouter/horizon-alpha";
1835
- if (!apiKey || !modelName) {
1836
- throw new Error("Chave de API ou nome do modelo do OpenRouter n\xE3o encontrados.");
1833
+ const endpoint = process.env.AZURE_OPENAI_ENDPOINT;
1834
+ const apiKey = process.env.AZURE_OPENAI_API_KEY;
1835
+ const apiVersion = process.env.AZURE_OPENAI_API_VERSION;
1836
+ this.deploymentName = process.env.AZURE_OPENAI_DEPLOYMENT || "";
1837
+ if (!endpoint || !apiKey || !apiVersion || !this.deploymentName) {
1838
+ const errorMessage = `Uma ou mais vari\xE1veis de ambiente Azure OpenAI n\xE3o foram encontradas. Verifique em: ${globalEnvPath} ou nas vari\xE1veis de sistema.`;
1839
+ throw new Error(errorMessage);
1837
1840
  }
1838
- this.deploymentName = modelName;
1839
1841
  this.client = new OpenAI({
1840
- // Configuração do cliente OpenAI hospedado no OpenRouter
1842
+ // Configuração do cliente OpenAI hospedado no Azure
1841
1843
  apiKey,
1842
- baseURL: "https://openrouter.ai/api/v1",
1843
- // <-- URL base do OpenRouter
1844
- defaultHeaders: {
1845
- "HTTP-Referer": "http://localhost:3000",
1846
- // Substitua pelo seu site ou app
1847
- "X-Title": "Bluma CLI Agent"
1848
- // Substitua pelo nome do seu projeto
1849
- }
1844
+ baseURL: `${endpoint}/openai/deployments/${this.deploymentName}`,
1845
+ defaultQuery: { "api-version": apiVersion },
1846
+ defaultHeaders: { "api-key": apiKey }
1850
1847
  });
1851
1848
  }
1852
1849
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "MIT",