Skip to content

fix: log LLM error response bodies#2012

Draft
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/log-llm-error-response-body
Draft

fix: log LLM error response bodies#2012
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/log-llm-error-response-body

Conversation

@RerankerGuo

Copy link
Copy Markdown

Fixes #1775.

Summary

  • Include a truncated response body in LLM JSON non-2xx warning logs.
  • Add a matching warning log for non-2xx streaming LLM responses before throwing.
  • Keep the thrown MemosError details unchanged while making provider rejection details visible in logs.
  • Add regression tests for JSON and streaming non-ok response logging.

Validation

  • npm test -- --run tests/unit/llm/fetcher.test.ts
  • npm run lint
  • Attempted: make format; blocked because poetry is not installed in this environment.

@Memtensor-AI Memtensor-AI changed the base branch from main to dev-v2.0.22 July 1, 2026 13:14
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: ENVIRONMENT FAILURE

Cloud test-engine rerun against dev-v2.0.22 did not produce a reliable code verdict because the cloud environment failed before executable test phases completed.

  • Run: tr-f415ef73-834 on cloud test-engine 10010
  • Raw verdict: fail_code_bug
  • Summary: Tests failed. Failed cases:

This should be retried after the cloud dependency cache is healthy; do not treat it as proof of a code bug.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: ENVIRONMENT RETRY

The previous cloud run failed before executable test phases because dependency environment preparation did not complete. The shared memos-local-plugin dependency cache is now present on the cloud test-engine host, so this PR has been requeued.

  • Retry run: tr-73877358-8e7 on cloud test-engine 10010
  • Branch tested: refs/pull/2012/head

I will post the final pass/fail result when this retry completes.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: PASSED

Cloud test-engine rerun against dev-v2.0.22 completed successfully.

  • Run: tr-73877358-8e7 on cloud test-engine 10010
  • memos_local_plugin/unit: 12 passed, 0 failed, 0 skipped

Manual code review is still required before merge.

@CarltonXiang CarltonXiang deleted the branch MemTensor:main July 3, 2026 07:25
@syzsunshine219 syzsunshine219 reopened this Jul 3, 2026
@syzsunshine219 syzsunshine219 added the needs-audit Requires manual audit before merge label Jul 3, 2026
@syzsunshine219 syzsunshine219 changed the base branch from dev-v2.0.22 to main July 3, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-audit Requires manual audit before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LLM provider 400 errors from SiliconFlow + missing response body logging (memos-local-plugin)

4 participants