Repository navigation
fix(llms): parse Titan results outputText - #7343
aniruddhaadak80 wants to merge 1 commit into
Conversation
Closes mem0ai#7336 Legacy amazon branch read completion which Titan never returns. Read results[0].outputText first, keep completion fallback.
|
Thanks for taking the time to open this. We only review pull requests that fix an issue we have already agreed to take on, so this one is closed for now. To get it reviewed:
Issue already labeled Documentation-only changes skip this gate entirely. See CONTRIBUTING.md for the full policy. |
|
Hi @aniruddhaadak80, thanks for opening this pull request. This is just a soft check: you are not yet in this repo's vouched contributor list ( A maintainer can vouch for you by commenting |
Linked Issue
Closes #7336
Description
Legacy
amazon(Titan)invoke_modelresponses always parsed to"", causing silent memory loss inMemory.add(). The request builder sends Titan shape (inputText/textGenerationConfig) but_parse_responseread top-levelcompletion, which Titan never returns (AWS shape isresults[0].outputText). This PR readsresults[0].outputTextfirst and keepscompletionas fallback for compat; empty/missing still returns"". Nova path untouched.Type of Change
AI Assistance
No AI assistance
AI-assisted (autocomplete, or I asked a model questions while writing this)
AI-generated (an agent wrote most or all of this diff)
I can explain every line of this diff and how it interacts with the rest of the codebase, without asking an AI tool.
Tool: Muse Spark (OpenCode). I verified the repro before/after, ran targeted pytest, and ran ruff check locally.
Breaking Changes
N/A
Test Coverage
Titan body → "Hi from Titan" (
test_titan_results_output_text,test_titan_generate_response); Novacontent[0].textunchanged (test_nova_content_unchanged); missing/empty →""; legacycompletionfallback kept.pytest tests/llms/test_aws_bedrock.py -v: 58 passed.ruff checkclean. New tests fail without fix (''vs'Hi from Titan').Checklist