Commit Graph

6873 Commits

Author SHA1 Message Date
Kian Jones
2b29478c08 Kian/remove uv caching (#4903)
* remove enable cache

* trigger CI

* remove extra with paramters which I believe to be unecessary

* try installing uv manuallly to avoid post install step

* should be fixed by manually installing and not using the action

* remove comment to trigger
2026-01-19 15:43:57 -08:00
Charles Packer
265ec3b478 fix: update gh templates (#3155) 2026-01-18 13:50:17 -08:00
cthomas
67013ef1bb chore: bump version 0.16.2 (#3140) 2026-01-12 11:04:11 -08:00
Caren Thomas
a626dec278 uv lock 2026-01-12 11:00:12 -08:00
Ari Webb
6d859174c2 feat: make conversations throw http busy to stop race condition [LET-6842] (#8411)
* feat: make conversations throw http busy to stop race condition

* use redis lock instead

* move acquire lock into redis client, integration tests, move lock release into run manager

* fix tests, bug

* conditional import

* remove else

* better release

* run ci

* final reordering lock

* update tests

* wrong naming of lock holder token
2026-01-12 10:57:49 -08:00
jnjpng
59c2b19812 fix: remove sync model validator for env var (#8518)
* base

* import
2026-01-12 10:57:49 -08:00
cthomas
03a64993cf fix: make file reads async (#8513) 2026-01-12 10:57:49 -08:00
Ari Webb
cdca1a564f fix: conversation id not found in tpuf (#8469)
* fix: conversation id not found in tpuf

* add tests
2026-01-12 10:57:49 -08:00
cthomas
e964307f6a feat: add lazy=raise for passage-org relationship (#8482) 2026-01-12 10:57:49 -08:00
Sarah Wooders
0cbdf452fa fix: temporarily disable structured outputs for anthropic (#8491) 2026-01-12 10:57:49 -08:00
jnjpng
87e939deda feat: add fastmcp v2 client (#8457)
* base

* testing code

* update

* nit
2026-01-12 10:57:49 -08:00
Shubham Naik
c02f966ff1 chore: nah (#8479) 2026-01-12 10:57:49 -08:00
Christina Tong
318498bde3 feat: filter internal runs endpoint by conversation id [LET-6886] (#8437) 2026-01-12 10:57:49 -08:00
Kian Jones
d99195f19d fix: get prerelease in e2b pipeline (#8476)
* revert to public ddtrace

* latest pre-release version
2026-01-12 10:57:49 -08:00
Kian Jones
5cba41ca4e chore: temp revert to public ddtrace (#8462)
revert to public ddtrace
2026-01-12 10:57:49 -08:00
cthomas
938bb78afe fix: handle anthropic incorrect tool id bug (#8447) 2026-01-12 10:57:49 -08:00
jnjpng
dceed06f84 fix: set value on agent environment variable as pydantic obj (#8452)
base
2026-01-12 10:57:49 -08:00
jnjpng
28839f5180 fix: import cryptography default backend at top level (#8444)
* base

* comment
2026-01-12 10:57:49 -08:00
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