Commit Graph

6784 Commits

Author SHA1 Message Date
cthomas
6c19192413 fix: validation failure on blocks retrieve [LET-6709] (#8146)
* fix: validation failure on blocks retrieve

* api sync
2026-01-12 10:57:47 -08:00
cthomas
b83e7c1cf9 fix: sanitize null bytes before persisting in db [LET-6710] (#8147)
fix: sanitize null bytes before persisting in db
2026-01-12 10:57:47 -08:00
Shubham Naik
c192600e8c Feeds v0 (#8034)
* feeds v0

* wow

* chore: add functions

* chore: add functions

* chore: add apis

* chore: add apis

* chore: add apis

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: regenerate api

* chore: regenerate api

* chore: regenerate api

* chore: regenerate api

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
Co-authored-by: Shubham Naik <shubhamnaik@Shubhams-MacBook-Pro.local>
2026-01-12 10:57:47 -08:00
jnjpng
7e8088adc5 chore: add tracing for request middleware (#8142)
* base

* update

* more
2026-01-12 10:57:47 -08:00
Sarah Wooders
190dbfa93b fix: remove error thrown if parallel tool calling and tool rules are both enabled (#8143) 2026-01-12 10:57:47 -08:00
cthomas
e904330dde fix: step metrics db timeouts [LET-6697] (#8136)
fix: step metrics db timeouts
2026-01-12 10:57:47 -08:00
cthomas
a7b3f469ac fix: more user friendly error for tpuf namespace not found [LET-6707] (#8141)
fix: more user friendly error for tpuf namespace not found
2026-01-12 10:57:47 -08:00
cthomas
442d9accae fix: return 404 for file not found [LET-6698] (#8137)
fix: return 404 for file not found
2026-01-12 10:57:47 -08:00
cthomas
d489d8837f fix: broken pagination for objects with missing created_at [LET-6699] (#8139)
fix: broken pagination for objects with missing created_at
2026-01-12 10:57:47 -08:00
cthomas
39dc1d9736 fix: image fetching timeouts [LET-6700] (#8140)
fix: image fetching timeouts
2026-01-12 10:57:47 -08:00
github-actions[bot]
21df642a43 fix: add URL validation for MCP server URLs to prevent malformed protocol errors (#8079)
Adds field validators to CreateSSEMCPServer, CreateStreamableHTTPMCPServer,
and their Update counterparts to validate that server_url fields:
- Start with 'http://' or 'https://'
- Have a valid host

This prevents errors like 'httpx.UnsupportedProtocol: Request URL has an
unsupported protocol 'hthttps://'' caused by user input typos.

Fixes #8078

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

Co-authored-by: github-actions[bot] <41898282+github-actions[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:47 -08:00
jnjpng
700409d943 fix: sanitize null bytes test (#8135)
base
2026-01-12 10:57:47 -08:00
cthomas
0dd1df306a fix: concurrent block update rollback [LET-6695] (#8133)
fix: concurrent block update rollback
2026-01-12 10:57:47 -08:00
jnjpng
fa9a98351d fix: add redis tracing (#8132)
base
2026-01-12 10:57:47 -08:00
cthomas
b6535b7590 fix: agent-runs relationship load causing timeouts [LET-6694] (#8129)
fix: agent-runs relationship load causing timeouts
2026-01-12 10:57:47 -08:00
cthomas
b08e55c0ee fix: sleeptime db timeout [LET-6692] (#8126)
fix: sleeptime db timeout
2026-01-12 10:57:47 -08:00
github-actions[bot]
dbdd1a40e4 fix: sanitize null bytes to prevent PostgreSQL CharacterNotInRepertoireError (#8015)
This fixes the asyncpg.exceptions.CharacterNotInRepertoireError that occurs
when tool returns contain null bytes (0x00), which PostgreSQL TEXT columns
reject in UTF-8 encoding.

Changes:
- Add sanitize_null_bytes() function to recursively remove null bytes from strings
- Update json_dumps() to sanitize data before serialization
- Apply sanitization in converters.py for tool_calls, tool_returns, approvals, and message_content
- Add comprehensive unit tests

Fixes #8014

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

Co-authored-by: github-actions[bot] <41898282+github-actions[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:47 -08:00
Sarah Wooders
d5decc2a27 fix: persist streaming errors in run metadata (#8062) 2026-01-12 10:57:47 -08:00
Sarah Wooders
c5c633285b fix: pass in stop_reason for sleeptime loop (#8086) 2026-01-12 10:57:47 -08:00
Sarah Wooders
0722877423 fix: validate parallel tool calls with tool rules at create/update time (#8060)
* fix: validate parallel tool calls with tool rules at create/update time

Move validation from runtime to agent create/update time for better UX.
Add client-side enforcement to truncate parallel tool calls when disabled
(handles providers like Gemini that ignore the setting).

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

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

* update apis

* undo

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:47 -08:00
Sarah Wooders
28b2f8b03f fix: just api generation (#8063) 2026-01-12 10:57:47 -08:00
cthomas
6f1ead8ba9 fix: remove sync api calls for byok (#8031)
* fix: remove sync api calls for byok

* fix import
2026-01-12 10:57:47 -08:00
cthomas
21add90a16 fix: remove sync sleep (#8032) 2026-01-12 10:57:47 -08:00
cthomas
0c25fad450 fix: unexpected kwarg argument_name (#8028) 2026-01-12 10:57:47 -08:00
Sarah Wooders
6bf5c50f42 fix: fix summarization for claude max plans (#8020)
Co-authored-by: Letta Bot <jinjpeng@gmail.com>
2026-01-12 10:57:44 -08:00
cthomas
0b97eec56b feat: collect metadata in feedback endpoint (#8000) 2026-01-12 10:57:20 -08:00
Sarah Wooders
b4b07ceecc feat: add glm 4.7 (#8005) 2026-01-12 10:57:20 -08:00
Sarah Wooders
6eccd2025d fix: dont return 500 from cancellation endpoint (#8004) 2026-01-12 10:57:20 -08:00
Sarah Wooders
256dfb31cf fix: attempt to fix /context again (#7946) 2026-01-12 10:57:20 -08:00
Sarah Wooders
f512d13bc9 feat: test token counting (#7943) 2026-01-12 10:57:20 -08:00
Ari Webb
0a372b2540 fix: enable zai streaming (#7755) 2026-01-12 10:57:20 -08:00
cthomas
c51d7f049c feat: add model id to telem (#7679)
* feat: add model id to telem

* api sync
2026-01-12 10:57:20 -08:00
Ari Webb
3c4cc878ab fix: update glm context windows (#7675) 2026-01-12 10:57:20 -08:00
Kevin Lin
a1dfedfb0b feat: Add structured outputs for Anthropic (#7495) 2026-01-12 10:57:19 -08:00
Sarah Wooders
acd8dd7bcf feat: make embedding_config optional on agent creation (#7553)
* feat: make embedding_config optional on agent creation

- Remove requirement for embedding_config in agent creation
- Add EmbeddingConfigRequiredError for operations that need embeddings
- Add null checks in sleeptime agent creation, passage insert, archive creation
- Register new error in app.py exception handlers

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

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

* chore: update API schemas for optional embedding_config

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

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

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:19 -08:00
jnjpng
a1fb295e69 feat: enable claude pro max plan for letta code (#7663)
* base

* more

* rev
2026-01-12 10:57:19 -08:00
Cameron
3e15159d83 fix: prevent human block overwrite when skills block missing (#7656)
* fix: prevent human block overwrite when skills block missing

**Bug**: When connecting to agents created before skills blocks were
standard, the human block gets overwritten with skills directory content.

**Root cause**: agent_manager.py:1893-1898 had `block = block` (no-op).
When skills block doesn't exist, loop variable ends as last block in
core_memory (often "human"), then updates that wrong block.

**Fix**: Use `matched_block` variable to properly track found block.
Now correctly raises NoResultFound when block label doesn't exist.

**Impact**: Affects pre-December 2025 agents missing skills blocks.

Written by Cameron ◯ Letta Code

"The best error message is the one that never shows up." - Thomas Fuchs

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

* fix: use correct method name in block update test

Change get_block_by_label_async to get_block_with_label_async in test.

Written by Cameron ◯ Letta Code

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

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:19 -08:00
cthomas
063228ba58 feat: letta code telemetry events (#7662)
* feat: letta code telemetry events

* api sync
2026-01-12 10:57:19 -08:00
Ari Webb
cd45212acb feat: add zai provider support (#7626)
* feat: add zai provider support

* add zai_api_key secret to deploy-core

* add to justfile

* add testing, provider integration skill

* enable zai key

* fix zai test

* clean up skill a little

* small changes
2026-01-12 10:57:19 -08:00
Ari Webb
cb283373b7 feat: add retrieve_file endpoint to get file content [LET-6188] (#7485)
* feat: add retrieve_file endpoint to get file content

* Restore package-lock.json to main
2026-01-12 10:57:19 -08:00
Kian Jones
61da937841 feat: enable differentiation between providers using the openai client (#7539)
enable differentiation between providers using the llm client base class
2026-01-12 10:57:19 -08:00
cthomas
9a95a8f976 fix: duplicate session commit in step logging (#7512)
* fix: duplicate session commit in step logging

* update all callsites
2026-01-12 10:57:19 -08:00
Ari Webb
4d8d9757aa feat: add request-id for steps [LET-6587] (#7349)
* feat: add request-id for steps

* order revisions correctly

* stage publish api
2026-01-12 10:57:19 -08:00
Kian Jones
3c0502454c feat: add llm obs patch (#7449)
* add llm obs patch

* add staging vars
2026-01-12 10:57:19 -08:00
Sarah Wooders
c675c289ef feat: add more summary logging (#7405) 2026-01-12 10:57:19 -08:00
Sarah Wooders
a7639a53eb fix: fix summary message return for compaction (#7402) 2026-01-12 10:57:19 -08:00
Shubham Naik
477b51fda1 chore: fix casing omg (#7379)
* chore: fix

* chore: fix

* chore: fix

* chore: merge

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2026-01-12 10:57:19 -08:00
Sarah Wooders
3f3e54d937 feat: add compaction response (#7389) 2026-01-12 10:57:19 -08:00
Sarah Wooders
f9f1b1e82d feat: allow for configuration compaction and return message delta (#7378) 2026-01-12 10:57:19 -08:00
Kian Jones
82e5d70807 fix: prevent empty reasoning messages in streaming interfaces (#7207)
* fix: prevent empty reasoning messages in streaming interfaces

Prevents empty "Thinking..." indicators from appearing in clients by
filtering out reasoning messages with no content at the source.

Changes:
- Gemini: Don't emit ReasoningMessage when only thought_signature exists
- Gemini: Only emit reasoning content if text is non-empty
- Anthropic: Don't emit ReasoningMessage for BetaSignatureDelta
- Anthropic: Only emit reasoning content if thinking text is non-empty

This fixes the issue where providers send signature metadata before
actual thinking content, causing empty reasoning blocks to appear
in the UI after responses complete.

Affects: Gemini reasoning, Anthropic extended thinking

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

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

* fix: handle Anthropic thinking signature correctly

- Only include 'signature' in Anthropic message payload if it is not None (fixes BadRequestError).
- Capture and attach 'signature' to ReasoningMessage in streaming interface.

* fix(anthropic): attach signature to last reasoning message in stream

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:19 -08:00