Commit Graph

6855 Commits

Author SHA1 Message Date
Shubham Naik
f3799fe4ee Shub/let 6883 users can create a feed [LET-6883] (#8432)
* chore: pdu

* chore: pdu

* chore: delete/disable

* chore: delete/disable

* chore: pdu

* chore: pdu

* chore: pdu

* chore: pdu

* chore: pdu

* chore: pdu

* chore: merge

* chore: merge

* cha

* chore: hotfix for convo id
2026-01-12 10:57:49 -08:00
Sarah Wooders
96cf24264c fix: avoid 'NoneType' object has no attribute 'name' error (#8407) 2026-01-12 10:57:49 -08:00
cthomas
b8e7c14f16 feat: enable optimized json response parsing (#8436) 2026-01-12 10:57:49 -08:00
cthomas
8adb88e7ea feat: set task name in safe_create_task (#8433) 2026-01-12 10:57:49 -08:00
github-actions[bot]
f2171447a8 fix: handle httpx.ReadError, WriteError, and ConnectError in LLM streaming clients (#8243)
Adds explicit handling for httpx network errors (ReadError, WriteError,
ConnectError) in AnthropicClient, OpenAIClient, and GoogleVertexClient.
These errors can occur during streaming when the connection is unexpectedly
closed while reading/writing data.

Maps these errors to LLMConnectionError for consistent error handling.

Fixes #8221 (and duplicate #8156)

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-12 10:57:49 -08:00
Kian Jones
e60e8ed670 chore: bump wait_for_server from 30 to 60 seconds (#8435)
bump 30 to 60 seconds
2026-01-12 10:57:49 -08:00
github-actions[bot]
b559bf8403 fix: handle missing tool_call_id in Anthropic message conversion (#8381)
* fix: handle missing tool_call_id in Anthropic message conversion

- Add null check for self.tool_returns before iterating
- Fall back to message's tool_call_id when tool_return.tool_call_id is None
- Improve error message to show actual tool name from message.name
- Only raise error if no valid tool_call_id is available from either source

This fixes the error "Anthropic API requires tool_use_id to be set" that
occurs when a ToolReturn object in the database doesn't have tool_call_id
set, by using the message-level tool_call_id as a fallback.

Fixes #8379

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-Authored-By: Letta <noreply@letta.com>

* fix: restrict tool_call_id fallback to single tool returns

The message-level `self.tool_call_id` is set to the first tool return's ID
for legacy compatibility. For parallel tool calls with multiple tool_returns,
using this as a fallback would incorrectly assign the first tool return's ID
to all subsequent returns missing their own ID.

This change:
- Only allows the fallback when there's exactly one tool return
- For multiple tool returns, each must have its own ID or raise an error
- Adds tool return index to error messages for better debugging

Co-authored-by: Kian Jones <kianjones9@users.noreply.github.com>

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

---------

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-12 10:57:49 -08:00
Christina Tong
d2e19bbc05 chore: conversation id filter to list_messages [LET-6875] (#8406)
* chore: add default conversation id filter to list_messages

* fix filter

* update comment
2026-01-12 10:57:48 -08:00
github-actions[bot]
05ec02e384 fix: handle Anthropic 413 request_too_large as ContextWindowExceededError (#8424)
The Anthropic API returns a 413 status code with error type `request_too_large`
when the request payload exceeds the maximum allowed size. This error should
be converted to `ContextWindowExceededError` so the system can handle it
appropriately (e.g., by summarizing the conversation to reduce context size).

Changes:
- Added `request_too_large` and `request exceeds the maximum size` to the
  early string-based error detection in `handle_llm_error`
- Added specific handling for HTTP 413 status code in the `APIStatusError`
  handler
- Added tests to verify the new error handling behavior

Fixes: #8422

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-12 10:57:48 -08:00
github-actions[bot]
adbc47ddc9 fix: downgrade McpError logging from warning to debug level (#8371)
MCP errors from external servers (e.g., "The specified key does not exist")
are user-facing issues, not system errors. Downgrading the log level from
warning to debug prevents these expected failures from triggering production
alerts in Datadog/Sentry.

Fixes #8370

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-12 10:57:48 -08:00
Kian Jones
4d31cecd00 feat: add custom version of ddtrace which supports anthropic (#8419)
* add built custom version of ddtrace

* trigger CI

* add linux-aarch54
2026-01-12 10:57:48 -08:00
Ari Webb
754e750cc5 feat: add conversation_id filter to list runs [LET-6865] (#8404)
feat: add conversation_id filter to list runs
2026-01-12 10:57:48 -08:00
Sarah Wooders
6fddcc0c57 fix: fix agent loop (#8401) 2026-01-12 10:57:48 -08:00
Kian Jones
55fecab485 Revert "fix: update temporalio min version to 1.11.0 for versioning_behavior support" (#8399)
Revert "fix: update temporalio min version to 1.11.0 for versioning_behavior …"

This reverts commit 53e477f158bc16f1f51c9a6c2af5e6c83133effb.
2026-01-12 10:57:48 -08:00
github-actions[bot]
8648eaf8fe fix: update temporalio min version to 1.11.0 for versioning_behavior support (#8397)
The code uses versioning_behavior parameter in start_workflow() and
execute_workflow() calls, which was only added in temporalio SDK 1.11.0.
The previous min version (1.8.0) caused TypeError in production.

Fixes #8396

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
Charles Packer
ed6284cedb feat: Add conversation_id filtering to message endpoints (#8324)
* feat: Add conversation_id filtering to message list and search endpoints

Add optional conversation_id parameter to filter messages by conversation:
- client.agents.messages.list
- client.messages.list
- client.messages.search

Changes:
- Added conversation_id field to MessageSearchRequest and SearchAllMessagesRequest schemas
- Added conversation_id filtering to list_messages in message_manager.py
- Updated get_agent_recall_async and get_all_messages_recall_async in server.py
- Added conversation_id query parameter to router endpoints
- Updated Turbopuffer client to support conversation_id filtering in searches

Fixes #8320

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Charles Packer <cpacker@users.noreply.github.com>

* add conversation_id to message and tpuf

* default messages filter for backward compatibility

* add test and auto gen

* fix integration test

* fix test

* update test

---------

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Charles Packer <cpacker@users.noreply.github.com>
Co-authored-by: christinatong01 <christina@letta.com>
2026-01-12 10:57:48 -08:00
jnjpng
737d6e2550 fix: remove noisy sync log and fix timeout type (#8392)
base
2026-01-12 10:57:48 -08:00
cthomas
1d360cc239 feat: dump thread state on event loop hang (#8388) 2026-01-12 10:57:48 -08:00
cthomas
a775bbfdf2 feat: offload llama index init logic (#8387) 2026-01-12 10:57:48 -08:00
Shubham Naik
6e64b59d8a chore: add scheduled message api to docs (#8348)
* chore: add scheudled message api o dogs

* chore: udpate api

* chore: clarification

* chore: clarification

* chore: clarification

* chore: next
2026-01-12 10:57:48 -08:00
jnjpng
4cb037f28e fix: async decrypt environment variable on create agent (#8367)
* base

* comment
2026-01-12 10:57:48 -08:00
jnjpng
d55fd69b7b chore: add comment and test for changing PBKDF2 iteration count (#8366)
base
2026-01-12 10:57:48 -08:00
jnjpng
b68e4e74f9 fix: replace cryptography with hashlib for encryption key derivation (#8364)
base
2026-01-12 10:57:48 -08:00
cthomas
cc975b5d15 fix: reuse db session when loading pending approval (#8363) 2026-01-12 10:57:48 -08:00
cthomas
9b359418d0 feat: add pending approval field on agent state (#8361)
* feat: add pending approval field on agent state

* test failures
2026-01-12 10:57:48 -08:00
Ari Webb
956e7783ad feat: add ids to archival memory search [LET-6642] (#8355)
* feat: add id to archival memory search tool

* stage api
2026-01-12 10:57:48 -08:00
jnjpng
4ee267a57c chore: add warning logs for sync model validate fallback for agent environment variables (#8362)
base
2026-01-12 10:57:48 -08:00
cthomas
f87c607115 fix: add encrypted placeholder constant (#8354) 2026-01-12 10:57:48 -08:00
Shubham Naik
a40bacd9c6 feat: add /v1/metadata/user [LET-6845] (#8349)
* feat: add /v1/metadata/user

* feat: add /v1/metadata/user

* chore: udpate style

* chore: udpate style

* chore: rebuild
2026-01-12 10:57:48 -08:00
cthomas
5857b97c7f fix: unbound local variable (#8346) 2026-01-12 10:57:48 -08:00
cthomas
3a5ace33b6 fix: nonetype not subscriptable (#8345) 2026-01-12 10:57:48 -08:00
cthomas
51a68d1250 feat: move more decrypt callsites outside db session (#8342) 2026-01-12 10:57:48 -08:00
jnjpng
ccfd3d1432 fix: asyncify encrypt on write (#8339)
* base

* update

* import
2026-01-12 10:57:48 -08:00
Shubham Naik
350436c0cc Shub/let 6820 add the migrator between legacy project to default project [LET-6820] (#8300)
* chore

* chore; udpate secrets

* chore: remove sleeptime templates

* chore: remove sleeptime templates

* Update apps/web/src/lib/client/components/ADEPage/ADEHeader/ADEHeader.tsx

Co-authored-by: datadog-official[bot] <214633350+datadog-official[bot]@users.noreply.github.com>

* Update apps/web/src/lib/client/components/ADEPage/ADEHeader/LegacyMigrationModal/LegacyMigrationModal.tsx

Co-authored-by: datadog-official[bot] <214633350+datadog-official[bot]@users.noreply.github.com>

---------

Co-authored-by: datadog-official[bot] <214633350+datadog-official[bot]@users.noreply.github.com>
2026-01-12 10:57:48 -08:00
cthomas
a54513c343 feat: move decryption outside db session (#8323)
* feat: move decryption outside db session

* fix pydantic error
2026-01-12 10:57:48 -08:00
cthomas
485fe9d1b2 fix: set task name earlier for logging (#8333) 2026-01-12 10:57:48 -08:00
Sarah Wooders
02700cdae2 fix: add byok handle testing (#8331)
* fix: patch byok agent creation

* match original logic

* fix: add testing for byok handle
2026-01-12 10:57:48 -08:00
Sarah Wooders
bca99c3bbf fix: patch byok agent creation (#8329)
* fix: patch byok agent creation

* match original logic
2026-01-12 10:57:48 -08:00
cthomas
8da7a08861 feat: add more granular logging for event loop (#8318) 2026-01-12 10:57:48 -08:00
jnjpng
febe6efaac fix: allow upserting empty secret object to delete agent secrets (#8316)
base
2026-01-12 10:57:48 -08:00
Sarah Wooders
4e1473c6dc fix: patch sleeptime agent (#8315) 2026-01-12 10:57:48 -08:00
Sarah Wooders
18a1a16bf4 Revert "feat: add message_types filter to list messages endpoint" (#8314)
Revert "feat: add message_types filter to list messages endpoint (#8280)"

This reverts commit e7ac5df721ec4b3e663dd30239f590ee16bb8630.
2026-01-12 10:57:48 -08:00
Ari Webb
02f3e3f3b9 fix: fix providers and models persistence (#8302) 2026-01-12 10:57:48 -08:00
jnjpng
e56c5c5b49 fix: global sandbox environment variables not injected on tool execution (#8310)
* base

* test
2026-01-12 10:57:48 -08:00
Charles Packer
e57adc0a6e chore: mark agent.messages.stream endpoint as deprecated (#8227) 2026-01-12 10:57:48 -08:00
Cameron
7c44375cce feat: add message_types filter to list messages endpoint (#8280)
* feat: add message_types filter to list messages endpoint

Add the ability to filter messages by type when listing message history
via GET /v1/agents/{agent_id}/messages. This brings parity with the
create message endpoint which already supports include_return_message_types.

Changes:
- Add message_types query parameter to list_messages endpoint in agents.py
- Add message_types parameter to get_agent_recall_async in server.py
- Filter messages by message_type after LettaMessage conversion
- Add test for message_types filtering

Closes #8277

Written by Cameron ◯ Letta Code

> "Simplicity is the ultimate sophistication." - Leonardo da Vinci

🐙 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* chore: regenerate OpenAPI spec and SDK for message_types filter

🐧 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

Written by Cameron ◯ Letta Code

"The only way to do great work is to love what you do." - Steve Jobs

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
Sarah Wooders
87d920782f feat: add conversation and conversation_messages tables for concurrent messaging (#8182) 2026-01-12 10:57:48 -08:00
cthomas
c66b852978 feat: add more data to event loop logging (#8299) 2026-01-12 10:57:48 -08:00
cthomas
1b25154c39 fix: unbounded gather for agents listing (#8297)
* fix: unbounded gather for agents listing

* more callsites
2026-01-12 10:57:48 -08:00
cthomas
3aaab90b4c feat: use bounded concurrency for decryption (#8296) 2026-01-12 10:57:48 -08:00