@juspay/neurolink 10.12.8 → 11.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.
Files changed (179) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/browser/neurolink.min.js +399 -401
  3. package/dist/cli/commands/setup.d.ts +16 -1
  4. package/dist/cli/commands/setup.js +141 -3
  5. package/dist/core/baseProvider.js +3 -3
  6. package/dist/core/dynamicModels.d.ts +1 -1
  7. package/dist/core/dynamicModels.js +1 -23
  8. package/dist/core/modelConfiguration.d.ts +1 -70
  9. package/dist/core/modelConfiguration.js +0 -303
  10. package/dist/core/modules/GenerationHandler.js +38 -16
  11. package/dist/core/modules/structuredOutputPolicy.d.ts +2 -2
  12. package/dist/core/modules/structuredOutputPolicy.js +2 -2
  13. package/dist/factories/providerFactory.d.ts +15 -0
  14. package/dist/factories/providerFactory.js +27 -39
  15. package/dist/factories/providerRegistry.js +2 -2
  16. package/dist/lib/core/baseProvider.js +3 -3
  17. package/dist/lib/core/dynamicModels.d.ts +1 -1
  18. package/dist/lib/core/dynamicModels.js +1 -23
  19. package/dist/lib/core/modelConfiguration.d.ts +1 -70
  20. package/dist/lib/core/modelConfiguration.js +0 -303
  21. package/dist/lib/core/modules/GenerationHandler.js +38 -16
  22. package/dist/lib/core/modules/structuredOutputPolicy.d.ts +2 -2
  23. package/dist/lib/core/modules/structuredOutputPolicy.js +2 -2
  24. package/dist/lib/factories/providerFactory.d.ts +15 -0
  25. package/dist/lib/factories/providerFactory.js +27 -39
  26. package/dist/lib/factories/providerRegistry.js +2 -2
  27. package/dist/lib/models/anthropicModels.d.ts +0 -7
  28. package/dist/lib/models/anthropicModels.js +0 -9
  29. package/dist/lib/neurolink.d.ts +15 -0
  30. package/dist/lib/neurolink.js +77 -44
  31. package/dist/lib/providers/anthropic/client.js +17 -1
  32. package/dist/lib/providers/anthropic/constants.d.ts +0 -1
  33. package/dist/lib/providers/anthropic/constants.js +0 -2
  34. package/dist/lib/providers/anthropic/index.d.ts +0 -1
  35. package/dist/lib/providers/anthropic/index.js +0 -1
  36. package/dist/lib/providers/googleAiStudio/index.d.ts +0 -1
  37. package/dist/lib/providers/googleAiStudio/index.js +0 -1
  38. package/dist/lib/providers/googleNativeGemini3/index.d.ts +0 -1
  39. package/dist/lib/providers/googleNativeGemini3/index.js +0 -1
  40. package/dist/lib/providers/googleVertex/client.d.ts +0 -51
  41. package/dist/lib/providers/googleVertex/client.js +0 -678
  42. package/dist/lib/providers/huggingFace/client.d.ts +1 -1
  43. package/dist/lib/providers/huggingFace/client.js +1 -1
  44. package/dist/lib/providers/huggingFace/index.d.ts +0 -1
  45. package/dist/lib/providers/huggingFace/index.js +0 -1
  46. package/dist/lib/providers/jina.d.ts +0 -1
  47. package/dist/lib/providers/jina.js +0 -1
  48. package/dist/lib/providers/litellm/index.d.ts +0 -2
  49. package/dist/lib/providers/litellm/index.js +0 -2
  50. package/dist/lib/providers/llamaCpp.d.ts +1 -0
  51. package/dist/lib/providers/llamaCpp.js +3 -0
  52. package/dist/lib/providers/lmStudio.js +3 -23
  53. package/dist/lib/providers/nvidiaNim/index.d.ts +0 -1
  54. package/dist/lib/providers/nvidiaNim/index.js +0 -1
  55. package/dist/lib/providers/ollama/client.js +1 -23
  56. package/dist/lib/providers/ollama/index.d.ts +0 -1
  57. package/dist/lib/providers/ollama/index.js +0 -1
  58. package/dist/lib/providers/openAI/index.d.ts +0 -2
  59. package/dist/lib/providers/openAI/index.js +0 -2
  60. package/dist/lib/providers/openRouter/utils.d.ts +0 -2
  61. package/dist/lib/providers/openRouter/utils.js +0 -12
  62. package/dist/lib/providers/openaiChatCompletionsBase.d.ts +9 -0
  63. package/dist/lib/providers/openaiChatCompletionsBase.js +33 -0
  64. package/dist/lib/providers/perplexity.d.ts +2 -1
  65. package/dist/lib/providers/perplexity.js +2 -1
  66. package/dist/lib/providers/replicate.d.ts +0 -1
  67. package/dist/lib/providers/replicate.js +22 -9
  68. package/dist/lib/providers/voyage.d.ts +0 -1
  69. package/dist/lib/providers/voyage.js +0 -1
  70. package/dist/lib/types/index.d.ts +0 -1
  71. package/dist/lib/types/index.js +0 -1
  72. package/dist/lib/types/providers.d.ts +2 -11
  73. package/dist/lib/types/utilities.d.ts +29 -0
  74. package/dist/lib/utils/json/coerce.d.ts +21 -1
  75. package/dist/lib/utils/json/coerce.js +148 -11
  76. package/dist/lib/utils/providerConfig.d.ts +0 -8
  77. package/dist/lib/utils/providerConfig.js +0 -37
  78. package/dist/lib/utils/providerUtils.js +1 -25
  79. package/dist/models/anthropicModels.d.ts +0 -7
  80. package/dist/models/anthropicModels.js +0 -9
  81. package/dist/neurolink.d.ts +15 -0
  82. package/dist/neurolink.js +77 -44
  83. package/dist/providers/anthropic/client.js +17 -1
  84. package/dist/providers/anthropic/constants.d.ts +0 -1
  85. package/dist/providers/anthropic/constants.js +0 -2
  86. package/dist/providers/anthropic/index.d.ts +0 -1
  87. package/dist/providers/anthropic/index.js +0 -1
  88. package/dist/providers/googleAiStudio/index.d.ts +0 -1
  89. package/dist/providers/googleAiStudio/index.js +0 -1
  90. package/dist/providers/googleNativeGemini3/index.d.ts +0 -1
  91. package/dist/providers/googleNativeGemini3/index.js +0 -1
  92. package/dist/providers/googleVertex/client.d.ts +0 -51
  93. package/dist/providers/googleVertex/client.js +0 -678
  94. package/dist/providers/huggingFace/client.d.ts +1 -1
  95. package/dist/providers/huggingFace/client.js +1 -1
  96. package/dist/providers/huggingFace/index.d.ts +0 -1
  97. package/dist/providers/huggingFace/index.js +0 -1
  98. package/dist/providers/jina.d.ts +0 -1
  99. package/dist/providers/jina.js +0 -1
  100. package/dist/providers/litellm/index.d.ts +0 -2
  101. package/dist/providers/litellm/index.js +0 -2
  102. package/dist/providers/llamaCpp.d.ts +1 -0
  103. package/dist/providers/llamaCpp.js +3 -0
  104. package/dist/providers/lmStudio.js +3 -23
  105. package/dist/providers/nvidiaNim/index.d.ts +0 -1
  106. package/dist/providers/nvidiaNim/index.js +0 -1
  107. package/dist/providers/ollama/client.js +1 -23
  108. package/dist/providers/ollama/index.d.ts +0 -1
  109. package/dist/providers/ollama/index.js +0 -1
  110. package/dist/providers/openAI/index.d.ts +0 -2
  111. package/dist/providers/openAI/index.js +0 -2
  112. package/dist/providers/openRouter/utils.d.ts +0 -2
  113. package/dist/providers/openRouter/utils.js +0 -12
  114. package/dist/providers/openaiChatCompletionsBase.d.ts +9 -0
  115. package/dist/providers/openaiChatCompletionsBase.js +33 -0
  116. package/dist/providers/perplexity.d.ts +2 -1
  117. package/dist/providers/perplexity.js +2 -1
  118. package/dist/providers/replicate.d.ts +0 -1
  119. package/dist/providers/replicate.js +22 -9
  120. package/dist/providers/voyage.d.ts +0 -1
  121. package/dist/providers/voyage.js +0 -1
  122. package/dist/types/index.d.ts +0 -1
  123. package/dist/types/index.js +0 -1
  124. package/dist/types/providers.d.ts +2 -11
  125. package/dist/types/utilities.d.ts +29 -0
  126. package/dist/utils/json/coerce.d.ts +21 -1
  127. package/dist/utils/json/coerce.js +148 -11
  128. package/dist/utils/providerConfig.d.ts +0 -8
  129. package/dist/utils/providerConfig.js +0 -37
  130. package/dist/utils/providerUtils.js +1 -25
  131. package/package.json +8 -6
  132. package/dist/lib/providers/anthropic/utils.d.ts +0 -7
  133. package/dist/lib/providers/anthropic/utils.js +0 -150
  134. package/dist/lib/providers/googleAiStudio/utils.d.ts +0 -2
  135. package/dist/lib/providers/googleAiStudio/utils.js +0 -19
  136. package/dist/lib/providers/googleNativeGemini3/constants.d.ts +0 -1
  137. package/dist/lib/providers/googleNativeGemini3/constants.js +0 -2
  138. package/dist/lib/providers/huggingFace/utils.d.ts +0 -2
  139. package/dist/lib/providers/huggingFace/utils.js +0 -8
  140. package/dist/lib/providers/index.d.ts +0 -33
  141. package/dist/lib/providers/index.js +0 -34
  142. package/dist/lib/providers/litellm/constants.d.ts +0 -1
  143. package/dist/lib/providers/litellm/constants.js +0 -3
  144. package/dist/lib/providers/litellm/utils.d.ts +0 -5
  145. package/dist/lib/providers/litellm/utils.js +0 -11
  146. package/dist/lib/providers/nvidiaNim/utils.d.ts +0 -9
  147. package/dist/lib/providers/nvidiaNim/utils.js +0 -101
  148. package/dist/lib/providers/ollama/utils.d.ts +0 -8
  149. package/dist/lib/providers/ollama/utils.js +0 -43
  150. package/dist/lib/providers/openAI/constants.d.ts +0 -1
  151. package/dist/lib/providers/openAI/constants.js +0 -3
  152. package/dist/lib/providers/openAI/utils.d.ts +0 -2
  153. package/dist/lib/providers/openAI/utils.js +0 -8
  154. package/dist/lib/types/universalProviderOptions.d.ts +0 -89
  155. package/dist/lib/types/universalProviderOptions.js +0 -55
  156. package/dist/providers/anthropic/utils.d.ts +0 -7
  157. package/dist/providers/anthropic/utils.js +0 -149
  158. package/dist/providers/googleAiStudio/utils.d.ts +0 -2
  159. package/dist/providers/googleAiStudio/utils.js +0 -18
  160. package/dist/providers/googleNativeGemini3/constants.d.ts +0 -1
  161. package/dist/providers/googleNativeGemini3/constants.js +0 -1
  162. package/dist/providers/huggingFace/utils.d.ts +0 -2
  163. package/dist/providers/huggingFace/utils.js +0 -7
  164. package/dist/providers/index.d.ts +0 -33
  165. package/dist/providers/index.js +0 -33
  166. package/dist/providers/litellm/constants.d.ts +0 -1
  167. package/dist/providers/litellm/constants.js +0 -2
  168. package/dist/providers/litellm/utils.d.ts +0 -5
  169. package/dist/providers/litellm/utils.js +0 -10
  170. package/dist/providers/nvidiaNim/utils.d.ts +0 -9
  171. package/dist/providers/nvidiaNim/utils.js +0 -100
  172. package/dist/providers/ollama/utils.d.ts +0 -8
  173. package/dist/providers/ollama/utils.js +0 -42
  174. package/dist/providers/openAI/constants.d.ts +0 -1
  175. package/dist/providers/openAI/constants.js +0 -2
  176. package/dist/providers/openAI/utils.d.ts +0 -2
  177. package/dist/providers/openAI/utils.js +0 -7
  178. package/dist/types/universalProviderOptions.d.ts +0 -89
  179. package/dist/types/universalProviderOptions.js +0 -54
