[GH-ISSUE #56] Type Error for model param after upgrade to 1.1.0 #16

Closed
opened 2026-02-16 06:16:49 -05:00 by yindo · 2 comments
Owner

Originally created by @josh-axy on GitHub (Nov 14, 2025).
Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/56

So I use ChatDeepSeek to create deepAgent, but it doesn't work in the new version.

// Create LLM instance
const llm = new ChatDeepSeek({
    apiKey,
    model: endpointId,
    streaming: true,
    temperature: 0.3,
    configuration: {
      baseURL: arkBaseUrl,
    },
  });

// Create the DeepAgent
const agent = createDeepAgent({
  model: llm,
  tools: mcpTools, // Only MCP tools, sub-agents are separate
  subagents, // Sub-agents passed directly
  systemPrompt: systemInstructions,
});

The error I met:

TS2322: Type ChatDeepSeek is not assignable to type string | LanguageModelLike | undefined
Type ChatDeepSeek is not assignable to type LanguageModelLike
Property lc_runnable is protected but type Runnable<RunInput, RunOutput, CallOptions> is not a class derived from Runnable<RunInput, RunOutput, CallOptions>
Image

My package.json dependencies:

{
  "dependencies": {
    "@langchain/core": "^1.0.5",
    "@langchain/deepseek": "^1.0.1",
    "@langchain/langgraph": "^1.0.2",
    "@langchain/openai": "^1.1.1",
    "@next-ai/fornax-langchain": "^1.0.0",
    "deepagents": "^1.1.0",
    "dotenv": "^17.2.1",
    "jose": "^6.1.0",
    "koa": "^2.15.3",
    "koa-bodyparser": "^4.4.1",
    "openai": "^4.0.0",
    "prettier": "^3.6.2",
    "redis": "^4.6.5",
    "uuid": "^9.0.0"
  },
  "devDependencies": {
    "@types/graceful-fs": "^4.1.9",
    "@types/jest": "^29.5.12",
    "@types/koa": "^2.15.0",
    "@types/koa-bodyparser": "^4.3.12",
    "@types/node": "^20.12.7",
    "@types/uuid": "^9.0.0",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.2",
    "ts-node": "^10.9.0",
    "typescript": "^5.0.4"
  },
  "resolutions": {
    "@langchain/core": "^1.0.5"
  }
}
Originally created by @josh-axy on GitHub (Nov 14, 2025). Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/56 So I use ChatDeepSeek to create deepAgent, but it doesn't work in the new version. ``` typescript // Create LLM instance const llm = new ChatDeepSeek({ apiKey, model: endpointId, streaming: true, temperature: 0.3, configuration: { baseURL: arkBaseUrl, }, }); // Create the DeepAgent const agent = createDeepAgent({ model: llm, tools: mcpTools, // Only MCP tools, sub-agents are separate subagents, // Sub-agents passed directly systemPrompt: systemInstructions, }); ``` The error I met: ``` TS2322: Type ChatDeepSeek is not assignable to type string | LanguageModelLike | undefined Type ChatDeepSeek is not assignable to type LanguageModelLike Property lc_runnable is protected but type Runnable<RunInput, RunOutput, CallOptions> is not a class derived from Runnable<RunInput, RunOutput, CallOptions> ``` <img width="1918" height="844" alt="Image" src="https://github.com/user-attachments/assets/ac578de5-3bc4-4269-98ec-5c00962f0593" /> My package.json dependencies: ```json { "dependencies": { "@langchain/core": "^1.0.5", "@langchain/deepseek": "^1.0.1", "@langchain/langgraph": "^1.0.2", "@langchain/openai": "^1.1.1", "@next-ai/fornax-langchain": "^1.0.0", "deepagents": "^1.1.0", "dotenv": "^17.2.1", "jose": "^6.1.0", "koa": "^2.15.3", "koa-bodyparser": "^4.4.1", "openai": "^4.0.0", "prettier": "^3.6.2", "redis": "^4.6.5", "uuid": "^9.0.0" }, "devDependencies": { "@types/graceful-fs": "^4.1.9", "@types/jest": "^29.5.12", "@types/koa": "^2.15.0", "@types/koa-bodyparser": "^4.3.12", "@types/node": "^20.12.7", "@types/uuid": "^9.0.0", "jest": "^29.7.0", "ts-jest": "^29.1.2", "ts-node": "^10.9.0", "typescript": "^5.0.4" }, "resolutions": { "@langchain/core": "^1.0.5" } } ```
yindo closed this issue 2026-02-16 06:16:49 -05:00
Author
Owner

@christian-bromann commented on GitHub (Jan 3, 2026):

@josh-axy thanks for raising the issue. We have changed the type to BaseLanguageModel, can you double check if this works now for you?

@christian-bromann commented on GitHub (Jan 3, 2026): @josh-axy thanks for raising the issue. We have changed the type to `BaseLanguageModel`, can you double check if this works now for you?
Author
Owner

@christian-bromann commented on GitHub (Jan 23, 2026):

Closing due to inactivity. Happy to re-open if the issue still persists.

@christian-bromann commented on GitHub (Jan 23, 2026): Closing due to inactivity. Happy to re-open if the issue still persists.
yindo changed title from Type Error for model param after upgrade to 1.1.0 to [GH-ISSUE #56] Type Error for model param after upgrade to 1.1.0 2026-06-05 17:20:58 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#16