Commit Graph

53 Commits

Author SHA1 Message Date
Kian Jones
745dd1e124 fix(core): reject empty API keys in Bearer auth headers (#9350)
Empty or None API keys resulted in "Bearer " header values which cause
httpx.LocalProtocolError. Use truthiness checks instead of `is not None`
to also reject empty strings before constructing Authorization headers.

Datadog: https://us5.datadoghq.com/error-tracking/issue/ad3c1e38-d557-11f0-a65d-da7ad0900000

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

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:07 -08:00
Ari Webb
85ee7ed7b4 fix: anthropic tool sanitation (#9310) 2026-02-24 10:52:06 -08:00
github-actions[bot]
5fbf8f93e2 fix: add explicit timeouts to httpx clients to prevent ReadTimeout errors (#8538)
This commit addresses the httpx.ReadTimeout error detected in production
by adding explicit timeout configurations to several httpx client usages:

1. MCP SSE client: Pass mcp_connect_to_server_timeout (30s) to sse_client()
2. MCP StreamableHTTP client: Pass mcp_connect_to_server_timeout (30s) to streamablehttp_client()
3. OpenAI model list API: Add 30s timeout with 10s connect timeout
4. Google AI model list/details API: Add 30s timeout with 10s connect timeout

Previously, these httpx clients were created without explicit timeouts,
which could cause ReadTimeout errors when remote servers are slow to respond.

Fixes #8073

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@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-19 15:54:38 -08:00
cthomas
9b5067bed9 fix: remove unused sync code (#8613)
* chore: remove unused sync code

* chore: remove deprecated sync Google AI functions

Removes unused sync functions that used httpx.Client (blocking):
- google_ai_get_model_details()
- google_ai_get_model_context_window()
- GoogleGeminiProvider.get_model_context_window()

All code now uses async versions with httpx.AsyncClient.

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

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

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-19 15:54:37 -08:00
Ari Webb
48cc73175b feat: parallel tool calling for openai non streaming [LET-4593] (#5773)
* first hack

* clean up

* first implementation working

* revert package-lock

* remove openai test

* error throw

* typo

* Update integration_test_send_message_v2.py

* Update integration_test_send_message_v2.py

* refine test

* Only make changes for openai non streaming

* Add tests

---------

Co-authored-by: Ari Webb <ari@letta.com>
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-11-13 15:36:14 -08:00
Kian Jones
704d3b2d79 chore: refactor not to use warnings.warn (#5730)
* refactor not to use warnings.warn

* temp circular import fix maybe unecessary/bnad

* fix Deprecation warning

* fix deprecation warning and mcp thing?

* revert changes to mcp server test

* fix deprecation warning
2025-10-24 15:14:31 -07:00
Kian Jones
161c70f11c chore: add logger calls instead of prints (#5720)
add logger calls instead of prints
2025-10-24 15:14:21 -07:00
Charles Packer
9edc7f4d64 feat: add OpenRouterProvider (#4848)
* feat: init add of openrouter provider, doesn't work bc no key pass and no header pass

* fix: working
2025-10-07 17:50:45 -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
cthomas
1edcc13778 feat: support filtering out messages when converting to openai dict (#4337)
* feat: support filtering out messages when converting to openai dict

* fix imports
2025-09-01 12:48:45 -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
Sarah Wooders
8417a7f54d fix: patch openai byok (#3966) 2025-08-16 13:41:48 -07:00
Andy Li
58081e3cea feat: support for providers 2025-07-22 16:09:50 -07:00
Andy Li
d2252f2953 feat: otel metrics and expanded collecting (#2647)
(passed tests in last run)
2025-06-05 17:20:14 -07:00
Shangyin Tan
2199d8fdda fix: do not pass temperature to request if model is oai reasoning model (#2189)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2025-05-24 21:34:18 -07:00
Matthew Zhou
87dae5d6e7 feat: Asyncify openai model listing (#2281) 2025-05-20 15:24:00 -07:00
Kevin Lin
075b4cb519 fix: patch lmstudio qwen (#2155) 2025-05-13 14:42:00 -07:00
cthomas
bafc47c655 test: add additional new agent messaging tests (#2120) 2025-05-12 15:58:52 -07:00
Charles Packer
fce28c73e3 fix: make togetherai nebius xai etc usable via the openaiprovider (#1981)
Co-authored-by: Kevin Lin <klin5061@gmail.com>
Co-authored-by: Kevin Lin <kl2806@columbia.edu>
2025-05-09 10:50:55 -07:00
jnjpng
f62a06f04d feat: add endpoint to test connection to llm provider (#2032)
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-05-07 16:26:55 -07:00
Charles Packer
326bbc5a04 fix: patch o1 support (#1978) 2025-05-02 14:54:25 -07:00
cthomas
c4f603d7b6 feat: always add user id to openai requests (#1969) 2025-04-30 23:23:01 -07:00
cthomas
4016201087 feat: use new model-proxy in production (#1908) 2025-04-30 15:20:54 -07:00
cthomas
6609372676 feat: add letta-free endpoint constant (#1907) 2025-04-27 12:57:06 -07:00
cthomas
0a1022b910 fix: pydantic serializer warning datetime -> int (#1701) 2025-04-23 14:53:58 -07:00
Charles Packer
9f12d71916 fix: patch o-series (#1699) 2025-04-23 13:41:34 -07:00
Kevin Lin
29c5ef4881 feat: add reasoning effort in LLMConfig (#1697)
Co-authored-by: cpacker <packercharles@gmail.com>
2025-04-13 17:44:10 -07:00
Kevin Lin
1453ba47c3 fix: patch o1 and o3-mini (#1657) 2025-04-10 13:50:38 -07:00
cthomas
ca602f7a73 fix: use message idx instead of chunk idx for streaming (#1587) 2025-04-06 11:23:19 -07:00
cthomas
7fcebf0ce3 feat: add otid field for message idempotency (#1556) 2025-04-04 08:43:01 -07:00
cthomas
1a5c08c62b test: add more robust multi-agent testing (#1444) 2025-03-28 14:21:54 -07:00
cthomas
d8966d8c7e feat: add content parts to message schema (#1273)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-03-13 18:43:32 -07:00
cthomas
84132d63f5 feat: log request data to otel (#1149) 2025-03-03 11:51:05 -08:00
Charles Packer
72dac99e92 feat: add xAI / Grok support (#1122)
Co-authored-by: Shubham Naik <shub@letta.com>
2025-02-26 11:02:42 -08:00
Matthew Zhou
afbb5af30b feat: Reverse inner thoughts for chat completions endpoint (#1081) 2025-02-20 12:30:34 -08:00
Sarah Wooders
81ba0a6567 docs: add documentation for DeepSeek integration (#1069) 2025-02-20 11:58:08 -08:00
Kevin Lin
7173d5cefb feat: support deepseek models (#821)
Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
Co-authored-by: Shubham Naik <shub@memgpt.ai>
Co-authored-by: Shubham Naik <shub@letta.com>
2025-02-18 15:28:01 -08:00
Kevin Lin
e858871ccb fix: add max tokens (#795)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2025-02-10 20:28:03 -08:00
Matthew Zhou
308e6ce215 fix: Fix trailing } in chat completions interface (#842) 2025-02-10 15:45:13 -08:00
Matthew Zhou
3a5be5aa38 fix: Disable default OpenAI retry behavior (#856) 2025-01-30 11:37:47 -08:00
Charles Packer
c9361680fb fix: fix fat finger push to main (#849) 2025-01-29 18:02:27 -08:00
cpacker
f3c512f4a1 fix: pass in a dummy key to openai python client if it doesn't exist at inference time 2025-01-29 17:55:54 -08:00
Matthew Zhou
9c5033e0bd feat: Use Async OpenAI client to prevent blocking server thread (#811) 2025-01-28 14:02:33 -08:00
Charles Packer
0225ca5381 fix: fix lmstudio docker (#788) 2025-01-26 19:19:31 -08:00
Charles Packer
d54e4fd4ac feat: lmstudio support via /v1/chat/completions proxy route (#724) 2025-01-24 15:08:23 -08:00
Kevin Lin
8a8ce46763 chore: add temperature to LLMConfig (#735)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2025-01-23 15:55:47 -08:00
Matthew Zhou
3ed216673e feat: Use official OpenAI client (#752) 2025-01-23 15:45:06 -08:00
Charles Packer
7d04fe2cb9 fix: patch gpt4omini bug (#619) 2025-01-12 17:34:25 -08:00
Caren Thomas
fd8961c39e run black, add isort config to pyproject.toml 2024-12-26 19:43:11 -08:00