@blaxel/langgraph 0.2.59-preview.42 → 0.2.59

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/esm/model.js CHANGED
@@ -54,12 +54,12 @@ export const blModel = async (model, options) => {
54
54
  throw new Error(`Model ${model} not found`);
55
55
  }
56
56
  await authenticate();
57
- const type = modelData?.spec?.runtime?.type || "openai";
57
+ const type = modelData.spec.runtime?.type || "openai";
58
58
  try {
59
59
  if (type === "gemini") {
60
60
  return new AuthenticatedChatGoogleGenerativeAI({
61
61
  apiKey: settings.token,
62
- model: modelData?.spec?.runtime?.model,
62
+ model: modelData.spec.runtime?.model,
63
63
  baseUrl: url,
64
64
  customHeaders: settings.headers,
65
65
  ...options,
@@ -68,7 +68,7 @@ export const blModel = async (model, options) => {
68
68
  else if (type === "mistral") {
69
69
  return new ChatOpenAI({
70
70
  apiKey: "replaced",
71
- model: modelData?.spec?.runtime?.model,
71
+ model: modelData.spec.runtime?.model,
72
72
  configuration: {
73
73
  baseURL: `${url}/v1`,
74
74
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -85,7 +85,7 @@ export const blModel = async (model, options) => {
85
85
  // @ts-ignore Error in langgraph
86
86
  return new ChatCohere({
87
87
  apiKey: "replaced",
88
- model: modelData?.spec?.runtime?.model,
88
+ model: modelData.spec.runtime?.model,
89
89
  client: new CohereClient({
90
90
  token: "replaced",
91
91
  environment: url,
@@ -98,7 +98,7 @@ export const blModel = async (model, options) => {
98
98
  // @ts-ignore Error in langgraph
99
99
  return new ChatDeepSeek({
100
100
  apiKey: "replaced",
101
- model: modelData?.spec?.runtime?.model,
101
+ model: modelData.spec.runtime?.model,
102
102
  configuration: {
103
103
  baseURL: `${url}/v1`,
104
104
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -111,7 +111,7 @@ export const blModel = async (model, options) => {
111
111
  // @ts-ignore Error in langgraph
112
112
  return new ChatAnthropic({
113
113
  anthropicApiUrl: url,
114
- model: modelData?.spec?.runtime?.model,
114
+ model: modelData.spec.runtime?.model,
115
115
  apiKey: "replaced",
116
116
  clientOptions: {
117
117
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -128,7 +128,7 @@ export const blModel = async (model, options) => {
128
128
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
129
129
  fetch: authenticatedFetch(),
130
130
  },
131
- model: modelData?.spec?.runtime?.model,
131
+ model: modelData.spec.runtime?.model,
132
132
  ...options,
133
133
  });
134
134
  }
@@ -136,7 +136,7 @@ export const blModel = async (model, options) => {
136
136
  // We don't use ChatCerebras because there is a problem with apiKey headers
137
137
  return new ChatOpenAI({
138
138
  apiKey: "replaced",
139
- model: modelData?.spec?.runtime?.model,
139
+ model: modelData.spec.runtime?.model,
140
140
  configuration: {
141
141
  baseURL: `${url}/v1`,
142
142
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -147,7 +147,7 @@ export const blModel = async (model, options) => {
147
147
  }
148
148
  return new ChatOpenAI({
149
149
  apiKey: "replaced",
150
- model: modelData?.spec?.runtime?.model,
150
+ model: modelData.spec.runtime?.model,
151
151
  configuration: {
152
152
  baseURL: `${url}/v1`,
153
153
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/langgraph",
3
- "version": "0.2.59-preview.42",
3
+ "version": "0.2.59",
4
4
  "description": "Blaxel SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",
@@ -53,7 +53,7 @@
53
53
  "langchain": "^1.0.6",
54
54
  "zod": "^3.24.3",
55
55
  "zod-to-json-schema": "^3.24.5",
56
- "@blaxel/core": "0.2.59-preview.42"
56
+ "@blaxel/core": "0.2.59"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@eslint/js": "^9.26.0",