create-langgraph-app 1.3.0 → 1.4.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/README.md CHANGED
@@ -11,7 +11,7 @@ npx create-langgraph-app
11
11
  ## What it does
12
12
 
13
13
  1. Asks for your project name
14
- 2. Lets you pick an LLM provider (OpenAI, Anthropic, Google, Groq, Ollama)
14
+ 2. Lets you pick an LLM provider (OpenAI, Anthropic, Google, Groq, DeepSeek, Ollama)
15
15
  3. Lets you select which agent patterns to include:
16
16
  - **Supervisor** — central coordinator + worker agents
17
17
  - **Swarm** — peer-to-peer agent handoffs
package/dist/create.js CHANGED
@@ -52,6 +52,7 @@ const PROVIDERS = {
52
52
  google: { envKey: "GOOGLE_API_KEY", defaultModel: "gemini-2.0-flash" },
53
53
  groq: { envKey: "GROQ_API_KEY", defaultModel: "llama-3.3-70b-versatile" },
54
54
  ollama: { envKey: "", defaultModel: "llama3.2" },
55
+ deepseek: { envKey: "DEEPSEEK_API_KEY", defaultModel: "deepseek-v4-flash" },
55
56
  };
56
57
  function generateEnv(config) {
57
58
  const prov = PROVIDERS[config.provider];
@@ -67,7 +68,9 @@ function generateEnv(config) {
67
68
  else {
68
69
  lines.push(`# No API key needed for ${config.provider}`);
69
70
  }
70
- lines.push(``, `# Model (optional — defaults to ${prov.defaultModel})`, `# LLM_MODEL=${prov.defaultModel}`, `LLM_TEMPERATURE=0`, ``, `PORT=3000`, ``, `# LangSmith tracing (optional)`, `# LANGCHAIN_TRACING_V2=true`, `# LANGSMITH_API_KEY=`, `# LANGSMITH_PROJECT=${config.name}`);
71
+ lines.push(``, `# Model (optional — defaults to ${prov.defaultModel})`, `# LLM_MODEL=${prov.defaultModel}`, `LLM_TEMPERATURE=0`, ``, ...(config.provider === "deepseek"
72
+ ? [`# DeepSeek reasoning mode (optional — "disabled" | "enabled")`, `# DEEPSEEK_THINKING=disabled`, ``]
73
+ : []), `PORT=3000`, ``, `# LangSmith tracing (optional)`, `# LANGCHAIN_TRACING_V2=true`, `# LANGSMITH_API_KEY=`, `# LANGSMITH_PROJECT=${config.name}`);
71
74
  return lines.join("\n") + "\n";
72
75
  }
73
76
  function generatePackageJson(config) {
@@ -90,6 +93,7 @@ function generatePackageJson(config) {
90
93
  google: "@langchain/google-genai",
91
94
  groq: "@langchain/groq",
92
95
  ollama: "@langchain/ollama",
96
+ deepseek: "@langchain/deepseek",
93
97
  };
94
98
  deps[provPkg[config.provider]] = "latest";
95
99
  const pkg = {
@@ -133,7 +137,7 @@ function generateTsConfig() {
133
137
  function generateEnvConfig(config) {
134
138
  return `import "dotenv/config";
135
139
 
136
- const VALID_PROVIDERS = ["openai", "anthropic", "google", "groq", "ollama"] as const;
140
+ const VALID_PROVIDERS = ["openai", "anthropic", "google", "groq", "ollama", "deepseek"] as const;
137
141
  export type LlmProvider = (typeof VALID_PROVIDERS)[number];
138
142
 
139
143
  function resolveProvider(): LlmProvider {
@@ -150,6 +154,7 @@ const API_KEY_MAP: Record<LlmProvider, string> = {
150
154
  google: "GOOGLE_API_KEY",
151
155
  groq: "GROQ_API_KEY",
152
156
  ollama: "",
157
+ deepseek: "DEEPSEEK_API_KEY",
153
158
  };
154
159
 
155
160
  export const LLM_PROVIDER = resolveProvider();
@@ -162,6 +167,9 @@ if (requiredKey && !process.env[requiredKey]) {
162
167
 
163
168
  export const LLM_MODEL = process.env.LLM_MODEL || undefined;
164
169
  export const LLM_TEMPERATURE = Number(process.env.LLM_TEMPERATURE ?? 0);
170
+ // Uses || rather than ?? so an empty DEEPSEEK_THINKING= in .env falls back
171
+ // to "disabled" instead of sending an invalid thinking type to the API.
172
+ export const DEEPSEEK_THINKING = process.env.DEEPSEEK_THINKING || "disabled";
165
173
  export const PORT = Number(process.env.PORT ?? 3000);
166
174
  `;
167
175
  }
@@ -173,11 +181,15 @@ const PROVIDER_LLM = {
173
181
  google: { pkg: "@langchain/google-genai", className: "ChatGoogleGenerativeAI", modelArg: "model", defaultModel: "gemini-2.0-flash" },
174
182
  groq: { pkg: "@langchain/groq", className: "ChatGroq", modelArg: "model", defaultModel: "llama-3.3-70b-versatile" },
175
183
  ollama: { pkg: "@langchain/ollama", className: "ChatOllama", modelArg: "model", defaultModel: "llama3.2" },
184
+ deepseek: { pkg: "@langchain/deepseek", className: "ChatDeepSeek", modelArg: "model", defaultModel: "deepseek-v4-flash", extraArgs: 'modelKwargs: { thinking: { type: DEEPSEEK_THINKING } }' },
176
185
  };
177
186
  function generateLlmConfig(config) {
178
187
  const p = PROVIDER_LLM[config.provider] ?? PROVIDER_LLM.openai;
188
+ const envImports = config.provider === "deepseek"
189
+ ? "LLM_MODEL, LLM_TEMPERATURE, DEEPSEEK_THINKING"
190
+ : "LLM_MODEL, LLM_TEMPERATURE";
179
191
  return `import type { BaseChatModel } from "@langchain/core/language_models/chat_models";
180
- import { LLM_MODEL, LLM_TEMPERATURE } from "./env";
192
+ import { ${envImports} } from "./env";
181
193
 
182
194
  const DEFAULT_MODEL = "${p.defaultModel}";
183
195
 
@@ -191,7 +203,7 @@ async function createLlm(opts: LlmOptions = {}): Promise<BaseChatModel> {
191
203
  const temperature = opts.temperature ?? LLM_TEMPERATURE;
192
204
 
193
205
  const { ${p.className} } = await import("${p.pkg}");
194
- return new ${p.className}({ ${p.modelArg}: model, temperature });
206
+ return new ${p.className}({ ${p.modelArg}: model, temperature${p.extraArgs ? `, ${p.extraArgs}` : ""} });
195
207
  }
196
208
 
197
209
  let _default: Promise<BaseChatModel> | undefined;
@@ -984,6 +996,7 @@ async function main() {
984
996
  { value: "anthropic", label: "Anthropic (Claude Sonnet)" },
985
997
  { value: "google", label: "Google (Gemini 2.0 Flash)" },
986
998
  { value: "groq", label: "Groq (Llama 3.3 70B)" },
999
+ { value: "deepseek", label: "DeepSeek (deepseek-v4-flash)" },
987
1000
  { value: "ollama", label: "Ollama (local, no API key)" },
988
1001
  ]);
989
1002
  const patterns = await choose(rl, "Which patterns? (select multiple)", [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-langgraph-app",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Scaffold a new LangGraph multi-agent project in seconds",
5
5
  "type": "module",
6
6
  "bin": {