@juspay/neurolink 6.2.1 → 7.0.0
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/CHANGELOG.md +27 -16
- package/README.md +3 -3
- package/dist/cli/index.js +6 -6
- package/dist/cli/utils/{complete-setup.d.ts → completeSetup.d.ts} +1 -1
- package/dist/cli/utils/{complete-setup.js → completeSetup.js} +2 -2
- package/dist/{lib/core/base-provider.d.ts → core/baseProvider.d.ts} +1 -1
- package/dist/core/{base-provider.js → baseProvider.js} +2 -2
- package/dist/core/{dynamic-models.js → dynamicModels.js} +1 -1
- package/dist/core/evaluation.js +1 -1
- package/dist/core/factory.js +5 -5
- package/dist/core/types.d.ts +2 -2
- package/dist/{lib/factories/provider-registry.js → factories/providerRegistry.js} +9 -9
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{core/base-provider.d.ts → lib/core/baseProvider.d.ts} +1 -1
- package/dist/lib/core/{base-provider.js → baseProvider.js} +2 -2
- package/dist/lib/core/{dynamic-models.js → dynamicModels.js} +1 -1
- package/dist/lib/core/evaluation.js +1 -1
- package/dist/lib/core/factory.js +3 -3
- package/dist/lib/core/types.d.ts +2 -2
- package/dist/{factories/provider-registry.js → lib/factories/providerRegistry.js} +9 -9
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +1 -1
- package/dist/lib/mcp/factory.d.ts +2 -2
- package/dist/lib/mcp/factory.js +2 -2
- package/dist/lib/mcp/servers/agent/{direct-tools-server.js → directToolsServer.js} +1 -1
- package/dist/lib/mcp/servers/{ai-providers/ai-core-server.js → aiProviders/aiCoreServer.js} +1 -1
- package/dist/lib/neurolink.d.ts +4 -4
- package/dist/lib/neurolink.js +4 -4
- package/dist/lib/providers/{amazon-bedrock.d.ts → amazonBedrock.d.ts} +2 -2
- package/dist/lib/providers/{amazon-bedrock.js → amazonBedrock.js} +1 -1
- package/dist/lib/providers/anthropic.d.ts +2 -2
- package/dist/lib/providers/anthropic.js +1 -1
- package/dist/{providers/anthropic-baseprovider.d.ts → lib/providers/anthropicBaseProvider.d.ts} +2 -2
- package/dist/lib/providers/{anthropic-baseprovider.js → anthropicBaseProvider.js} +1 -1
- package/dist/{providers/azure-openai.d.ts → lib/providers/azureOpenai.d.ts} +2 -2
- package/dist/{providers/azure-openai.js → lib/providers/azureOpenai.js} +1 -1
- package/dist/{providers/google-ai-studio.d.ts → lib/providers/googleAiStudio.d.ts} +2 -2
- package/dist/lib/providers/{google-ai-studio.js → googleAiStudio.js} +1 -1
- package/dist/{providers/google-vertex.d.ts → lib/providers/googleVertex.d.ts} +2 -2
- package/dist/lib/providers/{google-vertex.js → googleVertex.js} +1 -1
- package/dist/lib/providers/huggingFace.d.ts +2 -2
- package/dist/lib/providers/huggingFace.js +1 -1
- package/dist/lib/providers/index.d.ts +4 -4
- package/dist/lib/providers/index.js +4 -4
- package/dist/lib/providers/mistral.d.ts +2 -2
- package/dist/lib/providers/mistral.js +1 -1
- package/dist/lib/providers/ollama.d.ts +2 -2
- package/dist/lib/providers/ollama.js +1 -1
- package/dist/lib/providers/openAI.d.ts +2 -2
- package/dist/lib/providers/openAI.js +1 -1
- package/dist/{sdk/tool-registration.d.ts → lib/sdk/toolRegistration.d.ts} +1 -1
- package/dist/lib/telemetry/index.d.ts +2 -2
- package/dist/lib/telemetry/index.js +3 -3
- package/dist/lib/utils/providerConfig.js +1 -1
- package/dist/lib/utils/{provider-setup-messages.js → providerSetupMessages.js} +1 -1
- package/dist/lib/utils/providerUtils.js +1 -1
- package/dist/mcp/factory.d.ts +2 -2
- package/dist/mcp/factory.js +2 -2
- package/dist/mcp/servers/agent/{direct-tools-server.js → directToolsServer.js} +1 -1
- package/dist/mcp/servers/{ai-providers/ai-core-server.js → aiProviders/aiCoreServer.js} +2 -2
- package/dist/neurolink.d.ts +5 -5
- package/dist/neurolink.js +4 -4
- package/dist/providers/{amazon-bedrock.d.ts → amazonBedrock.d.ts} +2 -2
- package/dist/providers/{amazon-bedrock.js → amazonBedrock.js} +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +1 -1
- package/dist/{lib/providers/anthropic-baseprovider.d.ts → providers/anthropicBaseProvider.d.ts} +2 -2
- package/dist/providers/{anthropic-baseprovider.js → anthropicBaseProvider.js} +1 -1
- package/dist/{lib/providers/azure-openai.d.ts → providers/azureOpenai.d.ts} +2 -2
- package/dist/{lib/providers/azure-openai.js → providers/azureOpenai.js} +1 -1
- package/dist/{lib/providers/google-ai-studio.d.ts → providers/googleAiStudio.d.ts} +2 -2
- package/dist/providers/{google-ai-studio.js → googleAiStudio.js} +2 -2
- package/dist/{lib/providers/google-vertex.d.ts → providers/googleVertex.d.ts} +2 -2
- package/dist/providers/{google-vertex.js → googleVertex.js} +1 -1
- package/dist/providers/huggingFace.d.ts +2 -2
- package/dist/providers/huggingFace.js +1 -1
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.js +4 -4
- package/dist/providers/mistral.d.ts +2 -2
- package/dist/providers/mistral.js +1 -1
- package/dist/providers/ollama.d.ts +2 -2
- package/dist/providers/ollama.js +1 -1
- package/dist/providers/openAI.d.ts +2 -2
- package/dist/providers/openAI.js +1 -1
- package/dist/{lib/sdk/tool-registration.d.ts → sdk/toolRegistration.d.ts} +1 -1
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +3 -3
- package/dist/utils/providerConfig.js +1 -1
- package/dist/utils/{provider-setup-messages.js → providerSetupMessages.js} +1 -1
- package/dist/utils/providerUtils.js +1 -1
- package/package.json +23 -22
- /package/dist/agent/{direct-tools.d.ts → directTools.d.ts} +0 -0
- /package/dist/agent/{direct-tools.js → directTools.js} +0 -0
- /package/dist/cli/factories/{command-factory.d.ts → commandFactory.d.ts} +0 -0
- /package/dist/cli/factories/{command-factory.js → commandFactory.js} +0 -0
- /package/dist/cli/utils/{env-manager.d.ts → envManager.d.ts} +0 -0
- /package/dist/cli/utils/{env-manager.js → envManager.js} +0 -0
- /package/dist/cli/utils/{interactive-setup.d.ts → interactiveSetup.d.ts} +0 -0
- /package/dist/cli/utils/{interactive-setup.js → interactiveSetup.js} +0 -0
- /package/dist/core/{dynamic-models.d.ts → dynamicModels.d.ts} +0 -0
- /package/dist/core/{evaluation-providers.d.ts → evaluationProviders.d.ts} +0 -0
- /package/dist/core/{evaluation-providers.js → evaluationProviders.js} +0 -0
- /package/dist/core/{service-registry.d.ts → serviceRegistry.d.ts} +0 -0
- /package/dist/core/{service-registry.js → serviceRegistry.js} +0 -0
- /package/dist/factories/{provider-factory.d.ts → providerFactory.d.ts} +0 -0
- /package/dist/factories/{provider-factory.js → providerFactory.js} +0 -0
- /package/dist/factories/{provider-registry.d.ts → providerRegistry.d.ts} +0 -0
- /package/dist/lib/agent/{direct-tools.d.ts → directTools.d.ts} +0 -0
- /package/dist/lib/agent/{direct-tools.js → directTools.js} +0 -0
- /package/dist/lib/core/{dynamic-models.d.ts → dynamicModels.d.ts} +0 -0
- /package/dist/lib/core/{evaluation-providers.d.ts → evaluationProviders.d.ts} +0 -0
- /package/dist/lib/core/{evaluation-providers.js → evaluationProviders.js} +0 -0
- /package/dist/lib/core/{service-registry.d.ts → serviceRegistry.d.ts} +0 -0
- /package/dist/lib/core/{service-registry.js → serviceRegistry.js} +0 -0
- /package/dist/lib/factories/{provider-factory.d.ts → providerFactory.d.ts} +0 -0
- /package/dist/lib/factories/{provider-factory.js → providerFactory.js} +0 -0
- /package/dist/lib/factories/{provider-registry.d.ts → providerRegistry.d.ts} +0 -0
- /package/dist/lib/mcp/servers/agent/{direct-tools-server.d.ts → directToolsServer.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-analysis-tools.d.ts → aiProviders/aiAnalysisTools.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-analysis-tools.js → aiProviders/aiAnalysisTools.js} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-core-server.d.ts → aiProviders/aiCoreServer.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-workflow-tools.d.ts → aiProviders/aiWorkflowTools.d.ts} +0 -0
- /package/dist/lib/mcp/servers/{ai-providers/ai-workflow-tools.js → aiProviders/aiWorkflowTools.js} +0 -0
- /package/dist/lib/mcp/servers/utilities/{utility-server.d.ts → utilityServer.d.ts} +0 -0
- /package/dist/lib/mcp/servers/utilities/{utility-server.js → utilityServer.js} +0 -0
- /package/dist/lib/mcp/{tool-registry.d.ts → toolRegistry.d.ts} +0 -0
- /package/dist/lib/mcp/{tool-registry.js → toolRegistry.js} +0 -0
- /package/dist/lib/proxy/{proxy-fetch.d.ts → proxyFetch.d.ts} +0 -0
- /package/dist/lib/proxy/{proxy-fetch.js → proxyFetch.js} +0 -0
- /package/dist/lib/sdk/{tool-registration.js → toolRegistration.js} +0 -0
- /package/dist/lib/telemetry/{telemetry-service.d.ts → telemetryService.d.ts} +0 -0
- /package/dist/lib/telemetry/{telemetry-service.js → telemetryService.js} +0 -0
- /package/dist/lib/types/{generate-types.d.ts → generateTypes.d.ts} +0 -0
- /package/dist/lib/types/{generate-types.js → generateTypes.js} +0 -0
- /package/dist/lib/types/{mcp-types.d.ts → mcpTypes.d.ts} +0 -0
- /package/dist/lib/types/{mcp-types.js → mcpTypes.js} +0 -0
- /package/dist/lib/types/{stream-types.d.ts → streamTypes.d.ts} +0 -0
- /package/dist/lib/types/{stream-types.js → streamTypes.js} +0 -0
- /package/dist/lib/types/{universal-provider-options.d.ts → universalProviderOptions.d.ts} +0 -0
- /package/dist/lib/types/{universal-provider-options.js → universalProviderOptions.js} +0 -0
- /package/dist/lib/utils/{provider-setup-messages.d.ts → providerSetupMessages.d.ts} +0 -0
- /package/dist/mcp/servers/agent/{direct-tools-server.d.ts → directToolsServer.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-analysis-tools.d.ts → aiProviders/aiAnalysisTools.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-analysis-tools.js → aiProviders/aiAnalysisTools.js} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-core-server.d.ts → aiProviders/aiCoreServer.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-workflow-tools.d.ts → aiProviders/aiWorkflowTools.d.ts} +0 -0
- /package/dist/mcp/servers/{ai-providers/ai-workflow-tools.js → aiProviders/aiWorkflowTools.js} +0 -0
- /package/dist/mcp/servers/utilities/{utility-server.d.ts → utilityServer.d.ts} +0 -0
- /package/dist/mcp/servers/utilities/{utility-server.js → utilityServer.js} +0 -0
- /package/dist/mcp/{tool-registry.d.ts → toolRegistry.d.ts} +0 -0
- /package/dist/mcp/{tool-registry.js → toolRegistry.js} +0 -0
- /package/dist/proxy/{proxy-fetch.d.ts → proxyFetch.d.ts} +0 -0
- /package/dist/proxy/{proxy-fetch.js → proxyFetch.js} +0 -0
- /package/dist/sdk/{tool-registration.js → toolRegistration.js} +0 -0
- /package/dist/telemetry/{telemetry-service.d.ts → telemetryService.d.ts} +0 -0
- /package/dist/telemetry/{telemetry-service.js → telemetryService.js} +0 -0
- /package/dist/types/{generate-types.d.ts → generateTypes.d.ts} +0 -0
- /package/dist/types/{generate-types.js → generateTypes.js} +0 -0
- /package/dist/types/{mcp-types.d.ts → mcpTypes.d.ts} +0 -0
- /package/dist/types/{mcp-types.js → mcpTypes.js} +0 -0
- /package/dist/types/{stream-types.d.ts → streamTypes.d.ts} +0 -0
- /package/dist/types/{stream-types.js → streamTypes.js} +0 -0
- /package/dist/types/{universal-provider-options.d.ts → universalProviderOptions.d.ts} +0 -0
- /package/dist/types/{universal-provider-options.js → universalProviderOptions.js} +0 -0
- /package/dist/utils/{provider-setup-messages.d.ts → providerSetupMessages.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Amazon Bedrock Provider v2 - BaseProvider Implementation
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAmazonBedrock } from "@ai-sdk/amazon-bedrock";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { TimeoutError, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Anthropic Provider v2 - BaseProvider Implementation
|
|
8
8
|
* Fixed syntax and enhanced with proper error handling
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { anthropic } from "@ai-sdk/anthropic";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
package/dist/{providers/anthropic-baseprovider.d.ts → lib/providers/anthropicBaseProvider.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Anthropic provider implementation using BaseProvider pattern
|
|
8
8
|
* Migrated from direct API calls to Vercel AI SDK (@ai-sdk/anthropic)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAnthropic } from "@ai-sdk/anthropic";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LanguageModelV1 } from "ai";
|
|
2
|
-
import { BaseProvider } from "../core/
|
|
2
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
5
|
export declare class AzureOpenAIProvider extends BaseProvider {
|
|
6
6
|
private apiKey;
|
|
7
7
|
private resourceName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAzure } from "@ai-sdk/azure";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { validateApiKey, createAzureAPIKeyConfig, createAzureEndpointConfig, } from "../utils/providerConfig.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
export class AzureOpenAIProvider extends BaseProvider {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Google AI Studio provider implementation using BaseProvider
|
|
8
8
|
* Migrated from original GoogleAIStudio class to new factory pattern
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
3
|
import { GoogleAIModels } from "../core/types.js";
|
|
4
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
|
|
7
7
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Google Vertex AI Provider v2 - BaseProvider Implementation
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVertex, } from "@ai-sdk/google-vertex";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { TimeoutError, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* HuggingFace Provider - BaseProvider Implementation
|
|
8
8
|
* Using AI SDK with HuggingFace's OpenAI-compatible endpoint
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createOpenAI } from "@ai-sdk/openai";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Provider exports for Vercel AI SDK integration
|
|
3
3
|
* This file centralizes all AI provider classes for easy import and usage
|
|
4
4
|
*/
|
|
5
|
-
export { GoogleVertexProvider as GoogleVertexAI } from "./
|
|
6
|
-
export { AmazonBedrockProvider as AmazonBedrock } from "./
|
|
5
|
+
export { GoogleVertexProvider as GoogleVertexAI } from "./googleVertex.js";
|
|
6
|
+
export { AmazonBedrockProvider as AmazonBedrock } from "./amazonBedrock.js";
|
|
7
7
|
export { OpenAIProvider as OpenAI } from "./openAI.js";
|
|
8
8
|
export { AnthropicProvider as AnthropicProvider } from "./anthropic.js";
|
|
9
|
-
export { AzureOpenAIProvider } from "./
|
|
10
|
-
export { GoogleAIStudioProvider as GoogleAIStudio } from "./
|
|
9
|
+
export { AzureOpenAIProvider } from "./azureOpenai.js";
|
|
10
|
+
export { GoogleAIStudioProvider as GoogleAIStudio } from "./googleAiStudio.js";
|
|
11
11
|
export { HuggingFaceProvider as HuggingFace } from "./huggingFace.js";
|
|
12
12
|
export { OllamaProvider as Ollama } from "./ollama.js";
|
|
13
13
|
export { MistralProvider as MistralAI } from "./mistral.js";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Provider exports for Vercel AI SDK integration
|
|
3
3
|
* This file centralizes all AI provider classes for easy import and usage
|
|
4
4
|
*/
|
|
5
|
-
export { GoogleVertexProvider as GoogleVertexAI } from "./
|
|
6
|
-
export { AmazonBedrockProvider as AmazonBedrock } from "./
|
|
5
|
+
export { GoogleVertexProvider as GoogleVertexAI } from "./googleVertex.js";
|
|
6
|
+
export { AmazonBedrockProvider as AmazonBedrock } from "./amazonBedrock.js";
|
|
7
7
|
export { OpenAIProvider as OpenAI } from "./openAI.js";
|
|
8
8
|
export { AnthropicProvider as AnthropicProvider } from "./anthropic.js";
|
|
9
|
-
export { AzureOpenAIProvider } from "./
|
|
10
|
-
export { GoogleAIStudioProvider as GoogleAIStudio } from "./
|
|
9
|
+
export { AzureOpenAIProvider } from "./azureOpenai.js";
|
|
10
|
+
export { GoogleAIStudioProvider as GoogleAIStudio } from "./googleAiStudio.js";
|
|
11
11
|
export { HuggingFaceProvider as HuggingFace } from "./huggingFace.js";
|
|
12
12
|
export { OllamaProvider as Ollama } from "./ollama.js";
|
|
13
13
|
export { MistralProvider as MistralAI } from "./mistral.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LanguageModelV1 } from "ai";
|
|
2
2
|
import type { AIProviderName, TextGenerationOptions, EnhancedGenerateResult } from "../core/types.js";
|
|
3
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
4
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
4
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
5
5
|
/**
|
|
6
6
|
* Mistral AI Provider v2 - BaseProvider Implementation
|
|
7
7
|
* Supports official AI-SDK integration with all Mistral models
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createMistral } from "@ai-sdk/mistral";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createAnalytics } from "../core/analytics.js";
|
|
6
6
|
import { validateApiKey, createMistralConfig, getProviderModel, } from "../utils/providerConfig.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AIProviderName } from "../core/types.js";
|
|
2
2
|
import type { LanguageModelV1 } from "ai";
|
|
3
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
3
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
4
4
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
5
5
|
import type { Schema } from "ai";
|
|
6
|
-
import { BaseProvider } from "../core/
|
|
6
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
7
7
|
/**
|
|
8
8
|
* Ollama Provider v2 - BaseProvider Implementation
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProvider } from "../core/
|
|
1
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
2
2
|
import { logger } from "../utils/logger.js";
|
|
3
3
|
import { TimeoutError } from "../utils/timeout.js";
|
|
4
4
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* OpenAI Provider v2 - BaseProvider Implementation
|
|
8
8
|
* Migrated to use factory pattern with exact Google AI provider pattern
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { openai } from "@ai-sdk/openai";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
3
|
import { AIProviderName } from "../core/types.js";
|
|
4
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
import { createTimeoutController, TimeoutError, } from "../utils/timeout.js";
|
|
7
7
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import type { Tool } from "ai";
|
|
7
7
|
import { logger } from "../utils/logger.js";
|
|
8
|
-
import type { InMemoryMCPServerConfig, InMemoryToolInfo } from "../types/
|
|
8
|
+
import type { InMemoryMCPServerConfig, InMemoryToolInfo } from "../types/mcpTypes.js";
|
|
9
9
|
import type { ToolArgs, ToolContext as CoreToolContext, ToolResult, SimpleTool as CoreSimpleTool } from "../types/tools.js";
|
|
10
10
|
import type { JsonValue } from "../types/common.js";
|
|
11
11
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { TelemetryService, type HealthMetrics } from "./
|
|
1
|
+
export { TelemetryService, type HealthMetrics } from "./telemetryService.js";
|
|
2
2
|
/**
|
|
3
3
|
* Initialize telemetry for NeuroLink
|
|
4
4
|
* OPTIONAL - Only works when NEUROLINK_TELEMETRY_ENABLED=true
|
|
5
5
|
*/
|
|
6
|
-
export declare function initializeTelemetry(): Promise<import("./
|
|
6
|
+
export declare function initializeTelemetry(): Promise<import("./telemetryService.js").TelemetryService>;
|
|
7
7
|
/**
|
|
8
8
|
* Get telemetry status
|
|
9
9
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Optional Telemetry Infrastructure (Phase 2)
|
|
2
|
-
export { TelemetryService } from "./
|
|
2
|
+
export { TelemetryService } from "./telemetryService.js";
|
|
3
3
|
import { logger } from "../utils/logger.js";
|
|
4
4
|
/**
|
|
5
5
|
* Initialize telemetry for NeuroLink
|
|
6
6
|
* OPTIONAL - Only works when NEUROLINK_TELEMETRY_ENABLED=true
|
|
7
7
|
*/
|
|
8
8
|
export async function initializeTelemetry() {
|
|
9
|
-
const { TelemetryService } = await import("./
|
|
9
|
+
const { TelemetryService } = await import("./telemetryService.js");
|
|
10
10
|
const telemetry = TelemetryService.getInstance();
|
|
11
11
|
if (telemetry.isEnabled()) {
|
|
12
12
|
await telemetry.initialize();
|
|
@@ -18,6 +18,6 @@ export async function initializeTelemetry() {
|
|
|
18
18
|
* Get telemetry status
|
|
19
19
|
*/
|
|
20
20
|
export async function getTelemetryStatus() {
|
|
21
|
-
const { TelemetryService } = await import("./
|
|
21
|
+
const { TelemetryService } = await import("./telemetryService.js");
|
|
22
22
|
return TelemetryService.getInstance().getStatus();
|
|
23
23
|
}
|
|
@@ -15,7 +15,7 @@ const API_KEY_FORMATS = {
|
|
|
15
15
|
mistral: /^[A-Za-z0-9]{32}$/,
|
|
16
16
|
azure: /^[A-Za-z0-9]{32,}$/,
|
|
17
17
|
aws: /^[A-Z0-9]{20}$/, // Access Key ID format
|
|
18
|
-
|
|
18
|
+
googleVertex: /^[A-Za-z0-9\-_]{1,}$/, // Project ID format
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* Validates API key format for a specific provider
|
|
@@ -57,7 +57,7 @@ export function getProviderSetupMessage(provider, missingVars) {
|
|
|
57
57
|
azure: {
|
|
58
58
|
guide: "Set up Azure OpenAI resource and create deployment",
|
|
59
59
|
envVars: [
|
|
60
|
-
'AZURE_OPENAI_API_KEY="your-
|
|
60
|
+
'AZURE_OPENAI_API_KEY="your-azureOpenai-key"',
|
|
61
61
|
'AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"',
|
|
62
62
|
'AZURE_OPENAI_DEPLOYMENT_ID="your-deployment-name"',
|
|
63
63
|
"# Optional:",
|
|
@@ -116,7 +116,7 @@ export function hasProviderEnvVars(provider) {
|
|
|
116
116
|
case "claude":
|
|
117
117
|
return !!process.env.ANTHROPIC_API_KEY;
|
|
118
118
|
case "azure":
|
|
119
|
-
case "
|
|
119
|
+
case "azureOpenai":
|
|
120
120
|
return !!process.env.AZURE_OPENAI_API_KEY;
|
|
121
121
|
case "google-ai":
|
|
122
122
|
case "google-studio":
|
package/dist/mcp/factory.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { ExecutionContext } from "./contracts/mcpContract.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* MCP Server Categories for organization and discovery
|
|
10
10
|
*/
|
|
11
|
-
export type MCPServerCategory = "
|
|
11
|
+
export type MCPServerCategory = "aiProviders" | "frameworks" | "development" | "business" | "content" | "data" | "integrations" | "automation" | "analysis" | "custom";
|
|
12
12
|
/**
|
|
13
13
|
* Tool execution context - Rich context passed to every tool execution
|
|
14
14
|
* Following Lighthouse's pattern for rich tool context
|
|
@@ -130,7 +130,7 @@ export interface MCPServerConfig {
|
|
|
130
130
|
* id: 'neurolink-ai-core',
|
|
131
131
|
* title: 'NeuroLink AI Core',
|
|
132
132
|
* description: 'Core AI provider tools',
|
|
133
|
-
* category: '
|
|
133
|
+
* category: 'aiProviders'
|
|
134
134
|
* });
|
|
135
135
|
*
|
|
136
136
|
* aiCoreServer.registerTool({
|
package/dist/mcp/factory.js
CHANGED
|
@@ -14,7 +14,7 @@ const ServerConfigSchema = z.object({
|
|
|
14
14
|
version: z.string().optional(),
|
|
15
15
|
category: z
|
|
16
16
|
.enum([
|
|
17
|
-
"
|
|
17
|
+
"aiProviders",
|
|
18
18
|
"frameworks",
|
|
19
19
|
"development",
|
|
20
20
|
"business",
|
|
@@ -46,7 +46,7 @@ const ServerConfigSchema = z.object({
|
|
|
46
46
|
* id: 'neurolink-ai-core',
|
|
47
47
|
* title: 'NeuroLink AI Core',
|
|
48
48
|
* description: 'Core AI provider tools',
|
|
49
|
-
* category: '
|
|
49
|
+
* category: 'aiProviders'
|
|
50
50
|
* });
|
|
51
51
|
*
|
|
52
52
|
* aiCoreServer.registerTool({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { createMCPServer } from "../../factory.js";
|
|
7
|
-
import { directAgentTools } from "../../../agent/
|
|
7
|
+
import { directAgentTools } from "../../../agent/directTools.js";
|
|
8
8
|
import { logger } from "../../../utils/logger.js";
|
|
9
9
|
/**
|
|
10
10
|
* Direct Tools Server - Agent direct tools for immediate use
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { createMCPServer } from "../../factory.js";
|
|
8
|
-
import { ServiceRegistry } from "../../../core/
|
|
8
|
+
import { ServiceRegistry } from "../../../core/serviceRegistry.js";
|
|
9
9
|
import { getBestProvider, getAvailableProviders, } from "../../../utils/providerUtils.js";
|
|
10
10
|
import { logger } from "../../../utils/logger.js";
|
|
11
11
|
/**
|
|
@@ -16,7 +16,7 @@ export const aiCoreServer = createMCPServer({
|
|
|
16
16
|
id: "neurolink-ai-core",
|
|
17
17
|
title: "NeuroLink AI Core",
|
|
18
18
|
description: "Core AI provider management with automatic fallback and status monitoring",
|
|
19
|
-
category: "
|
|
19
|
+
category: "aiProviders",
|
|
20
20
|
version: "1.2.0",
|
|
21
21
|
capabilities: [
|
|
22
22
|
"provider-selection",
|
package/dist/neurolink.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* Uses real MCP infrastructure for tool discovery and execution.
|
|
7
7
|
*/
|
|
8
8
|
import type { TextGenerationOptions, TextGenerationResult } from "./core/types.js";
|
|
9
|
-
import type { GenerateOptions, GenerateResult } from "./types/
|
|
10
|
-
import type { StreamOptions, StreamResult } from "./types/
|
|
11
|
-
import type { SimpleTool } from "./sdk/
|
|
12
|
-
import type { InMemoryMCPServerConfig } from "./types/
|
|
9
|
+
import type { GenerateOptions, GenerateResult } from "./types/generateTypes.js";
|
|
10
|
+
import type { StreamOptions, StreamResult } from "./types/streamTypes.js";
|
|
11
|
+
import type { SimpleTool } from "./sdk/toolRegistration.js";
|
|
12
|
+
import type { InMemoryMCPServerConfig } from "./types/mcpTypes.js";
|
|
13
13
|
export interface ProviderStatus {
|
|
14
14
|
provider: string;
|
|
15
15
|
status: "working" | "failed" | "not-configured";
|
|
@@ -138,7 +138,7 @@ export declare class NeuroLink {
|
|
|
138
138
|
* Get all available tools including custom and in-memory ones
|
|
139
139
|
* @returns Array of available tools with metadata
|
|
140
140
|
*/
|
|
141
|
-
getAllAvailableTools(): Promise<import("./mcp/
|
|
141
|
+
getAllAvailableTools(): Promise<import("./mcp/toolRegistry.js").ToolInfo[]>;
|
|
142
142
|
/**
|
|
143
143
|
* Get comprehensive status of all AI providers
|
|
144
144
|
* Primary method for provider health checking and diagnostics
|
package/dist/neurolink.js
CHANGED
|
@@ -15,11 +15,11 @@ catch (error) {
|
|
|
15
15
|
}
|
|
16
16
|
import { AIProviderFactory } from "./core/factory.js";
|
|
17
17
|
import { mcpLogger } from "./utils/logger.js";
|
|
18
|
-
import { toolRegistry } from "./mcp/
|
|
18
|
+
import { toolRegistry } from "./mcp/toolRegistry.js";
|
|
19
19
|
import { logger } from "./utils/logger.js";
|
|
20
20
|
import { getBestProvider } from "./utils/providerUtils.js";
|
|
21
|
-
import { ProviderRegistry } from "./factories/
|
|
22
|
-
import { validateTool, createMCPServerFromTools, } from "./sdk/
|
|
21
|
+
import { ProviderRegistry } from "./factories/providerRegistry.js";
|
|
22
|
+
import { validateTool, createMCPServerFromTools, } from "./sdk/toolRegistration.js";
|
|
23
23
|
// Core types imported from core/types.js
|
|
24
24
|
export class NeuroLink {
|
|
25
25
|
mcpInitialized = false;
|
|
@@ -667,7 +667,7 @@ export class NeuroLink {
|
|
|
667
667
|
"openai",
|
|
668
668
|
"bedrock",
|
|
669
669
|
"vertex",
|
|
670
|
-
"
|
|
670
|
+
"googleVertex",
|
|
671
671
|
"anthropic",
|
|
672
672
|
"azure",
|
|
673
673
|
"google-ai",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Amazon Bedrock Provider v2 - BaseProvider Implementation
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAmazonBedrock } from "@ai-sdk/amazon-bedrock";
|
|
2
2
|
import { streamText, Output } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, getDefaultTimeout, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Anthropic Provider v2 - BaseProvider Implementation
|
|
8
8
|
* Fixed syntax and enhanced with proper error handling
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { anthropic } from "@ai-sdk/anthropic";
|
|
2
2
|
import { streamText, Output } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, getDefaultTimeout, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
package/dist/{lib/providers/anthropic-baseprovider.d.ts → providers/anthropicBaseProvider.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Anthropic provider implementation using BaseProvider pattern
|
|
8
8
|
* Migrated from direct API calls to Vercel AI SDK (@ai-sdk/anthropic)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAnthropic } from "@ai-sdk/anthropic";
|
|
2
2
|
import { streamText, Output } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, getDefaultTimeout, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LanguageModelV1 } from "ai";
|
|
2
|
-
import { BaseProvider } from "../core/
|
|
2
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
5
|
export declare class AzureOpenAIProvider extends BaseProvider {
|
|
6
6
|
private apiKey;
|
|
7
7
|
private resourceName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAzure } from "@ai-sdk/azure";
|
|
2
2
|
import { streamText } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { validateApiKey, createAzureAPIKeyConfig, createAzureEndpointConfig, } from "../utils/providerConfig.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
export class AzureOpenAIProvider extends BaseProvider {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Google AI Studio provider implementation using BaseProvider
|
|
8
8
|
* Migrated from original GoogleAIStudio class to new factory pattern
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
|
2
2
|
import { streamText, Output } from "ai";
|
|
3
3
|
import { GoogleAIModels } from "../core/types.js";
|
|
4
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
import { createTimeoutController, TimeoutError, getDefaultTimeout, } from "../utils/timeout.js";
|
|
7
7
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
8
|
-
import { createProxyFetch } from "../proxy/
|
|
8
|
+
import { createProxyFetch } from "../proxy/proxyFetch.js";
|
|
9
9
|
// Environment variable setup
|
|
10
10
|
if (!process.env.GOOGLE_GENERATIVE_AI_API_KEY &&
|
|
11
11
|
process.env.GOOGLE_AI_API_KEY) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* Google Vertex AI Provider v2 - BaseProvider Implementation
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVertex, } from "@ai-sdk/google-vertex";
|
|
2
2
|
import { streamText, Output } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, getDefaultTimeout, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType, ZodTypeDef } from "zod";
|
|
2
2
|
import { type Schema, type LanguageModelV1 } from "ai";
|
|
3
3
|
import type { AIProviderName } from "../core/types.js";
|
|
4
|
-
import type { StreamOptions, StreamResult } from "../types/
|
|
5
|
-
import { BaseProvider } from "../core/
|
|
4
|
+
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
|
|
5
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
6
6
|
/**
|
|
7
7
|
* HuggingFace Provider - BaseProvider Implementation
|
|
8
8
|
* Using AI SDK with HuggingFace's OpenAI-compatible endpoint
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createOpenAI } from "@ai-sdk/openai";
|
|
2
2
|
import { streamText, Output } from "ai";
|
|
3
|
-
import { BaseProvider } from "../core/
|
|
3
|
+
import { BaseProvider } from "../core/baseProvider.js";
|
|
4
4
|
import { logger } from "../utils/logger.js";
|
|
5
5
|
import { createTimeoutController, TimeoutError, getDefaultTimeout, } from "../utils/timeout.js";
|
|
6
6
|
import { DEFAULT_MAX_TOKENS } from "../core/constants.js";
|