* add regression test for dict content in AssistantMessage
Tests the fix for pydantic validation error when send_message tool
returns dict content like {'tofu': 1, 'mofu': 1, 'bofu': 1}.
The test verifies that dict content is properly serialized to JSON
string before creating AssistantMessage.
* improve type annotation for validate_function_response
Changed return type from Any to str | dict[str, Any] to match actual
behavior. This enables static type checkers (pyright, mypy) to catch
type mismatches like the AssistantMessage bug.
With proper type annotations, pyright would have caught:
error: Argument of type "str | dict[str, Any]" cannot be assigned
to parameter "content" of type "str"
This prevents future bugs where dict is passed to string-only fields.
* add regression test for dict content in AssistantMessage
Moved test into existing test_message_manager.py suite alongside other
message conversion tests.
Tests the fix for pydantic validation error when send_message tool
returns dict content like {'tofu': 1, 'mofu': 1, 'bofu': 1}.
The test verifies that dict content is properly serialized to JSON
string before creating AssistantMessage.
fix AssistantMessage validation error when content is dict
validate_function_response can return either a string or dict, but
AssistantMessage.content expects a string. When a tool returns a dict
like {'tofu': 1, 'mofu': 1, 'bofu': 1}, it needs to be JSON-serialized
before passing to AssistantMessage.
Fixes: pydantic_core._pydantic_core.ValidationError: 2 validation errors for AssistantMessage
- Add [IMAGE] placeholder when extracting user messages with image content blocks
- Allows LLM to know images were present in conversation history
- LLM can infer context from surrounding text and conversation flow
🐙 Generated with [Letta Code](https://letta.com)
Co-authored-by: Letta <noreply@letta.com>
- Add Letta memory capability notice in memory blocks prompt
- Fix duplicate message persistence by only capturing latest user message
- Append memory blocks to end of system prompt instead of prepending
- Skip empty description tags in memory block formatting
🐙 Generated with [Letta Code](https://letta.com)
Co-authored-by: Letta <noreply@letta.com>
* fix: clear message history no longer deletes messages
* toast and make it stay for 8 secs
* fix test
---------
Co-authored-by: Ari Webb <ari@letta.com>
- Forward all incoming headers from client to Anthropic API
- Extract header preparation logic into prepare_anthropic_headers() helper
- Filter out hop-by-hop headers and authorization header
- Only add fallback API key if client doesn't provide one
🐙 Generated with [Letta Code](https://letta.com)
Co-authored-by: Letta <noreply@letta.com>
- Update memory injection to use Letta XML format with memory_blocks tags
- Extract memory formatting into format_memory_blocks() helper function
🐙 Generated with [Letta Code](https://letta.com)
Co-authored-by: Letta <noreply@letta.com>
* trying tout gpt-5.1-codex
* add unit test for message content
* try to support multimodal
* remove ValueError and add logging on stream error
* prevent stream termination from api spec implementation errors
* fix: remove final_response references from non-Responses API interfaces
* fix: add diagnostic attributes to SimpleOpenAIResponsesStreamingInterface
* fix: remove final_response from SimpleOpenAIStreamingInterface (Chat Completions API)