Files
deepagents/libs/code/tests
Mason Daugherty acc3d33f35 feat(code): confirm model switches with large context (#5829)
`deepagents-code` now warns before switching models with large active
contexts; configure `warnings.model_switch_token_threshold` (default
`100000`, `0` disables).

<img width="648" height="298" alt="Screenshot"
src="https://github.com/user-attachments/assets/6fbd0d6d-882b-4d80-a422-05bc1a4bc0f4"
/>

---

Require explicit confirmation before user-initiated model switches when
the active thread exceeds a configurable context-token threshold,
reducing accidental cache loss and context-limit surprises.

Made by [Open
SWE](https://openswe.vercel.app/agents/62d82b6f-f2f2-5c88-9467-ba9e99d2382e)

## References
- Plan:
https://openswe.vercel.app/agents/62d82b6f-f2f2-5c88-9467-ba9e99d2382e/plan

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-25 22:32:56 -04:00
..

Deep Agents Code Tests

API Keys

Required

  • ANTHROPIC_API_KEY - Required for integration tests that use Anthropic models

Optional

  • LANGSMITH_API_KEY - Enables LangSmith tracing for test runs