@@ -74,7 +74,7 @@ import { CircuitBreaker, ERROR_CODES, ErrorFactory, isAbortError, isRetriableErr
74
74
  import { hasLifecycleErrorFired, markLifecycleErrorFired, } from "./utils/lifecycleCallbacks.js";
75
75
  import { resolveLifecycleTimeoutMs } from "./utils/lifecycleTimeout.js";
76
76
  import { cloneOptionsForCallIsolation } from "./utils/cloneOptions.js";
77
- import { coerceJsonToSchema } from "./utils/json/coerce.js";
77
+ import { coerceJsonToSchema, recoverScalarRoot, schemaAccepts, } from "./utils/json/coerce.js";
78
78
  // Factory processing imports
79
79
  import { createCleanStreamOptions, enhanceTextGenerationOptions, processFactoryOptions, processStreamingFactoryOptions, validateFactoryConfig, } from "./utils/factoryProcessing.js";
80
80
  import { logger, mcpLogger } from "./utils/logger.js";
@@ -4058,52 +4058,85 @@ Current user's request: ${currentInput}`;
4058
4058
  }
4059
4059
  return textOptions;
4060
4060
  }
4061
- finalizeGenerateRequestResult(params) {
4062
- const { generateSpan, options, textOptions, textResult, factoryResult, originalPrompt, startTime, } = params;
4063
- // Provider-agnostic JSON coercion for schema requests. Structured-output
4064
- // enforcement makes valid JSON the overwhelming case; for every other
4065
- // provider pathincluding generate() overrides (Vertex, Anthropic,
4066
- // Bedrock, Google AI Studio) object/array roots are recovered here via
4067
- // balanced-scan + jsonrepair and scalar JSON roots via plain JSON.parse,
4068
- // with the parsed value exposed as `structuredData`. If nothing
4069
- // JSON-shaped is recoverable (pure prose), the raw text is returned,
4070
- // `structuredData` stays undefined, and a WARN makes the case observable.
4071
- // Runs BEFORE the end-of-generation emits below so event consumers see
4072
- // the same coerced content/structuredData the caller receives.
4073
- if (textOptions.schema &&
4074
- textResult.structuredData === undefined &&
4075
- typeof textResult.content === "string") {
4076
- const coerced = coerceJsonToSchema(textResult.content, textOptions.schema);
4077
- if (coerced) {
4078
- textResult.content = coerced.content;
4079
- textResult.structuredData = coerced.structuredData;
4080
- if (coerced.repaired) {
4081
- textResult.jsonRepaired = true;
4082
- }
4083
- if (coerced.truncated) {
4084
- textResult.jsonTruncated = true;
4085
- }
4061
+ /**
4062
+ * Provider-agnostic JSON recovery for schema requests. Structured-output
4063
+ * enforcement makes valid JSON the overwhelming case; for every other
4064
+ * provider path including generate() overrides (Vertex, Anthropic,
4065
+ * Bedrock, Google AI Studio) object/array roots are recovered here via
4066
+ * balanced-scan + jsonrepair and scalar JSON roots via plain JSON.parse,
4067
+ * with the parsed value exposed as `structuredData`. If nothing JSON-shaped
4068
+ * is recoverable (pure prose), the raw text is returned, `structuredData`
4069
+ * stays undefined, and a WARN makes the case observable.
4070
+ *
4071
+ * Mutates `textResult` in place, and must run BEFORE the end-of-generation
4072
+ * emits so event consumers see the same content/structuredData the caller
4073
+ * receives.
4074
+ */
4075
+ recoverStructuredData(textResult, schema) {
4076
+ // A provider path that produced its own `structuredData` normally owns it.
4077
+ // The one exception is a STRING the caller's schema rejects: that is the
4078
+ // raw completion leaking through as structured output (the shape a
4079
+ // truncated response degrades to), so re-run recovery over the text rather
4080
+ // than handing back a value the declared schema forbids.
4081
+ const structuredIsRejectedString = typeof textResult.structuredData === "string" &&
4082
+ !schemaAccepts(schema, textResult.structuredData);
4083
+ if (!schema ||
4084
+ (textResult.structuredData !== undefined &&
4085
+ !structuredIsRejectedString) ||
4086
+ typeof textResult.content !== "string") {
4087
+ return;
4088
+ }
4089
+ if (structuredIsRejectedString) {
4090
+ textResult.structuredData = undefined;
4091
+ }
4092
+ const coerced = coerceJsonToSchema(textResult.content, schema);
4093
+ if (coerced) {
4094
+ textResult.content = coerced.content;
4095
+ textResult.structuredData = coerced.structuredData;
4096
+ if (coerced.repaired) {
4097
+ textResult.jsonRepaired = true;
4086
4098
  }
4087
- else {
4088
- try {
4089
- const scalar = JSON.parse(textResult.content);
4090
- if (scalar === "") {
4091
- // A JSON-encoded empty string is an EMPTY completion, not a
4092
- // recovered scalar — normalize to a true empty so callers'
4093
- // empty-response handling fires instead of a literal '""'
4094
- // reaching the user. `structuredData` stays undefined.
4095
- textResult.content = "";
4096
- logger.warn("[NeuroLink] schema requested but the model returned an empty JSON string; normalizing to empty content", { provider: textResult.provider, model: textResult.model });
4097
- }
4098
- else if (scalar !== null && scalar !== undefined) {
4099
- textResult.structuredData = scalar;
4100
- }
4101
- }
4102
- catch {
4103
- logger.warn("[NeuroLink] schema requested but no JSON could be recovered from model output; returning raw text", { provider: textResult.provider, model: textResult.model });
4104
- }
4099
+ if (coerced.truncated) {
4100
+ textResult.jsonTruncated = true;
4105
4101
  }
4102
+ return;
4106
4103
  }
4104
+ const scalar = recoverScalarRoot(textResult.content, schema);
4105
+ switch (scalar.kind) {
4106
+ case "empty":
4107
+ // A JSON-encoded empty string is an EMPTY completion, not a recovered
4108
+ // scalar — normalize to a true empty so callers' empty-response
4109
+ // handling fires instead of a literal '""' reaching the user.
4110
+ // `structuredData` stays undefined.
4111
+ textResult.content = "";
4112
+ logger.warn("[NeuroLink] schema requested but the model returned an empty JSON string; normalizing to empty content", { provider: textResult.provider, model: textResult.model });
4113
+ break;
4114
+ case "accepted":
4115
+ // Only publish a scalar root the caller's schema actually accepts.
4116
+ // Under an OBJECT schema a recovered string is the raw completion in
4117
+ // disguise — the shape a truncated response degrades to — and exposing
4118
+ // it hands the caller a `structuredData` that violates the schema they
4119
+ // passed.
4120
+ textResult.structuredData = scalar.value;
4121
+ break;
4122
+ case "rejected":
4123
+ logger.warn("[NeuroLink] recovered a JSON scalar the requested schema rejects; leaving structuredData unset", {
4124
+ provider: textResult.provider,
4125
+ model: textResult.model,
4126
+ scalarType: typeof scalar.value,
4127
+ });
4128
+ break;
4129
+ case "nullish":
4130
+ // JSON null/undefined — no structured value to publish.
4131
+ break;
4132
+ case "not-json":
4133
+ logger.warn("[NeuroLink] schema requested but no JSON could be recovered from model output; returning raw text", { provider: textResult.provider, model: textResult.model });
4134
+ break;
4135
+ }
4136
+ }
4137
+ finalizeGenerateRequestResult(params) {
4138
+ const { generateSpan, options, textOptions, textResult, factoryResult, originalPrompt, startTime, } = params;
4139
+ this.recoverStructuredData(textResult, textOptions.schema);
4107
4140
  // Surface truncation when a schema was requested: either the provider
4108
4141
  // reported finishReason="length" or the recovered JSON came from an
4109
4142
  // unclosed span. Either way `structuredData` may be incomplete — warn at
@@ -1206,6 +1206,9 @@ export class AnthropicProvider extends BaseProvider {
1206
1206
  }
1207
1207
  const content = [];
1208
1208
  let finalResultText;
1209
+ // Text emitted in forced-json mode, kept only as a fallback (see below).
1210
+ const jsonModeText = [];
1211
+ let jsonToolAnswered = false;
1209
1212
  for (const block of response.content) {
1210
1213
  if (block.type === "thinking") {
1211
1214
  content.push({ type: "reasoning", text: block.thinking });
@@ -1213,13 +1216,17 @@ export class AnthropicProvider extends BaseProvider {
1213
1216
  else if (block.type === "text") {
1214
1217
  // In forced-json mode the payload arrives via the tool input, not
1215
1218
  // text — pass text through only in normal mode.
1216
- if (!jsonTool) {
1219
+ if (jsonTool) {
1220
+ jsonModeText.push(block.text);
1221
+ }
1222
+ else {
1217
1223
  content.push({ type: "text", text: block.text });
1218
1224
  }
1219
1225
  }
1220
1226
  else if (block.type === "tool_use") {
1221
1227
  if (jsonTool && block.name === jsonTool) {
1222
1228
  // Unwrap the synthetic tool call back into text JSON.
1229
+ jsonToolAnswered = true;
1223
1230
  content.push({
1224
1231
  type: "text",
1225
1232
  text: stringifyToolInput(block.input),
@@ -1241,6 +1248,15 @@ export class AnthropicProvider extends BaseProvider {
1241
1248
  }
1242
1249
  }
1243
1250
  }
1251
+ // Forced-json mode normally drops text blocks because the payload rides
1252
+ // in the synthetic tool's input. But when the response is cut short
1253
+ // (stop_reason "max_tokens") the tool call can be missing entirely, and
1254
+ // dropping the text would leave an EMPTY completion with nothing for
1255
+ // coerceJsonToSchema to recover. Fall back to the text so a partial
1256
+ // object can still be salvaged and flagged truncated.
1257
+ if (jsonTool && !jsonToolAnswered && jsonModeText.length > 0) {
1258
+ content.push({ type: "text", text: jsonModeText.join("") });
1259
+ }
1244
1260
  // final_result is terminal — parity with the native Claude-on-Vertex
1245
1261
  // and Gemini loops, which break out of the tool loop the moment it
1246
1262
  // arrives. Reasoning blocks are kept; any prose preamble and any tool
@@ -1,4 +1,3 @@
1
1
  export declare const ANTHROPIC_BETA_HEADERS: {
2
2
  "anthropic-beta": string;
3
3
  };
4
- export declare const streamTracer: import("@opentelemetry/api").Tracer;
@@ -1,9 +1,7 @@
1
- import { trace } from "@opentelemetry/api";
2
1
  export const ANTHROPIC_BETA_HEADERS = {
3
2
  "anthropic-beta": [
4
3
  "claude-code-20250219",
5
4
  "fine-grained-tool-streaming-2025-05-14",
6
5
  ].join(","),
7
6
  };
8
- export const streamTracer = trace.getTracer("neurolink.provider.anthropic");
9
7
  //# sourceMappingURL=constants.js.map
@@ -1,3 +1,2 @@
1
1
  export * from "./client.js";
2
2
  export * from "./constants.js";
3
- export * from "./utils.js";
@@ -1,4 +1,3 @@
1
1
  export * from "./client.js";
2
2
  export * from "./constants.js";
3
- export * from "./utils.js";
4
3
  //# sourceMappingURL=index.js.map
@@ -1,2 +1 @@
1
1
  export * from "./client.js";
2
- export * from "./utils.js";
@@ -1,3 +1,2 @@
1
1
  export * from "./client.js";
2
- export * from "./utils.js";
3
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1 @@
1
- export * from "./constants.js";
2
1
  export * from "./utils.js";
@@ -1,3 +1,2 @@
1
- export * from "./constants.js";
2
1
  export * from "./utils.js";
3
2
  //# sourceMappingURL=index.js.map
@@ -70,28 +70,6 @@ export declare class GoogleVertexProvider extends BaseProvider {
70
70
  * Creates fresh model instances for each request
71
71
  */
72
72
  protected getAISDKModel(): Promise<LanguageModel>;
73
- /**
74
- * Initialize model creation tracking
75
- */
76
- private initializeModelCreationLogging;
77
- /**
78
- * Check if model is Anthropic-based and attempt creation
79
- */
80
- private attemptAnthropicModelCreation;
81
- /**
82
- * Create Google Vertex model with comprehensive logging and error handling
83
- */
84
- private createGoogleVertexModel;
85
- /**
86
- * @deprecated This method is no longer used. All models now use native SDKs.
87
- */
88
- private createVertexInstance;
89
- /**
90
- * Gets the appropriate model instance (Google or Anthropic)
91
- * Uses dual provider architecture for proper model routing
92
- * Creates fresh instances for each request to ensure proper authentication
93
- */
94
- private getModel;
95
73
  /**
96
74
  * Validate stream options
97
75
  */
@@ -320,35 +298,6 @@ export declare class GoogleVertexProvider extends BaseProvider {
320
298
  * @returns Promise<boolean> indicating if Anthropic support is available
321
299
  */
322
300
  hasAnthropicSupport(): Promise<boolean>;
323
- /**
324
- * @deprecated This method is no longer used. Claude models now use native @anthropic-ai/vertex-sdk
325
- * via executeNativeAnthropicStream and executeNativeAnthropicGenerate.
326
- */
327
- createAnthropicModel(_modelName: string): Promise<LanguageModel | null>;
328
- /**
329
- * Validate Vertex AI authentication configuration
330
- */
331
- private validateVertexAuthentication;
332
- /**
333
- * Validate Vertex AI project configuration
334
- */
335
- private validateVertexProjectConfiguration;
336
- /**
337
- * Check if the specified region supports Anthropic models
338
- */
339
- private checkVertexRegionalSupport;
340
- /**
341
- * Validate Anthropic model name format and availability
342
- */
343
- private validateAnthropicModelName;
344
- /**
345
- * Analyze Anthropic model creation errors for detailed troubleshooting
346
- */
347
- private analyzeAnthropicCreationError;
348
- /**
349
- * Get detailed troubleshooting steps based on error analysis
350
- */
351
- private getAnthropicTroubleshootingSteps;
352
301
  /**
353
302
  * Register a tool with the AI provider
354
303
  * @param name The name of the tool