[PR #460] feat: centralize default model constant with env var override #481

Open
opened 2026-06-05 17:23:21 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/460
Author: @open-swe[bot]
Created: 4/14/2026
Status: 🔄 Open

Base: mainHead: open-swe/dfd00850-86b7-5f87-2c10-3bd968b1c75e


📝 Commits (2)

  • b69c449 feat: centralize default model into DEFAULT_MODEL constant with DEEPAGENTS_DEFAULT_MODEL env var override
  • 697c8de feat: deprecate implicit model default, matching deepagents-py pattern

📊 Changes

5 files changed (+29 additions, -9 deletions)

View changed files

📝 libs/acp/src/cli.ts (+7 -7)
📝 libs/deepagents/src/agent.ts (+4 -1)
libs/deepagents/src/defaults.ts (+16 -0)
📝 libs/deepagents/src/index.ts (+1 -0)
📝 libs/deepagents/src/types.ts (+1 -1)

📄 Description

Description

Introduces a single source of truth for the default model (DEFAULT_MODEL) in libs/deepagents/src/defaults.ts, replacing scattered hardcoded model strings. The default can now be overridden at runtime via the DEEPAGENTS_DEFAULT_MODEL environment variable. Also fixes the stale ACP CLI default (was claude-sonnet-4-5-20250929, now uses the centralized constant) and updates stale JSDoc.

Test Plan

  • Verify createDeepAgent() with no model param uses DEFAULT_MODEL
  • Verify DEEPAGENTS_DEFAULT_MODEL=openai:gpt-4.1 npx deepagents-acp picks up the env var override
  • Verify ACP CLI --help shows the correct default model

Opened collaboratively by Hunter Lovell and open-swe.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/460 **Author:** [@open-swe[bot]](https://github.com/apps/open-swe) **Created:** 4/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `open-swe/dfd00850-86b7-5f87-2c10-3bd968b1c75e` --- ### 📝 Commits (2) - [`b69c449`](https://github.com/langchain-ai/deepagentsjs/commit/b69c449064b13038c5f521049a1647198647f8b0) feat: centralize default model into DEFAULT_MODEL constant with DEEPAGENTS_DEFAULT_MODEL env var override - [`697c8de`](https://github.com/langchain-ai/deepagentsjs/commit/697c8def40f0c1abbc29a6342832a00f9c8ecb74) feat: deprecate implicit model default, matching deepagents-py pattern ### 📊 Changes **5 files changed** (+29 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `libs/acp/src/cli.ts` (+7 -7) 📝 `libs/deepagents/src/agent.ts` (+4 -1) ➕ `libs/deepagents/src/defaults.ts` (+16 -0) 📝 `libs/deepagents/src/index.ts` (+1 -0) 📝 `libs/deepagents/src/types.ts` (+1 -1) </details> ### 📄 Description ## Description Introduces a single source of truth for the default model (`DEFAULT_MODEL`) in `libs/deepagents/src/defaults.ts`, replacing scattered hardcoded model strings. The default can now be overridden at runtime via the `DEEPAGENTS_DEFAULT_MODEL` environment variable. Also fixes the stale ACP CLI default (was `claude-sonnet-4-5-20250929`, now uses the centralized constant) and updates stale JSDoc. ## Test Plan - [ ] Verify `createDeepAgent()` with no model param uses `DEFAULT_MODEL` - [ ] Verify `DEEPAGENTS_DEFAULT_MODEL=openai:gpt-4.1 npx deepagents-acp` picks up the env var override - [ ] Verify ACP CLI `--help` shows the correct default model _Opened collaboratively by Hunter Lovell and open-swe._ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:23:21 -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#481