@contentgrowth/llm-service 1.4.2 → 1.4.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.
package/dist/index.js CHANGED
@@ -1690,14 +1690,18 @@ var LLMService = class {
1690
1690
  if (this.providerCache.has(cacheKey)) {
1691
1691
  return this.providerCache.get(cacheKey);
1692
1692
  }
1693
- const config = await ConfigManager.getConfig(tenantId, this.env);
1694
- if (!config.apiKey && config.provider !== "vertex") {
1693
+ const configOptions = {};
1694
+ if (this._ptalkTaskType) {
1695
+ configOptions.capability = this._ptalkTaskType;
1696
+ }
1697
+ const config = await ConfigManager.getConfig(tenantId, this.env, configOptions);
1698
+ if (!config.apiKey && config.provider !== "vertex" && config.provider !== "google") {
1695
1699
  throw new LLMServiceException(`LLM service is not configured for ${config.provider}. Missing API Key.`, 500);
1696
1700
  }
1697
1701
  let provider;
1698
1702
  if (config.provider === "openai") {
1699
1703
  provider = new OpenAIProvider(config);
1700
- } else if (config.provider === "gemini" || config.provider === "vertex") {
1704
+ } else if (config.provider === "gemini" || config.provider === "vertex" || config.provider === "google") {
1701
1705
  provider = new GoogleProvider(config);
1702
1706
  } else if (config.provider === "anthropic") {
1703
1707
  provider = new AnthropicProvider(config);