Commit Graph

21 Commits

Author SHA1 Message Date
Kian Jones
f5c4ab50f4 chore: add ty + pre-commit hook and repeal even more ruff rules (#9504)
* auto fixes

* auto fix pt2 and transitive deps and undefined var checking locals()

* manual fixes (ignored or letta-code fixed)

* fix circular import

* remove all ignores, add FastAPI rules and Ruff rules

* add ty and precommit

* ruff stuff

* ty check fixes

* ty check fixes pt 2

* error on invalid
2026-02-24 10:55:11 -08:00
Kian Jones
25d54dd896 chore: enable F821, F401, W293 (#9503)
* auto fixes

* auto fix pt2 and transitive deps and undefined var checking locals()

* manual fixes (ignored or letta-code fixed)

* fix circular import
2026-02-24 10:55:08 -08:00
Kian Jones
6f746c5225 fix(core): handle Anthropic overloaded errors and Unicode encoding issues (#9305)
* fix: handle Anthropic overloaded_error in streaming interfaces

* fix: handle Unicode surrogates in OpenAI requests

Sanitize Unicode surrogate pairs before sending requests to OpenAI API.
Surrogate pairs (U+D800-U+DFFF) are UTF-16 encoding artifacts that cause
UnicodeEncodeError when encoding to UTF-8.

Fixes Datadog error: 'utf-8' codec can't encode character '\ud83c' in
position 326605: surrogates not allowed

* fix: handle UnicodeEncodeError from lone Unicode surrogates in OpenAI requests

Improved sanitize_unicode_surrogates() to explicitly filter out lone
surrogate characters (U+D800 to U+DFFF) which are invalid in UTF-8.

Previous implementation used errors='ignore' which could still fail in
edge cases. New approach directly checks Unicode code points and removes
any surrogates before data reaches httpx encoding.

Also added sanitization to stream_async_responses() method which was
missing it.

Fixes: 'utf-8' codec can't encode character '\ud83c' in position X:
surrogates not allowed
2026-02-24 10:52:06 -08:00
jnjpng
df2e666ced test: skip deepwiki SSE MCP server test (#9218)
The deepwiki SSE MCP server is deprecated, so skip this test.

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

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:06 -08:00
Ari Webb
5c06918042 fix: don't need embedding model for self hosted [LET-7009] (#8935)
* fix: don't need embedding model for self hosted

* stage publish api

* passes tests

* add test

* remove unnecessary upgrades

* update revision order db migrations

* add timeout for ci
2026-01-29 12:44:04 -08:00
cthomas
9cdaf4b5a8 test: migrate mcp_tests to 1.0 sdk [LET-6326] (#6374)
test: migrate mcp_tests to 1.0 sdk
2025-11-26 14:39:39 -08:00
jnjpng
39a23e5960 fix: mcp schema generation test (#5608)
* base

* base

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:13:15 -07:00
jnjpng
b0c0c8752b feat: support anyOf for structured output tools [LET-5615] (#5556)
* base

* works?

* update tests

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:13:15 -07:00
jnjpng
31ba71de15 chore: skip invalid schema tool attach test (#5350)
skip

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:11:31 -07:00
Sarah Wooders
324933edd3 feat: exception handling middleware for sandbox_configs + identities + tools (#5143) 2025-10-07 17:50:50 -07:00
Sarah Wooders
e07a589796 chore: rm composio (#5151) 2025-10-07 17:50:49 -07:00
Kian Jones
b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00
Kian Jones
22f70ca07c chore: officially migrate to submodule (#4502)
* remove apps/core and apps/fern

* fix precommit

* add submodule updates in workflows

* submodule

* remove core tests

* update core revision

* Add submodules: true to all GitHub workflows

- Ensure all workflows can access git submodules
- Add submodules support to deployment, test, and CI workflows
- Fix YAML syntax issues in workflow files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* remove core-lint

* upgrade core with latest main of oss

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 12:45:53 -07:00
Charles Packer
507784f292 fix: try and patch the PATCH/update issue with MCP server URL [LET-3933]
* fix: patch update path

* autogenerate

* update

* update

---------

Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
Co-authored-by: Letta Bot <noreply@letta.com>
Co-authored-by: jnjpng <jin@letta.com>
2025-09-03 09:42:57 -07:00
Kian Jones
fecf6decfb chore: migrate to ruff (#4305)
* base requirements

* autofix

* Configure ruff for Python linting and formatting

- Set up minimal ruff configuration with basic checks (E, W, F, I)
- Add temporary ignores for common issues during migration
- Configure pre-commit hooks to use ruff with pass_filenames
- This enables gradual migration from black to ruff

* Delete sdj

* autofixed only

* migrate lint action

* more autofixed

* more fixes

* change precommit

* try changing the hook

* try this stuff
2025-08-29 11:11:19 -07:00
jnjpng
238dac2482 fix: test_mcp.py tests [LET-4075]
* fix tests

* update venv cleanup
2025-08-27 15:04:47 -07:00
jnjpng
a5e84cc80b feat: generate strict-compatible schema for MCP tools with optional fields
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-08-25 22:08:59 -07:00
jnjpng
74029acb0d fix: mcp schema generation and non-strict schema validation
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-08-22 15:45:33 -07:00
jnjpng
a2967ac497 fix: update mcp tool schema validation test
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-08-21 13:43:04 -07:00
Charles Packer
773a6452d1 fix: handle faulty schemas from bad mcp servers better
Co-authored-by: jnjpng <jin@letta.com>
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-08-15 16:08:52 -07:00
Andy Li
bb9a298d11 fix: imports for mcp tests 2025-08-15 15:01:46 -07:00